Date: Wed, 02 Jun 1999 08:52:32 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Charles Anderson <caa@midgard.dhs.org> Cc: Sheldon Hearn <sheldonh@uunet.co.za>, current@FreeBSD.ORG Subject: Re: cdevsw changes broke world in vinum Message-ID: <24167.928306352@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 01 Jun 1999 23:29:02 EDT." <19990601232902.A17503@midgard.dhs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I'm waiting for Greg to review the patch I sent to him: Index: 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/31 12:29:11 @@ -49,13 +49,26 @@ #endif #include <dev/vinum/request.h> -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 */ CDEV_MAJOR, + /* dump */ vinumdump, + /* psize */ vinumsize, + /* flags */ D_DISK, + /* maxio */ 0, + /* bmaj */ BDEV_MAJOR }; /* Called by main() during pseudo-device attachment. */ @@ -85,7 +98,7 @@ daemonq = NULL; /* initialize daemon's work queue */ dqend = NULL; - cdevsw_add_generic(BDEV_MAJOR, CDEV_MAJOR, &vinum_cdevsw); + cdevsw_add(&vinum_cdevsw); #ifdef DEVFS #error DEVFS not finished yet #endif @@ -236,7 +249,9 @@ } } #endif +#if 0 cdevsw[CDEV_MAJOR] = NULL; /* no cdevsw any more */ +#endif log(LOG_INFO, "vinum: unloaded\n"); /* tell the world */ return 0; default: -- 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! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?24167.928306352>