summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-06-20 21:06:51 +0000
committerjhb <jhb@FreeBSD.org>2012-06-20 21:06:51 +0000
commiteb50c82f35336be7dff27205eebac36288ccc0e2 (patch)
tree6fb34f9041097d49ffd229287bf3198bf463e00b /sys/boot/common
parent9026ef5736c1ef187623cff58736e5801aba8e67 (diff)
downloadFreeBSD-src-eb50c82f35336be7dff27205eebac36288ccc0e2.zip
FreeBSD-src-eb50c82f35336be7dff27205eebac36288ccc0e2.tar.gz
Don't return an error if a kld does not contain any modules (e.g. a
kld that only contained a sysctl). The kernel linker allows such modules, so the boot loader should not reject them. MFC after: 2 weeks
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/load_elf.c2
-rw-r--r--sys/boot/common/load_elf_obj.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c
index bf095bb..019307e 100644
--- a/sys/boot/common/load_elf.c
+++ b/sys/boot/common/load_elf.c
@@ -612,7 +612,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
Elf_Addr v, p, p_stop;
if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0)
- return ENOENT;
+ return 0;
p = sym.st_value + ef->off;
if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0)
return ENOENT;
diff --git a/sys/boot/common/load_elf_obj.c b/sys/boot/common/load_elf_obj.c
index 54d9b10..2c8e184 100644
--- a/sys/boot/common/load_elf_obj.c
+++ b/sys/boot/common/load_elf_obj.c
@@ -369,7 +369,7 @@ __elfN(obj_parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
if (__elfN(obj_lookup_set)(fp, ef, "modmetadata_set", &p, &p_stop,
&modcnt) != 0)
- return ENOENT;
+ return 0;
modcnt = 0;
while (p < p_stop) {
OpenPOWER on IntegriCloud