Lines Matching refs:fd
70 int fd;
78 fd = bbootfs_ops.fsw_open(file, flags);
81 return (fd);
83 if (strncmp(file, SYSTEM_BOOT_PATH, len) == 0 || fd >= 0)
84 return ((fd < 0) ? fd : (fd | BFD_F_SYSTEM_BOOT));
90 BRD_CLOSE(struct boot_fs_ops *ops, int fd)
92 if (fd & BFD_F_SYSTEM_BOOT)
93 return (bbootfs_ops.fsw_close(fd & ~BFD_F_SYSTEM_BOOT));
95 return (ops->fsw_close(fd));
99 BRD_READ(struct boot_fs_ops *ops, int fd, caddr_t buf, size_t len)
101 if (fd & BFD_F_SYSTEM_BOOT) {
102 return (bbootfs_ops.fsw_read(fd & ~BFD_F_SYSTEM_BOOT,
106 return (ops->fsw_read(fd, buf, len));
110 BRD_SEEK(struct boot_fs_ops *ops, int fd, off_t addr, int whence)
112 if (fd & BFD_F_SYSTEM_BOOT) {
113 return (bbootfs_ops.fsw_lseek(fd & ~BFD_F_SYSTEM_BOOT,
117 return (ops->fsw_lseek(fd, addr, whence));
121 BRD_FSTAT(struct boot_fs_ops *ops, int fd, struct bootstat *bsp)
123 if (fd & BFD_F_SYSTEM_BOOT)
124 return (bbootfs_ops.fsw_fstat(fd & ~BFD_F_SYSTEM_BOOT, bsp));
126 return (ops->fsw_fstat(fd, bsp));