summaryrefslogtreecommitdiff
path: root/src/logs-show.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logs-show.c')
-rw-r--r--src/logs-show.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/logs-show.c b/src/logs-show.c
index e28fe8fa21..d44c50a291 100644
--- a/src/logs-show.c
+++ b/src/logs-show.c
@@ -350,6 +350,12 @@ int show_journal_by_service(
assert(service);
+ if (!endswith(service, ".service") &&
+ !endswith(service, ".socket") &&
+ !endswith(service, ".mount") &&
+ !endswith(service, ".swap"))
+ return 0;
+
if (n_columns <= 0)
n_columns = columns();