/external/ltp/lib/ |
D | tst_device.c | 68 int ctl_fd, dev_fd, rc, i; in find_free_loopdev() local 107 dev_fd = open(dev_path, O_RDONLY); in find_free_loopdev() 109 if (dev_fd < 0) in find_free_loopdev() 112 if (ioctl(dev_fd, LOOP_GET_STATUS, &loopinfo) == 0) { in find_free_loopdev() 118 close(dev_fd); in find_free_loopdev() 122 close(dev_fd); in find_free_loopdev() 133 int dev_fd, file_fd, err; in attach_device() local 135 dev_fd = SAFE_OPEN(cleanup_fn, dev, O_RDWR); in attach_device() 138 if (ioctl(dev_fd, LOOP_SET_FD, file_fd) < 0) { in attach_device() 140 close(dev_fd); in attach_device() [all …]
|
/external/syslinux/linux/ |
D | syslinux.c | 106 int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) in do_mount() argument 112 if (fstat(dev_fd, &st) < 0) in do_mount() 129 if (ioctl(loop_fd, LOOP_SET_FD, (void *)dev_fd)) { in do_mount() 147 (unsigned long)mypid, dev_fd); in do_mount() 161 (unsigned long)mypid, dev_fd); in do_mount() 262 int dev_fd, fd; in main() local 302 dev_fd = open(opt.device, O_RDWR); in main() 303 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { in main() 316 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); in main() 317 fsync(dev_fd); in main() [all …]
|
/external/dhcpcd-6.8.2/ |
D | dev.c | 65 eloop_event_delete(ctx->eloop, ctx->dev_fd, 0); in dev_stop1() 69 ctx->dev_fd = -1; in dev_stop1() 169 if (ctx->dev_fd != -1) { in dev_start() 171 ctx->dev_fd); in dev_start() 172 return ctx->dev_fd; in dev_start() 175 ctx->dev_fd = dev_start1(ctx); in dev_start() 176 if (ctx->dev_fd != -1) { in dev_start() 178 ctx->dev_fd, dev_handle_data, ctx, NULL, NULL) == -1) in dev_start() 187 return ctx->dev_fd; in dev_start()
|
D | dhcpcd.h | 150 int dev_fd; member
|
D | dhcpcd.c | 1482 ctx.dev_fd = -1; in main()
|
/external/syslinux/dos/ |
D | syslinux.c | 572 static void move_file(int dev_fd, char *pathname, char *filename) in move_file() argument 579 new_name[0] = dev_fd | 0x40; in move_file() 616 int dev_fd, fd; in main() local 657 dev_fd = (opt.device[0] & ~0x20) - 0x40; in main() 658 if (dev_fd < 1 || dev_fd > 26 || opt.device[1] != ':' || opt.device[2]) in main() 661 set_lock_device(dev_fd); in main() 664 read_device(dev_fd, sectbuf, 1, 0); in main() 677 ldlinux_name[0] = dev_fd | 0x40; in main() 678 ldlinuxc32_name[0] = dev_fd | 0x40; in main() 703 fs = libfat_open(libfat_xpread, dev_fd); in main() [all …]
|
/external/syslinux/mtools/ |
D | syslinux.c | 189 int dev_fd; in main() local 241 dev_fd = open(opt.device, O_RDWR); in main() 242 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { in main() 254 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); in main() 282 dev_fd, (unsigned long long)opt.offset); in main() 322 fs = libfat_open(libfat_xpread, dev_fd); in main() 341 xpwrite(dev_fd, (const char _force *)syslinux_ldlinux in main() 394 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); in main() 400 xpwrite(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); in main() 402 close(dev_fd); in main()
|
/external/mmc-utils/ |
D | mmc_cmds.c | 1610 int ret, dev_fd, key_fd; in do_rpmb_write_key() local 1618 dev_fd = open(argv[1], O_RDWR); in do_rpmb_write_key() 1619 if (dev_fd < 0) { in do_rpmb_write_key() 1647 ret = do_rpmb_op(dev_fd, &frame_in, &frame_out, 1); in do_rpmb_write_key() 1660 close(dev_fd); in do_rpmb_write_key() 1667 int rpmb_read_counter(int dev_fd, unsigned int *cnt) in rpmb_read_counter() argument 1675 ret = do_rpmb_op(dev_fd, &frame_in, &frame_out, 1); in rpmb_read_counter() 1692 int ret, dev_fd; in do_rpmb_read_counter() local 1698 dev_fd = open(argv[1], O_RDWR); in do_rpmb_read_counter() 1699 if (dev_fd < 0) { in do_rpmb_read_counter() [all …]
|
/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/syslinux/libinstaller/ |
D | syslxcom.c | 299 int syslinux_already_installed(int dev_fd) in syslinux_already_installed() argument 303 xpread(dev_fd, buffer, 8, 3); in syslinux_already_installed()
|
D | syslxcom.h | 12 int syslinux_already_installed(int dev_fd);
|
/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
|