rng-tools/rngd-exit-code-for-list.patch
Troy Dawson 20788990a8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/rng-tools#e438127b78cb794a9ce4d31c481eba1d6b1627d1
2020-10-20 07:42:43 -07:00

22 lines
612 B
Diff

diff -up ./rngd.c.orig ./rngd.c
--- ./rngd.c.orig 2017-10-27 14:18:52.617286574 -0400
+++ ./rngd.c 2017-10-27 14:19:34.189456107 -0400
@@ -423,12 +423,15 @@ int main(int argc, char **argv)
}
if (arguments->list) {
+ int rc = 1;
msg_squash = false;
printf("Available entropy sources:\n");
for (i=0; i < ENT_MAX; i++)
- if (entropy_sources[i].init && entropy_sources[i].disabled == false)
+ if (entropy_sources[i].init && entropy_sources[i].disabled == false) {
+ rc = 0;
printf("%d: %s\n", i, entropy_sources[i].rng_name);
- return 1;
+ }
+ return rc;
}
if (!ent_sources) {