modprobe-small: fix failure to load when no arguments are given

modutils-24: fix bad interaction of xzalloc with xrealloc_vector; style fixes
This commit is contained in:
Denis Vlasenko
2008-11-12 00:09:58 +00:00
parent f91f14d221
commit 1ad4db1d8e
2 changed files with 63 additions and 45 deletions

View File

@ -600,18 +600,22 @@ static void process_module(char *name, const char *cmdline_options)
free(deps);
/* modprobe -> load it */
if (!is_rmmod && (options && !strstr(options, "blacklist"))) {
errno = 0;
if (load_module(info->pathname, options) != 0) {
if (EEXIST != errno) {
bb_error_msg("'%s': %s",
if (!is_rmmod) {
if (!options || strstr(options, "blacklist") == NULL) {
errno = 0;
if (load_module(info->pathname, options) != 0) {
if (EEXIST != errno) {
bb_error_msg("'%s': %s",
info->pathname,
moderror(errno));
} else {
dbg1_error_msg("'%s': %s",
} else {
dbg1_error_msg("'%s': %s",
info->pathname,
moderror(errno));
}
}
} else {
dbg1_error_msg("'%s': blacklisted", info->pathname);
}
}
ret: