Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpdev Convert to match current ioconf fas...



details:   https://anonhg.NetBSD.org/src/rev/2ea7137be238
branches:  trunk
changeset: 751430:2ea7137be238
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Feb 03 21:35:22 2010 +0000

description:
Convert to match current ioconf fashion.

diffstat:

 sys/rump/librump/rumpdev/autoconf.c |  38 +++++++++++-------------------------
 sys/rump/librump/rumpdev/rump_dev.c |  12 +++++-----
 2 files changed, 18 insertions(+), 32 deletions(-)

diffs (113 lines):

diff -r b91c9ca94c8e -r 2ea7137be238 sys/rump/librump/rumpdev/autoconf.c
--- a/sys/rump/librump/rumpdev/autoconf.c       Wed Feb 03 21:32:27 2010 +0000
+++ b/sys/rump/librump/rumpdev/autoconf.c       Wed Feb 03 21:35:22 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.4 2009/10/03 19:06:35 pooka Exp $       */
+/*     $NetBSD: autoconf.c,v 1.5 2010/02/03 21:35:22 pooka Exp $       */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2009/10/03 19:06:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2010/02/03 21:35:22 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -41,36 +41,22 @@
        int mb_nada;
 };
 
-static const struct cfiattrdata mainbus_iattrdata = {
-        "mainbus", 0, {
-               { NULL, NULL, 0 },
-       }
+/*
+ * Initial lists.  Should ingrate with config better.
+ */
+const struct cfattachinit cfattachinit[] = {
+       { NULL, NULL },
 };
-static const struct cfiattrdata * const mainbus_attrs[] = {
-       &mainbus_iattrdata,
-       NULL,
+struct cfdata cfdata[] = {
+       { "mainbus", "mainbus", 0, FSTATE_NOTFOUND, NULL, 0, NULL},
+       { NULL, NULL, 0, FSTATE_NOTFOUND, NULL, 0, NULL},
 };
-
-CFDRIVER_DECL(mainbus, DV_DULL, mainbus_attrs);
-CFATTACH_DECL_NEW(mainbus, sizeof(struct mainbus_softc),
-       mainbus_match, mainbus_attach, NULL, NULL);
-
 struct cfdriver * const cfdriver_list_initial[] = {
-       &mainbus_cd,
        NULL
 };
 
-static struct cfattach * const mainbus_cfattachinit[] = {
-       &mainbus_ca, NULL
-};
-const struct cfattachinit cfattachinit[] = {
-       { "mainbus", mainbus_cfattachinit },
-       { NULL, NULL },
-};
-
-struct cfdata cfdata[] = {
-       { "mainbus", "mainbus", 0, FSTATE_NOTFOUND, NULL, 0, NULL},
-};
+CFATTACH_DECL_NEW(mainbus, sizeof(struct mainbus_softc),
+       mainbus_match, mainbus_attach, NULL, NULL);
 
 const short cfroots[] = {
        0, /* mainbus */
diff -r b91c9ca94c8e -r 2ea7137be238 sys/rump/librump/rumpdev/rump_dev.c
--- a/sys/rump/librump/rumpdev/rump_dev.c       Wed Feb 03 21:32:27 2010 +0000
+++ b/sys/rump/librump/rumpdev/rump_dev.c       Wed Feb 03 21:35:22 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_dev.c,v 1.13 2010/01/31 03:07:00 pooka Exp $      */
+/*     $NetBSD: rump_dev.c,v 1.14 2010/02/03 21:35:22 pooka Exp $      */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.13 2010/01/31 03:07:00 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.14 2010/02/03 21:35:22 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -41,7 +41,6 @@
 __weak_alias(rump_dev_raidframe_init,nocomponent);
 __weak_alias(rump_dev_netsmb_init,nocomponent);
 __weak_alias(rump_dev_rnd_init,nocomponent);
-__weak_alias(rump_dev_rumpusbhc_init,nocomponent);
 __weak_alias(rump_dev_sysmon_init,nocomponent);
 
 __weak_alias(rump_device_configuration,nocomponent);
@@ -66,7 +65,6 @@
        rump_dev_raidframe_init();
        rump_dev_netsmb_init();
        rump_dev_rnd_init();
-       rump_dev_rumpusbhc_init();
        rump_dev_sysmon_init();
 
        rump_pdev_finalize();
@@ -75,9 +73,11 @@
        rump_wscons_configuration();
 
        cold = 0;
-       if (config_rootfound("mainbus", NULL) == NULL)
-               panic("no mainbus");
+       if (rump_device_configuration != nocomponent) {
+               if (config_rootfound("mainbus", NULL) == NULL)
+                       panic("no mainbus");
 
+       }
        config_finalize();
 
        KERNEL_UNLOCK_LAST(curlwp);



Home | Main Index | Thread Index | Old Index