* when plymouth is disabled the console password entry stuff seems to be borked
https://bugzilla.redhat.com/show_bug.cgi?id=655538
-* systemctl default is started when we type "reboot" at rescue mode prompt
-
* exclude java hsp files by default
https://bugzilla.redhat.com/show_bug.cgi?id=527425
* add --ignore-deps to systemctl
-* add --failed to systemctl
-
* increase password timeout
* look up crypto partition mount points via fstab to show to the user when prompting for a password
they are set or not.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--failed</option></term>
+
+ <listitem><para>When listing units,
+ show only failed units. Do not confuse
+ with
+ <option>--fail</option>.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>--full</option></term>
unfinished job, fail the command. If
this is not specified the requested
operation will replace the pending job,
- if necessary.</para></listitem>
+ if necessary. Do not confuse
+ with
+ <option>--failed</option>.</para></listitem>
</varlistentry>
<varlistentry>
static bool arg_force = false;
static bool arg_defaults = false;
static bool arg_ask_password = false;
+static bool arg_failed = false;
static char **arg_wall = NULL;
static const char *arg_kill_who = NULL;
static const char *arg_kill_mode = NULL;
return strcasecmp(u->id, v->id);
}
-static bool output_show_job(const struct unit_info *u) {
+static bool output_show_unit(const struct unit_info *u) {
const char *dot;
+ if (arg_failed)
+ return streq(u->active_state, "failed");
+
return (!arg_type || ((dot = strrchr(u->id, '.')) &&
streq(dot+1, arg_type))) &&
(arg_all || !(streq(u->active_state, "inactive") || u->following[0]) || u->job_id > 0);
job_len = sizeof("JOB")-1;
for (u = unit_infos; u < unit_infos + c; u++) {
- if (!output_show_job(u))
+ if (!output_show_unit(u))
continue;
active_len = MAX(active_len, strlen(u->active_state));
const char *on_loaded, *off_loaded;
const char *on_active, *off_active;
- if (!output_show_job(u))
+ if (!output_show_unit(u))
continue;
n_shown++;
" -t --type=TYPE List only units of a particular type\n"
" -p --property=NAME Show only properties by this name\n"
" -a --all Show all units/properties, including dead/empty ones\n"
+ " --failed Show only failed units\n"
" --full Don't ellipsize unit names on output\n"
" --fail When queueing a new job, fail if conflicting jobs are\n"
" pending\n"
ARG_DEFAULTS,
ARG_KILL_MODE,
ARG_KILL_WHO,
- ARG_NO_ASK_PASSWORD
+ ARG_NO_ASK_PASSWORD,
+ ARG_FAILED
};
static const struct option options[] = {
{ "type", required_argument, NULL, 't' },
{ "property", required_argument, NULL, 'p' },
{ "all", no_argument, NULL, 'a' },
+ { "failed", no_argument, NULL, ARG_FAILED },
{ "full", no_argument, NULL, ARG_FULL },
{ "fail", no_argument, NULL, ARG_FAIL },
{ "user", no_argument, NULL, ARG_USER },
arg_full = true;
break;
+ case ARG_FAILED:
+ arg_failed = true;
+ break;
+
case 'q':
arg_quiet = true;
break;