Subject: Re: vinum & i4b patches. Date: Mon, 31 May 1999 07:31:10 +0200 From: Poul-Henning Kamp In message , Hellmuth Michaelis writes: >>From the keyboard of Poul-Henning Kamp: > >> Here are the patches for vinum and i4b corresponding to the mega >> commit I just did. > >Where are they ? > Duh! Here... Index: dev/vinum/vinum.c =================================================================== RCS file: /home/ncvs/src/sys/dev/vinum/vinum.c,v retrieving revision 1.23 diff -u -r1.23 vinum.c --- vinum.c 1999/05/15 05:49:19 1.23 +++ vinum.c 1999/05/30 15:34:34 @@ -49,13 +49,26 @@ #endif #include -STATIC struct cdevsw vinum_cdevsw = -{ - vinumopen, vinumclose, physread, physwrite, - vinumioctl, nostop, nullreset, nodevtotty, - seltrue, nommap, vinumstrategy, "vinum", - NULL, -1, vinumdump, vinumsize, - D_DISK, 0, -1 +static struct cdevsw vinum_cdevsw = { + /* open */ vinumopen, + /* close */ vinumclose, + /* read */ physread, + /* write */ physwrite, + /* ioctl */ vinumioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ nommap, + /* strategy */ vinumstrategy, + /* name */ "vinum", + /* parms */ noparms, + /* maj */ -1, + /* dump */ vinumdump, + /* psize */ vinumsize, + /* flags */ D_DISK, + /* maxio */ 0, + /* bmaj */ -1 }; /* Called by main() during pseudo-device attachment. */ Index: i4b/driver/i4b_ctl.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/driver/i4b_ctl.c,v retrieving revision 1.4 diff -u -r1.4 i4b_ctl.c --- i4b_ctl.c 1999/05/20 10:08:56 1.4 +++ i4b_ctl.c 1999/05/30 16:13:39 @@ -93,17 +93,33 @@ #ifdef OS_USES_POLL static d_poll_t i4bctlpoll; +#define POLLFIELD i4bctlpoll +#else +#define POLLFIELD noselect #endif #define CDEV_MAJOR 55 -static struct cdevsw i4bctl_cdevsw = - { i4bctlopen, i4bctlclose, noread, nowrite, - i4bctlioctl, nostop, nullreset, nodevtotty, -#ifdef OS_USES_POLL - i4bctlpoll, nommap, NULL, "i4bctl", NULL, -1 }; -#else - noselect, nommap, NULL, "i4bctl", NULL, -1 }; -#endif +static struct cdevsw i4bctl_cdevsw = { + /* open */ i4bctlopen, + /* close */ i4bctlclose, + /* read */ noread, + /* write */ nowrite, + /* ioctl */ i4bctlioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4bctl", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; static void i4bctlattach(void *); PSEUDO_SET(i4bctlattach, i4b_i4bctldrv); Index: i4b/driver/i4b_rbch.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/driver/i4b_rbch.c,v retrieving revision 1.3 diff -u -r1.3 i4b_rbch.c --- i4b_rbch.c 1999/05/20 10:09:02 1.3 +++ i4b_rbch.c 1999/05/30 16:13:44 @@ -168,19 +168,33 @@ #ifdef OS_USES_POLL PDEVSTATIC d_poll_t i4brbchpoll; +#define POLLFIELD i4brbchpoll #else PDEVSTATIC d_select_t i4brbchselect; +#define POLLFIELD i4brbchselect #endif #define CDEV_MAJOR 57 static struct cdevsw i4brbch_cdevsw = { - i4brbchopen, i4brbchclose, i4brbchread, i4brbchwrite, - i4brbchioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4brbchpoll, nommap, NULL, "i4brbch", NULL, -1 -#else - i4brbchselect, nommap, NULL, "i4brbch", NULL, -1 -#endif + /* open */ i4brbchopen, + /* close */ i4brbchclose, + /* read */ i4brbchread, + /* write */ i4brbchwrite, + /* ioctl */ i4brbchioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4brbch", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; static void i4brbchattach(void *); Index: i4b/driver/i4b_tel.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/driver/i4b_tel.c,v retrieving revision 1.3 diff -u -r1.3 i4b_tel.c --- i4b_tel.c 1999/05/20 10:09:03 1.3 +++ i4b_tel.c 1999/05/30 16:13:50 @@ -185,19 +185,33 @@ PDEVSTATIC d_ioctl_t i4btelioctl; #ifdef OS_USES_POLL PDEVSTATIC d_poll_t i4btelpoll; +#define POLLFIELD i4btelpoll #else PDEVSTATIC d_select_t i4btelsel; +#define POLLFIELD i4btelsel #endif #define CDEV_MAJOR 56 static struct cdevsw i4btel_cdevsw = { - i4btelopen, i4btelclose, i4btelread, i4btelwrite, - i4btelioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4btelpoll, nommap, NULL, "i4btel", NULL, -1 -#else - i4btelsel, nommap, NULL, "i4btel", NULL, -1 -#endif + /* open */ i4btelopen, + /* close */ i4btelclose, + /* read */ i4btelread, + /* write */ i4btelwrite, + /* ioctl */ i4btelioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4btel", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; PDEVSTATIC void i4btelinit(void *unused); Index: i4b/driver/i4b_trace.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/driver/i4b_trace.c,v retrieving revision 1.3 diff -u -r1.3 i4b_trace.c --- i4b_trace.c 1999/05/20 10:09:05 1.3 +++ i4b_trace.c 1999/05/30 16:13:53 @@ -127,17 +127,32 @@ static d_ioctl_t i4btrcioctl; #ifdef OS_USES_POLL static d_poll_t i4btrcpoll; +#define POLLFIELD i4btrcpoll +#else +#define POLLFIELD noselect #endif #define CDEV_MAJOR 59 static struct cdevsw i4btrc_cdevsw = { - i4btrcopen, i4btrcclose, i4btrcread, nowrite, - i4btrcioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4btrcpoll, nommap, NULL, "i4btrc", NULL, -1 -#else - noselect, nommap, NULL, "i4btrc", NULL, -1 -#endif + /* open */ i4btrcopen, + /* close */ i4btrcclose, + /* read */ i4btrcread, + /* write */ nowrite, + /* ioctl */ i4btrcioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4btrc", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; /*---------------------------------------------------------------------------* Index: i4b/layer4/i4b_i4bdrv.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/layer4/i4b_i4bdrv.c,v retrieving revision 1.5 diff -u -r1.5 i4b_i4bdrv.c --- i4b_i4bdrv.c 1999/05/20 10:11:20 1.5 +++ i4b_i4bdrv.c 1999/05/30 16:13:56 @@ -140,19 +140,34 @@ #ifdef OS_USES_POLL PDEVSTATIC d_poll_t i4bpoll; +#define POLLFIELD i4bpoll #else PDEVSTATIC d_select_t i4bselect; +#define POLLFIELD i4bselect #endif #define CDEV_MAJOR 60 -static struct cdevsw i4b_cdevsw = - { i4bopen, i4bclose, i4bread, nowrite, - i4bioctl, nostop, nullreset, nodevtotty, -#ifdef OS_USES_POLL - i4bpoll, nommap, NULL, "i4b", NULL, -1 }; -#else - i4bselect, nommap, NULL, "i4b", NULL, -1 }; -#endif +static struct cdevsw i4b_cdevsw = { + /* open */ i4bopen, + /* close */ i4bclose, + /* read */ i4bread, + /* write */ nowrite, + /* ioctl */ i4bioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4b", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; PDEVSTATIC void i4battach(void *); PSEUDO_SET(i4battach, i4b_i4bdrv); Index: i4b/tina-dd/i4b_tina_dd.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/tina-dd/i4b_tina_dd.c,v retrieving revision 1.2 diff -u -r1.2 i4b_tina_dd.c --- i4b_tina_dd.c 1999/01/12 11:05:03 1.2 +++ i4b_tina_dd.c 1999/05/30 16:13:59 @@ -90,17 +90,33 @@ static d_ioctl_t tinaioctl; #if defined(__FreeBSD__) && __FreeBSD__ >= 3 static d_poll_t tinapoll; +#define POLLFIELD tinapoll +#else +#define POLLFIELD noselect #endif #define CDEV_MAJOR 54 -static struct cdevsw tina_cdevsw = - { tinaopen, tinaclose, noread, nowrite, - tinaioctl, nostop, nullreset, nodevtotty, -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 - tinapoll, nommap, NULL, "tina", NULL, -1 }; -#else - noselect, nommap, NULL, "tina", NULL, -1 }; -#endif +static struct cdevsw tina_cdevsw = { + /* open */ tinaopen, + /* close */ tinaclose, + /* read */ noread, + /* write */ nowrite, + /* ioctl */ tinaioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "tina", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; static void setupaddr(unsigned short iobase, unsigned int addr); static void readblock(unsigned short iobase, unsigned int addr, -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far!