1 #ifndef _LIBFSDRIVER_FSDRIVER_H 2 #define _LIBFSDRIVER_FSDRIVER_H 3 4 #include <minix/drivers.h> 5 #include <minix/fsdriver.h> 6 #include <minix/vfsif.h> 7 8 #define ROOT_UID 0 /* user ID of superuser */ 9 10 extern int fsdriver_putnode(const struct fsdriver * __restrict, 11 const message * __restrict, message * __restrict); 12 extern int fsdriver_slink(const struct fsdriver * __restrict, 13 const message * __restrict, message * __restrict); 14 extern int fsdriver_trunc(const struct fsdriver * __restrict, 15 const message * __restrict, message * __restrict); 16 extern int fsdriver_chown(const struct fsdriver * __restrict, 17 const message * __restrict, message * __restrict); 18 extern int fsdriver_chmod(const struct fsdriver * __restrict, 19 const message * __restrict, message * __restrict); 20 extern int fsdriver_inhibread(const struct fsdriver * __restrict, 21 const message * __restrict, message * __restrict); 22 extern int fsdriver_stat(const struct fsdriver * __restrict, 23 const message * __restrict, message * __restrict); 24 extern int fsdriver_utime(const struct fsdriver * __restrict, 25 const message * __restrict, message * __restrict); 26 extern int fsdriver_statvfs(const struct fsdriver * __restrict, 27 const message * __restrict, message * __restrict); 28 extern int fsdriver_bread(const struct fsdriver * __restrict, 29 const message * __restrict, message * __restrict); 30 extern int fsdriver_bwrite(const struct fsdriver * __restrict, 31 const message * __restrict, message * __restrict); 32 extern int fsdriver_unlink(const struct fsdriver * __restrict, 33 const message * __restrict, message * __restrict); 34 extern int fsdriver_rmdir(const struct fsdriver * __restrict, 35 const message * __restrict, message * __restrict); 36 extern int fsdriver_unmount(const struct fsdriver * __restrict, 37 const message * __restrict, message * __restrict); 38 extern int fsdriver_sync(const struct fsdriver * __restrict, 39 const message * __restrict, message * __restrict); 40 extern int fsdriver_newdriver(const struct fsdriver * __restrict, 41 const message * __restrict, message * __restrict); 42 extern int fsdriver_flush(const struct fsdriver * __restrict, 43 const message * __restrict, message * __restrict); 44 extern int fsdriver_read(const struct fsdriver * __restrict, 45 const message * __restrict, message * __restrict); 46 extern int fsdriver_write(const struct fsdriver * __restrict, 47 const message * __restrict, message * __restrict); 48 extern int fsdriver_mknod(const struct fsdriver * __restrict, 49 const message * __restrict, message * __restrict); 50 extern int fsdriver_mkdir(const struct fsdriver * __restrict, 51 const message * __restrict, message * __restrict); 52 extern int fsdriver_create(const struct fsdriver * __restrict, 53 const message * __restrict, message * __restrict); 54 extern int fsdriver_link(const struct fsdriver * __restrict, 55 const message * __restrict, message * __restrict); 56 extern int fsdriver_rename(const struct fsdriver * __restrict, 57 const message * __restrict, message * __restrict); 58 extern int fsdriver_lookup(const struct fsdriver * __restrict, 59 const message * __restrict, message * __restrict); 60 extern int fsdriver_mountpoint(const struct fsdriver * __restrict, 61 const message * __restrict, message * __restrict); 62 extern int fsdriver_readsuper(const struct fsdriver * __restrict, 63 const message * __restrict, message * __restrict); 64 extern int fsdriver_newnode(const struct fsdriver * __restrict, 65 const message * __restrict, message * __restrict); 66 extern int fsdriver_rdlink(const struct fsdriver * __restrict, 67 const message * __restrict, message * __restrict); 68 extern int fsdriver_getdents(const struct fsdriver * __restrict, 69 const message * __restrict, message * __restrict); 70 extern int fsdriver_peek(const struct fsdriver * __restrict, 71 const message * __restrict, message * __restrict); 72 extern int fsdriver_bpeek(const struct fsdriver * __restrict, 73 const message * __restrict, message * __restrict); 74 75 extern int fsdriver_getname(endpoint_t endpt, cp_grant_id_t grant, size_t len, 76 char *name, size_t size, int not_empty); 77 78 extern dev_t fsdriver_device; 79 extern ino_t fsdriver_root; 80 extern int fsdriver_mounted; 81 extern int (*fsdriver_callvec[])(const struct fsdriver * __restrict, 82 const message * __restrict, message * __restrict); 83 84 #endif /* !_LIBFSDRIVER_FSDRIVER_H */ 85