chiark / gitweb /
sd-journal: return error when we cannot open a file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 8 Mar 2015 15:11:50 +0000 (11:11 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 8 Mar 2015 15:11:50 +0000 (11:11 -0400)
Lack of this caused journalctl not to display a hint about missing groups
properly when the user lacks permissions.

src/journal/sd-journal.c

index 9b57e5945dd385f1863f2b2be449b8f6e9b167dc..9b9e8ac8593e724f597802d3336651b96aa6773d 100644 (file)
@@ -1248,7 +1248,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) {
         r = add_any_file(j, path);
         if (r == -ENOENT)
                 return 0;
-        return 0;
+        return r;
 }
 
 static int remove_file(sd_journal *j, const char *prefix, const char *filename) {