Module Name:    src
Committed By:   martin
Date:           Thu Apr  4 13:58:20 UTC 2019

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

Log Message:
Ignore -f with the "destroy" command completely (it was effectively
ignored already, so no functional change). Leave it as valid option
for compatibility.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/gpt/destroy.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/destroy.c
diff -u src/sbin/gpt/destroy.c:1.10 src/sbin/gpt/destroy.c:1.11
--- src/sbin/gpt/destroy.c:1.10	Thu Dec  3 01:07:28 2015
+++ src/sbin/gpt/destroy.c	Thu Apr  4 13:58:20 2019
@@ -33,7 +33,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/destroy.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: destroy.c,v 1.10 2015/12/03 01:07:28 christos Exp $");
+__RCSID("$NetBSD: destroy.c,v 1.11 2019/04/04 13:58:20 martin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -52,7 +52,7 @@ __RCSID("$NetBSD: destroy.c,v 1.10 2015/
 static int cmd_destroy(gpt_t, int, char *[]);
 
 static const char *destroyhelp[] = {
-	"[-rf]",
+	"[-r]",
 };
 
 struct gpt_cmd c_destroy = {
@@ -107,12 +107,10 @@ cmd_destroy(gpt_t gpt, int argc, char *a
 {
 	int ch;
 	int recoverable = 0;
-	int force = 0;
 
 	while ((ch = getopt(argc, argv, "fr")) != -1) {
 		switch(ch) {
 		case 'f':
-			force = 1;
 			break;
 		case 'r':
 			recoverable = 1;
@@ -125,5 +123,5 @@ cmd_destroy(gpt_t gpt, int argc, char *a
 	if (argc != optind)
 		return usage();
 
-	return destroy(gpt, force, recoverable);
+	return destroy(gpt, 0, recoverable);
 }

Reply via email to