… | |
… | |
76 | /* using "typical" values in the hope that the compiler will do something sensible */ |
76 | /* using "typical" values in the hope that the compiler will do something sensible */ |
77 | enum eio_dtype { |
77 | enum eio_dtype { |
78 | EIO_DT_UNKNOWN = 0, |
78 | EIO_DT_UNKNOWN = 0, |
79 | EIO_DT_FIFO = 1, |
79 | EIO_DT_FIFO = 1, |
80 | EIO_DT_CHR = 2, |
80 | EIO_DT_CHR = 2, |
81 | EIO_DT_MPC = 3, /* multiplexed char device (v7+Coherent) */ |
81 | EIO_DT_MPC = 3, /* multiplexed char device (v7+coherent) */ |
82 | EIO_DT_DIR = 4, |
82 | EIO_DT_DIR = 4, |
83 | EIO_DT_NAM = 5, /* xenix special named file */ |
83 | EIO_DT_NAM = 5, /* xenix special named file */ |
84 | EIO_DT_BLK = 6, |
84 | EIO_DT_BLK = 6, |
85 | EIO_DT_MPB = 7, /* multiplexed block device (v7+coherent) */ |
85 | EIO_DT_MPB = 7, /* multiplexed block device (v7+coherent) */ |
86 | EIO_DT_REG = 8, |
86 | EIO_DT_REG = 8, |
… | |
… | |
89 | EIO_DT_LNK = 10, |
89 | EIO_DT_LNK = 10, |
90 | /* DT_SHAD = 11,*/ |
90 | /* DT_SHAD = 11,*/ |
91 | EIO_DT_SOCK = 12, |
91 | EIO_DT_SOCK = 12, |
92 | EIO_DT_DOOR = 13, /* solaris door */ |
92 | EIO_DT_DOOR = 13, /* solaris door */ |
93 | EIO_DT_WHT = 14, |
93 | EIO_DT_WHT = 14, |
94 | EIO_DT_MAX = 15 /* highest DT_VALUE ever, hopefully */ |
94 | EIO_DT_MAX = 15 /* highest DT_VALUE ever, hopefully */ |
95 | }; |
95 | }; |
96 | |
96 | |
97 | struct eio_dirent { |
97 | struct eio_dirent { |
98 | char *name; |
98 | int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */ |
99 | ino_t inode; |
99 | unsigned short namelen; /* size of filename without trailing 0 */ |
100 | unsigned short namelen; |
100 | unsigned char type; /* one of EIO_DT_* */ |
101 | unsigned char type; |
|
|
102 | unsigned char score; /* internal use */ |
101 | signed char score; /* internal use */ |
103 | /* 0-4 bytes padding */ |
102 | ino_t inode; /* the inode number, if available, otherwise unspecified */ |
104 | }; |
103 | }; |
105 | |
104 | |
106 | /* eio_sync_file_range flags */ |
105 | /* eio_sync_file_range flags */ |
107 | |
106 | |
108 | enum { |
107 | enum { |
… | |
… | |
142 | eio_req volatile *next; /* private ETP */ |
141 | eio_req volatile *next; /* private ETP */ |
143 | |
142 | |
144 | ssize_t result; /* result of syscall, e.g. result = read (... */ |
143 | ssize_t result; /* result of syscall, e.g. result = read (... */ |
145 | off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset */ |
144 | off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset */ |
146 | size_t size; /* read, write, readahead, sendfile, msync, sync_file_range: length */ |
145 | size_t size; /* read, write, readahead, sendfile, msync, sync_file_range: length */ |
147 | void *ptr1; /* all applicable requests: pathname, old name; readdir: possible output memory buffer */ |
146 | void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */ |
148 | void *ptr2; /* all applicable requests: new name or memory buffer */ |
147 | void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */ |
149 | eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ |
148 | eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ |
150 | eio_tstamp nv2; /* utime, futime: mtime */ |
149 | eio_tstamp nv2; /* utime, futime: mtime */ |
151 | |
150 | |
152 | int type; /* EIO_xxx constant ETP */ |
151 | int type; /* EIO_xxx constant ETP */ |
153 | int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, readdir: flags */ |
152 | int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, readdir: flags */ |