summaryrefslogtreecommitdiff
path: root/file.h
blob: 99f0122a6cb4f37d8925a2ae4606b847d8bd1cde (plain)
1
2
3
4
5
6
7
8
9
struct file {
  enum { FD_CLOSED, FD_NONE, FD_PIPE, FD_INODE } type;
  int ref; // reference count
  char readable;
  char writable;
  struct pipe *pipe;
  struct inode *ip;
  uint off;
};