Blame SOURCES/0006-Add-documentation-examples-for-using-bus-device-iden.patch

536eb0
From b3482e8d8f8970d481b9bfdb6662a8b67a973537 Mon Sep 17 00:00:00 2001
536eb0
From: John Call <johnsimcall@gmail.com>
536eb0
Date: Mon, 19 Dec 2022 19:01:50 +0000
536eb0
Subject: [PATCH 6/8] Add documentation examples for using bus-device
536eb0
 identification
536eb0
536eb0
---
536eb0
 tools/usbredirect.1 | 6 ++++++
536eb0
 tools/usbredirect.c | 2 +-
536eb0
 2 files changed, 7 insertions(+), 1 deletion(-)
536eb0
536eb0
diff --git a/tools/usbredirect.1 b/tools/usbredirect.1
536eb0
index d6b2a63..2be8be0 100644
536eb0
--- a/tools/usbredirect.1
536eb0
+++ b/tools/usbredirect.1
536eb0
@@ -4,6 +4,9 @@ usbredirect \- exporting an USB device for use from another (virtual) machine
536eb0
 .SH SYNOPSIS
536eb0
 .B usbredirect
536eb0
 [\fI--device vendor:product\fR] [\fI--to addr:port\fR] [\fI--as addr:port\fR]
536eb0
+.br
536eb0
+.B usbredirect
536eb0
+[\fI--device bus-device\fR] [\fI--to addr:port\fR] [\fI--as addr:port\fR]
536eb0
 .SH DESCRIPTION
536eb0
 usbredirect is an usbredir client for exporting an USB device either as TCP
536eb0
 client or server, for use from another (virtual) machine through the usbredir
536eb0
@@ -11,6 +14,9 @@ protocol.
536eb0
 .PP
536eb0
 You can specify the USB device to export by USB id in the form of
536eb0
 \fI<vendorid>:<prodid>\fR.
536eb0
+.br
536eb0
+Or you can specify the USB device to export in the form of
536eb0
+\fI<busnum>-<devnum>\fR.
536eb0
 .PP
536eb0
 Notice that an instance of usbredirect can only be used to export a single USB
536eb0
 device and it will close once the other side closes the connection. If you
536eb0
diff --git a/tools/usbredirect.c b/tools/usbredirect.c
536eb0
index b6a30ad..95f3580 100644
536eb0
--- a/tools/usbredirect.c
536eb0
+++ b/tools/usbredirect.c
536eb0
@@ -138,7 +138,7 @@ parse_opts(int *argc, char ***argv)
536eb0
     redirect *self = NULL;
536eb0
 
536eb0
     GOptionEntry entries[] = {
536eb0
-        { "device", 0, 0, G_OPTION_ARG_STRING, &device, "Local USB device to be redirected", NULL },
536eb0
+        { "device", 0, 0, G_OPTION_ARG_STRING, &device, "Local USB device to be redirected identified as either VENDOR:PRODUCT \"0123:4567\" or BUS-DEVICE \"5-2\"", NULL },
536eb0
         { "to", 0, 0, G_OPTION_ARG_STRING, &remoteaddr, "Client URI to connect to", NULL },
536eb0
         { "as", 0, 0, G_OPTION_ARG_STRING, &localaddr, "Server URI to be run", NULL },
536eb0
         { "keepalive", 'k', 0, G_OPTION_ARG_NONE, &keepalive, "If we should set SO_KEEPALIVE flag on underlying socket", NULL },
536eb0
-- 
536eb0
2.39.0
536eb0