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 The first step to having cd work i...



details:   https://anonhg.NetBSD.org/src/rev/436a6b449051
branches:  trunk
changeset: 751975:436a6b449051
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Feb 10 02:08:34 2010 +0000

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

diffstat:

 sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 3ea5de0feca7 -r 436a6b449051 sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
--- a/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c        Wed Feb 10 01:40:24 2010 +0000
+++ b/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c        Wed Feb 10 02:08:34 2010 +0000
@@ -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));
 }



Home | Main Index | Thread Index | Old Index