Add a chan_ctl devop; support fcntl on chans
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 31 Mar 2016 19:10:23 +0000 (15:10 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 31 Mar 2016 20:53:42 +0000 (16:53 -0400)
commit3d0c515443c7b2c10229521c8deec3fb37022f44
tree8b39302268efbf82457cb38e0b3079510b83505e
parentb19548e77b7b4f54b92ad3a9b11e59d8b00d0070
Add a chan_ctl devop; support fcntl on chans

fcntl() works on chans.  A device can intercept the operation, do whatever
it needs to do, and optionally error out.  I imagine #devmnt will need to
send a new 9p message for this.

If there are no errors, the chan flags get updated (the CEXTERNAL_FLAGS).

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