From nobody Sat Mar 1 09:39:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z4g5p3Ty4z5p7vt; Sat, 01 Mar 2025 09:39:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z4g5n3p52z3Hdf; Sat, 01 Mar 2025 09:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740821981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8LmgIqvFBmVOHJKVYF7xR8iyYk8U2ipNlty1qhNt9w=; b=ElXiqWP9OlfnEi0dnFDS2gexza2xbqby+wpCGQH6dl/2qzSPMkp2ztbPXrHjZPIW5HnJta ettUtvyVyQo/FwYHVFwtWRWp7pbHbvLmSl2/H/kpLry7/wFU1DFRt7EfgM9zuALqOoZJU6 bL0gBo6kHz99K36WX7TdYEUhdq1XliPUUdt9QZVA/h1zUSFuxO1YdIyprh7vzU2JSUVjTK HyvmgdL20kyibrfGcvBtHw8KN/3gD3BngM1tV83FZGVdwgx8HSi0eHk5+syBJXA5G6lvOq wTRFUKO0iudmFeuogAcr563L5TmBKpbBVn9l6+h6RoHPoyT35ek/jc03jxDqvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740821981; a=rsa-sha256; cv=none; b=Btlw4g3XaVbU2E8mmBMWt/w97r0mauRF01tDwsdW+S82UaHAq1LRDCQNvQwSD0l8caP3o2 Fit9BLm3Y+4G5GSJ+5v7yHZVBmw1SKUZcuZyVJOPPnlCR3bJ1CPw+4YNVOdhTXWD19pMs7 6RmbFkXiZLKbUbgjj3poAjly7dTRcfS9/SsAClevene+MG1k+FYMK/OysVGB9WEvfZf0Sw GOfQFZFIgN9Z3XQo/x/0+sSnxn44DXX5z529rooKq37Pua+uNG/SpDMwjnQbQ/EJ7ApMc3 qmdoZq7Nx5aP3rPAelKxt5GiyJ8Gnx2pyJa8cLb8ECRy+i/rfSw6e9nAl16rYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740821981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8LmgIqvFBmVOHJKVYF7xR8iyYk8U2ipNlty1qhNt9w=; b=qfARlNCF7J3PYPkLN5lbuW9Tu/+yAKF9OJVkWqBHlsHodYYjbGn/CEqcdEVhv+nnR+m7qg 4+ZpX7ATCzRbvu6agqBbrzr+ygozUVzGDssXXEG6tlYSTqFsmvaWWzHF3lp4GYAzaiLFo3 P5SmOE4YaQMWAD2/W26vdIjN1Xo0z0Hw6VMt+rk0BVTd8/5+QVs71Urk5o/oieQ3ZxJQ97 omqQm+NnAuBF2zKIE9BpFE4IMbS4lbO6A156NUqGI473VtHgpU8xGHRJSK96L92iOB0e0e V4F3zHphXlXREjW35Xi9o/hHe1grd/STYt1mvdbkGYFeQdUB2sXNTngohR8fXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z4g5n3NWLz18VD; Sat, 01 Mar 2025 09:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5219df7k084656; Sat, 1 Mar 2025 09:39:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5219dfQg084653; Sat, 1 Mar 2025 09:39:41 GMT (envelope-from git) Date: Sat, 1 Mar 2025 09:39:41 GMT Message-Id: <202503010939.5219dfQg084653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 666f8246c392 - stable/14 - iwmbtfw(8): fix getopt flags, unify usage()/manual page contents List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 666f8246c39251e70f2a676bd1775f3563e73b1c Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=666f8246c39251e70f2a676bd1775f3563e73b1c commit 666f8246c39251e70f2a676bd1775f3563e73b1c Author: Eygene Ryabinkin AuthorDate: 2025-01-29 21:56:41 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-03-01 09:36:39 +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 Reviewed by: wulf MFC after: 1 month (cherry picked from commit 0feaf865ce8e333f834177a5656e57b5e32ad5cf) --- 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;