Changeset View
Changeset View
Standalone View
Standalone View
head/stand/libsa/stand.h
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
* filesystems that they require. | * filesystems that they require. | ||||
*/ | */ | ||||
struct fs_ops { | struct fs_ops { | ||||
const char *fs_name; | const char *fs_name; | ||||
int (*fo_open)(const char *path, struct open_file *f); | int (*fo_open)(const char *path, struct open_file *f); | ||||
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, 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); | ||||
}; | }; | ||||
/* | /* | ||||
* libstand-supplied filesystems | * libstand-supplied filesystems | ||||
▲ Show 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | |||||
/* null functions for device/filesystem switches (undocumented) */ | /* null functions for device/filesystem switches (undocumented) */ | ||||
extern int nodev(void); | extern int nodev(void); | ||||
extern int noioctl(struct open_file *, u_long, void *); | extern int noioctl(struct open_file *, u_long, void *); | ||||
extern void nullsys(void); | extern void nullsys(void); | ||||
extern int null_open(const char *path, struct open_file *f); | extern int null_open(const char *path, struct open_file *f); | ||||
extern int null_close(struct open_file *f); | extern int null_close(struct open_file *f); | ||||
extern int null_read(struct open_file *f, void *buf, size_t size, size_t *resid); | extern int null_read(struct open_file *f, void *buf, size_t size, size_t *resid); | ||||
extern int null_write(struct open_file *f, void *buf, size_t size, size_t *resid); | extern int null_write(struct open_file *f, const void *buf, size_t size, size_t *resid); | ||||
extern off_t null_seek(struct open_file *f, off_t offset, int where); | extern off_t null_seek(struct open_file *f, off_t offset, int where); | ||||
extern int null_stat(struct open_file *f, struct stat *sb); | extern int null_stat(struct open_file *f, struct stat *sb); | ||||
extern int null_readdir(struct open_file *f, struct dirent *d); | extern int null_readdir(struct open_file *f, struct dirent *d); | ||||
/* | /* | ||||
* Machine dependent functions and data, must be provided or stubbed by | * Machine dependent functions and data, must be provided or stubbed by | ||||
* the consumer | * the consumer | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |