The branch main has been updated by wulf:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0feaf865ce8e333f834177a5656e57b5e32ad5cf

commit 0feaf865ce8e333f834177a5656e57b5e32ad5cf
Author:     Eygene Ryabinkin <r...@freebsd.org>
AuthorDate: 2025-01-29 21:56:41 +0000
Commit:     Vladimir Kondratyev <w...@freebsd.org>
CommitDate: 2025-01-29 21:56:41 +0000

    iwmbtfw(8): fix getopt flags, unify usage()/manual page contents
    
    Seems like there was an intention to use command line switches
    -m, -p and -v (each with argument), but there is no handling
    for them.
    
    Also, some enhancements to the usage()/manpage:
    
     - use FreeBSD manpage style -- square brackets -- for denoting
       optional arguments in usage();
    
     - show default directory path in usage();
    
     - update manual: -f is the optional flag;
    
     - show descriptions for -I/-D together: they are logically related.
    
    Signed-off-by:  Eygene Ryabinkin <r...@freebsd.org>
    Reviewed by:    wulf
    MFC after:      1 month
---
 usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 6 +++---
 usr.sbin/bluetooth/iwmbtfw/main.c    | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 
b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
index 2ce828cb5ebe..87f34435d3f4 100644
--- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
+++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
@@ -36,7 +36,7 @@
 .Nm
 .Op Fl DI
 .Fl d Ar device_name
-.Fl f Ar firmware_path
+.Op Fl f Ar firmware_path
 .Nm
 .Fl h
 .Sh DESCRIPTION
@@ -66,6 +66,8 @@ configuration to load in at runtime.
 .Pp
 The options are as follows:
 .Bl -tag -width "-f firmware_path"
+.It Fl I
+Enable informational debugging.
 .It Fl D
 Enable verbose debugging.
 .It Fl d Ar device_name
@@ -76,8 +78,6 @@ device name.
 Specify the directory containing the firmware files to search and upload.
 .It Fl h
 Display usage message and exit.
-.It Fl I
-Enable informational debugging.
 .El
 .Sh EXIT STATUS
 .Ex -std
diff --git a/usr.sbin/bluetooth/iwmbtfw/main.c 
b/usr.sbin/bluetooth/iwmbtfw/main.c
index 7af07bb68322..b27c5ad62239 100644
--- a/usr.sbin/bluetooth/iwmbtfw/main.c
+++ b/usr.sbin/bluetooth/iwmbtfw/main.c
@@ -369,10 +369,11 @@ static void
 usage(void)
 {
        fprintf(stderr,
-           "Usage: iwmbtfw (-D) -d ugenX.Y (-f firmware path) (-I)\n");
+           "Usage: iwmbtfw [-DI] -d ugenX.Y [-f firmware path]\n");
        fprintf(stderr, "    -D: enable debugging\n");
        fprintf(stderr, "    -d: device to operate upon\n");
-       fprintf(stderr, "    -f: firmware path, if not default\n");
+       fprintf(stderr, "    -f: firmware path (defaults to %s)\n",
+           _DEFAULT_IWMBT_FIRMWARE_PATH);
        fprintf(stderr, "    -I: enable informational output\n");
        exit(127);
 }
@@ -652,7 +653,7 @@ main(int argc, char *argv[])
        enum iwmbt_device iwmbt_device;
 
        /* Parse command line arguments */
-       while ((n = getopt(argc, argv, "Dd:f:hIm:p:v:")) != -1) {
+       while ((n = getopt(argc, argv, "Dd:f:hI")) != -1) {
                switch (n) {
                case 'd': /* ugen device name */
                        devid_set = 1;

Reply via email to