summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-25tmdate(1): fix missing arg, fix formatting (thanks joe9)Ori Bernstein
2020-09-25mergeOri Bernstein
2020-09-25tmdate(2): fix mistakes in prototype (thanks moody)Ori Bernstein
2020-09-25aux/acpi: connect EC region handler, fixes battery status on eeepc 1000px ↵Sigrid
(thanks Peter Kosyh)
2020-09-23syscall: fix build problem caused by stale tab.hkvik
Recently the script which generates tab.h and the code including it got incompatibly changed. People reported problems involving syntax errors when trying to rebuild the system following a sysupdate. The problem was with the script being embedded within a mkfile rule, meaning that mk didn't notice it changing and therefore didn't rebuild the target file. For people who were rebuilding the system this meant that the old tab.h got included, causing syntax errors. This patch moves the codegen script into a file and tells mk about this new dependency, so that tab.h will get rebuilt for everyone. I also took an opportunity to rewrite the script, hopefuly making it easier to follow.
2020-09-23ftpd: handle "allo" command by treating it as a no-opAlex Musolino
RFC959 says: "The ALLO command should be treated as a NOOP (no operation) by those servers which do not require that the maximum size of the file be declared beforehand..."
2020-09-22libc: ignore '?' in date format stringsOri Bernstein
Ignoring '?' when formatting date strings allows the format strings to be reused for parsing. This is convenient, since we don't need to duplicate the format strings.
2020-09-22libc: make yday 0-based, as docs suggestOri Bernstein
Tm.yday is docuemnted as being 0-based, and our new api should respect that. Fix the code so that this is true.
2020-09-22acme: import changes from plan9port (thanks jxy)Ori Bernstein
Import the following improvements and bugfixes from plan9port: 4650064a acme: scale window bodies on resize, not including tag space d28913a9 acme: save/restore multiline tags in Dump/Load d2df5d6c acme: fix crash in X |cat with multiple windows 3d6e5cb5 acme: preserve window position and selection during Get
2020-09-21ape/limits.h: fix typo in (U)LLONG_MAXOri Bernstein
Fix missing 'L' in the size suffix, so we were overflowing the maximum size.
2020-09-21diff: support unified diff via -uOri Bernstein
The format produced by `diff -u` is inferior to that produced by `diff -c`, but it's what ape/patch and unix patch expect, so it's useful to generate it. This patch adds `diff -u`.
2020-09-20syscall: utility overhaulkvik
Following is a list of functional changes: * The -o flag outputs the entire buffer to the length returned by the syscall, or, in case of fd2path(2) and errstr(2), to '\0'. * The -x flag is removed; the above makes it possible to pipe into xd(1) to get the same result. * The -s flag uses dirfmt(2) to format the stat message, instead of trying to imitate ls(1). * Stderr reports are normalized and made easier to parse. The code also suffered a number of stylistic changes.
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