Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 21:06:52 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237338 - head/sys/boot/common
Message-ID:  <201206202106.q5KL6q2N067734@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Jun 20 21:06:51 2012
New Revision: 237338
URL: http://svn.freebsd.org/changeset/base/237338

Log:
  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

Modified:
  head/sys/boot/common/load_elf.c
  head/sys/boot/common/load_elf_obj.c

Modified: head/sys/boot/common/load_elf.c
==============================================================================
--- head/sys/boot/common/load_elf.c	Wed Jun 20 20:01:51 2012	(r237337)
+++ head/sys/boot/common/load_elf.c	Wed Jun 20 21:06:51 2012	(r237338)
@@ -612,7 +612,7 @@ __elfN(parse_modmetadata)(struct preload
     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;

Modified: head/sys/boot/common/load_elf_obj.c
==============================================================================
--- head/sys/boot/common/load_elf_obj.c	Wed Jun 20 20:01:51 2012	(r237337)
+++ head/sys/boot/common/load_elf_obj.c	Wed Jun 20 21:06:51 2012	(r237338)
@@ -369,7 +369,7 @@ __elfN(obj_parse_modmetadata)(struct pre
 
 	if (__elfN(obj_lookup_set)(fp, ef, "modmetadata_set", &p, &p_stop,
 	    &modcnt) != 0)
-		return ENOENT;
+		return 0;
 
 	modcnt = 0;
 	while (p < p_stop) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206202106.q5KL6q2N067734>