summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-13 19:30:05 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-13 19:53:29 -0400
commit886a64fe6903bc1ccde5c7af0eac6786918c8e49 (patch)
treee8a8fd3318aa1e909ced2e38f84f052892a27c46 /src/systemctl
parent7d7681f70bc8c2140092029ccada9f75510a176b (diff)
logs-show: export logic to add matches for units
After that functions which add matches, show_journal_by_unit and show_journal_by_user_unit, become nearly identical, so I merged them into one function.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 4a55c566ec..5902a3798d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2509,23 +2509,15 @@ static void print_status_info(UnitStatusInfo *i) {
if (i->id && arg_transport != TRANSPORT_SSH) {
printf("\n");
- if(arg_scope == UNIT_FILE_SYSTEM)
- show_journal_by_unit(stdout,
- i->id,
- arg_output,
- 0,
- i->inactive_exit_timestamp_monotonic,
- arg_lines,
- flags);
- else
- show_journal_by_user_unit(stdout,
- i->id,
- arg_output,
- 0,
- i->inactive_exit_timestamp_monotonic,
- arg_lines,
- getuid(),
- flags);
+ show_journal_by_unit(stdout,
+ i->id,
+ arg_output,
+ 0,
+ i->inactive_exit_timestamp_monotonic,
+ arg_lines,
+ getuid(),
+ flags,
+ arg_scope == UNIT_FILE_SYSTEM);
}
if (i->need_daemon_reload)