Lines Matching defs:fd
62 static int check_mbr_label(int fd, char *pathname, uint64_t *sizep);
269 int fd = -1, err = -1;
271 if ((fd = open(rdiskpathname, O_RDONLY|O_NDELAY)) < 0)
274 if ((err = efi_alloc_and_read(fd, &efi_vtoc)) >= 0) {
291 (void) close(fd);
323 (void) close(fd);
331 err = check_mbr_label(fd, rdiskpathname, sizep);
353 (void) close(fd);
525 /* input pathname is /dev/rdsk/cxtxdxsN . fd corresponds to pathname */
528 check_mbr_label(int fd, char *pathname, uint64_t *sizep)
540 if (ioctl(fd, DKIOCGMEDIAINFO, &minfo) != 0) {
550 if (ioctl(fd, DKIOCGMBOOT, bootsect) < 0) {
683 int fd = -1, ret = BOOT_REQ_PART_NOT_REQUIRED;
691 if ((fd = open(vdevpathname, O_RDONLY|O_NDELAY)) < 0) {
699 if ((efi_alloc_and_read(fd, &efi_vtoc)) >= 0) {
713 ret = check_mbr_label(fd, vdevpathname, NULL);
741 int fd = -1;
742 if ((fd = open(path, O_RDONLY|O_NDELAY)) < 0)
744 if (efi_alloc_and_read(fd, &local_efi_vtoc) < 0)
747 (void) close(fd);