Comment 21 for bug 900384

Revision history for this message
Claudio Mignanti (claudyus) wrote :

Hi,
re-reading the usbip code I found that the previous patch (in comment #20) is incorrect.
Here a proof of concept patch for path change in usbip kernel driver.

usbip$ bzr diff
=== modified file 'src/cmd/bind-driver.c'
--- src/cmd/bind-driver.c 2009-04-30 23:30:45 +0000
+++ src/cmd/bind-driver.c 2013-01-24 09:24:19 +0000
@@ -29,7 +29,7 @@
 };

 static const char match_busid_path[] = "/sys/bus/usb/drivers/usbip/match_busid";
-
+static const char match_busid-host_path[] = "/sys/bus/usb/drivers/usbip-host/match_busid";

 static void show_help(void)
 {
@@ -62,7 +62,9 @@

  fd = open(match_busid_path, O_WRONLY);
  if (fd < 0)
- return -1;
+ fd = open(match_busid-host_path, O_WRONLY);
+ if (fd < 0)
+ return -1;

  if (add)
   snprintf(buff, BUS_ID_SIZE + 4, "add %s", busid);

This is not a wonderful solution but it is somethings.
How can I recompile the package? no configure, no makefile, autotools returns a lot of error... any tips?