19 #include <sysfs/libsysfs.h>
31 #include "usbip_common.h"
35 static const char usbip_detach_usage_string[] =
36 "usbip detach <args>\n"
38 " port the device is on\n";
42 printf(
"usage: %s", usbip_detach_usage_string);
45 static int detach_port(
char *
port)
50 for (
unsigned int i=0;
i <
strlen(port);
i++)
52 err(
"invalid port %s", port);
62 err(
"open vhci_driver");
77 static const struct option opts[] = {
78 {
"port", required_argument,
NULL,
'p' },
85 opt = getopt_long(argc, argv,
"p:", opts,
NULL);
92 ret = detach_port(optarg);