summaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
authorMike Frysinger2006-01-03 23:59:17 +0000
committerMike Frysinger2006-01-03 23:59:17 +0000
commit705fad296447295ef4e71e301c5b7cdbf186d6a1 (patch)
treee571b8206036240d544680fe2218e30a89080073 /modutils/lsmod.c
parentbb12d6f728b7adfbf7fd6e062c11835b3965d3b8 (diff)
downloadbusybox-705fad296447295ef4e71e301c5b7cdbf186d6a1.zip
busybox-705fad296447295ef4e71e301c5b7cdbf186d6a1.tar.gz
just use bb_xfopen()
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index f2ee19f..3d9f700 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -169,10 +169,7 @@ extern int lsmod_main(int argc, char **argv)
FILE *file;
char line[4096];
- file = fopen("/proc/modules", "r");
-
- if (!file)
- bb_error_msg_and_die("Opening /proc/modules");
+ file = bb_xfopen("/proc/modules", "r");
while (fgets(line, sizeof(line), file)) {
char *tok;