diff options
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r-- | modutils/modprobe-small.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index ae7c29cd1..f75dae8a3 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -299,7 +299,7 @@ static FAST_FUNC int fileAction(const char *pathname, | |||
299 | static int load_dep_bb(void) | 299 | static int load_dep_bb(void) |
300 | { | 300 | { |
301 | char *line; | 301 | char *line; |
302 | FILE *fp = fopen(DEPFILE_BB, "r"); | 302 | FILE *fp = fopen_for_read(DEPFILE_BB); |
303 | 303 | ||
304 | if (!fp) | 304 | if (!fp) |
305 | return 0; | 305 | return 0; |
@@ -492,7 +492,7 @@ static int already_loaded(const char *name) | |||
492 | char *line; | 492 | char *line; |
493 | FILE* modules; | 493 | FILE* modules; |
494 | 494 | ||
495 | modules = xfopen("/proc/modules", "r"); | 495 | modules = xfopen_for_read("/proc/modules"); |
496 | while ((line = xmalloc_fgets(modules)) != NULL) { | 496 | while ((line = xmalloc_fgets(modules)) != NULL) { |
497 | if (strncmp(line, name, len) == 0 && line[len] == ' ') { | 497 | if (strncmp(line, name, len) == 0 && line[len] == ' ') { |
498 | free(line); | 498 | free(line); |
@@ -688,7 +688,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
688 | 688 | ||
689 | /* are we lsmod? -> just dump /proc/modules */ | 689 | /* are we lsmod? -> just dump /proc/modules */ |
690 | if ('l' == applet0) { | 690 | if ('l' == applet0) { |
691 | xprint_and_close_file(xfopen("/proc/modules", "r")); | 691 | xprint_and_close_file(xfopen_for_read("/proc/modules")); |
692 | return EXIT_SUCCESS; | 692 | return EXIT_SUCCESS; |
693 | } | 693 | } |
694 | 694 | ||