From owner-freebsd-current Sun Mar 2 12:14:18 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76F7537B401 for ; Sun, 2 Mar 2003 12:14:16 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6847F43FA3 for ; Sun, 2 Mar 2003 12:14:15 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h22KEDA6009989 for ; Sun, 2 Mar 2003 21:14:14 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: current@freebsd.org Subject: HEADSUP: Driver mega-commit ahead. From: Poul-Henning Kamp Date: Sun, 02 Mar 2003 21:14:13 +0100 Message-ID: <9988.1046636053@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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