Module Name:    src
Committed By:   christos
Date:           Mon Feb 24 17:07:04 UTC 2025

Modified Files:
        src/sbin/gpt: recover.c

Log Message:
remove getopt call (noted by rillig@)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sbin/gpt/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/recover.c
diff -u src/sbin/gpt/recover.c:1.20 src/sbin/gpt/recover.c:1.21
--- src/sbin/gpt/recover.c:1.20	Sun Feb 23 15:47:19 2025
+++ src/sbin/gpt/recover.c	Mon Feb 24 12:07:04 2025
@@ -33,7 +33,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/recover.c,v 1.8 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: recover.c,v 1.20 2025/02/23 20:47:19 christos Exp $");
+__RCSID("$NetBSD: recover.c,v 1.21 2025/02/24 17:07:04 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -232,17 +232,7 @@ recover(gpt_t gpt)
 static int
 cmd_recover(gpt_t gpt, int argc, char *argv[])
 {
-	int ch;
-
-	while ((ch = getopt(argc, argv, "r")) != -1) {
-		switch(ch) {
-		case 'r':
-		default:
-			return usage();
-		}
-	}
-
-	if (argc != optind)
+	if (argc != 2)
 		return usage();
 
 	return recover(gpt);

Reply via email to