diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-29 06:49:36 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-29 06:49:36 +0000 |
commit | ab310e1b1c2f85235e61c471802b53314da919f0 (patch) | |
tree | 415cf40159a0c2b6009a27df18b0cc45bea2e956 /modutils | |
parent | 1cd1012a9063656a6b5b75dac8d400abd60cd643 (diff) | |
download | busybox-w32-ab310e1b1c2f85235e61c471802b53314da919f0.tar.gz busybox-w32-ab310e1b1c2f85235e61c471802b53314da919f0.tar.bz2 busybox-w32-ab310e1b1c2f85235e61c471802b53314da919f0.zip |
apply post-1.13.0 patches
Diffstat (limited to '')
-rw-r--r-- | modutils/modprobe-small.c | 18 | ||||
-rw-r--r-- | modutils/modutils-24.c | 6 |
2 files changed, 15 insertions, 9 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: |
diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c index 2bc4bda92..c6e7226cd 100644 --- a/modutils/modutils-24.c +++ b/modutils/modutils-24.c | |||
@@ -3236,8 +3236,10 @@ static struct obj_file *obj_load(FILE *fp, int loadprogbits UNUSED_PARAM) | |||
3236 | } | 3236 | } |
3237 | 3237 | ||
3238 | shnum = f->header.e_shnum; | 3238 | shnum = f->header.e_shnum; |
3239 | f->sections = xmalloc(sizeof(struct obj_section *) * shnum); | 3239 | /* Growth of ->sections vector will be done by |
3240 | memset(f->sections, 0, sizeof(struct obj_section *) * shnum); | 3240 | * xrealloc_vector(..., 2, ...), therefore we must allocate |
3241 | * at least 2^2 = 4 extra elements here. */ | ||
3242 | f->sections = xzalloc(sizeof(f->sections[0]) * (shnum + 4)); | ||
3241 | 3243 | ||
3242 | section_headers = alloca(sizeof(ElfW(Shdr)) * shnum); | 3244 | section_headers = alloca(sizeof(ElfW(Shdr)) * shnum); |
3243 | fseek(fp, f->header.e_shoff, SEEK_SET); | 3245 | fseek(fp, f->header.e_shoff, SEEK_SET); |