Date: Sun, 02 Mar 2003 21:14:13 +0100 From: Poul-Henning Kamp <phk@phk.freebsd.dk> To: current@freebsd.org Subject: HEADSUP: Driver mega-commit ahead. Message-ID: <9988.1046636053@critter.freebsd.dk>
next in thread | raw e-mail | index | archive | help
I plan to commit http://phk.freebsd.dk/patch/cdevsw.patch one of the first days of the week. Basically, it changes cdevsw initializations to use C99 sparse format, and thereby eliminates 859 lines of redundant defaultvalue initializations. After this patch has been committed, we will be able to add new (variants of existing) methods to cdevsw without having to change all device drivers to match. This will also allow us to clean up fluff from earlier expansions, like for instance the KQ_FILTER flag which will no longer be necessary. Compatibility with 4-stable could be possible if somebody volunteers to test the necessary patches. Included is the top of the patch file, the rest is equally boring. Poul-Henning ---------------------------------------------------------------------------- This is a machine generated patch which changes all cdevsw{} initializations to use C99 style sparse initializers and at the same time removes all the initializations which are not needed because they are the default values. Index: alpha/alpha/mem.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/mem.c,v retrieving revision 1.42 diff -u -r1.42 mem.c --- alpha/alpha/mem.c 25 Feb 2003 03:21:18 -0000 1.42 +++ alpha/alpha/mem.c 2 Mar 2003 19:48:33 -0000 @@ -80,19 +80,15 @@ #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { - /* open */ mmopen, - /* close */ mmclose, - /* read */ mmrw, - /* write */ mmrw, - /* ioctl */ mmioctl, - /* poll */ (d_poll_t *)seltrue, - /* mmap */ memmmap, - /* strategy */ nostrategy, - /* name */ "mem", - /* maj */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_MEM, + .d_open = mmopen, + .d_close = mmclose, + .d_read = mmrw, + .d_write = mmrw, + .d_ioctl = mmioctl, + .d_mmap = memmmap, + .d_name = "mem", + .d_maj = CDEV_MAJOR, + .d_flags = D_MEM, }; ---------------------------------------------------------------------------- struct mem_range_softc mem_range_softc; -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. 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?9988.1046636053>