MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • usb

usb

Reset usb device

  • lsusb
  • cc resetusb.c -o resetusb
  • cp resetusb /usr/sbin
  • #bus 004 device 006
  • ./resetusb /dev/bus/usb/004/006

   1 #include <stdio.h>
   2 #include <fcntl.h>
   3 #include <errno.h>
   4 #include <sys/ioctl.h>
   5 #include <linux/usbdevice_fs.h>
   6 void main(int argc, char **argv)
   7 {
   8         const char *filename;
   9         int fd;
  10         filename = argv[1];
  11         fd = open(filename, O_WRONLY);
  12         ioctl(fd, USBDEVFS_RESET, 0);
  13         close(fd);
  14         return;
  15 }
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01