Blame SOURCES/0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch
|
|
a4b143 |
From 198884f22dc432a98e3d4423434b9e97d67f2da8 Mon Sep 17 00:00:00 2001
|
|
|
a4b143 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
a4b143 |
Date: Fri, 13 Sep 2013 14:12:55 +0200
|
|
|
a4b143 |
Subject: [PATCH] random-seed: we should return errno of failed loop_write
|
|
|
a4b143 |
|
|
|
a4b143 |
---
|
|
|
a4b143 |
src/random-seed/random-seed.c | 2 +-
|
|
|
a4b143 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a4b143 |
|
|
|
a4b143 |
diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c
|
|
|
a4b143 |
index 4776c07..afbd500 100644
|
|
|
a4b143 |
--- a/src/random-seed/random-seed.c
|
|
|
a4b143 |
+++ b/src/random-seed/random-seed.c
|
|
|
a4b143 |
@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) {
|
|
|
a4b143 |
r = loop_write(seed_fd, buf, (size_t) k, false);
|
|
|
a4b143 |
if (r <= 0) {
|
|
|
a4b143 |
log_error("Failed to write new random seed file: %s", r < 0 ? strerror(-r) : "short write");
|
|
|
a4b143 |
- r = k == 0 ? -EIO : (int) k;
|
|
|
a4b143 |
+ r = r == 0 ? -EIO : r;
|
|
|
a4b143 |
}
|
|
|
a4b143 |
}
|
|
|
a4b143 |
|