aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/modprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/modprobe.c')
-rw-r--r--toys/pending/modprobe.c4
1 files changed, 3 insertions, 1 deletions
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);