open_file
ret = open_file(context, f, min, max, NULL, NULL, stderr, 1);
ret = open_file(context, f, min, max, "/dev/console", "w", NULL, 0);
ret = open_file(context, f, min, max, fn, "a", file, keep_open);
ret = open_file(context, f, min, max, strdup(p + 7), "w", NULL, 0);
ret = open_file(context, &fd);
fd = open_file(fname);
fd = open_file(name);
struct open_file *f = fd2open_file(ctx->vec_fd);
net_open(struct open_file *f, ...)
net_close(struct open_file *f)
static int net_open(struct open_file *, ...);
static int net_close(struct open_file *);
devopen(struct open_file *f, const char *fname, const char **file)
devclose(struct open_file *f)
md_open(struct open_file *f, ...)
md_close(struct open_file *f)
static int md_open(struct open_file *, ...);
static int md_close(struct open_file *);
vdisk_open(struct open_file *f, ...)
vdisk_close(struct open_file *f)
vdisk_ioctl(struct open_file *f, u_long cmd, void *data)
static int vdisk_open(struct open_file *, ...);
static int vdisk_close(struct open_file *);
static int vdisk_ioctl(struct open_file *, u_long, void *);
efihttp_dev_open(struct open_file *f, ...)
efihttp_dev_close(struct open_file *f)
_efihttp_fs_open(const char *path, struct open_file *f)
static int efihttp_dev_open(struct open_file *f, ...);
static int efihttp_dev_close(struct open_file *f);
efihttp_fs_open(const char *path, struct open_file *f)
static int efihttp_fs_open(const char *path, struct open_file *f);
static int efihttp_fs_close(struct open_file *f);
efihttp_fs_close(struct open_file *f __unused)
static int efihttp_fs_read(struct open_file *f, void *buf, size_t size,
_efihttp_fs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
static int efihttp_fs_write(struct open_file *f, const void *buf, size_t size,
static off_t efihttp_fs_seek(struct open_file *f, off_t offset, int where);
static int efihttp_fs_stat(struct open_file *f, struct stat *sb);
static int efihttp_fs_readdir(struct open_file *f, struct dirent *d);
efihttp_fs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
efihttp_fs_write(struct open_file *f __unused, const void *buf __unused,
efihttp_fs_seek(struct open_file *f, off_t offset, int where)
efihttp_fs_stat(struct open_file *f, struct stat *sb)
efihttp_fs_readdir(struct open_file *f, struct dirent *d)
static int efipart_open(struct open_file *, ...);
static int efipart_close(struct open_file *);
static int efipart_ioctl(struct open_file *, u_long, void *);
efipart_open(struct open_file *f, ...)
efipart_close(struct open_file *f)
efipart_ioctl(struct open_file *f, u_long cmd, void *data)
static int bd_open(struct open_file *f, ...);
static int bd_close(struct open_file *f);
static int bd_ioctl(struct open_file *f, u_long cmd, void *data);
bd_open(struct open_file *f, ...)
bd_close(struct open_file *f)
bd_ioctl(struct open_file *f, u_long cmd, void *data)
hostdisk_open(struct open_file *f, ...)
hostdisk_close(struct open_file *f)
hostdisk_ioctl(struct open_file *f, u_long cmd, void *data)
static int hostdisk_open(struct open_file *f, ...);
static int hostdisk_close(struct open_file *f);
static int hostdisk_ioctl(struct open_file *f, u_long cmd, void *data);
hostfs_read(struct open_file *f, void *start, size_t size, size_t *resid)
hostfs_seek(struct open_file *f, off_t offset, int whence)
hostfs_stat(struct open_file *f, struct stat *sb)
hostfs_readdir(struct open_file *f, struct dirent *d)
host_dev_open(struct open_file *f, ...)
host_dev_close(struct open_file *f)
hostfs_open(const char *fn, struct open_file *f)
hostfs_close(struct open_file *f)
ofwd_open(struct open_file *f, ...)
ofwd_close(struct open_file *f)
ofwd_ioctl(struct open_file *f, u_long cmd, void *data)
static int ofwd_open(struct open_file *f, ...);
static int ofwd_close(struct open_file *f);
static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data);
bzf_open(const char *fname, struct open_file *f)
bzf_close(struct open_file *f)
bzf_read(struct open_file *f, void *buf, size_t size, size_t *resid)
bzf_rewind(struct open_file *f)
bzf_seek(struct open_file *f, off_t offset, int where)
bzf_stat(struct open_file *f, struct stat *sb)
struct open_file f;
static int bzf_open(const char *path, struct open_file *f);
static int bzf_close(struct open_file *f);
static int bzf_read(struct open_file *f, void *buf, size_t size, size_t *resid);
static off_t bzf_seek(struct open_file *f, off_t offset, int where);
static int bzf_stat(struct open_file *f, struct stat *sb);
susp_lookup_record(struct open_file *f, const char *identifier,
rrip_lookup_name(struct open_file *f, struct iso_directory_record *dp,
rrip_check(struct open_file *f, struct iso_directory_record *dp, int *lenskip)
dirmatch(struct open_file *f, const char *path, struct iso_directory_record *dp,
cd9660_read_dr(struct open_file *f, struct iso_directory_record *rec)
cd9660_open(const char *path, struct open_file *f)
cd9660_close(struct open_file *f)
buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
cd9660_read(struct open_file *f, void *start, size_t size, size_t *resid)
cd9660_readdir(struct open_file *f, struct dirent *d)
static int buf_read_file(struct open_file *f, char **buf_p,
static int cd9660_open(const char *path, struct open_file *f);
static int cd9660_close(struct open_file *f);
cd9660_seek(struct open_file *f, off_t offset, int where)
static int cd9660_read(struct open_file *f, void *buf, size_t size,
cd9660_stat(struct open_file *f, struct stat *sb)
static off_t cd9660_seek(struct open_file *f, off_t offset, int where);
static int cd9660_stat(struct open_file *f, struct stat *sb);
struct open_file *f;
static int cd9660_readdir(struct open_file *f, struct dirent *d);
static int dirmatch(struct open_file *f, const char *path,
static int rrip_check(struct open_file *f, struct iso_directory_record *dp,
static char *rrip_lookup_name(struct open_file *f,
static ISO_SUSP_HEADER *susp_lookup_record(struct open_file *f,
struct open_file *f, *last;
struct open_file *f;
noioctl(struct open_file *f __unused, u_long cmd __unused, void *data __unused)
struct open_file *fd = fs->fd;
dos_mount_impl(DOS_FS *fs, struct open_file *fd)
struct open_file *f;
dos_open(const char *path, struct open_file *fd)
dos_read(struct open_file *fd, void *buf, size_t nbyte, size_t *resid)
dos_seek(struct open_file *fd, off_t offset, int whence)
dos_close(struct open_file *fd)
dos_stat(struct open_file *fd, struct stat *sb)
static int dos_open(const char *path, struct open_file *fd);
static int dos_close(struct open_file *fd);
static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid);
dos_readdir(struct open_file *fd, struct dirent *d)
static off_t dos_seek(struct open_file *fd, off_t offset, int whence);
static int dos_stat(struct open_file *fd, struct stat *sb);
static int dos_readdir(struct open_file *fd, struct dirent *d);
struct open_file *fd; /* file descriptor */
static int ext2fs_readdir(struct open_file *f, struct dirent *d);
static int read_inode(ino_t inumber, struct open_file *f);
static int block_map(struct open_file *f, daddr_t file_block,
static int buf_read_file(struct open_file *f, char **buf_p,
static int search_directory(char *name, struct open_file *f,
ext2fs_open(const char *upath, struct open_file *f)
read_inode(ino_t inumber, struct open_file *f)
block_map(struct open_file *f, daddr_t file_block, daddr_t *disk_block_p)
buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
search_directory(char *name, struct open_file *f, ino_t *inumber_p)
ext2fs_close(struct open_file *f)
ext2fs_read(struct open_file *f, void *addr, size_t size, size_t *resid)
ext2fs_seek(struct open_file *f, off_t offset, int where)
ext2fs_stat(struct open_file *f, struct stat *sb)
ext2fs_readdir(struct open_file *f, struct dirent *d)
static int ext2fs_open(const char *path, struct open_file *f);
static int ext2fs_close(struct open_file *f);
static int ext2fs_read(struct open_file *f, void *buf,
static off_t ext2fs_seek(struct open_file *f, off_t offset, int where);
static int ext2fs_stat(struct open_file *f, struct stat *sb);
struct open_file *f;
struct open_file;
void geli_probe_and_attach(struct open_file *f);
geli_dev_open(struct open_file *f, ...)
geli_dev_close(struct open_file *f)
geli_dev_ioctl(struct open_file *f, u_long cmd, void *data)
geli_probe_and_attach(struct open_file *f)
static int geli_dev_open(struct open_file *f, ...);
static int geli_dev_close(struct open_file *f);
static int geli_dev_ioctl(struct open_file *, u_long, void *);
zf_open(const char *fname, struct open_file *f)
zf_close(struct open_file *f)
zf_read(struct open_file *f, void *buf, size_t size, size_t *resid)
zf_rewind(struct open_file *f)
zf_seek(struct open_file *f, off_t offset, int where)
zf_stat(struct open_file *f, struct stat *sb)
static int zf_open(const char *path, struct open_file *f);
static int zf_close(struct open_file *f);
static int zf_read(struct open_file *f, void *buf, size_t size, size_t *resid);
static off_t zf_seek(struct open_file *f, off_t offset, int where);
static int zf_stat(struct open_file *f, struct stat *sb);
struct open_file *f;
struct open_file *f;
int nfs_open(const char *path, struct open_file *f);
static int nfs_close(struct open_file *f);
static int nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
static off_t nfs_seek(struct open_file *f, off_t offset, int where);
static int nfs_stat(struct open_file *f, struct stat *sb);
static int nfs_readdir(struct open_file *f, struct dirent *d);
nfs_open(const char *upath, struct open_file *f)
nfs_close(struct open_file *f)
nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
nfs_seek(struct open_file *f, off_t offset, int where)
nfs_stat(struct open_file *f, struct stat *sb)
nfs_readdir(struct open_file *f, struct dirent *d)
int null_open (const char *path, struct open_file *f)
int null_close(struct open_file *f)
int null_read (struct open_file *f, void *buf, size_t size, size_t *resid)
int null_write (struct open_file *f, const void *buf, size_t size, size_t *resid)
off_t null_seek (struct open_file *f, off_t offset, int where)
int null_stat (struct open_file *f, struct stat *sb)
int null_readdir(struct open_file *f, struct dirent *d)
o_gethandle(struct open_file **ptr)
struct open_file *f, *last;
o_rainit(struct open_file *f)
struct open_file *f;
struct open_file *
struct open_file *f;
pkg_open_follow(const char *fn, struct open_file *f, int lnks)
pkg_open(const char *fn, struct open_file *f)
pkg_close(struct open_file *f)
pkg_read(struct open_file *f, void *buf, size_t size, size_t *res)
static int pkg_open(const char *, struct open_file *);
pkg_seek(struct open_file *f, off_t ofs, int whence)
static int pkg_close(struct open_file *);
static int pkg_read(struct open_file *, void *, size_t, size_t *);
static off_t pkg_seek(struct open_file *, off_t, int);
static int pkg_stat(struct open_file *, struct stat *);
static int pkg_readdir(struct open_file *, struct dirent *);
pkg_stat(struct open_file *f, struct stat *sb)
pkg_readdir(struct open_file *f, struct dirent *d)
struct open_file *f;
struct open_file *f;
struct open_file *f;
splitfs_open(const char *fname, struct open_file *f)
splitfs_close(struct open_file *f)
splitfs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
splitfs_seek(struct open_file *f, off_t offset, int where)
splitfs_stat(struct open_file *f, struct stat *sb)
static int splitfs_open(const char *path, struct open_file *f);
static int splitfs_close(struct open_file *f);
static int splitfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
static off_t splitfs_seek(struct open_file *f, off_t offset, int where);
static int splitfs_stat(struct open_file *f, struct stat *sb);
int (*fo_open)(const char *path, struct open_file *f);
int (*fo_close)(struct open_file *f);
int (*fo_read)(struct open_file *f, void *buf,
int (*fo_write)(struct open_file *f, const void *buf,
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_readdir)(struct open_file *f, struct dirent *d);
int (*fo_preload)(struct open_file *f);
int (*dv_open)(struct open_file *f, ...);
int (*dv_close)(struct open_file *f);
int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data);
TAILQ_ENTRY(open_file) f_link; /* next entry */
typedef TAILQ_HEAD(file_list, open_file) file_list_t;
extern struct open_file *fd2open_file(int);
extern int noioctl(struct open_file *, u_long, void *);
extern int null_open(const char *path, 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_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 int null_stat(struct open_file *f, struct stat *sb);
extern int null_readdir(struct open_file *f, struct dirent *d);
extern int devopen(struct open_file *, const char *, const char **);
extern int devclose(struct open_file *f);
struct open_file;
tftp_open(const char *path, struct open_file *f)
tftp_read(struct open_file *f, void *addr, size_t size,
tftp_close(struct open_file *f)
tftp_stat(struct open_file *f, struct stat *sb)
static int tftp_open(const char *, struct open_file *);
static int tftp_close(struct open_file *);
tftp_seek(struct open_file *f, off_t offset, int where)
static int tftp_read(struct open_file *, void *, size_t, size_t *);
tftp_preload(struct open_file *f)
static off_t tftp_seek(struct open_file *, off_t, int);
static int tftp_stat(struct open_file *, struct stat *);
static int tftp_preload(struct open_file *);
static int read_inode(ino_t, struct open_file *);
static int block_map(struct open_file *, ufs2_daddr_t, ufs2_daddr_t *);
static int buf_read_file(struct open_file *, char **, size_t *);
static int buf_write_file(struct open_file *, const char *, size_t *);
static int search_directory(char *, struct open_file *, ino_t *);
read_inode(ino_t inumber, struct open_file *f)
block_map(struct open_file *f, ufs2_daddr_t file_block,
buf_write_file(struct open_file *f, const char *buf_p, size_t *size_p)
buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
search_directory(char *name, struct open_file *f, ino_t *inumber_p)
ufs_open(const char *upath, struct open_file *f)
struct open_file *sbf;
struct open_file *f;
f = (struct open_file *)devfd;
ufs_close(struct open_file *f)
ufs_read(struct open_file *f, void *start, size_t size, size_t *resid)
ufs_write(struct open_file *f, const void *start, size_t size, size_t *resid)
ufs_seek(struct open_file *f, off_t offset, int where)
static int ufs_open(const char *path, struct open_file *f);
static int ufs_write(struct open_file *f, const void *buf, size_t size,
ufs_stat(struct open_file *f, struct stat *sb)
static int ufs_close(struct open_file *f);
static int ufs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
ufs_readdir(struct open_file *f, struct dirent *d)
static off_t ufs_seek(struct open_file *f, off_t offset, int where);
static int ufs_stat(struct open_file *f, struct stat *sb);
static int ufs_readdir(struct open_file *f, struct dirent *d);
struct open_file *f;
struct open_file *f;
zfs_open(const char *upath, struct open_file *f)
zfs_close(struct open_file *f)
zfs_read(struct open_file *f, void *start, size_t size, size_t *resid /* out */)
zfs_dev_open(struct open_file *f, ...)
zfs_dev_close(struct open_file *f)
zfs_seek(struct open_file *f, off_t offset, int where)
zfs_stat(struct open_file *f, struct stat *sb)
zfs_readdir(struct open_file *f, struct dirent *d)
static int zfs_open(const char *path, struct open_file *f);
static int zfs_close(struct open_file *f);
static int zfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
static off_t zfs_seek(struct open_file *f, off_t offset, int where);
static int zfs_stat(struct open_file *f, struct stat *sb);
static int zfs_readdir(struct open_file *f, struct dirent *d);
struct open_file f;
stor_open(struct open_file *f, ...)
stor_close(struct open_file *f)
stor_ioctl(struct open_file *f, u_long cmd, void *data)
static int stor_open(struct open_file *, ...);
static int stor_close(struct open_file *);
static int stor_ioctl(struct open_file *f, u_long cmd, void *data);
umass_disk_open(struct open_file *f,...)
umass_disk_ioctl(struct open_file *f, u_long cmd, void *buf)
umass_disk_close(struct open_file *f)
static int umass_disk_open(struct open_file *,...);
static int umass_disk_close(struct open_file *);
static int umass_disk_ioctl(struct open_file *, u_long, void *);
host_dev_open(struct open_file *f, ...)
host_dev_close(struct open_file *f)
host_open(const char *upath, struct open_file *f)
host_close(struct open_file *f)
host_read(struct open_file *f, void *start, size_t size, size_t *resid)
host_seek(struct open_file *f, off_t offset, int where)
host_stat(struct open_file *f, struct stat *sb)
host_readdir(struct open_file *f, struct dirent *d)
userdisk_open(struct open_file *f, ...)
userdisk_close(struct open_file *f)
userdisk_ioctl(struct open_file *f, u_long cmd, void *data)
static int userdisk_open(struct open_file *f, ...);
static int userdisk_close(struct open_file *f);
static int userdisk_ioctl(struct open_file *f, u_long cmd, void *data);
rc = open_file(path, &nid);
rc = open_file(path, &nid);
static int open_file(const char *path, struct nameidata *nid);