xref: /netbsd-src/sys/rump/dev/lib/libwscons/wscons_component.c (revision 97f8debd624665fdeaf9373bf4602036de3fcd85)
1*97f8debdSpgoyette /*	$NetBSD: wscons_component.c,v 1.6 2022/03/31 19:30:18 pgoyette Exp $	*/
2a57097d0Salnsn 
3a57097d0Salnsn #include <sys/cdefs.h>
4*97f8debdSpgoyette __KERNEL_RCSID(0, "$NetBSD: wscons_component.c,v 1.6 2022/03/31 19:30:18 pgoyette Exp $");
5da5f0878Spooka 
6da5f0878Spooka #include <sys/param.h>
7da5f0878Spooka #include <sys/conf.h>
8da5f0878Spooka #include <sys/device.h>
9da5f0878Spooka #include <sys/mount.h>
10da5f0878Spooka #include <sys/stat.h>
11da5f0878Spooka 
12da5f0878Spooka #include "ioconf.c"
13da5f0878Spooka 
146bb51422Spooka #include <rump-sys/kern.h>
156bb51422Spooka #include <rump-sys/vfs.h>
16da5f0878Spooka 
RUMP_COMPONENT(RUMP_COMPONENT_DEV)17da5f0878Spooka RUMP_COMPONENT(RUMP_COMPONENT_DEV)
18da5f0878Spooka {
19da5f0878Spooka 	extern struct cdevsw wskbd_cdevsw, wsmouse_cdevsw;
20da5f0878Spooka 	devmajor_t bmaj, cmaj;
21da5f0878Spooka 
22da5f0878Spooka 	bmaj = cmaj = -1;
23da5f0878Spooka 	FLAWLESSCALL(devsw_attach("wskbd", NULL, &bmaj, &wskbd_cdevsw, &cmaj));
24da5f0878Spooka 
25da5f0878Spooka 	bmaj = cmaj = -1;
26da5f0878Spooka 	FLAWLESSCALL(devsw_attach("wsmouse", NULL, &bmaj,
27da5f0878Spooka 	    &wsmouse_cdevsw, &cmaj));
28*97f8debdSpgoyette 
29*97f8debdSpgoyette 	config_init_component(cfdriver_ioconf_wscons,
30*97f8debdSpgoyette 	    cfattach_ioconf_wscons, cfdata_ioconf_wscons);
31*97f8debdSpgoyette 
32*97f8debdSpgoyette 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/wskbd", cmaj, 0));
33*97f8debdSpgoyette 
34da5f0878Spooka 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/wsmouse", cmaj, 0));
35da5f0878Spooka }
36