Properly report readable/writable in pipestat()
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 1 Dec 2016 18:29:05 +0000 (13:29 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 7 Dec 2016 22:46:48 +0000 (14:46 -0800)
commitce72b478929a089edef2ab0c4798dc008793102b
treee916cfd25af8c86f0e75ea0755823c2bf8407dc9
parent265ab3aa436517534dfe3ca95f4fa3c5f19258b0
Properly report readable/writable in pipestat()

This caused select() (which calls fstat()) to think that some files were
writable when they weren't.  If the pipe had a lot of bidirection space,
you won't notice.  We'd only notice the problem if one side was clogged.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/pipe.c