summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-19 02:03:22 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-19 02:03:22 +0200
commit9f8d29834ba97052403e50ec9b358c0470fa4ceb (patch)
tree99ae67be6e1ab599c9977b877797fd7b68f0b607 /src/journal/sd-journal.c
parent57fb9fb56db0584581ce33ee842dcbf5f1136856 (diff)
journald: don't choke on journal files with no cutoff date
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 497f79cb52..c3f19ca697 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1950,6 +1950,8 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
usec_t fr, t;
r = journal_file_get_cutoff_realtime_usec(f, &fr, &t);
+ if (r == -ENOENT)
+ continue;
if (r < 0)
return r;
if (r == 0)
@@ -1987,6 +1989,8 @@ _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot
usec_t fr, t;
r = journal_file_get_cutoff_monotonic_usec(f, boot_id, &fr, &t);
+ if (r == -ENOENT)
+ continue;
if (r < 0)
return r;
if (r == 0)