print an error message if we can't load a module

This commit is contained in:
Robert Griebl 2002-12-03 22:41:36 +00:00
parent 7127b58baa
commit 3ba7ceebfc

View File

@ -540,8 +540,10 @@ extern int modprobe_main(int argc, char** argv)
if (optind >= argc) if (optind >= argc)
error_msg_and_die ( "No module or pattern provided\n" ); error_msg_and_die ( "No module or pattern provided\n" );
return mod_insert ( xstrdup ( argv [optind] ), argc - optind - 1, argv + optind + 1 ) ? \ if ( mod_insert ( xstrdup ( argv [optind] ), argc - optind - 1, argv + optind + 1 ))
EXIT_FAILURE : EXIT_SUCCESS; error_msg_and_die ( "failed to load module %s", argv [optind] );
return EXIT_SUCCESS;
} }