chiark / gitweb /
journal: fix SD_JOURNAL_SYSTEM_ONLY flag
authorLennart Poettering <lennart@poettering.net>
Sat, 9 Jun 2012 13:03:22 +0000 (15:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 16 Jun 2012 22:03:12 +0000 (00:03 +0200)
src/journal/sd-journal.c

index 5ed8c3f..9c6cbaa 100644 (file)
@@ -943,7 +943,8 @@ static int add_file(sd_journal *j, const char *prefix, const char *dir, const ch
         assert(filename);
 
         if ((j->flags & SD_JOURNAL_SYSTEM_ONLY) &&
-            !startswith(filename, "system.journal"))
+            !(streq(filename, "system.journal") ||
+             (startswith(filename, "system@") && endswith(filename, ".journal"))))
                 return 0;
 
         if (dir)