Home
last modified time | relevance | path

Searched refs:dev_fd (Results 1 – 8 of 8) sorted by relevance

/illumos-gate/usr/src/lib/libfdisk/common/
H A Dlibfdisk.c72 if (ioctl(epp->dev_fd, DKIOCG_VIRTGEOM, &disk_geom)) { in fdisk_init_disk_geom()
95 if (ioctl(epp->dev_fd, DKIOCG_PHYGEOM, &disk_geom)) { in fdisk_init_disk_geom()
108 if (ioctl(epp->dev_fd, DKIOCGGEOM, &disk_geom)) { in fdisk_init_disk_geom()
270 (void) close((*epp)->dev_fd); in libfdisk_fini()
304 if (lseek(epp->dev_fd, label_offset, SEEK_SET) < 0) { in fdisk_is_linux_swap()
330 if (lseek(epp->dev_fd, seek_offset, SEEK_SET) < 0) { in fdisk_is_linux_swap()
649 if (lseek(epp->dev_fd, offset, SEEK_SET) < 0) { in fdisk_read_extpart()
652 if (read(epp->dev_fd, ext_buf, sectsize) < in fdisk_read_extpart()
779 if (lseek(epp->dev_fd, 0, SEEK_SET) < 0) { in fdisk_read_master_part_table()
797 if (read(epp->dev_fd, buf, sectsize) < sectsize) { in fdisk_read_master_part_table()
[all …]
H A Dlibfdisk.h204 int dev_fd; member
/illumos-gate/usr/src/cmd/boot/installgrub/
H A Dpcfs_glue.c44 static int dev_fd; variable
103 ret = pread(dev_fd, filep->fi_memp, filep->fi_count, diskloc); in diskread()
170 dev_fd = device_fd; in read_stage2_blocklist()
H A Dinstallgrub.c1213 read_stage1_from_disk(int dev_fd, char *stage1_buf) in read_stage1_from_disk() argument
1217 if (read_in(dev_fd, stage1_buf, SECTOR_SIZE, 0) != BC_SUCCESS) { in read_stage1_from_disk()
1225 read_stage2_from_disk(int dev_fd, ig_stage2_t *stage2, int type) in read_stage2_from_disk() argument
1233 assert(dev_fd != -1); in read_stage2_from_disk()
1235 if (read_in(dev_fd, mboot_scan, sizeof (mboot_scan), in read_stage2_from_disk()
1272 if (read_in(dev_fd, stage2->buf, buf_size, STAGE2_BLKOFF(type) * in read_stage2_from_disk()
1298 int dev_fd = device->part_fd; in is_update_necessary() local
1306 if (read_stage2_from_disk(dev_fd, &stage2_disk, device->type) in is_update_necessary()
/illumos-gate/usr/src/cmd/ucodeadm/
H A Ducodeadm.c489 int dev_fd = -1; in main() local
666 if ((dev_fd = open(ucode_dev, O_RDONLY)) == -1) { in main()
698 tmprc = ioctl(dev_fd, UCODE_GET_VERSION, &info32); in main()
704 tmprc = ioctl(dev_fd, UCODE_GET_VERSION, &info); in main()
739 tmprc = ioctl(dev_fd, UCODE_UPDATE, &uw_struct32); in main()
746 tmprc = ioctl(dev_fd, UCODE_UPDATE, &uw_struct); in main()
763 if (dev_fd != -1) in main()
764 (void) close(dev_fd); in main()
/illumos-gate/usr/src/cmd/luxadm/
H A Dqlgcupdate.c770 static int dev_fd, fcode_size; in q_load_file() local
826 if ((dev_fd = open(device, O_RDWR|O_EXCL)) < 0) { in q_load_file()
841 (void) close(dev_fd); in q_load_file()
852 if (ioctl(dev_fd, FCIO_CMD, &fcio) != 0) { in q_load_file()
856 (void) close(dev_fd); in q_load_file()
861 (void) close(dev_fd); in q_load_file()
979 static int dev_fd, fcode_size; in fcode_load_file() local
1013 if ((dev_fd = open(device, O_RDWR|O_EXCL)) < 0) { in fcode_load_file()
1026 if (ioctl(dev_fd, FCIO_CMD, &fcio) != 0) { in fcode_load_file()
1027 (void) close(dev_fd); in fcode_load_file()
[all …]
/illumos-gate/usr/src/cmd/boot/installboot/sparc/
H A Dinstallboot.c180 read_bootblock_from_disk(int dev_fd, ib_bootblock_t *bblock) in read_bootblock_from_disk() argument
189 assert(dev_fd != -1); in read_bootblock_from_disk()
196 if (read_in(dev_fd, mboot_scan, sizeof (mboot_scan), in read_bootblock_from_disk()
232 if (read_in(dev_fd, dest, size, SECTOR_SIZE) != BC_SUCCESS) { in read_bootblock_from_disk()
243 if (read_in(dev_fd, dest, size, BBLK_ZFS_EXTRA_OFF) != BC_SUCCESS) { in read_bootblock_from_disk()
269 int dev_fd = device->fd; in is_update_necessary() local
280 if (read_bootblock_from_disk(dev_fd, &bblock_disk) != BC_SUCCESS) { in is_update_necessary()
/illumos-gate/usr/src/lib/libsmbfs/smb/
H A Dctx.c1376 smb_fh_getssnkey(int dev_fd, uchar_t *key, size_t len) in smb_fh_getssnkey() argument
1381 if (nsmb_ioctl(dev_fd, SMBIOC_GETSSNKEY, key) == -1) in smb_fh_getssnkey()