backup deletedump: Change -port to -portoffset
authorAndrew Deason <adeason@sinenomine.net>
Thu, 7 Nov 2013 06:03:17 +0000 (00:03 -0600)
committerDerrick Brashear <shadow@your-file-system.com>
Thu, 7 Nov 2013 12:21:13 +0000 (04:21 -0800)
Use -portoffset instead of -port, for consistency with all of the
other backup suite commands. Leave -port in as an alias, for backwards
compatibility. Currently -port will mean -portoffset anyway, since
it's an unambiguous abbreviation, but put in the alias explicitly,
just in case some other option comes along starting with -port.

Change-Id: I2f8aaa34fdf9e7c80a8fec1dc1caf63d9b7192b1
Reviewed-on: http://gerrit.openafs.org/10440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/bucoord/commands.c
src/bucoord/main.c

index ba7eb42..daeb791 100644 (file)
@@ -2445,7 +2445,7 @@ bc_deleteDumpCmd(struct cmd_syndesc *as, void *arock)
        havetime = 1;
     }
 
-    port = (as->parms[3].items ? getPortOffset(as->parms[3].items->data) : 0); /* -port */
+    port = (as->parms[3].items ? getPortOffset(as->parms[3].items->data) : 0); /* -portoffset */
     if (as->parms[5].items)    /* -dbonly */
        port = -1;
 
index d233dba..818a7f8 100644 (file)
@@ -714,7 +714,8 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-dumpid", CMD_LIST, CMD_OPTIONAL, "dump id");
     cmd_AddParm(ts, "-from", CMD_LIST, CMD_OPTIONAL, "date time");
     cmd_AddParm(ts, "-to", CMD_LIST, CMD_OPTIONAL, "date time");
-    cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+    cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+    cmd_AddParmAlias(ts, 3, "-port");
     cmd_AddParm(ts, "-groupid", CMD_SINGLE, CMD_OPTIONAL, "group ID");
     cmd_AddParm(ts, "-dbonly", CMD_FLAG, CMD_OPTIONAL,
                "delete the dump from the backup database only");