Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt Ignore -f with the "destroy" command completely (it...



details:   https://anonhg.NetBSD.org/src/rev/eea74f95ab78
branches:  trunk
changeset: 840364:eea74f95ab78
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 04 13:58:20 2019 +0000

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

diffstat:

 sbin/gpt/destroy.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r c38570e057a0 -r eea74f95ab78 sbin/gpt/destroy.c
--- a/sbin/gpt/destroy.c        Thu Apr 04 13:55:40 2019 +0000
+++ b/sbin/gpt/destroy.c        Thu Apr 04 13:58:20 2019 +0000
@@ -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 @@
 static int cmd_destroy(gpt_t, int, char *[]);
 
 static const char *destroyhelp[] = {
-       "[-rf]",
+       "[-r]",
 };
 
 struct gpt_cmd c_destroy = {
@@ -107,12 +107,10 @@
 {
        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 @@
        if (argc != optind)
                return usage();
 
-       return destroy(gpt, force, recoverable);
+       return destroy(gpt, 0, recoverable);
 }



Home | Main Index | Thread Index | Old Index