From: Kurt Kanzenbach Date: Thu, 4 Apr 2013 14:03:15 +0000 (+0200) Subject: staging: usbip: userspace: unified command line arguments X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=80e4b9432c7d84f70686e69bb7469d89d58e5d87;p=linux-beck.git staging: usbip: userspace: unified command line arguments The command `usbip attach' uses --host for specifing the remote host, while `usbip list' uses --remote. This is confusing and this patch adapts this. In Addition changed the manpage and README accordingly. Before: $ usbip attach --host -b $ usbip list --remote Now: $ usbip attach --remote -b $ usbip list --remote Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/usbip/userspace/README b/drivers/staging/usbip/userspace/README index 233d1d7aef92..00a1658b272b 100644 --- a/drivers/staging/usbip/userspace/README +++ b/drivers/staging/usbip/userspace/README @@ -54,7 +54,7 @@ client:# usbip list --remote - List exported USB devices on the . - client:# usbip attach --host --busid 1-2 + client:# usbip attach --remote --busid 1-2 - Connect the remote USB device. client:# usbip port @@ -163,7 +163,7 @@ exportable on the host. Attach a remote USB device: - deux:# usbip attach --host 10.0.0.3 --busid 1-1 + deux:# usbip attach --remote 10.0.0.3 --busid 1-1 port 0 attached Show the devices attached to this client: diff --git a/drivers/staging/usbip/userspace/doc/usbip.8 b/drivers/staging/usbip/userspace/doc/usbip.8 index 6e0d74503792..ccdadc87c478 100644 --- a/drivers/staging/usbip/userspace/doc/usbip.8 +++ b/drivers/staging/usbip/userspace/doc/usbip.8 @@ -38,7 +38,7 @@ then exit. .PP .HP -\fBattach\fR \-\-host=<\fIhost\fR> \-\-busid=<\fIbus_id\fR> +\fBattach\fR \-\-remote=<\fIhost\fR> \-\-busid=<\fIbus_id\fR> .IP Attach a remote USB device. .PP @@ -79,7 +79,7 @@ List local USB devices. client:# usbip list --remote=server - List exportable usb devices on the server. - client:# usbip attach --host=server --busid=1-2 + client:# usbip attach --remote=server --busid=1-2 - Connect the remote USB device. client:# usbip detach --port=0 diff --git a/drivers/staging/usbip/userspace/src/usbip_attach.c b/drivers/staging/usbip/userspace/src/usbip_attach.c index 2da4e44e1633..0ec16e54fb02 100644 --- a/drivers/staging/usbip/userspace/src/usbip_attach.c +++ b/drivers/staging/usbip/userspace/src/usbip_attach.c @@ -36,7 +36,7 @@ static const char usbip_attach_usage_string[] = "usbip attach \n" - " -h, --host= The machine with exported USB devices\n" + " -r, --remote= The machine with exported USB devices\n" " -b, --busid= Busid of the device on \n"; void usbip_attach_usage(void) @@ -201,9 +201,9 @@ static int attach_device(char *host, char *busid) int usbip_attach(int argc, char *argv[]) { static const struct option opts[] = { - { "host", required_argument, NULL, 'h' }, - { "busid", required_argument, NULL, 'b' }, - { NULL, 0, NULL, 0 } + { "remote", required_argument, NULL, 'r' }, + { "busid", required_argument, NULL, 'b' }, + { NULL, 0, NULL, 0 } }; char *host = NULL; char *busid = NULL; @@ -211,13 +211,13 @@ int usbip_attach(int argc, char *argv[]) int ret = -1; for (;;) { - opt = getopt_long(argc, argv, "h:b:", opts, NULL); + opt = getopt_long(argc, argv, "r:b:", opts, NULL); if (opt == -1) break; switch (opt) { - case 'h': + case 'r': host = optarg; break; case 'b':