Module Name:    src
Committed By:   pooka
Date:           Wed Feb  3 21:35:22 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpdev: autoconf.c rump_dev.c

Log Message:
Convert to match current ioconf fashion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpdev/autoconf.c
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpdev/rump_dev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpdev/autoconf.c
diff -u src/sys/rump/librump/rumpdev/autoconf.c:1.4 src/sys/rump/librump/rumpdev/autoconf.c:1.5
--- src/sys/rump/librump/rumpdev/autoconf.c:1.4	Sat Oct  3 19:06:35 2009
+++ src/sys/rump/librump/rumpdev/autoconf.c	Wed Feb  3 21:35:22 2010
@@ -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,37 +41,23 @@
 	int mb_nada;
 };
 
-static const struct cfiattrdata mainbus_iattrdata = {
-        "mainbus", 0, {
-		{ NULL, NULL, 0 },
-	}
-};
-static const struct cfiattrdata * const mainbus_attrs[] = {
-	&mainbus_iattrdata,
-	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
-};
+/*
+ * Initial lists.  Should ingrate with config better.
+ */
 const struct cfattachinit cfattachinit[] = {
-	{ "mainbus", mainbus_cfattachinit },
 	{ NULL, NULL },
 };
-
 struct cfdata cfdata[] = {
 	{ "mainbus", "mainbus", 0, FSTATE_NOTFOUND, NULL, 0, NULL},
+	{ NULL, NULL, 0, FSTATE_NOTFOUND, NULL, 0, NULL},
+};
+struct cfdriver * const cfdriver_list_initial[] = {
+	NULL
 };
 
+CFATTACH_DECL_NEW(mainbus, sizeof(struct mainbus_softc),
+	mainbus_match, mainbus_attach, NULL, NULL);
+
 const short cfroots[] = {
 	0, /* mainbus */
 	-1

Index: src/sys/rump/librump/rumpdev/rump_dev.c
diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.13 src/sys/rump/librump/rumpdev/rump_dev.c:1.14
--- src/sys/rump/librump/rumpdev/rump_dev.c:1.13	Sun Jan 31 03:07:00 2010
+++ src/sys/rump/librump/rumpdev/rump_dev.c	Wed Feb  3 21:35:22 2010
@@ -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);

Reply via email to