Author: jhb
Date: Wed Aug 29 12:35:50 2012
New Revision: 239822
URL: http://svn.freebsd.org/changeset/base/239822

Log:
  MFC 237338:
  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.

Modified:
  stable/8/sys/boot/common/load_elf.c
  stable/8/sys/boot/common/load_elf_obj.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/compat/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/dev/sound/   (props changed)
  stable/8/sys/dev/sound/pci/   (props changed)
  stable/8/sys/dev/virtio/   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/sys/   (props changed)
  stable/8/sys/vm/   (props changed)

Modified: stable/8/sys/boot/common/load_elf.c
==============================================================================
--- stable/8/sys/boot/common/load_elf.c Wed Aug 29 12:34:43 2012        
(r239821)
+++ stable/8/sys/boot/common/load_elf.c Wed Aug 29 12:35:50 2012        
(r239822)
@@ -611,7 +611,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: stable/8/sys/boot/common/load_elf_obj.c
==============================================================================
--- stable/8/sys/boot/common/load_elf_obj.c     Wed Aug 29 12:34:43 2012        
(r239821)
+++ stable/8/sys/boot/common/load_elf_obj.c     Wed Aug 29 12:35:50 2012        
(r239822)
@@ -344,7 +344,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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to