Module Name:    src
Committed By:   pooka
Date:           Wed Feb 10 02:08:34 UTC 2010

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

Log Message:
The first step to having cd work is to remember to attach it and
go "devfs" on it.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
    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/sd_at_scsibus_at_umass.c
diff -u src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.8 src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.9
--- src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.8	Tue Feb  9 19:02:19 2010
+++ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c	Wed Feb 10 02:08:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.8 2010/02/09 19:02:19 pooka Exp $	*/
+/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.9 2010/02/10 02:08:34 pooka Exp $	*/
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -24,8 +24,8 @@
 	extern struct cfattach rumpusbhc_ca;
 	extern struct cfattach usb_ca, uhub_ca, uroothub_ca, umass_ca;
 	extern struct cfattach scsibus_ca, atapibus_ca, sd_ca, cd_ca;
-	extern struct bdevsw sd_bdevsw;
-	extern struct cdevsw sd_cdevsw;
+	extern struct bdevsw sd_bdevsw, cd_bdevsw;
+	extern struct cdevsw sd_cdevsw, cd_cdevsw;
 	devmajor_t bmaj, cmaj;
 
 	FLAWLESSCALL(config_cfdata_attach(cfdata_umass, 0));
@@ -66,4 +66,12 @@
 	    bmaj, 0, 8));
 	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rsd0", 'a',
 	    cmaj, 0, 8));
+
+	bmaj = cmaj = -1;
+	FLAWLESSCALL(devsw_attach("cd", &cd_bdevsw, &bmaj, &cd_cdevsw, &cmaj));
+
+	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/cd0", 'a',
+	    bmaj, 0, 8));
+	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rcd0", 'a',
+	    cmaj, 0, 8));
 }

Reply via email to