Module Name:    src
Committed By:   pooka
Date:           Mon Oct  5 08:34:54 UTC 2009

Modified Files:
        src/sys/rump/dev/wip/libumass: Makefile sd_at_scsibus_at_umass.c

Log Message:
Attach sd to devsw and create /dev/sd0[a-h].


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/wip/libumass/Makefile \
    src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.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/dev/wip/libumass/Makefile
diff -u src/sys/rump/dev/wip/libumass/Makefile:1.1 src/sys/rump/dev/wip/libumass/Makefile:1.2
--- src/sys/rump/dev/wip/libumass/Makefile:1.1	Thu Oct  1 21:46:30 2009
+++ src/sys/rump/dev/wip/libumass/Makefile	Mon Oct  5 08:34:53 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/10/01 21:46:30 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2009/10/05 08:34:53 pooka Exp $
 #
 #
 # umass.  includes scsibus+sd for simplicity due to the umass code
@@ -15,7 +15,7 @@
 SRCS+=	sd_at_scsibus_at_umass.c
 
 CFLAGS+=	-Wno-pointer-sign
-CPPFLAGS+=	-I${.CURDIR}/opt
+CPPFLAGS+=	-I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs
 
 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>
Index: src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
diff -u src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.1 src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.2
--- src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.1	Thu Oct  1 21:46:30 2009
+++ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c	Mon Oct  5 08:34:53 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.1 2009/10/01 21:46:30 pooka Exp $	*/
+/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.2 2009/10/05 08:34:53 pooka Exp $	*/
 
 #include <sys/param.h>
-#include <sys/types.h>
 #include <sys/conf.h>
 #include <sys/device.h>
 #include <sys/kmem.h>
+#include <sys/stat.h>
 
 /*
  * sd @ scsibus @ umass @ usb
@@ -116,6 +116,7 @@
 };
 
 #include "rump_dev_private.h"
+#include "rump_vfs_private.h"
 
 #define FLAWLESSCALL(call)						\
 do {									\
@@ -129,6 +130,9 @@
 {
 	extern struct cfattach usb_ca, uhub_ca, uroothub_ca, umass_ca;
 	extern struct cfattach scsibus_ca, sd_ca;
+	extern struct bdevsw sd_bdevsw;
+	extern struct cdevsw sd_cdevsw;
+	devmajor_t bmaj, cmaj;
 
 	FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
 	FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
@@ -151,4 +155,9 @@
 	FLAWLESSCALL(config_cfdata_attach(sd_cfdata, 0));
 
 	FLAWLESSCALL(config_cfattach_attach("uhub", &uroothub_ca));
+
+	bmaj = cmaj = -1;
+	FLAWLESSCALL(devsw_attach("sd", &sd_bdevsw, &bmaj, &sd_cdevsw, &cmaj));
+
+	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "sd0", 'a', bmaj, 0, 8));
 }

Reply via email to