Lines Matching refs:part_fd
396 ret = read_stage2_from_disk(device->part_fd, stage2, device->type); in handle_getinfo()
494 ret = read_stage2_from_disk(curr_device->part_fd, stage2_curr, in handle_mirror()
585 if (read_stage1_from_disk(src_device->part_fd, target->stage1_buf) in propagate_bootblock()
636 device->part_fd = -1; in init_device()
676 if (fstyp_init(device->part_fd, 0, NULL, &fhdl) != 0) in init_device()
702 if (device->part_fd != -1) in cleanup_device()
703 (void) close(device->part_fd); in cleanup_device()
708 device->part_fd = -1; in cleanup_device()
765 if (ioctl(device->part_fd, DKIOCEXTPARTINFO, &edkpi) < 0) { in get_start_sector()
766 if (ioctl(device->part_fd, DKIOCPARTINFO, &dkpi) < 0) { in get_start_sector()
986 if (write_out(device->part_fd, stage2->file, SECTOR_SIZE, in write_stage2()
989 write_out(device->part_fd, stage2->file + SECTOR_SIZE, in write_stage2()
1015 if (write_out(device->part_fd, stage2->buf, stage2->buf_size, in write_stage2()
1036 if (write_out(device->part_fd, install->stage1_buf, in write_stage1()
1177 if (pread(device->part_fd, bpb_sect, SECTOR_SIZE, 0) in prepare_stage1()
1290 int dev_fd = device->part_fd; in is_update_necessary()
1293 assert(device->part_fd != -1); in is_update_necessary()
1387 if (read_stage2_blocklist(device->part_fd, blocklist) != 0) { in prepare_stage2()
1525 device->part_fd = open(raw, O_RDONLY); in get_raw_partition_fd()
1527 device->part_fd = open(raw, O_RDWR); in get_raw_partition_fd()
1529 if (device->part_fd < 0 || fstat(device->part_fd, &stat) != 0) { in get_raw_partition_fd()
1537 (void) close(device->part_fd); in get_raw_partition_fd()
1538 device->part_fd = -1; in get_raw_partition_fd()