← Commit list

0d6e3ad66

Denys Vlasenko
Denys Vlasenko
2017-04-06
SUCCESS Duration: 245s

Subject

modprobe-small: fix "modprobe non-existing-module" exitcode (should be 1)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

modutils/modprobe-small.c+4 -1
@@ -765,9 +765,12 @@ static int process_module(char *name, const char *cmdline_options)
if (!infovec) {
/* both dirscan and find_alias found nothing */
- if (!is_remove && !is_depmod) /* it wasn't rmmod or depmod */
+ if (!is_remove && !is_depmod) { /* it wasn't rmmod or depmod */
bb_error_msg("module '%s' not found", name);
//TODO: _and_die()? or should we continue (un)loading modules listed on cmdline?
+ /* "modprobe non-existing-module; echo $?" must print 1 */
+ exitcode = EXIT_FAILURE;
+ }
goto ret;
}