Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev/wip/libumass Attach sd to devsw and create /dev...
details: https://anonhg.NetBSD.org/src/rev/86921fcbacf6
branches: trunk
changeset: 747901:86921fcbacf6
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Oct 05 08:34:53 2009 +0000
description:
Attach sd to devsw and create /dev/sd0[a-h].
diffstat:
sys/rump/dev/wip/libumass/Makefile | 4 ++--
sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c | 13 +++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diffs (62 lines):
diff -r d487456e69ae -r 86921fcbacf6 sys/rump/dev/wip/libumass/Makefile
--- a/sys/rump/dev/wip/libumass/Makefile Mon Oct 05 04:20:13 2009 +0000
+++ b/sys/rump/dev/wip/libumass/Makefile Mon Oct 05 08:34:53 2009 +0000
@@ -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>
diff -r d487456e69ae -r 86921fcbacf6 sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
--- a/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c Mon Oct 05 04:20:13 2009 +0000
+++ b/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c Mon Oct 05 08:34:53 2009 +0000
@@ -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));
}
Home |
Main Index |
Thread Index |
Old Index