示例#1
0
struct cdevsw	cdevsw[] =
{
    cdev_cn_init(1,cn),		/* 0: virtual console */
    cdev_ctty_init(1,ctty),		/* 1: controlling terminal */
    cdev_mm_init(1,mm),		/* 2: /dev/{null,mem,kmem,...} */
    cdev_disk_init(NWD,wd),		/* 3: st506/rll/esdi/ide disk */
    cdev_swap_init(1,sw),		/* 4: /dev/drum (swap pseudo-device) */
    cdev_tty_init(NPTY,pts),	/* 5: pseudo-tty slave */
    cdev_ptc_init(NPTY,ptc),	/* 6: pseudo-tty master */
    cdev_log_init(1,log),		/* 7: /dev/klog */
    cdev_tty_init(NCOM,com),	/* 8: serial communications ports */
    cdev_disk_init(NFD,Fd),		/* 9: floppy disk */
    cdev_tape_init(NWT,wt),		/* 10: QIC-24/60/120/150 cartridge tape */
    cdev_disk_init(NXD,xd),		/* 11: temp alt st506/rll/esdi/ide disk */
    cdev_pc_init(1,pc),		/* 12: real console */
    cdev_notdef(),			/* 13 */
    cdev_bpf_init(NBPFILTER,bpf),	/* 14: berkeley packet filter */
};

int	nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);

int	mem_no = 2; 	/* major device number of memory special file */

/*
 * Swapdev is a fake device implemented
 * in sw.c used only internally to get to swstrategy.
 * It cannot be provided to the users, because the
 * swstrategy routine munches the b_dev and b_blkno entries
 * before calling the appropriate driver.  This would horribly
 * confuse, e.g. the hashing routines. Instead, /dev/drum is
示例#2
0
文件: conf.c 项目: MarginC/kame
#include "scr.h"
#include "joy.h"
#include "vcoda.h"			/* coda file system */
#include "openfirm.h"
#include "clockctl.h"
cdev_decl(clockctl);

/* Character devices */

struct cdevsw cdevsw[] = {
	cdev_mm_init(1, mm),            /*  0: /dev/{null,mem,kmem,...} */
	cdev_swap_init(1, sw),          /*  1: /dev/drum (swap pseudo-device) */
	cdev_cn_init(1, cn),            /*  2: virtual console */
	cdev_ctty_init(1,ctty),         /*  3: controlling terminal */
#if defined(SHARK) && (NPC > 0)
	cdev_pc_init(1,pc),		/*  4: PC console */
#elif (defined(OFWGENCFG) || defined(SHARK))
	cdev_tty_init(NOFCONS,ofcons_),	/*  4: Openfirmware console */
#else
	cdev_notdef(),			/* 4: */
#endif
	cdev_log_init(1,log),           /*  5: /dev/klog */
	cdev_ptc_init(NPTY,ptc),        /*  6: pseudo-tty master */
	cdev_tty_init(NPTY,pts),        /*  7: pseudo-tty slave */
	cdev_lpt_init(NLPT,lpt),        /*  8: parallel printer */
	cdev_lkm_dummy(),		/*  9: was qms */
	cdev_lkm_dummy(),		/* 10: was beep */
	cdev_lkm_dummy(),		/* 11: was kbd */
	cdev_tty_init(NCOM,com),        /* 12: serial port */
	cdev_lkm_dummy(),		/* 13: */
	cdev_lkm_dummy(),		/* 14: */
示例#3
0
文件: conf.c 项目: MarginC/kame
struct cdevsw cdevsw[] =
{
	cdev_cn_init(1,cn),		/* 0: virtual console */
	cdev_ctty_init(1,ctty),		/* 1: controlling terminal */
	cdev_mm_init(1,mm),		/* 2: /dev/{null,mem,kmem,...} */
	cdev_disk_init(NWD,wd),		/* 3: ST506/ESDI/IDE disk */
	cdev_swap_init(1,sw),		/* 4: /dev/drum (swap pseudo-device) */
	cdev_tty_init(NPTY,pts),	/* 5: pseudo-tty slave */
	cdev_ptc_init(NPTY,ptc),	/* 6: pseudo-tty master */
	cdev_log_init(1,log),		/* 7: /dev/klog */
	cdev_tty_init(NCOM,com),	/* 8: serial port */
	cdev_disk_init(NFDC,fd),	/* 9: floppy disk */
	cdev_tape_init(NWT,wt),		/* 10: QIC-02/QIC-36 tape */
	cdev_disk_init(NSCD,scd),	/* 11: Sony CD-ROM */
	cdev_pc_init(NPC,pc),		/* 12: PC console */
	cdev_disk_init(NSD,sd),		/* 13: SCSI disk */
	cdev_tape_init(NST,st),		/* 14: SCSI tape */
	cdev_disk_init(NCD,cd),		/* 15: SCSI CD-ROM */
	cdev_lpt_init(NLPT,lpt),	/* 16: parallel printer */
	cdev_ch_init(NCH,ch),		/* 17: SCSI autochanger */
	cdev_disk_init(NCCD,ccd),	/* 18: concatenated disk driver */
	cdev_scanner_init(NSS,ss),	/* 19: SCSI scanner */
	cdev_uk_init(NUK,uk),		/* 20: SCSI unknown */
	cdev_notdef(),			/* 21: */
	cdev_fd_init(1,filedesc),	/* 22: file descriptor pseudo-device */
	cdev_bpftun_init(NBPFILTER,bpf),/* 23: Berkeley packet filter */
	cdev_disk_init(NMD,md),		/* 24: memory disk driver */
	cdev_notdef(),			/* 25 */
	cdev_joy_init(NJOY,joy),        /* 26: joystick */
	cdev_spkr_init(NSPKR,spkr),	/* 27: PC speaker */