summaryrefslogtreecommitdiffstats
path: root/src/haveged.c
diff options
context:
space:
mode:
authorJirka Hladky <jhladky@redhat.com>2022-01-02 01:14:27 +0100
committerJirka Hladky <jhladky@redhat.com>2022-01-02 01:14:27 +0100
commit9e4a1f53cfbb2a7aa1f534861e6f03587e5d6f16 (patch)
tree07cedb4fefbac6e8effde7e554c29d8c70b42ce1 /src/haveged.c
parentAdded haveged-once.service to provide entropy once (intended for initramfs) (diff)
downloadhaveged-9e4a1f53cfbb2a7aa1f534861e6f03587e5d6f16.tar.xz
haveged-9e4a1f53cfbb2a7aa1f534861e6f03587e5d6f16.zip
Fixed exist status when using --once option. Updated man page
Diffstat (limited to 'src/haveged.c')
-rw-r--r--src/haveged.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/haveged.c b/src/haveged.c
index fcfe764..293f5e6 100644
--- a/src/haveged.c
+++ b/src/haveged.c
@@ -657,8 +657,10 @@ static void run_daemon( /* RETURN: nothing */
if (ioctl(random_fd, RNDADDENTROPY, output) == -1)
error_exit("RNDADDENTROPY failed!");
h->n_entropy_bytes += nbytes;
- if (params->once == 1)
+ if (params->once == 1) {
+ params->exit_code = 0;
error_exit("Entropy refilled once (%d bytes), exiting.", nbytes);
+ }
t[0] = t[1];
continue;
}