Lines Matching refs:fd
50 if (a->fd == -1 || a->ctl == NULL)
60 DBG("ioctl(%d SBD_CMD_GETNCM, 0x%p)\n", a->fd, (void *)ctl);
62 if (ioctl(a->fd, SBD_CMD_GETNCM, ctl) == -1) {
80 int fd;
95 if (a->fd == -1) {
101 if ((fd = open(a->path, oflag, 0)) == -1) {
105 a->fd = fd;
107 fd = a->fd;
179 fd, (void *)sc->s_statp, sc->s_nbytes, ctl->i_flags);
184 if (ioctl(fd, SBD_CMD_STATUS, ctl) == -1) {
330 if (a->fd != -1)
331 (void) close(a->fd);
356 a->fd = -1;
593 if (ioctl(a->fd, ioc, ctl) == -1) {