Changeset View
Changeset View
Standalone View
Standalone View
stand/libsa/stand.h
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | struct fs_ops { | ||||
int (*fo_close)(struct open_file *f); | int (*fo_close)(struct open_file *f); | ||||
int (*fo_read)(struct open_file *f, void *buf, | int (*fo_read)(struct open_file *f, void *buf, | ||||
size_t size, size_t *resid); | size_t size, size_t *resid); | ||||
int (*fo_write)(struct open_file *f, const void *buf, | int (*fo_write)(struct open_file *f, const void *buf, | ||||
size_t size, size_t *resid); | size_t size, size_t *resid); | ||||
off_t (*fo_seek)(struct open_file *f, off_t offset, int where); | off_t (*fo_seek)(struct open_file *f, off_t offset, int where); | ||||
int (*fo_stat)(struct open_file *f, struct stat *sb); | int (*fo_stat)(struct open_file *f, struct stat *sb); | ||||
int (*fo_readdir)(struct open_file *f, struct dirent *d); | int (*fo_readdir)(struct open_file *f, struct dirent *d); | ||||
int (*fo_preload)(struct open_file *f); | |||||
int (*fo_mount)(const char *, const char *, void **); | int (*fo_mount)(const char *, const char *, void **); | ||||
int (*fo_unmount)(const char *, void *); | int (*fo_unmount)(const char *, void *); | ||||
}; | }; | ||||
/* | /* | ||||
* libstand-supplied filesystems | * libstand-supplied filesystems | ||||
*/ | */ | ||||
extern struct fs_ops ufs_fsops; | extern struct fs_ops ufs_fsops; | ||||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | |||||
/* NOT IMPLEMENTED */ | /* NOT IMPLEMENTED */ | ||||
#define O_CREAT 0x0200 /* create if nonexistent */ | #define O_CREAT 0x0200 /* create if nonexistent */ | ||||
#define O_TRUNC 0x0400 /* truncate to zero length */ | #define O_TRUNC 0x0400 /* truncate to zero length */ | ||||
extern int close(int); | extern int close(int); | ||||
extern void closeall(void); | extern void closeall(void); | ||||
extern ssize_t read(int, void *, size_t); | extern ssize_t read(int, void *, size_t); | ||||
extern ssize_t write(int, const void *, size_t); | extern ssize_t write(int, const void *, size_t); | ||||
extern struct dirent *readdirfd(int); | extern struct dirent *readdirfd(int); | ||||
extern void preload(int); | |||||
extern void srandom(unsigned int); | extern void srandom(unsigned int); | ||||
extern long random(void); | extern long random(void); | ||||
/* imports from stdlib, locally modified */ | /* imports from stdlib, locally modified */ | ||||
extern char *optarg; /* getopt(3) external variables */ | extern char *optarg; /* getopt(3) external variables */ | ||||
extern int optind, opterr, optopt, optreset; | extern int optind, opterr, optopt, optreset; | ||||
extern int getopt(int, char * const [], const char *); | extern int getopt(int, char * const [], const char *); | ||||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |