summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/journald.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 1faf570161..b42be8d7ad 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -391,7 +391,9 @@ static char *shortened_cgroup_path(pid_t pid) {
return NULL;
}
- if (streq(init_path, "/"))
+ if (endswith(init_path, "/system"))
+ init_path[strlen(init_path) - 7] = 0;
+ else if (streq(init_path, "/"))
init_path[0] = 0;
if (startswith(process_path, init_path)) {