From 027a73a903af306449710ce12bc09e0e3550c6c9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 4 Aug 2016 10:16:59 -0500 Subject: 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. --- toys/pending/modprobe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toys/pending/modprobe.c') diff --git a/toys/pending/modprobe.c b/toys/pending/modprobe.c index 7a35c186..ebf17a0e 100644 --- a/toys/pending/modprobe.c +++ b/toys/pending/modprobe.c @@ -367,7 +367,9 @@ static int ins_mod(char *modules, char *flags) { char *buf = NULL; int len, res; - int fd = xopen(modules, O_RDONLY); + int fd = xopenro(modules); + + // TODO xreadfile() len = fdlength(fd); buf = xmalloc(len); -- cgit v1.2.3