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

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