[systemd-devel] [PATCH] systemctl: resolve duplicate -f option in doc

Dave Reisner d at falconindy.com
Sun Mar 18 17:28:29 PDT 2012


The man page listed -f as the shortopt for both --follow and --force,
but the shortopt only applied to --force. Since --force is the dangerous
option, take away the shortopt and give it to --follow. Users should be
reminded that what they're about to do isn't standard procedure.
---
 man/systemctl.xml |    1 -
 src/systemctl.c   |    6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/man/systemctl.xml b/man/systemctl.xml
index c467ed8..e44ce5d 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -338,7 +338,6 @@
 
                         <varlistentry>
                                 <term><option>--force</option></term>
-                                <term><option>-f</option></term>
 
                                 <listitem><para>When used with
                                 <command>enable</command>, override any
diff --git a/src/systemctl.c b/src/systemctl.c
index f51085f..9e517c9 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4247,7 +4247,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                 ARG_NO_ASK_PASSWORD,
                 ARG_FAILED,
                 ARG_RUNTIME,
-                ARG_FOLLOW
+                ARG_FORCE
         };
 
         static const struct option options[] = {
@@ -4271,7 +4271,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                 { "order",     no_argument,       NULL, ARG_ORDER     },
                 { "require",   no_argument,       NULL, ARG_REQUIRE   },
                 { "root",      required_argument, NULL, ARG_ROOT      },
-                { "force",     no_argument,       NULL, 'f'           },
+                { "force",     no_argument,       NULL, ARG_FORCE     },
                 { "no-reload", no_argument,       NULL, ARG_NO_RELOAD },
                 { "kill-mode", required_argument, NULL, ARG_KILL_MODE }, /* undocumented on purpose */
                 { "kill-who",  required_argument, NULL, ARG_KILL_WHO  },
@@ -4281,7 +4281,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                 { "privileged",no_argument,       NULL, 'P'           },
                 { "runtime",   no_argument,       NULL, ARG_RUNTIME   },
                 { "lines",     required_argument, NULL, 'n'           },
-                { "follow",    no_argument,       NULL, ARG_FOLLOW    },
+                { "follow",    no_argument,       NULL, 'f'           },
                 { "output",    required_argument, NULL, 'o'           },
                 { NULL,        0,                 NULL, 0             }
         };
-- 
1.7.9.4



More information about the systemd-devel mailing list