]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Hide -noexecute in favor of -dryrun
authorJeff Blaine <jblaine@kickflop.net>
Thu, 19 May 2011 01:46:52 +0000 (21:46 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 6 Apr 2016 08:12:49 +0000 (04:12 -0400)
Makes all previous -noexecute arguments hidden (still callable)
and replaces them with -dryrun whose help text has been made
common where appropriate instead of the 3 previous ways the
argument was explained.

Reviewed-on: http://gerrit.openafs.org/4678
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit f1928b9d26cfc415911a2e4346fbfefb909745ac)

Change-Id: I1685d2de6d4f690300deac36143912fad11608c9
Reviewed-on: https://gerrit.openafs.org/11613
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jan Iven <jan.iven@cern.ch>
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/bucoord/commands.c
src/bucoord/main.c
src/uss/uss.c
src/volser/vos.c

index f4589b5777d017a4bccaa3c9af3792f2e334deff..54a978ce6e953fc67449f040506fdd5372d5793c 100644 (file)
@@ -2485,7 +2485,12 @@ bc_deleteDumpCmd(struct cmd_syndesc *as, void *arock)
     if (havegroupid)
        groupId = atoi(as->parms[4].items->data);
 
-    noexecute = (as->parms[7].items ? 1 : 0);
+    if (as->parms[7].items || as->parms[8].items) {
+        /* -noexecute (hidden) or -dryrun used */
+       noexecute = 1;
+    } else {
+       noexecute = 0;
+    }
 
     /* Get the time to delete to */
     if (as->parms[2].items) {  /* -to */
index 3f38d07dca78500c0a0f0a345e956cadc0ad4cd5..13ddbe43ecc97ac0d0b4796d38ebd26a96d79f28 100644 (file)
@@ -715,8 +715,9 @@ main(int argc, char **argv)
                "delete the dump from the backup database only");
     cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
                "always delete from backup database");
-    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL,
-               "Just list the dumps");
+    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL|CMD_HIDDEN, "");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
+               "list the dumps, don't delete anything");
 
     if (!interact)
        add_std_args(ts);
index 1163fc126c29b914fdb41c1050e49a2fcaeb5f88..242f03366170b5c22a04a2b7c8833dfddf8a68a0 100644 (file)
@@ -1846,7 +1846,7 @@ main(int argc, char *argv[])
     cmd_AddParm(cs, "-admin", CMD_SINGLE, CMD_OPTIONAL,
                "administrator to authenticate");
     cmd_AddParm(cs, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
-               "only list what would be done, don't do it");
+               "list what would be done, don't do it");
     cmd_AddParm(cs, "-skipauth", CMD_FLAG, CMD_OPTIONAL,
                "ignore all contact with the authentication server (kaserver)");
     cmd_AddParm(cs, "-overwrite", CMD_FLAG, CMD_OPTIONAL,
@@ -1866,7 +1866,7 @@ main(int argc, char *argv[])
     cmd_AddParm(cs, "-admin", CMD_SINGLE, CMD_OPTIONAL,
                "administrator to authenticate");
     cmd_AddParm(cs, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
-               "only list what would be done, don't do it");
+               "list what would be done, don't do it");
     cmd_AddParm(cs, "-skipauth", CMD_FLAG, CMD_OPTIONAL,
                "ignore all contact with the authentication server (kaserver)");
     cmd_AddParm(cs, "-overwrite", CMD_FLAG, CMD_OPTIONAL,
@@ -1907,7 +1907,7 @@ main(int argc, char *argv[])
     cmd_AddParm(cs, "-admin", CMD_SINGLE, CMD_OPTIONAL,
                "administrator to authenticate");
     cmd_AddParm(cs, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
-               "only list what would be done, don't do it");
+               "list what would be done, don't do it");
     cmd_AddParm(cs, "-skipauth", CMD_FLAG, CMD_OPTIONAL,
                "ignore all contact with the authentication server (kaserver)");
 #if USS_FUTURE_FEATURES
@@ -1927,7 +1927,7 @@ main(int argc, char *argv[])
     cmd_AddParm(cs, "-admin", CMD_SINGLE, CMD_OPTIONAL,
                "administrator to authenticate");
     cmd_AddParm(cs, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
-               "only list what would be done, don't do it");
+               "list what would be done, don't do it");
     cmd_AddParm(cs, "-skipauth", CMD_FLAG, CMD_OPTIONAL,
                "ignore all contact with the authentication server (kaserver)");
 #endif /* USS_DONT_HIDE_SOME_FEATURES */
@@ -1960,7 +1960,7 @@ main(int argc, char *argv[])
     cmd_AddParm(cs, "-admin", CMD_SINGLE, CMD_OPTIONAL,
                "administrator to authenticate");
     cmd_AddParm(cs, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
-               "only list what would be done, don't do it");
+               "list what would be done, don't do it");
     cmd_AddParm(cs, "-skipauth", CMD_FLAG, CMD_OPTIONAL,
                "ignore all contact with the authentication server (kaserver)");
 #endif /* USS_DONT_HIDE_SOME_FEATURES */
index 28b63a3e257ae9b81df93d292171c1d59dff27bc..a7b4851fc2ea89082798ad9f347c567a1f548626 100644 (file)
@@ -4296,7 +4296,8 @@ DeleteEntry(struct cmd_syndesc *as, void *arock)
                            itp->data);
                continue;
            }
-           if (as->parms[4].items) {   /* -noexecute */
+           if (as->parms[4].items || as->parms[5].items) {
+               /* -noexecute (hidden) or -dryrun */
                fprintf(STDOUT, "Would have deleted VLDB entry for %s \n",
                        itp->data);
                fflush(STDOUT);
@@ -4406,7 +4407,8 @@ DeleteEntry(struct cmd_syndesc *as, void *arock)
            }
        }
 
-       if (as->parms[4].items) {       /* -noexecute */
+       if (as->parms[4].items || as->parms[5].items) {
+           /* -noexecute (hidden) or -dryrun */
            fprintf(STDOUT, "Would have deleted VLDB entry for %s \n",
                    vllist->name);
            fflush(STDOUT);
@@ -6266,14 +6268,14 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
     cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
-    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "list what would be done, don't do it");
     COMMONPARMS;
 
     ts = cmd_CreateSyntax("syncserv", SyncServer, NULL,
                          "synchronize server with VLDB");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
-    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "list what would be done, don't do it");
     COMMONPARMS;
 
     ts = cmd_CreateSyntax("examine", ExamineVolume, NULL,
@@ -6351,7 +6353,7 @@ main(int argc, char **argv)
                "exclude common prefix volumes");
     cmd_AddParm(ts, "-xprefix", CMD_LIST, CMD_OPTIONAL,
                "negative prefix on volume(s)");
-    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "no action");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "list what would be done, don't do it");
     COMMONPARMS;
 
     ts = cmd_CreateSyntax("delentry", DeleteEntry, NULL,
@@ -6361,8 +6363,9 @@ main(int argc, char **argv)
                "prefix of the volume whose VLDB entry is to be deleted");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
-    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL,
-               "no execute");
+    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL|CMD_HIDDEN, "");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL,
+               "list what would be done, don't do it");
     COMMONPARMS;
 
     ts = cmd_CreateSyntax("partinfo", PartitionInfo, NULL,