aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eim/sw/trng_extractor_eim.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/eim/sw/trng_extractor_eim.c b/eim/sw/trng_extractor_eim.c
index 330c153..711ede1 100644
--- a/eim/sw/trng_extractor_eim.c
+++ b/eim/sw/trng_extractor_eim.c
@@ -134,6 +134,12 @@ int main(int argc, char *argv[])
FILE *output = stdout;
uint32_t data;
+ // Check that we have can talk to the trng.
+ if (avalanche_check() || rosc_check() || trng_check()) {
+ fprintf(stderr, "Can't properly access the trng.\n");
+ return EXIT_FAILURE;
+ }
+
/* parse command line */
while ((opt = getopt(argc, argv, "h?arcn:o:")) != -1) {
switch (opt) {