sharkcz / rpms / rng-tools

Forked from rpms/rng-tools 3 years ago
Clone
Blob Blame History Raw
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) {