Lines Matching refs:fd
19 void drop_privileges(int fd, uint32_t mask)
23 res = ioctl(fd, USBDEVFS_DROP_PRIVILEGES, &mask);
30 void reset_device(int fd)
34 res = ioctl(fd, USBDEVFS_RESET);
42 void claim_some_intf(int fd)
47 res = ioctl(fd, USBDEVFS_CLAIMINTERFACE, &i);
59 int c, fd;
61 fd = open(argv[1], O_RDWR);
62 if (fd < 0) {
71 ioctl(fd, USBDEVFS_GET_CAPABILITIES, &caps);
81 drop_privileges(fd, -1U);
95 reset_device(fd);
98 claim_some_intf(fd);
103 drop_privileges(fd, mask);
113 close(fd);
117 close(fd);