2 enum { FD_NONE
, FD_PIPE
, FD_INODE
} type
;
3 int ref
; // reference count
12 // in-core file system types
15 uint dev
; // Device number
16 uint inum
; // Inode number
17 int ref
; // Reference count
18 int flags
; // I_BUSY, I_VALID
20 short type
; // copy of disk inode
25 uint addrs
[NDIRECT
+1];
32 // device implementations
35 int (*read
)(struct inode
*, char*, int);
36 int (*write
)(struct inode
*, char*, int);
39 extern struct devsw devsw
[];