* Re: [PATCH v3 1/2] usbip: make remote list honor parsable output
[not found] <CA+Z0x2JOUKR6cH41JyFHBmG5L_XoVEa02vrc91-L42RX5oa5OA@mail.gmail.com>
@ 2026-08-12 5:23 ` Greg KH
2026-08-12 5:40 ` Jason Colapietro
0 siblings, 1 reply; 2+ messages in thread
From: Greg KH @ 2026-08-12 5:23 UTC (permalink / raw)
To: Jason Colapietro
Cc: Shuah Khan, Valentina Manea, skhan, Hongren Zheng, linux-usb,
linux-kernel, stable
On Tue, Aug 11, 2026 at 11:26:44PM -0400, Jason Colapietro wrote:
> The -p option only affects local devices and gadgets. Remote lists still
> print their human-readable headings and details, so scripts cannot parse
> them using the documented option.
>
> Pass the parsable flag through the remote listing path. Emit the same busid
> and usbid record used for local devices while continuing to consume every
> interface record from the server.
>
> Fixes: e9837bbb3e69 ("staging: usbip: userspace tools v1.0.0")
> Closes:
> https://www.google.com/url?q=https://bugzilla.kernel.org/show_bug.cgi?id%3D219502&source=gmail&ust=1786591574713000&sa=E
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:gpt-5
> Signed-off-by: Jason Colapietro <jasoncola1@gmail.com>
> ---
> Changes in v3:
> - No functional change; resent as 1/2 of a series.
> - 2/2 makes -p work regardless of where it appears on the command line.
>
> tools/usb/usbip/src/usbip_list.c | 33 ++++++++++++++++++++------------
> 1 file changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/tools/usb/usbip/src/usbip_list.c
> b/tools/usb/usbip/src/usbip_list.c
> index 3d810bcca02..b9d60b87e47 100644
> --- a/tools/usb/usbip/src/usbip_list.c
> +++ b/tools/usb/usbip/src/usbip_list.c
> @@ -41,7 +41,7 @@ void usbip_list_usage(void)
> printf("usage: %s", usbip_list_usage_string);
> }
>
> -static int get_exported_devices(char *host, int sockfd)
> +static int get_exported_devices(char *host, int sockfd, bool parsable)
> {
> char product_name[100];
> char class_name[100];
> @@ -80,9 +80,11 @@ static int get_exported_devices(char *host, int sockfd)
> return 0;
> }
>
> - printf("Exportable USB devices\n");
> - printf("======================\n");
> - printf(" - %s\n", host);
> + if (!parsable) {
> + printf("Exportable USB devices\n");
> + printf("======================\n");
> + printf(" - %s\n", host);
> + }
Something went wrong with your email client and it sent html email with
a corrupted patch :(
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3 1/2] usbip: make remote list honor parsable output
2026-08-12 5:23 ` [PATCH v3 1/2] usbip: make remote list honor parsable output Greg KH
@ 2026-08-12 5:40 ` Jason Colapietro
0 siblings, 0 replies; 2+ messages in thread
From: Jason Colapietro @ 2026-08-12 5:40 UTC (permalink / raw)
To: Greg KH
Cc: Shuah Khan, Valentina Manea, skhan, Hongren Zheng, linux-usb,
linux-kernel, stable
Thanks for catching that, Greg. Sorry about the noise — Gmail mangled
the patch. I'll resend the series as plain text using git send-email.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-12 5:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CA+Z0x2JOUKR6cH41JyFHBmG5L_XoVEa02vrc91-L42RX5oa5OA@mail.gmail.com>
2026-08-12 5:23 ` [PATCH v3 1/2] usbip: make remote list honor parsable output Greg KH
2026-08-12 5:40 ` Jason Colapietro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox