summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:07 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:07 +0100
commit7bb87460e691d30c1a7fd23a1a8240776957e05f (patch)
tree814482466f84eead3ddb0e0b271afc89980636c9 /src/journal
parent709f6e46a35ec492b70eb92943d82a8d838ce918 (diff)
journal: posix_fallocate() does not set errno
manpage says: posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-kmsg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 489f6f689c..c0712b5644 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -442,6 +442,7 @@ fail:
int server_open_kernel_seqnum(Server *s) {
_cleanup_close_ int fd;
uint64_t *p;
+ int r;
assert(s);
@@ -455,8 +456,9 @@ int server_open_kernel_seqnum(Server *s) {
return 0;
}
- if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
- log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
+ r = posix_fallocate(fd, 0, sizeof(uint64_t));
+ if (r != 0) {
+ log_error_errno(r, "Failed to allocate sequential number file, ignoring: %m");
return 0;
}