summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-17upas/fs: fix handing of multi-line header fields (thanks theinicke)Ori Bernstein
Right now, upasfs exposes header lines as is, without stripping out new lines. It also documents that it provides one header per line in the info file. As a result, when we get a mail with headers that span lines, our tools get confused. These split lines are not semantically meaningful. From RFC5322: 2.2.3. Long Header Fields Each header field is logically a single line of characters comprising the field name, the colon, and the field body. For convenience however, and to deal with the 998/78 character limitations per line, the field body portion of a header field can be split into a multiple-line representation; this is called "folding". The general rule is that wherever this specification allows for folding white space (not simply WSP characters), a CRLF may be inserted before any WSP. As a result, to simplify processing, we should just strip out the line separators when exposing the headers from upasfs.
2020-09-16ptrap: fix /env/status always being set on main process exitBurnZeZ
2020-09-16syscall: don't append '\n' to the outputkvik
2020-09-16window: fix error exit with the -m flagkvik
When called with the -m flag window would always exit with some error, usually status='no match', because of an if-match being the last status-setting command in the script.
2020-09-16win: fix window recreation commandkvik
2020-09-14/lib/rob, /lib/rsc, /lib/theo: So it sounds like everyone is in favor of the ↵stanley lieber
entire generics proposal and all the semantics, and all we have left to hammer out is the bracket characters? Do I have that right?
2020-09-13mergecinap_lenrek
2020-09-13kernel: massive pci code rewritecinap_lenrek
The new pci code is moved to port/pci.[hc] and shared by all ports. Each port has its own PCI controller implementation, providing the pcicfgrw*() functions for low level pci config space access. The locking for pcicfgrw*() is now done by the caller (only port/pci.c). Device drivers now need to include "../port/pci.h" in addition to "io.h". The new code now checks bridge windows and membars, while enumerating the bus, giving the pc driver a chance to re-assign them. This is needed because some UEFI implementations fail to assign the bars for some devices, so we need to do it outselfs. (See pcireservemem()). While working on this, it was discovered that the pci code assimed the smallest I/O bar size is 16 (pcibarsize()), which is wrong. I/O bars can be as small as 4 bytes. Bit 1 in an I/O bar is also reserved and should be masked off, making the port mask: port = bar & ~3;
2020-09-13games/4s: increase thread size (thanks majiru)Ori Bernstein
It seems like on amd64, we're overflowing the stack. Let's not do that.
2020-09-12faces: remove log supportOri Bernstein
Use a damn plumber, you animals!
2020-09-12tmdate(1): document tz fieldOri Bernstein
2020-09-10ctime(2), tmdate(2): document ctime/tmparse incompatibilityOri Bernstein
Tmparse and ctime don't mix. The timezone name may be too long for the number of characters ctime mandates. Document this footgun.
2020-09-07tmdate(2): one more typoOri Bernstein
no more top arse. only bottom arse.
2020-09-07tmdate(2): fix examples, stale references (thanks deuteron)Ori Bernstein
There were a number of ideas that were tried out as the tmdate api evolved. As a result, there were some references in the manpage to things that are no more. Fix them.
2020-09-07tmdate(2): fix name of tm structOri Bernstein
There was a leftover from when this library was separate with different types.
2020-09-06etheriwl: add support for Intel Wireless AC 8265cinap_lenrek
2020-09-06wifi: add packet timestamping supportcinap_lenrek
2020-09-03walk(1): improve wording, formattingOri Bernstein
Clean up the wording of the walk(1) manpage, improve the formatting of the format characters.
2020-09-01tmparse: put in local timezone hackOri Bernstein
Ctime is defined as printing a 3-character timezone name. The timezone name is ambiguous. For example, EST refers to both Australian and American eastern time. On top of that, we don't want to make the tzabbrev table exhaustive. So, we put in this hack: Before we consult the well known table of timezones, we check if the local time matches the timezone name. On top of that, tm2sec If you want unambiguous timezone parsing, use numeric timezone offsets (Z, ZZ formats).
2020-09-01seconds: tolerate trailing whitespace in datesOri Bernstein
This allows handling dates with leading and trailing whitespace, including newlines.
2020-09-01upas: appendfolder() don't be picky about the timezone of ctime()cinap_lenrek
This is temporary fix, we should try to emulate the previous behaviour where we accept at least our local timezone, and otherwise ignore the offset.
2020-09-01upas: appendfolder(): skip the address from unix header before datecinap_lenrek
2020-09-01upas/fs: extract proper date from unix headercinap_lenrek
do not try to parse the m->unixfrom field, it only contains the unix mail address. instead, have parseunix() save a pointer into the unixheader after the unix mail address for the unixdate, and later use it to derive the mails timestamp.
2020-09-01upas/fs: remove unused function date822tounixAlex Musolino
2020-09-01png: remove bogus chanlen warningAlex Musolino
2020-08-29ape/ctype.h: add isblank, fix functions (thanks staalmannen)Ori Bernstein
Our ctype.h mistakenly ommitted isblank. Add it in. While we're here, the make the 'isfoo()' functions are broken: they're offsetting into the array, and don't work with negative character values. Sync the function bodies with the macros, and make them produce correct results.
2020-08-29walk(1): fix typoAlex Musolino
2020-08-27faces(1): remove bespoke date parserOri Bernstein
In addition to being more code, this date parser would treat local times as local, but anything that wasn't a local time would get parsed as gmt, due to a quirk of how tm2sec used to work. This moves the code to tmparse, and fixes timezone parsing at the same time.
2020-08-26walk(1): clarify how -n argument works (thanks umbraticus)Ori Bernstein
Make it clear what happens if you omit the ',' when specifying '-n'.
2020-08-26tmparse: fix typoOri Bernstein
2020-08-26libc: tmparse should ignore leading whitespaceOri Bernstein
We almost always want to skip leading whitespace in time formats, so make tmparse just do it. This fixes upas mbox parsing, which leaves a leading whitespace at the start of the date.
2020-08-25getwd(2): add reference to chdir(2) in SEE ALSO sectionAlex Musolino
2020-08-25chdir(2): add reference to getwd(2) in SEE ALSO sectionAlex Musolino
2020-08-24tm2sec: clear new fields in tmOri Bernstein
Old users of the time APIs would hand-craft time structs without first zeroing all the members. When this got into tmnorm(), we would try to access the new members, and things would go off the rails. This makes tm2sec() clear the new fields before passing them to the new APIs, so that the hand-crafted structs remain valid.
2020-08-23nusb/lib: use fmtprint for the entire dump to be printed outSigrid
2020-08-23kernel: fix Abind cyclic reference and mounthead leaks (thanks Alex Musolino)cinap_lenrek
The Abind case in namec() needs to cunique() the chan before attaching the umh mount head pointer onto it. This is because we cannot give a reference to the mount head to any of the mh->mount...->to channels, as they will never go away until the mount head goes away. This is a cyclic reference. This could be reproduced with: @{rfork n; mount -a '#s/boot' /mnt/root; bind /mnt/root /} Also, fix memory leaks around cunique(), which can error, leaking the mount head we got from domount(). Move the umh != nil check inside cunique().
2020-08-21torrent(1): update url in examples sectionAlex Musolino
2020-08-20ip(3): fix typo in manpage (thanks jstsmthrgk)Ori Bernstein
2020-08-20libaml: fix fault when the second operand of comparison cannot be convertedSigrid
2020-08-18oggdec: give it enough chance to seek from the start, where first seek might ↵Sigrid
be still too close to the beginning of the file
2020-08-12audio/oggdec: allow -s 0Sigrid
2020-08-12audio/mp3dec: mad timer duration is all wrong, use samples insteadSigrid
2020-08-12audio/mp3dec: add -s SECONDS optionSigrid
2020-08-11audio(1): add new -s SECONDS optionSigrid
2020-08-11audio/oggdec: add -s SECONDS option to seek before decodingSigrid
2020-08-11audio/flacdec: add -s SECONDS option to seek before decodingSigrid
2020-08-10tmdate(2): fix typo (thanks mveety)Ori Bernstein
sysfata => sysfatal
2020-08-10stdio.h: correct return type of putcOri Bernstein
The putc macro is specified as returning an int, but our type conversion rules turned it into a uint. Put in the appropriate cast to make the type what we want.
2020-08-10aux/ms2, aux/na: fix warningsOri Bernstein
aux/na was comparing the return of putc with <0, when it should have been comparing against EOF, which is not specified as -ve. aux/ms2 was zero-extending the mask for the address when it should have been sign extended.
2020-08-10seconds: use new libc date apiOri Bernstein