Home | History | Annotate | Line # | Download | only in libulpt
      1 /*	$NetBSD: ulpt_at_usb.c,v 1.10 2022/03/31 19:30:18 pgoyette Exp $	*/
      2 
      3 #include <sys/cdefs.h>
      4 __KERNEL_RCSID(0, "$NetBSD: ulpt_at_usb.c,v 1.10 2022/03/31 19:30:18 pgoyette Exp $");
      5 
      6 #include <sys/param.h>
      7 #include <sys/conf.h>
      8 #include <sys/device.h>
      9 #include <sys/mount.h>
     10 #include <sys/stat.h>
     11 
     12 #include "ioconf.c"
     13 
     14 #include <rump-sys/kern.h>
     15 #include <rump-sys/vfs.h>
     16 
     17 RUMP_COMPONENT(RUMP_COMPONENT_DEV)
     18 {
     19 	extern struct cdevsw ulpt_cdevsw;
     20 	devmajor_t bmaj, cmaj;
     21 
     22 	bmaj = cmaj = -1;
     23 	FLAWLESSCALL(devsw_attach("ulpt", NULL, &bmaj, &ulpt_cdevsw, &cmaj));
     24 
     25 	config_init_component(cfdriver_ioconf_ulpt,
     26 	    cfattach_ioconf_ulpt, cfdata_ioconf_ulpt);
     27 
     28 	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/ulpt", '0',
     29 	    cmaj, 0, 1));
     30 }
     31