chiark / gitweb /
journalctl: respect --after-cursor semantics with --follow in all cases
[elogind.git] / src / journal / journal-authenticate.c
index bd7100a8d5c86aeaebaf3a52c3373d70743679b2..f9bd686c11a4965cc7a955c9120e061136d946e8 100644 (file)
@@ -60,7 +60,7 @@ int journal_file_append_tag(JournalFile *f) {
         o->tag.seqnum = htole64(journal_file_tag_seqnum(f));
         o->tag.epoch = htole64(FSPRG_GetEpoch(f->fsprg_state));
 
-        log_debug("Writing tag %"PRIu64" for epoch %"PRIu64"\n",
+        log_debug("Writing tag %"PRIu64" for epoch %"PRIu64"",
                   le64toh(o->tag.seqnum),
                   FSPRG_GetEpoch(f->fsprg_state));
 
@@ -339,7 +339,7 @@ int journal_file_fss_load(JournalFile *f) {
         fd = open(p, O_RDWR|O_CLOEXEC|O_NOCTTY, 0600);
         if (fd < 0) {
                 if (errno != ENOENT)
-                        log_error("Failed to open %s: %m", p);
+                        log_error_errno(errno, "Failed to open %s: %m", p);
 
                 r = -errno;
                 goto finish;
@@ -418,10 +418,9 @@ finish:
         if (m)
                 munmap(m, PAGE_ALIGN(sizeof(FSSHeader)));
 
-        if (fd >= 0)
-                close_nointr_nofail(fd);
-
+        safe_close(fd);
         free(p);
+
         return r;
 }