X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournalctl.c;h=7b67bc1dab950d76e1cf5ac7e10457d502197659;hb=fa6ac76083b8ffc1309876459f54f9f0e2843731;hp=3cec9a0c84e936e8d720873bf78983cdb76d3704;hpb=8ee8e53648bf45854d92b60e1e70c17a0cec3c3d;p=elogind.git diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 3cec9a0c8..7b67bc1da 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1406,17 +1406,15 @@ static int setup_keys(void) { h.fsprg_secpar = htole16(FSPRG_RECOMMENDED_SECPAR); h.fsprg_state_size = htole64(state_size); - l = loop_write(fd, &h, sizeof(h), false); - if (l < 0 || (size_t) l != sizeof(h)) { - log_error_errno(EIO, "Failed to write header: %m"); - r = -EIO; + r = loop_write(fd, &h, sizeof(h), false); + if (r < 0) { + log_error_errno(r, "Failed to write header: %m"); goto finish; } - l = loop_write(fd, state, state_size, false); - if (l < 0 || (size_t) l != state_size) { - log_error_errno(EIO, "Failed to write state: %m"); - r = -EIO; + r = loop_write(fd, state, state_size, false); + if (r < 0) { + log_error_errno(r, "Failed to write state: %m"); goto finish; } @@ -1693,7 +1691,7 @@ static int flush_to_var(void) { break; if (errno != ENOENT) - return log_error_errno(errno, "Failed to check for existance of /run/systemd/journal/flushed: %m"); + return log_error_errno(errno, "Failed to check for existence of /run/systemd/journal/flushed: %m"); r = fd_wait_for_event(watch_fd, POLLIN, USEC_INFINITY); if (r < 0)