Lines Matching refs:fd
30 nvme_ioctl(int fd, int ioc, size_t *bufsize, void **buf, uint64_t arg, in nvme_ioctl() argument
52 if (ioctl(fd, ioc, &nioc) != 0) { in nvme_ioctl()
74 nvme_capabilities(int fd) in nvme_capabilities() argument
79 (void) nvme_ioctl(fd, NVME_IOC_CAPABILITIES, &bufsize, &cap, 0, NULL); in nvme_capabilities()
85 nvme_version(int fd) in nvme_version() argument
90 (void) nvme_ioctl(fd, NVME_IOC_VERSION, &bufsize, &vs, 0, NULL); in nvme_version()
96 nvme_identify_ctrl(int fd) in nvme_identify_ctrl() argument
101 (void) nvme_ioctl(fd, NVME_IOC_IDENTIFY_CTRL, &bufsize, &idctl, 0, in nvme_identify_ctrl()
108 nvme_identify_nsid(int fd) in nvme_identify_nsid() argument
113 (void) nvme_ioctl(fd, NVME_IOC_IDENTIFY_NSID, &bufsize, &idns, 0, NULL); in nvme_identify_nsid()
119 nvme_get_logpage(int fd, uint8_t logpage, size_t *bufsize) in nvme_get_logpage() argument
123 (void) nvme_ioctl(fd, NVME_IOC_GET_LOGPAGE, bufsize, &buf, logpage, in nvme_get_logpage()
130 nvme_get_feature(int fd, uint8_t feature, uint32_t arg, uint64_t *res, in nvme_get_feature() argument
133 return (nvme_ioctl(fd, NVME_IOC_GET_FEATURES, bufsize, buf, in nvme_get_feature()
138 nvme_intr_cnt(int fd) in nvme_intr_cnt() argument
142 (void) nvme_ioctl(fd, NVME_IOC_INTR_CNT, NULL, NULL, 0, &res); in nvme_intr_cnt()
147 nvme_format_nvm(int fd, uint8_t lbaf, uint8_t ses) in nvme_format_nvm() argument
154 return (nvme_ioctl(fd, NVME_IOC_FORMAT, NULL, NULL, frmt.r, NULL)); in nvme_format_nvm()
158 nvme_detach(int fd) in nvme_detach() argument
160 return (nvme_ioctl(fd, NVME_IOC_DETACH, NULL, NULL, 0, NULL)); in nvme_detach()
164 nvme_attach(int fd) in nvme_attach() argument
166 return (nvme_ioctl(fd, NVME_IOC_ATTACH, NULL, NULL, 0, NULL)); in nvme_attach()
173 int fd; in nvme_open() local
185 fd = open(path, O_RDWR); in nvme_open()
188 if (fd < 0) { in nvme_open()
194 return (fd); in nvme_open()
198 nvme_close(int fd) in nvme_close() argument
200 (void) close(fd); in nvme_close()