summaryrefslogtreecommitdiff
path: root/sys/src/cmd/plumb/fsys.c
AgeCommit message (Collapse)Author
2021-09-10plumber: remove $plumbsrv, add optional srvname, usage checkqwx
Plumber both posts a service to /srv and sets a $plumbsrv environment variable. Our libplumb no longer uses $plumbsrv and nothing else does. It's a silly hack; rc doesn't update /env immediately, and scripts, which for instance set up subrios, cannot rely on it to clean up the plumber at the end. Instead, add the option to specify a srvname, actually check for some common errors and print a usage string. Thanks to Ori for input and a preliminary patch.
2020-12-28plumber: don't leak srvfd file descriptor into sub processescinap_lenrek
Put OCEXEC flag on the srvfd so it wont be leaked on sub-processes we spawn from plumb rules.
2020-08-01pre-lib9p servers: fix incorrect Tversion handlingkvik
version(5) says: If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters ``unknown''. Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror. lib9p(2) follows the above spec, although ignoring the next part concerning comparison after period-stripping. It assumes an Fcall.version starting with "9P" is correctly formed and returns the only supported version of the protocol, which seems alright. This patch brings pre-lib9p servers in accordance with the spec.
2020-05-02make bind(2) error handling consistentcinap_lenrek
The mount() and bind() syscalls return -1 on error, and the mountid sequence number on success. The manpage states that the mountid sequence number is a positive integer, but the kernels implementation currently uses a unsigned 32-bit integer and does not guarantee that the mountid will not become negative. Most code just cares about the error, so test for the -1 error value only.
2018-10-11plumber: fix memory and filedescriptor leaks (thanks BurnZeZ)cinap_lenrek
2016-07-24make error handling in 9p service loops consistentcinap_lenrek
when we get eof, stop the loop immidiately and do not rely on the read to eventually return an error. when convM2S() fails to decode the message, error out and stop the loop. there is no point in continuing.
2013-06-16make filesystem handling of read9pmsg() consistentcinap_lenrek
2012-03-09plumber: use 16K stack, make libplumb thread safecinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen