Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/rump_allserver make -m available on all platforms



details:   https://anonhg.NetBSD.org/src/rev/f3de83c4f707
branches:  trunk
changeset: 791328:f3de83c4f707
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 13 16:43:38 2013 +0000

description:
make -m available on all platforms

diffstat:

 usr.bin/rump_allserver/rump_allserver.c |  19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diffs (89 lines):

diff -r 74d991ad7e47 -r f3de83c4f707 usr.bin/rump_allserver/rump_allserver.c
--- a/usr.bin/rump_allserver/rump_allserver.c   Wed Nov 13 16:42:30 2013 +0000
+++ b/usr.bin/rump_allserver/rump_allserver.c   Wed Nov 13 16:43:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_allserver.c,v 1.26 2013/09/10 20:36:08 pooka Exp $        */
+/*     $NetBSD: rump_allserver.c,v 1.27 2013/11/13 16:43:38 pooka Exp $        */
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,16 +28,13 @@
 #include <rump/rumpuser_port.h>
 
 #ifndef lint
-__RCSID("$NetBSD: rump_allserver.c,v 1.26 2013/09/10 20:36:08 pooka Exp $");
+__RCSID("$NetBSD: rump_allserver.c,v 1.27 2013/11/13 16:43:38 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
 #include <sys/signal.h>
 #include <sys/stat.h>
 
-#ifdef PLATFORM_HAS_NBMODULES
-#include <sys/module.h>
-#endif
 #ifdef PLATFORM_HAS_DISKLABEL
 #include <sys/disklabel.h>
 #include <util.h>
@@ -55,6 +52,7 @@
 
 #include <rump/rump.h>
 #include <rump/rump_syscalls.h>
+#include <rump/rumpdefs.h>
 
 __dead static void
 usage(void)
@@ -130,11 +128,8 @@
        int error;
        int ch, sflag;
        unsigned i;
-
-#ifdef PLATFORM_HAS_NBMODULES
        char **modarray = NULL;
        unsigned nmods = 0, curmod = 0;
-#endif
 
 #ifdef PLATFORM_HAS_SETGETPROGNAME
        setprogname(argv[0]);
@@ -307,7 +302,6 @@
                                }
                        }
                        break;
-#ifdef PLATFORM_HAS_NBMODULES
                case 'm': {
 
                        if (nmods - curmod == 0) {
@@ -319,7 +313,6 @@
                        }
                        modarray[curmod++] = optarg;
                        break; }
-#endif
                case 'r':
                        setenv("RUMP_MEMLIMIT", optarg, 1);
                        break;
@@ -353,10 +346,9 @@
        if (error)
                die(sflag, error, "rump init failed");
 
-#ifdef PLATFORM_HAS_NBMODULES
        /* load modules */
        for (i = 0; i < curmod; i++) {
-               struct modctl_load ml;
+               struct rump_modctl_load ml;
 
 #define ETFSKEY "/module.mod"
                if ((error = rump_pub_etfs_register(ETFSKEY,
@@ -364,12 +356,11 @@
                        die(sflag, error, "module etfs register failed");
                memset(&ml, 0, sizeof(ml));
                ml.ml_filename = ETFSKEY;
-               if (rump_sys_modctl(MODCTL_LOAD, &ml) == -1)
+               if (rump_sys_modctl(RUMP_MODCTL_LOAD, &ml) == -1)
                        die(sflag, errno, "module load failed");
                rump_pub_etfs_remove(ETFSKEY);
 #undef ETFSKEY
        }
-#endif /* PLATFORM_HAS_NBMODULES */
 
        /* register host drives */
        for (i = 0; i < curetfs; i++) {



Home | Main Index | Thread Index | Old Index