Page MenuHomeFreeBSD

usbconfig: implement -v option
ClosedPublic

Authored by joerg on Dec 20 2021, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 5:52 AM
Unknown Object (File)
Thu, Oct 31, 9:09 AM
Unknown Object (File)
Oct 4 2024, 4:00 PM
Unknown Object (File)
Oct 4 2024, 7:25 AM
Unknown Object (File)
Oct 2 2024, 7:03 AM
Unknown Object (File)
Oct 2 2024, 12:11 AM
Unknown Object (File)
Oct 1 2024, 9:01 PM
Unknown Object (File)
Sep 30 2024, 5:07 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.