diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/srv.c | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/srv.c')
-rw-r--r-- | src/cmd/srv.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cmd/srv.c b/src/cmd/srv.c index e53c99c8..c4e79cc4 100644 --- a/src/cmd/srv.c +++ b/src/cmd/srv.c @@ -30,7 +30,7 @@ threadmain(int argc, char **argv) fmtinstall('F', fcallfmt); fmtinstall('M', dirmodefmt); - + ARGBEGIN{ case 'D': debug = 1; @@ -51,7 +51,7 @@ threadmain(int argc, char **argv) default: usage(); }ARGEND - + if(argc != 1 && argc != 2) usage(); @@ -80,7 +80,7 @@ do9p(Fcall *tx, Fcall *rx) static uchar buf[9000]; static char ebuf[200]; int n; - + n = convS2M(tx, buf, sizeof buf); if(n == BIT16SZ){ werrstr("convS2M failed"); @@ -133,7 +133,7 @@ xauth(void) if(rx.type == Rerror) sysfatal("Tversion: %s", rx.ename); msize = rx.msize; - + tx.type = Tauth; tx.tag = 1; tx.afid = afid; @@ -154,7 +154,7 @@ int xread(void *buf, int n) { Fcall tx, rx; - + tx.type = Tread; tx.tag = 1; tx.fid = 0; /* afid above */ @@ -165,7 +165,7 @@ xread(void *buf, int n) werrstr("%s", rx.ename); return -1; } - + if(rx.count > n){ werrstr("too much data returned"); return -1; @@ -178,7 +178,7 @@ int xwrite(void *buf, int n) { Fcall tx, rx; - + tx.type = Twrite; tx.tag = 1; tx.fid = 0; /* afid above */ @@ -354,4 +354,3 @@ xauth_proxy(AuthGetkey *getkey, char *fmt, ...) auth_freerpc(rpc); return ai; } - |