From: Robert Griebl Date: Tue, 3 Dec 2002 22:41:36 +0000 (-0000) Subject: print an error message if we can't load a module X-Git-Tag: 1_00_pre1~360 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3ba7ceebfc8035fa618c99b27f6995a5bc6997ac;p=oweals%2Fbusybox.git print an error message if we can't load a module --- diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 6a714da77..99650ff03 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -540,8 +540,10 @@ extern int modprobe_main(int argc, char** argv) if (optind >= argc) error_msg_and_die ( "No module or pattern provided\n" ); - return mod_insert ( xstrdup ( argv [optind] ), argc - optind - 1, argv + optind + 1 ) ? \ - EXIT_FAILURE : EXIT_SUCCESS; + if ( mod_insert ( xstrdup ( argv [optind] ), argc - optind - 1, argv + optind + 1 )) + error_msg_and_die ( "failed to load module %s", argv [optind] ); + + return EXIT_SUCCESS; }