diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-01-14 18:16:50 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-16 12:11:47 -0500 |
commit | 9bdbc2e2ec523dbefe1c1c7e164b5544aff0b185 (patch) | |
tree | 5a24260ea36f9984b1f03162fa4d418429d9f268 /src/systemctl | |
parent | 2e72983463fc0b95f5aac3528334848e8d1d0744 (diff) |
systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.
--full parameter also for cgls and loginctl.
Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).
get_process_cmdline with max_length == 0 will not ellipsize output.
Replace LINE_MAX with 0 in some calls of get_process_cmdline.
[zj: Default to --full when under pager for clgs.
Drop '-f' since it wasn't documented and didn't actually work.
Reindent a bit.
]
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 7cf51dceb8..a2ad0deb5a 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2231,6 +2231,12 @@ static void print_status_info(UnitStatusInfo *i) { char since1[FORMAT_TIMESTAMP_RELATIVE_MAX], *s1; char since2[FORMAT_TIMESTAMP_MAX], *s2; const char *path; + int flags = + arg_all * OUTPUT_SHOW_ALL | + (!on_tty() || pager_have()) * OUTPUT_FULL_WIDTH | + on_tty() * OUTPUT_COLOR | + !arg_quiet * OUTPUT_WARN_CUTOFF | + arg_full * OUTPUT_FULL_WIDTH; assert(i); @@ -2454,17 +2460,11 @@ static void print_status_info(UnitStatusInfo *i) { if (i->control_pid > 0) extra[k++] = i->control_pid; - show_cgroup_and_extra_by_spec(i->default_control_group, "\t\t ", c, false, arg_all, extra, k); + show_cgroup_and_extra_by_spec(i->default_control_group, "\t\t ", c, false, extra, k, flags); } } if (i->id && arg_transport != TRANSPORT_SSH) { - int flags = - arg_all * OUTPUT_SHOW_ALL | - (!on_tty() || pager_have()) * OUTPUT_FULL_WIDTH | - on_tty() * OUTPUT_COLOR | - !arg_quiet * OUTPUT_WARN_CUTOFF; - printf("\n"); show_journal_by_unit(stdout, i->id, |