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