mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 17:05:18 +07:00
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 <host> -b <busid> $ usbip list --remote <host> Now: $ usbip attach --remote <host> -b <busid> $ usbip list --remote <host> Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de> Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b2e0228409
commit
80e4b9432c
@ -54,7 +54,7 @@
|
|||||||
client:# usbip list --remote <host>
|
client:# usbip list --remote <host>
|
||||||
- List exported USB devices on the <host>.
|
- List exported USB devices on the <host>.
|
||||||
|
|
||||||
client:# usbip attach --host <host> --busid 1-2
|
client:# usbip attach --remote <host> --busid 1-2
|
||||||
- Connect the remote USB device.
|
- Connect the remote USB device.
|
||||||
|
|
||||||
client:# usbip port
|
client:# usbip port
|
||||||
@ -163,7 +163,7 @@ exportable on the host.
|
|||||||
|
|
||||||
Attach a remote USB device:
|
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
|
port 0 attached
|
||||||
|
|
||||||
Show the devices attached to this client:
|
Show the devices attached to this client:
|
||||||
|
@ -38,7 +38,7 @@ then exit.
|
|||||||
.PP
|
.PP
|
||||||
|
|
||||||
.HP
|
.HP
|
||||||
\fBattach\fR \-\-host=<\fIhost\fR> \-\-busid=<\fIbus_id\fR>
|
\fBattach\fR \-\-remote=<\fIhost\fR> \-\-busid=<\fIbus_id\fR>
|
||||||
.IP
|
.IP
|
||||||
Attach a remote USB device.
|
Attach a remote USB device.
|
||||||
.PP
|
.PP
|
||||||
@ -79,7 +79,7 @@ List local USB devices.
|
|||||||
client:# usbip list --remote=server
|
client:# usbip list --remote=server
|
||||||
- List exportable usb devices on the 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.
|
- Connect the remote USB device.
|
||||||
|
|
||||||
client:# usbip detach --port=0
|
client:# usbip detach --port=0
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
static const char usbip_attach_usage_string[] =
|
static const char usbip_attach_usage_string[] =
|
||||||
"usbip attach <args>\n"
|
"usbip attach <args>\n"
|
||||||
" -h, --host=<host> The machine with exported USB devices\n"
|
" -r, --remote=<host> The machine with exported USB devices\n"
|
||||||
" -b, --busid=<busid> Busid of the device on <host>\n";
|
" -b, --busid=<busid> Busid of the device on <host>\n";
|
||||||
|
|
||||||
void usbip_attach_usage(void)
|
void usbip_attach_usage(void)
|
||||||
@ -201,7 +201,7 @@ static int attach_device(char *host, char *busid)
|
|||||||
int usbip_attach(int argc, char *argv[])
|
int usbip_attach(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
static const struct option opts[] = {
|
static const struct option opts[] = {
|
||||||
{ "host", required_argument, NULL, 'h' },
|
{ "remote", required_argument, NULL, 'r' },
|
||||||
{ "busid", required_argument, NULL, 'b' },
|
{ "busid", required_argument, NULL, 'b' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
@ -211,13 +211,13 @@ int usbip_attach(int argc, char *argv[])
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
opt = getopt_long(argc, argv, "h:b:", opts, NULL);
|
opt = getopt_long(argc, argv, "r:b:", opts, NULL);
|
||||||
|
|
||||||
if (opt == -1)
|
if (opt == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h':
|
case 'r':
|
||||||
host = optarg;
|
host = optarg;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
|
Loading…
Reference in New Issue
Block a user