Lines Matching refs:fd
297 int fd;
314 if ((fd = open64(file, O_RDONLY)) < 0) {
321 if (zpool_in_use(hdl, fd, &state, &name, &inuse) == 0 && inuse) {
370 (void) close(fd);
387 int fd;
392 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0)
394 if (efi_alloc_and_init(fd, EFI_NUMPAR, &label) != 0) {
395 (void) close(fd);
399 (void) close(fd);
595 int fd;
599 if ((fd = open(path, O_RDONLY)) < 0) {
606 if (devid_get(fd, &devid) == 0) {
607 if (devid_get_minor_name(fd, &minor) == 0 &&
620 (void) close(fd);
681 int fd, err;
738 if ((fd = open(path, O_RDONLY)) >= 0) {
739 err = fstat64(fd, &statbuf);
740 (void) close(fd);
1007 int fd;
1043 if ((fd = open(buf, O_RDONLY)) < 0) {
1050 if (devid_get(fd, &devid) == 0) {
1051 if (devid_get_minor_name(fd, &minor) == 0 &&
1071 (void) close(fd);
1106 int fd;
1116 if ((fd = open(path, O_RDONLY)) < 0)
1119 if (zpool_in_use(hdl, fd, &state, &name, &inuse) != 0 ||
1122 zpool_read_label(fd, &label) != 0) {
1124 (void) close(fd);
1128 (void) close(fd);