/external/ltp/lib/ |
H A D | tst_device.c | 72 int ctl_fd, dev_fd, rc, i; local 111 dev_fd = open(dev_path, O_RDONLY); 113 if (dev_fd < 0) 116 if (ioctl(dev_fd, LOOP_GET_STATUS, &loopinfo) == 0) { 122 close(dev_fd); 126 close(dev_fd); 136 int dev_fd, file_fd; local 139 dev_fd = open(dev, O_RDWR); 140 if (dev_fd < 0) { 148 close(dev_fd); 182 int dev_fd, ret, i; local [all...] |
/external/syslinux/libinstaller/ |
H A D | syslxcom.h | 12 int syslinux_already_installed(int dev_fd);
|
H A D | syslxcom.c | 299 int syslinux_already_installed(int dev_fd) argument 303 xpread(dev_fd, buffer, 8, 3);
|
/external/dhcpcd-6.8.2/ |
H A D | dev.c | 65 eloop_event_delete(ctx->eloop, ctx->dev_fd, 0); 69 ctx->dev_fd = -1; 169 if (ctx->dev_fd != -1) { 171 ctx->dev_fd); 172 return ctx->dev_fd; 175 ctx->dev_fd = dev_start1(ctx); 176 if (ctx->dev_fd != -1) { 178 ctx->dev_fd, dev_handle_data, ctx, NULL, NULL) == -1) 187 return ctx->dev_fd;
|
H A D | dhcpcd.h | 150 int dev_fd; member in struct:dhcpcd_ctx
|
H A D | dhcpcd.c | 1482 ctx.dev_fd = -1;
|
/external/syslinux/linux/ |
H A D | syslinux.c | 106 int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) argument 112 if (fstat(dev_fd, &st) < 0) 129 if (ioctl(loop_fd, LOOP_SET_FD, (void *)dev_fd)) { 147 (unsigned long)mypid, dev_fd); 161 (unsigned long)mypid, dev_fd); 262 int dev_fd, fd; local 302 dev_fd = open(opt.device, O_RDWR); 303 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { 316 xpread(dev_fd, sectbu [all...] |
/external/f2fs-tools/tools/sg_write_buffer/include/ |
H A D | sg_pt.h | 44 /* Assumes dev_fd is an "open" file handle associated with device_name. If 45 * the implementation (possibly for one OS) cannot determine from dev_fd if 50 * NSID), or 0 if something else (e.g. ATA block device) or dev_fd < 0. 52 int check_pt_file_handle(int dev_fd, const char * device_name, int verbose); 66 * that will cause pt_device_is_nvme() to return true. Set dev_fd to 70 construct_scsi_pt_obj_with_fd(int dev_fd, int verbose); 72 /* Forget any previous dev_fd and install the one given. May attempt to 75 * will return. dev_fd should be >= 0 for a valid file handle or -1 . */ 76 int set_pt_file_handle(struct sg_pt_base * objp, int dev_fd, int verbose); 83 * used to issue more than one SCSI command. The dev_fd i [all...] |
H A D | sg_pt_linux.h | 103 int dev_fd; /* -1 if not given (yet) */ member in struct:sg_pt_linux_scsi 107 * implies dev_fd is not a NVMe device
|
/external/syslinux/dos/ |
H A D | syslinux.c | 572 static void move_file(int dev_fd, char *pathname, char *filename) argument 579 new_name[0] = dev_fd | 0x40; 616 int dev_fd, fd; local 657 dev_fd = (opt.device[0] & ~0x20) - 0x40; 658 if (dev_fd < 1 || dev_fd > 26 || opt.device[1] != ':' || opt.device[2]) 661 set_lock_device(dev_fd); 664 read_device(dev_fd, sectbuf, 1, 0); 677 ldlinux_name[0] = dev_fd | 0x40; 678 ldlinuxc32_name[0] = dev_fd | [all...] |
/external/f2fs-tools/tools/sg_write_buffer/ |
H A D | sg_pt_linux.c | 190 * true if dev_fd is a scsi generic pass-through device. If yields 191 * *is_nvme_p = true with *nsid_p = 0 then dev_fd is a NVMe char device. 192 * If yields *nsid_p > 0 then dev_fd is a NVMe block device. */ 194 check_file_type(int dev_fd, struct stat * dev_statp, bool * is_bsg_p, argument 206 if (dev_fd >= 0) { 207 if (fstat(dev_fd, dev_statp) < 0) { 226 nsid = ioctl(dev_fd, NVME_IOCTL_ID, NULL); 240 pr2ws("%s: invalid file descriptor (%d)\n", __func__, dev_fd); 270 /* Assumes dev_fd is an "open" file handle associated with device_name. If 271 * the implementation (possibly for one OS) cannot determine from dev_fd i 279 check_pt_file_handle(int dev_fd, const char * device_name, int verbose) argument 395 construct_scsi_pt_obj_with_fd(int dev_fd, int verbose) argument 482 set_pt_file_handle(struct sg_pt_base * vp, int dev_fd, int verbose) argument [all...] |
H A D | sg_pt_linux_nvme.c | 329 res = ioctl(ptp->dev_fd, NVME_IOCTL_ADMIN_CMD, cmdp); 1093 if ((ptp->dev_fd >= 0) && (fd != ptp->dev_fd)) { 1099 ptp->dev_fd = fd; 1100 } else if (ptp->dev_fd < 0) {
|
/external/syslinux/mtools/ |
H A D | syslinux.c | 189 int dev_fd; local 241 dev_fd = open(opt.device, O_RDWR); 242 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { 254 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); 282 dev_fd, (unsigned long long)opt.offset); 322 fs = libfat_open(libfat_xpread, dev_fd); 341 xpwrite(dev_fd, (const char _force *)syslinux_ldlinux 394 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); 400 xpwrite(dev_fd, sectbu [all...] |
/external/mmc-utils/ |
H A D | mmc_cmds.c | 1610 int ret, dev_fd, key_fd; local 1618 dev_fd = open(argv[1], O_RDWR); 1619 if (dev_fd < 0) { 1647 ret = do_rpmb_op(dev_fd, &frame_in, &frame_out, 1); 1660 close(dev_fd); 1667 int rpmb_read_counter(int dev_fd, unsigned int *cnt) argument 1675 ret = do_rpmb_op(dev_fd, &frame_in, &frame_out, 1); 1692 int ret, dev_fd; local 1698 dev_fd = open(argv[1], O_RDWR); 1699 if (dev_fd < 1721 int i, ret, dev_fd, data_fd, key_fd = -1; local 1868 int ret, dev_fd, key_fd, data_fd; local [all...] |
/external/toybox/toys/pending/ |
H A 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; 166 if (ioctl(dev_fd, BLKGETSIZE64, &sec64) == 0) { 174 if (ioctl(dev_fd, BLKGETSIZE, §ors) == 0) 227 if (ioctl(dev_fd, HDIO_GETGEO, &geometry)) return; 260 xlseek(dev_fd, (off_t)(offset * g_sect_size), SEEK_SET); 262 if (g_sect_size != readall(dev_fd, sec_buf, g_sect_size)) { 263 close(dev_fd); 355 if(fd != dev_fd) { 356 if(dup2(fd, dev_fd) ! [all...] |
/external/ppp/pppd/ |
H A 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 */
|
H A D | sys-linux.c | 597 void generic_disestablish_ppp(int dev_fd) argument
|
/external/minijail/ |
H A D | libminijail.c | 1264 int dev_fd; local 1289 dev_fd = open(dev_path, O_DIRECTORY|O_PATH|O_CLOEXEC); 1290 if (dev_fd < 0) { 1298 ret = mknodat(dev_fd, ds->name, ds->mode, 1307 ret = symlinkat(ds->dest, dev_fd, ds->source); 1314 close(dev_fd);
|