Commit graph

7 commits

Author SHA1 Message Date
cinap_lenrek b5c7158f39 syscall: don't rely on . being in $path (thanks Silas) 2021-01-23 15:06:30 +01:00
kvik 2968225196 syscall: fix build problem caused by stale tab.h
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-23 17:17:52 +02:00
kvik aa7c8cac11 syscall: utility overhaul
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-20 14:49:12 +02:00
kvik be876a06ac syscall: don't append '\n' to the output 2020-09-16 13:18:43 +02:00
cinap_lenrek e7b94ba052 syscall: add missing _nsec() declaration 2014-05-20 05:21:22 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00