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 pass unit number in mainbus attach ...



details:   https://anonhg.NetBSD.org/src/rev/e6ab70d1f9e0
branches:  trunk
changeset: 747858:e6ab70d1f9e0
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Oct 03 19:06:35 2009 +0000

description:
pass unit number in mainbus attach args

diffstat:

 sys/rump/librump/rumpdev/autoconf.c         |  10 ++++++----
 sys/rump/librump/rumpdev/rump_dev_private.h |   6 +++++-
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 0269164d37e7 -r e6ab70d1f9e0 sys/rump/librump/rumpdev/autoconf.c
--- a/sys/rump/librump/rumpdev/autoconf.c       Sat Oct 03 17:09:18 2009 +0000
+++ b/sys/rump/librump/rumpdev/autoconf.c       Sat Oct 03 19:06:35 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.3 2009/10/01 15:21:38 pooka Exp $       */
+/*     $NetBSD: autoconf.c,v 1.4 2009/10/03 19:06:35 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.3 2009/10/01 15:21:38 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2009/10/03 19:06:35 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -125,9 +125,11 @@
 mainbus_search(struct device *parent, struct cfdata *cf,
        const int *ldesc, void *aux)
 {
+       struct mainbus_attach_args maa;
 
-       if (config_match(parent, cf, NULL) > 0)
-               config_attach(parent, cf, NULL, NULL);
+       maa.maa_unit = cf->cf_unit;
+       if (config_match(parent, cf, &maa) > 0)
+               config_attach(parent, cf, &maa, NULL);
 
        return 0;
 }
diff -r 0269164d37e7 -r e6ab70d1f9e0 sys/rump/librump/rumpdev/rump_dev_private.h
--- a/sys/rump/librump/rumpdev/rump_dev_private.h       Sat Oct 03 17:09:18 2009 +0000
+++ b/sys/rump/librump/rumpdev/rump_dev_private.h       Sat Oct 03 19:06:35 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_dev_private.h,v 1.5 2009/10/01 21:43:29 pooka Exp $       */
+/*     $NetBSD: rump_dev_private.h,v 1.6 2009/10/03 19:06:36 pooka Exp $       */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -41,4 +41,8 @@
 
 void   rump_device_configuration(void);
 
+struct mainbus_attach_args {
+       int maa_unit;
+};
+
 #endif /* _SYS_RUMP_DEV_PRIVATE_H_ */



Home | Main Index | Thread Index | Old Index