]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: restore --failed (#5198)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Feb 2017 23:23:46 +0000 (18:23 -0500)
committerLennart Poettering <lennart@poettering.net>
Wed, 1 Feb 2017 23:23:46 +0000 (00:23 +0100)
'systemctl --failed' is an extremely common operation and it's nice to have
a shortcut for it.

Revert "man: don't document systemctl --failed" and add the option back to
systemctl's help and shell completion scripts.

This reverts commit 036359ba8d0aba7db7eac75d10073a849a033fd1.

man/systemctl.xml
shell-completion/bash/systemctl.in
shell-completion/zsh/_systemctl.in
src/systemctl/systemctl.c

index 87cf52172be950411b6d46c9afec169bb9726663..25db00e5f689c8ca7134ca4dcfc8f4cd81e1b647 100644 (file)
       <xi:include href="user-system-options.xml" xpointer="user" />
       <xi:include href="user-system-options.xml" xpointer="system" />
 
-      <!-- we do not document -failed here, as it has been made
-           redundant by -state=failed, which it predates. To keep
-           things simple, we only document the new switch, while
-           keeping the old one around for compatibility only. -->
+      <varlistentry>
+        <term><option>--failed</option></term>
+
+        <listitem>
+          <para>List units in failed state. This is equivalent to
+          <option>--state=failed</option>.</para>
+        </listitem>
+      </varlistentry>
 
       <varlistentry>
         <term><option>--no-wall</option></term>
index 77650108691ff26b2234f8c6fb9eae546328ec23..e4ccad879961a3bbeb3aafc4c2b9fd270b30a504 100644 (file)
@@ -126,7 +126,7 @@ _systemctl () {
                [STANDALONE]='--all -a --reverse --after --before --defaults --force -f --full -l --global
                              --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall --now
                              --quiet -q --privileged -P --system --user --version --runtime --recursive -r --firmware-setup
-                             --show-types -i --ignore-inhibitors --plain'
+                             --show-types -i --ignore-inhibitors --plain --failed'
                       [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root
                              --preset-mode -n --lines -o --output -M --machine'
         )
index 553216da5e0bc5caefcab13be92738751827192a..92a56ba99a0959317947d52d2bab41850e9864a1 100644 (file)
@@ -386,4 +386,5 @@ _arguments -s \
     {-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \
     '--firmware-setup[Tell the firmware to show the setup menu on next boot]' \
     '--plain[When used with list-dependencies, print output as a list]' \
+    '--failed[Show failed units]' \
     '*::systemctl command:_systemctl_command'
index a20ca1bcb5037e821c21788ffc20dbde695508a8..8f80559bafa389d5317474fef899911b56789664 100644 (file)
@@ -6937,6 +6937,7 @@ static void systemctl_help(void) {
                "  -a --all            Show all properties/all units currently in memory,\n"
                "                      including dead/empty ones. To list all units installed on\n"
                "                      the system, use the 'list-unit-files' command instead.\n"
+               "     --failed         Same as --state=failed\n"
                "  -l --full           Don't ellipsize unit names on output\n"
                "  -r --recursive      Show unit list of host and local containers\n"
                "     --reverse        Show reverse dependencies with 'list-dependencies'\n"