diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-31 04:40:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-31 04:40:02 +0200 |
commit | ba1a55152c50dfbcd3d4a64353b95f4a2f37985e (patch) | |
tree | f2c0d6d04ffd3178d5b958aa5d14b108588294c3 /src | |
parent | 9408a2d295a312a5472345090e28e0502570494b (diff) |
random: do not print warning if random seed doesn't exist yet
Diffstat (limited to 'src')
-rw-r--r-- | src/random-seed.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/random-seed.c b/src/random-seed.c index 8eab2b4e1c..054233e660 100644 --- a/src/random-seed.c +++ b/src/random-seed.c @@ -86,9 +86,11 @@ int main(int argc, char *argv[]) { } } - if ((r = loop_read(seed_fd, buf, buf_size, false)) <= 0) - log_error("Failed to read seed file: %s", r < 0 ? strerror(errno) : "EOF"); - else { + if ((r = loop_read(seed_fd, buf, buf_size, false)) <= 0) { + + if (r != 0) + log_error("Failed to read seed file: %m"); + } else { lseek(seed_fd, 0, SEEK_SET); if ((r = loop_write(random_fd, buf, (size_t) r, false)) <= 0) |