summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirco Tischler <mt-ml@gmx.de>2013-01-17 18:55:08 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-18 11:14:00 -0500
commitcc86e6b86e6431940a68fae56b84b865cf5b1e6d (patch)
tree103d552046f7ee039d259fce2a5636a7ee741ef1
parent1a6c43e94649b3f271502a88655f63ea85168fec (diff)
systemctl: print the user session journal for user session units.
-rw-r--r--src/systemctl/systemctl.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index f3d661d2b5..fb4ae24ed6 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2734,13 +2734,23 @@ static void print_status_info(UnitStatusInfo *i) {
if (i->id && arg_transport != TRANSPORT_SSH) {
printf("\n");
- show_journal_by_unit(stdout,
- i->id,
- arg_output,
- 0,
- i->inactive_exit_timestamp_monotonic,
- arg_lines,
- flags);
+ 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);
}
if (i->need_daemon_reload)