chiark / gitweb /
systemctl: shortcut log output for non-service, non-socket, non-mount, non-swap units
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 14:35:59 +0000 (15:35 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 14:35:59 +0000 (15:35 +0100)
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();