Re: [PATCH v3 RESEND 2/2] usbip: apply list options regardless of order
From: Greg KH
Date: Wed Aug 12 2026 - 03:26:26 EST
On Wed, Aug 12, 2026 at 02:39:10AM -0400, Jason Colapietro wrote:
> usbip_list() acts on -r, -l and -d as soon as getopt_long() returns them,
> so any option parsed afterwards is never seen. -p therefore only takes
> effect when it precedes the mode selector: "usbip list -p -r <host>" is
> parsable while "usbip list -r <host> -p" is not, and -l and -d behave the
> same way. Nothing in the usage text suggests the order matters.
>
> Record the requested mode during the option loop and run it once parsing
> has finished, so -p applies wherever it appears on the command line. When
> several mode selectors are given the first one still wins, as before.
This changes how the program works, so this might break existing
systems.
Is this a real problem as-is? If not, I'd be very careful in changing
anything here...
thanks,
greg k-h