qio: Fix minor bugs
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 21 Sep 2016 17:59:19 +0000 (13:59 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 21 Sep 2016 21:27:46 +0000 (17:27 -0400)
commit18d20e9b5838941b2ea2a07331cf98086c45873c
treea1aab48a611596c0391947086d017c6bcfa352f2
parent06f0e9220bacb17c3509b39c9352e2a1f28c678b
qio: Fix minor bugs

Changing the state is racy, since it could muck with the receive path code
that also toggles flags.  If you made a qnonblock() call at the same time
as a qbread/qbwrite that changed the state flags, you could corrupt the
flags.

n -> len wouldn't even compile.

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