diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-09-13 14:12:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-09-13 14:32:14 +0200 |
commit | 2dba165c63cc1b687bb9f035a8f01f40595a708a (patch) | |
tree | 861f78aae2e6c6f12b5ef6d689afd61ecc79627b /src/random-seed | |
parent | 6a94f2e938c6535917b29a9611d6ad815125ed1b (diff) |
random-seed: we should return errno of failed loop_write
Diffstat (limited to 'src/random-seed')
-rw-r--r-- | src/random-seed/random-seed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index 4776c071ca..afbd5002dd 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) { r = loop_write(seed_fd, buf, (size_t) k, false); if (r <= 0) { log_error("Failed to write new random seed file: %s", r < 0 ? strerror(-r) : "short write"); - r = k == 0 ? -EIO : (int) k; + r = r == 0 ? -EIO : r; } } |