diff options
author | julian <julian@FreeBSD.org> | 1995-11-29 15:31:22 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-11-29 15:31:22 +0000 |
commit | d235bcfb64166b03701e485d9d97291f1cdd7a2c (patch) | |
tree | dd333a2b288528280e46eb31b06ddd067e30d8cb /sys | |
parent | 5fc58cb36956ce012b830ed8023a4a508a121ac5 (diff) | |
download | FreeBSD-src-d235bcfb64166b03701e485d9d97291f1cdd7a2c.zip FreeBSD-src-d235bcfb64166b03701e485d9d97291f1cdd7a2c.tar.gz |
missed one..
thanks jim..
(actually I was already aware I'd missed it, but hadn't started
searching for it :)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/meteor.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index 7dee66c..bfaa826 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -72,6 +72,15 @@ #endif #include <machine/ioctl_meteor.h> +#ifdef JREMOD +#include <sys/conf.h> +#ifdef DEVFS +#include <sys/devfsext.h> +#endif /* DEVFS */ +#define CDEV_MAJOR 67 +#endif /* JREMOD */ + + extern int meteor_intr __P((void *arg)); /* enough memory for 640x48 RGB16, or YUV (16 storage bits/pixel) or @@ -1253,4 +1262,37 @@ meteor_mmap(dev_t dev, int offset, int nprot) return i386_btop((vtophys(mtr->bigbuf) + offset)); } + +#ifdef JREMOD +struct cdevsw meteor_cdevsw = + { meteor_open, meteor_close, meteor_read, meteor_write, /*67*/ + meteor_ioctl, nostop, nullreset, nodevtotty,/* Meteor */ + seltrue, meteor_mmap, NULL }; + +static meteor_devsw_installed = 0; + +static void meteor_drvinit(void *unused) +{ + dev_t dev; + + if( ! meteor_devsw_installed ) { + dev = makedev(CDEV_MAJOR,0); + cdevsw_add(&dev,&meteor_cdevsw,NULL); + meteor_devsw_installed = 1; +#ifdef DEVFS + { + int x; +/* default for a simple device with no probe routine (usually delete this) */ + x=devfs_add_devsw( +/* path name devsw minor type uid gid perm*/ + "/", "meteor", major(dev), 0, DV_CHR, 0, 0, 0600); + } +#endif + } +} + +SYSINIT(meteordev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,meteor_drvinit,NULL) + +#endif /* JREMOD */ + #endif /* NMETEOR > 0 */ |