summaryrefslogtreecommitdiff
path: root/modutils/modprobe-small.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-12 00:09:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-12 00:09:58 +0000
commit1ad4db1d8e47b8835f19ad8fe44475db51cf01f9 (patch)
tree69ced31a88277c8089093830d45df57217ad47bf /modutils/modprobe-small.c
parentf91f14d2211148ade28270572b9c45023f9b6580 (diff)
downloadbusybox-w32-1ad4db1d8e47b8835f19ad8fe44475db51cf01f9.tar.gz
busybox-w32-1ad4db1d8e47b8835f19ad8fe44475db51cf01f9.tar.bz2
busybox-w32-1ad4db1d8e47b8835f19ad8fe44475db51cf01f9.zip
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 96a0a08ed..d3fde0e8b 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)
600 free(deps); 600 free(deps);
601 601
602 /* modprobe -> load it */ 602 /* modprobe -> load it */
603 if (!is_rmmod && (options && !strstr(options, "blacklist"))) { 603 if (!is_rmmod) {
604 errno = 0; 604 if (!options || strstr(options, "blacklist") == NULL) {
605 if (load_module(info->pathname, options) != 0) { 605 errno = 0;
606 if (EEXIST != errno) { 606 if (load_module(info->pathname, options) != 0) {
607 bb_error_msg("'%s': %s", 607 if (EEXIST != errno) {
608 bb_error_msg("'%s': %s",
608 info->pathname, 609 info->pathname,
609 moderror(errno)); 610 moderror(errno));
610 } else { 611 } else {
611 dbg1_error_msg("'%s': %s", 612 dbg1_error_msg("'%s': %s",
612 info->pathname, 613 info->pathname,
613 moderror(errno)); 614 moderror(errno));
615 }
614 } 616 }
617 } else {
618 dbg1_error_msg("'%s': blacklisted", info->pathname);
615 } 619 }
616 } 620 }
617 ret: 621 ret: