Page MenuHomeFreeBSD

usbconfig: implement -v option
ClosedPublic

Authored by joerg on Dec 20 2021, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 12:46 PM
Unknown Object (File)
Jan 13 2024, 7:47 PM
Unknown Object (File)
Jan 10 2024, 1:59 AM
Unknown Object (File)
Dec 27 2023, 2:41 PM
Unknown Object (File)
Dec 20 2023, 5:50 AM
Unknown Object (File)
Dec 13 2023, 5:08 PM
Unknown Object (File)
Nov 23 2023, 4:17 AM
Unknown Object (File)
Nov 16 2023, 9:13 AM
Subscribers

Details

Summary

Implement a -v option to usbconfig(8), as a shortcut for the most frequently needed commands dump_device_desc, dump_curr_config_desc, and show_ifdrv.
While here, implement a real -h option that has been promised by the man page.
Use <sysexits.h> to declare the utility return codes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joerg requested review of this revision.Dec 20 2021, 1:36 PM
usr.sbin/usbconfig/usbconfig.c
275

Add a space before "[-v]".

614

use /* comments */ and not // comments

Well, with the additional space, one of the usage lines is now 79 characters ...

I thought // comments were now acceptable as they are in C since C99, a lot of /usr/src files have them, but you're right, style(9) doesn't mention them.

This revision is now accepted and ready to land.Dec 20 2021, 8:00 PM

Don't forget to bump the manual page date again.

Don't forget to bump the manual page date again.

Hmm, it's still today's date. Does any automatic dependency strictly require a new date on each change?

Just set the date for tomorrow. There are some external scripts which look for date changes.

Just set the date for tomorrow. There are some external scripts which look for date changes.

OK, didn't knew that. I bumped it again, and pushed everything.
Thanks again for the speedy review!

This revision was automatically updated to reflect the committed changes.