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

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