git: c67a07eb2cf8 - main - sdiotool: Remove the unused -f option

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 05 Nov 2026 14:52:29 UTC
The branch main has been updated by manu:

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

commit c67a07eb2cf8efb6ea626225ca2883f8c5aad910
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-10-22 16:39:07 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-05 14:52:14 +0000

    sdiotool: Remove the unused -f option
    
    The -f option was parsed but never used.  Its argument handling was also broken: getopt(3) binds the argument to the last option letter, so "fu:" made -f take no argument at all.  Remove it.
    
    Reviewed by:    oh
    Differential Revision:  https://reviews.freebsd.org/D61028
---
 usr.bin/sdiotool/sdiotool.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/usr.bin/sdiotool/sdiotool.c b/usr.bin/sdiotool/sdiotool.c
index 448fe830f7dd..2682891fd4b1 100644
--- a/usr.bin/sdiotool/sdiotool.c
+++ b/usr.bin/sdiotool/sdiotool.c
@@ -486,7 +486,6 @@ int
 main(int argc, char **argv) {
 	char device[] = "pass";
 	int unit = 0;
-	int func = 0;
 	__unused uint8_t *fw_ptr;
 	int ch;
 	struct cam_device *cam_dev;
@@ -495,14 +494,11 @@ main(int argc, char **argv) {
 
 	//fw_ptr = mmap_fw();
 
-	while ((ch = getopt(argc, argv, "fu:")) != -1) {
+	while ((ch = getopt(argc, argv, "u:")) != -1) {
 		switch (ch) {
 		case 'u':
 			unit = (int) strtol(optarg, NULL, 10);
 			break;
-		case 'f':
-			func = (int) strtol(optarg, NULL, 10);
-			break;
 		case '?':
 		default:
 			usage();