chiark / gitweb /
systemctl: shortcut log output for non-service, non-socket, non-mount, non-swap units
[elogind.git] / src / logs-show.c
index e28fe8f..d44c50a 100644 (file)
@@ -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();