diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-01-24 04:53:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-01-24 04:53:00 +0000 |
commit | 411504476290e884e426a5d3b7a520304ff19cf6 (patch) | |
tree | 8d091cfdc71424b602286c40c103ac53eed2c7b9 | |
parent | 85480668fe4729431215d4c46acc07b3e212dace (diff) |
Only report about random seed failures, not attempts.
Discussed with jsing
-rw-r--r-- | sys/stand/boot/boot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index 91ed765eae6..1ef4d1911d8 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.39 2014/01/02 00:03:04 deraadt Exp $ */ +/* $OpenBSD: boot.c,v 1.40 2014/01/24 04:52:59 deraadt Exp $ */ /* * Copyright (c) 2003 Dale Rahn @@ -147,11 +147,11 @@ loadrandom(char *name, char *buf, size_t buflen) } } - printf("loadrandom: %s\n", path); - fd = open(path, O_RDONLY); if (fd == -1) { - printf("cannot open %s\n", path); + if (errno == ENXIO || errno == ENOENT) + return -1; + printf("cannot open %s: %s\n", path, strerror(errno)); return -1; } if (fstat(fd, &sb) == -1 || |