aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-08-04 10:16:59 -0500
committerRob Landley <rob@landley.net>2016-08-04 10:16:59 -0500
commit027a73a903af306449710ce12bc09e0e3550c6c9 (patch)
treea415cb11fa6f2b34e63b8259fc52342aaa8fec75 /lib/lib.c
parent145b7024b5fbb74f16d5e403fb004ff8209bc4a0 (diff)
downloadtoybox-027a73a903af306449710ce12bc09e0e3550c6c9.tar.gz
Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout,
add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users.
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 5c7696d0..718ea3ac 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -1008,7 +1008,7 @@ int qstrcmp(const void *a, const void *b)
void create_uuid(char *uuid)
{
// Read 128 random bits
- int fd = xopen("/dev/urandom", O_RDONLY);
+ int fd = xopenro("/dev/urandom");
xreadall(fd, uuid, 16);
close(fd);