summaryrefslogtreecommitdiff
path: root/modutils/modprobe-small.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-11-12 00:09:58 +0000
committerDenis Vlasenko2008-11-12 00:09:58 +0000
commit1ad4db1d8e47b8835f19ad8fe44475db51cf01f9 (patch)
tree69ced31a88277c8089093830d45df57217ad47bf /modutils/modprobe-small.c
parentf91f14d2211148ade28270572b9c45023f9b6580 (diff)
downloadbusybox-1ad4db1d8e47b8835f19ad8fe44475db51cf01f9.zip
busybox-1ad4db1d8e47b8835f19ad8fe44475db51cf01f9.tar.gz
modprobe-small: fix failure to load when no arguments are given
modutils-24: fix bad interaction of xzalloc with xrealloc_vector; style fixes
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r--modutils/modprobe-small.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 96a0a08..d3fde0e 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -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: