Fix Plan 9 partial write() return values
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 25 May 2017 20:07:33 +0000 (16:07 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 25 May 2017 20:07:33 +0000 (16:07 -0400)
commit395ce5721d96b8620e6276ceecc9112364b82bb5
tree46fcdefd6e6ed31b33baae62d789a984abed8926
parenta3c78e2ad40633caa59e6ccad79eb1ede8d34927
Fix Plan 9 partial write() return values

We were returning the value that the user attempted to write, not the
amount that actually made it.

Note that the proper way for a device to return -1 is to throw an error(),
which we catch in rwrite().  If a device's write method actually returns
-1, that'll screw things up.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/sysfile.c