38 #include <sys/ioctl.h> 40 #include <linux/usbdevice_fs.h> 43 int main(
int argc,
char **argv)
50 fprintf(stderr,
"Usage: usbreset device-filename\n");
55 fd = open(filename, O_WRONLY);
57 perror(
"Error opening output file");
61 printf(
"Resetting USB device %s\n", filename);
62 rc = ioctl(fd, USBDEVFS_RESET, 0);
64 perror(
"Error in ioctl");
67 printf(
"Reset successful\n");
int main(int argc, char **argv)