Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/modload desupport LMRESERV_O, anything relying on it do...



details:   https://anonhg.NetBSD.org/src/rev/abd214ebeb36
branches:  trunk
changeset: 545573:abd214ebeb36
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Apr 11 07:49:31 2003 +0000

description:
desupport LMRESERV_O, anything relying on it doesn't have chance of working
anyway due to numerous kernel structure changes

diffstat:

 sbin/modload/modload.c |  30 +++++++-----------------------
 1 files changed, 7 insertions(+), 23 deletions(-)

diffs (67 lines):

diff -r d38936cf75d5 -r abd214ebeb36 sbin/modload/modload.c
--- a/sbin/modload/modload.c    Fri Apr 11 06:24:59 2003 +0000
+++ b/sbin/modload/modload.c    Fri Apr 11 07:49:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: modload.c,v 1.36 2003/02/09 23:29:32 atatat Exp $      */
+/*     $NetBSD: modload.c,v 1.37 2003/04/11 07:49:31 jdolecek Exp $    */
 
 /*
  * Copyright (c) 1993 Terrence R. Lambert.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: modload.c,v 1.36 2003/02/09 23:29:32 atatat Exp $");
+__RCSID("$NetBSD: modload.c,v 1.37 2003/04/11 07:49:31 jdolecek Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -254,7 +254,7 @@
        int strtablen;
        size_t modsize; /* XXX */
        void *modentry; /* XXX */
-       int noready = 0, old = 0;
+       int noready = 0;
 
        while ((c = getopt(argc, argv, "dnvse:p:o:A:ST:")) != -1) {
                switch (c) {
@@ -420,15 +420,9 @@
 
        if (verbose)
                warnx("reserving %lu bytes of memory", (unsigned long)modsize);
-       if (ioctl(devfd, LMRESERV, &resrv) == -1) {
-           if (symtab)
-               warn("not loading symbols: kernel does not support symbol table loading");
-       doold:
-           symtab = 0;
-           if (ioctl(devfd, LMRESERV_O, &resrv) == -1)
+       if (ioctl(devfd, LMRESERV, &resrv) == -1)
                err(9, "can't reserve memory");
-           old = TRUE;
-       }
+
        fileopen |= PART_RESRV;
 
        /*
@@ -466,19 +460,9 @@
         * is maintained on success, or blow everything back to ground
         * zero on failure.
         */
-       if (ioctl(devfd, LMREADY, &modentry) == -1) {
-         if (errno == EINVAL && !old) {
-           if (fileopen & MOD_OPEN)
-             close(modfd);
-           /* PART_RESRV is not true since the kernel cleans up
-              after a failed LMREADY */
-           fileopen &= ~(MOD_OPEN|PART_RESRV);
-           /* try using oldstyle */
-           warn("module failed to load using new version; trying old version");
-           goto doold;
-         } else
+       if (ioctl(devfd, LMREADY, &modentry) == -1)
            err(14, "error initializing module");
-       }
+
        /*
         * Success!
         */



Home | Main Index | Thread Index | Old Index