[systemd-devel] [PATCH 2/2] random-seed: we should return errno of failed loop_write
Lennart Poettering
lennart at poettering.net
Fri Sep 13 05:35:22 PDT 2013
On Fri, 13.09.13 14:12, Lukas Nykryn (lnykryn at redhat.com) wrote:
Thanks! Applied this one!
> ---
> src/random-seed/random-seed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c
> index 4776c07..afbd500 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;
> }
> }
>
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list