/external/ltp/lib/ |
D | tst_device.c | 74 int ctl_fd, dev_fd, rc, i; in tst_find_free_loopdev() local 116 dev_fd = open(buf, O_RDONLY); in tst_find_free_loopdev() 118 if (dev_fd < 0) in tst_find_free_loopdev() 121 if (ioctl(dev_fd, LOOP_GET_STATUS, &loopinfo) == 0) { in tst_find_free_loopdev() 127 close(dev_fd); in tst_find_free_loopdev() 135 close(dev_fd); in tst_find_free_loopdev() 145 int dev_fd, file_fd; in tst_attach_device() local 151 dev_fd = open(dev, O_RDWR); in tst_attach_device() 152 if (dev_fd >= 0) in tst_attach_device() 156 if (dev_fd < 0) { in tst_attach_device() [all …]
|
/external/f2fs-tools/tools/sg_write_buffer/ |
D | sg_pt_linux.c | 194 check_file_type(int dev_fd, struct stat * dev_statp, bool * is_bsg_p, in check_file_type() argument 206 if (dev_fd >= 0) { in check_file_type() 207 if (fstat(dev_fd, dev_statp) < 0) { in check_file_type() 226 nsid = ioctl(dev_fd, NVME_IOCTL_ID, NULL); in check_file_type() 240 pr2ws("%s: invalid file descriptor (%d)\n", __func__, dev_fd); in check_file_type() 279 check_pt_file_handle(int dev_fd, const char * device_name, int verbose) in check_pt_file_handle() argument 282 pr2ws("%s: dev_fd=%d, device_name: %s\n", __func__, dev_fd, in check_pt_file_handle() 289 if (dev_fd >= 0) { in check_pt_file_handle() 295 is_sg = check_file_type(dev_fd, &a_stat, &is_bsg, &is_nvme, &nsid, in check_pt_file_handle() 395 construct_scsi_pt_obj_with_fd(int dev_fd, int verbose) in construct_scsi_pt_obj_with_fd() argument [all …]
|
D | sg_pt_linux_nvme.c | 329 res = ioctl(ptp->dev_fd, NVME_IOCTL_ADMIN_CMD, cmdp); in do_nvme_admin_cmd() 1093 if ((ptp->dev_fd >= 0) && (fd != ptp->dev_fd)) { in sg_do_nvme_pt() 1099 ptp->dev_fd = fd; in sg_do_nvme_pt() 1100 } else if (ptp->dev_fd < 0) { in sg_do_nvme_pt()
|
/external/ltp/testcases/kernel/syscalls/pwritev/ |
D | pwritev03.c | 92 int dev_fd, ret; in setup() local 94 dev_fd = SAFE_OPEN(tst_device->dev, O_RDWR); in setup() 95 SAFE_IOCTL(dev_fd, BLKSSZGET, &ret); in setup() 96 SAFE_CLOSE(dev_fd); in setup()
|
/external/ltp/testcases/kernel/syscalls/preadv/ |
D | preadv03.c | 93 int dev_fd, ret; in setup() local 95 dev_fd = SAFE_OPEN(tst_device->dev, O_RDWR); in setup() 96 SAFE_IOCTL(dev_fd, BLKSSZGET, &ret); in setup() 97 SAFE_CLOSE(dev_fd); in setup()
|
/external/f2fs-tools/tools/sg_write_buffer/include/ |
D | sg_pt.h | 52 int check_pt_file_handle(int dev_fd, const char * device_name, int verbose); 70 construct_scsi_pt_obj_with_fd(int dev_fd, int verbose); 76 int set_pt_file_handle(struct sg_pt_base * objp, int dev_fd, int verbose);
|
D | sg_pt_linux.h | 103 int dev_fd; /* -1 if not given (yet) */ member
|
/external/toybox/toys/pending/ |
D | fdisk.c | 85 static int num_parts, disp_unit_cyl, dos_flag, dev_fd = 3; variable 151 if (ioctl(dev_fd, BLKSSZGET, &arg) == 0) g_sect_size = arg; in read_sec_sz() 166 if (ioctl(dev_fd, BLKGETSIZE64, &sec64) == 0) { in read_size() 174 if (ioctl(dev_fd, BLKGETSIZE, §ors) == 0) in read_size() 227 if (ioctl(dev_fd, HDIO_GETGEO, &geometry)) return; in read_geometry() 260 xlseek(dev_fd, (off_t)(offset * g_sect_size), SEEK_SET); in read_ebr() 262 if (g_sect_size != readall(dev_fd, sec_buf, g_sect_size)) { in read_ebr() 263 close(dev_fd); in read_ebr() 355 if(fd != dev_fd) { in read_mbr() 356 if(dup2(fd, dev_fd) != dev_fd) perror_exit("Can't dup2"); in read_mbr() [all …]
|
/external/linux-kselftest/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 774 int dev_fd, ret; in vcpu_mmap_sz() local 776 dev_fd = open(KVM_DEV_PATH, O_RDONLY); in vcpu_mmap_sz() 777 if (dev_fd < 0) in vcpu_mmap_sz() 780 ret = ioctl(dev_fd, KVM_GET_VCPU_MMAP_SIZE, NULL); in vcpu_mmap_sz() 785 close(dev_fd); in vcpu_mmap_sz()
|
/external/ppp/pppd/ |
D | pppd.h | 617 void generic_disestablish_ppp __P((int dev_fd)); /* Restore device setting */ 618 int generic_establish_ppp __P((int dev_fd)); /* Make a ppp interface */
|
D | sys-linux.c | 597 void generic_disestablish_ppp(int dev_fd) in generic_disestablish_ppp() argument
|
/external/minijail/ |
D | libminijail.c | 1541 int dev_fd; in mount_dev() local 1566 dev_fd = open(dev_path, O_DIRECTORY|O_PATH|O_CLOEXEC); in mount_dev() 1567 if (dev_fd < 0) { in mount_dev() 1575 ret = mknodat(dev_fd, ds->name, ds->mode, in mount_dev() 1584 ret = symlinkat(ds->dest, dev_fd, ds->source); in mount_dev() 1590 ret = mkdirat(dev_fd, "shm", 01777); in mount_dev() 1596 close(dev_fd); in mount_dev()
|