Re: CVS commit: src/etc/mtree
On Mon, 5 Sep 2011, Valeriy E. Ushakov wrote: On Mon, Sep 05, 2011 at 15:13:49 +0100, Iain Hibbert wrote: On Mon, 5 Sep 2011, Joerg Sonnenberger wrote: On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote: Module Name:src Committed By: apb Date: Mon Sep 5 09:57:02 UTC 2011 Modified Files: src/etc/mtree: Makefile Log Message: Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp. This fixes a problem in which NetBSD.dist.tmp had been created in the SRCDIR by an earlier build (performed without an OBJDIR), and the existence of the file in the SRCDIR confused a subsequent build (performed with an OBJDIR). Do we really want to add special cases like this? There are all kinds of mysterious errors triggered by unclean SRCDIR, I don't think it is worth adding this specific hack. IMO these cases are worth handling just because if an OBJDIR is specified, it should be used. The alternative being that the OBJDIR is used sometimes? Thats just wrong.. So whay do you treat NetBSD.dist.tmp and NetBSD.dist differently then? Well, I don't know but ${.OBJDIR}/NetBSD.dist is already referenced in that file? If you go down that path, where do you stop? You can sleep when you have a system that works as expected, not one that fails with mysterious errors because even though you told it to use an OBJDIR for work files, it was confused by some it found elsewhere. As noted, most of this is handled invisibly by the make framework, but some of it needs to be manually handled. I guess people fix things as they notice them.. iain
re: CVS commit: src/sys/arch/sparc/sparc
Module Name: src Committed By: martin Date: Thu Sep 1 08:47:56 UTC 2011 Modified Files: src/sys/arch/sparc/sparc: pmap.c Log Message: In pmap_unwire() fix an obvious editor mishap - enable kernel preemption before returning, not the other way around. Might fix PR kern/45137. To generate a diff of this commit: cvs rdiff -u -r1.345 -r1.346 src/sys/arch/sparc/sparc/pmap.c thanks for fixing this. hmm... code was like: { return; foo(); } it would be nice if we got warnings about this. .mrg.
re: CVS commit: src/usr.bin/fstat
Module Name: src Committed By: christos Date: Sat Sep 3 13:22:56 UTC 2011 Modified Files: src/usr.bin/fstat: fstat.1 Log Message: Mention that fstat -f will not list open unix sockets on that filesystem. shouldn't this be a .Sh BUGS entry? it sure isn't a feature. .mrg.
Re: CVS commit: src/etc/mtree
On Tue, Sep 06, 2011 at 08:43:10 +0100, Iain Hibbert wrote: On Mon, 5 Sep 2011, Valeriy E. Ushakov wrote: On Mon, Sep 05, 2011 at 15:13:49 +0100, Iain Hibbert wrote: On Mon, 5 Sep 2011, Joerg Sonnenberger wrote: On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote: Module Name: src Committed By: apb Date: Mon Sep 5 09:57:02 UTC 2011 Modified Files: src/etc/mtree: Makefile Log Message: Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp. This fixes a problem in which NetBSD.dist.tmp had been created in the SRCDIR by an earlier build (performed without an OBJDIR), and the existence of the file in the SRCDIR confused a subsequent build (performed with an OBJDIR). Do we really want to add special cases like this? There are all kinds of mysterious errors triggered by unclean SRCDIR, I don't think it is worth adding this specific hack. IMO these cases are worth handling just because if an OBJDIR is specified, it should be used. The alternative being that the OBJDIR is used sometimes? Thats just wrong.. So whay do you treat NetBSD.dist.tmp and NetBSD.dist differently then? Well, I don't know but ${.OBJDIR}/NetBSD.dist is already referenced in that file? If you go down that path, where do you stop? You can sleep when you have a system that works as expected, not one that fails with mysterious errors because even though you told it to use an OBJDIR for work files, it was confused by some it found elsewhere. As noted, most of this is handled invisibly by the make framework, but some of it needs to be manually handled. I guess people fix things as they notice them.. Are you saying you are going to add a special case for each foo.o file each time an accidental non-objdir build left foo.o in src? (and no, that's not a rhetoric question). -uwe
Re: CVS commit: src/etc/mtree
In article 20110905111014.gb12...@britannica.bec.de, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote: Module Name: src Committed By:apb Date:Mon Sep 5 09:57:02 UTC 2011 Modified Files: src/etc/mtree: Makefile Log Message: Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp. This fixes a problem in which NetBSD.dist.tmp had been created in the SRCDIR by an earlier build (performed without an OBJDIR), and the existence of the file in the SRCDIR confused a subsequent build (performed with an OBJDIR). Do we really want to add special cases like this? There are all kinds of mysterious errors triggered by unclean SRCDIR, I don't think it is worth adding this specific hack. We definitely don't want to add such magic. Please revert. Otherwise we should go and do this in 100's of Makefiles. christos
Re: CVS commit: src/etc
On 06.09.2011 12:54, Thomas Klausner wrote: On Mon, Aug 22, 2011 at 06:54:07PM +, Jean-Yves Migeon wrote: Module Name: src Committed By:jym Date:Mon Aug 22 18:54:06 UTC 2011 [snip] Log Message: Modify etc/defaults/Makefile so that architectures can specify an additional rc.conf file. This one should reside under etc/etc.${MACHINE}/, and will get automatically appended to etc/defaults/rc.conf at build time if present. [snip] See also http://mail-index.netbsd.org/tech-userlevel/2011/07/25/msg005246.html In a snapshot from a few hours ago I installed, postinstall fix without any other arguments removed the architecture specific section (the rc.conf included in the build output directory is fine). Thomas Hmmm, /etc/defaults/rc.conf should be transparent to postinstall(8), as it gets installed via bsd.files.mk during build.sh. If the source ('-s' of postinstall(8)) is not specified at command line, according to code it takes /usr/src as default. Do you have a stale/old rc.conf(5) file in there, /usr/src/etc/defaults/rc.conf? Now, if this case should be handled properly is another question. There are multiple solutions, all of them end up tweaking postinstall(8): - raise a warning when overriding certain configuration files with older versions (perhaps by using the CVS tags?) - make source an explicit arg to etcupdate/postinstall - something else? -- Jean-Yves Migeon j...@netbsd.org
Re: CVS commit: src/etc/mtree
On Tue, 06 Sep 2011, Christos Zoulas wrote: Modified Files: src/etc/mtree: Makefile Log Message: Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp. This fixes a problem in which NetBSD.dist.tmp had been created in the SRCDIR by an earlier build (performed without an OBJDIR), and the existence of the file in the SRCDIR confused a subsequent build (performed with an OBJDIR). We definitely don't want to add such magic. Please revert. Otherwise we should go and do this in 100's of Makefiles. I certainly see no reason to make similar changes in hundreds of Makefiles; only in the few places where people actually encounter (and report) problems traceable to this sort of issue. There have been only a few such issues, and we have fixed all the others (elsewhere under src/etc). I have an idea for letting make cleandir deal with this problem, and may be willing to revert if that works out. --apb (Alan Barrett)
Re: CVS commit: src/etc
On Tue, Sep 06, 2011 at 01:48:41PM +0200, Jean-Yves Migeon wrote: Hmmm, /etc/defaults/rc.conf should be transparent to postinstall(8), as it gets installed via bsd.files.mk during build.sh. If the source ('-s' of postinstall(8)) is not specified at command line, according to code it takes /usr/src as default. Do you have a stale/old rc.conf(5) file in there, /usr/src/etc/defaults/rc.conf? I have the CVS checkout there that was used to build the snapshot I installed, so yes there is a file there but no it is not stale. Now, if this case should be handled properly is another question. There are multiple solutions, all of them end up tweaking postinstall(8): - raise a warning when overriding certain configuration files with older versions (perhaps by using the CVS tags?) It's not an older version. - make source an explicit arg to etcupdate/postinstall - something else? Or perhaps prefer ./etc to /usr/src/etc, that would solve the issue for me at least :) Thomas
Re: CVS commit: src/usr.bin/touch
On Tue, Sep 06, 2011 at 14:04:45 -0500, David Young wrote: Joerg, Please commit changes like the following together instead of spamming the source-changes list. I don't think that spamming source-changes is a very high priority consideration. OTOH, I know that per-directory commits were easier for the committer to review and verify, lest unrelated change is committed accidentally. It's also allows for custom commit messages where something unusual merits an explicit explanation. On Tue, Sep 06, 2011 at 06:33:18PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:33:18 UTC 2011 Modified Files: src/usr.bin/touch: touch.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/touch/touch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:33:47PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:33:46 UTC 2011 Modified Files: src/usr.bin/tr: extern.h str.c tr.c Log Message: ANSIfy. Sprinkle const and __dead. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/tr/extern.h cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tr/str.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tr/tr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:34:12PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:12 UTC 2011 Modified Files: src/usr.bin/tset: extern.h map.c set.c term.c tset.c wrterm.c Log Message: ANSIfy. Sprinkle static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/tset/extern.h cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tset/map.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/tset/set.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tset/term.c cvs rdiff -u -r1.19 -r1.20 src/usr.bin/tset/tset.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tset/wrterm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:34:38PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:38 UTC 2011 Modified Files: src/usr.bin/tsort: tsort.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/tsort/tsort.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:34:57PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:57 UTC 2011 Modified Files: src/usr.bin/tty: tty.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/tty/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:35:13PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:35:13 UTC 2011 Modified Files: src/usr.bin/uname: uname.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/uname/uname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. On Tue, Sep 06, 2011 at 06:35:41PM +, Joerg Sonnenberger wrote: Module Name:src Committed By: joerg Date: Tue Sep 6 18:35:41 UTC 2011 Modified Files: src/usr.bin/units: units.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/units/units.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 344-0444 x24 -uwe
Re: CVS commit: src/etc
On 06.09.2011 21:29, Thomas Klausner wrote: If the source ('-s' of postinstall(8)) is not specified at command line, according to code it takes /usr/src as default. Do you have a stale/old rc.conf(5) file in there, /usr/src/etc/defaults/rc.conf? I have the CVS checkout there that was used to build the snapshot I installed, so yes there is a file there but no it is not stale. Now, if this case should be handled properly is another question. There are multiple solutions, all of them end up tweaking postinstall(8): - raise a warning when overriding certain configuration files with older versions (perhaps by using the CVS tags?) It's not an older version. - make source an explicit arg to etcupdate/postinstall - something else? Or perhaps prefer ./etc to /usr/src/etc, that would solve the issue for me at least :) postinstall(8) and etcupdate(8) all take /usr/src/ as default, so I won't change that. The problem is that rc.conf is now generated at build time, and I am always using postinstall(8) via -s /usr/cvs/dest (my default DESTDIR), so this went unnoticed during my tests as the correct /etc/defaults gets parsed. I'll add the required code to handle this; thanks for reporting! -- Jean-Yves Migeon jeanyves.mig...@free.fr
Re: CVS commit: src/etc/mtree
On Tue, 6 Sep 2011, Valeriy E. Ushakov wrote: On Tue, Sep 06, 2011 at 08:43:10 +0100, Iain Hibbert wrote: On Mon, 5 Sep 2011, Valeriy E. Ushakov wrote: On Mon, Sep 05, 2011 at 15:13:49 +0100, Iain Hibbert wrote: On Mon, 5 Sep 2011, Joerg Sonnenberger wrote: On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote: Module Name:src Committed By: apb Date: Mon Sep 5 09:57:02 UTC 2011 Modified Files: src/etc/mtree: Makefile Log Message: Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp. This fixes a problem in which NetBSD.dist.tmp had been created in the SRCDIR by an earlier build (performed without an OBJDIR), and the existence of the file in the SRCDIR confused a subsequent build (performed with an OBJDIR). Do we really want to add special cases like this? There are all kinds of mysterious errors triggered by unclean SRCDIR, I don't think it is worth adding this specific hack. IMO these cases are worth handling just because if an OBJDIR is specified, it should be used. The alternative being that the OBJDIR is used sometimes? Thats just wrong.. So whay do you treat NetBSD.dist.tmp and NetBSD.dist differently then? Well, I don't know but ${.OBJDIR}/NetBSD.dist is already referenced in that file? If you go down that path, where do you stop? You can sleep when you have a system that works as expected, not one that fails with mysterious errors because even though you told it to use an OBJDIR for work files, it was confused by some it found elsewhere. As noted, most of this is handled invisibly by the make framework, but some of it needs to be manually handled. I guess people fix things as they notice them.. Are you saying you are going to add a special case for each foo.o file each time an accidental non-objdir build left foo.o in src? (and no, that's not a rhetoric question). clearly not, since the foo.o files are already handled by a general case iain
CVS commit: src/sys/dev/pci/voyager
Module Name:src Committed By: macallan Date: Tue Sep 6 06:27:15 UTC 2011 Modified Files: src/sys/dev/pci/voyager: voyagerfb.c Log Message: add simple backlight control support, only on/off for now To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/voyager/voyagerfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/voyager/voyagerfb.c diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.2 src/sys/dev/pci/voyager/voyagerfb.c:1.3 --- src/sys/dev/pci/voyager/voyagerfb.c:1.2 Tue Sep 6 03:31:37 2011 +++ src/sys/dev/pci/voyager/voyagerfb.c Tue Sep 6 06:27:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: voyagerfb.c,v 1.2 2011/09/06 03:31:37 macallan Exp $ */ +/* $NetBSD: voyagerfb.c,v 1.3 2011/09/06 06:27:14 macallan Exp $ */ /* * Copyright (c) 2009 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.2 2011/09/06 03:31:37 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.3 2011/09/06 06:27:14 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -59,6 +59,9 @@ #include dev/i2c/i2cvar.h #include dev/pci/voyagervar.h +/* there are probably gdium-specific */ +#define GPIO_BACKLIGHT 0x2000 + struct voyagerfb_softc { device_t sc_dev; @@ -81,6 +84,8 @@ struct vcons_data vd; uint8_t *sc_dataport; int sc_mode; + int sc_bl_on, sc_bl_level; + void *sc_gpio_cookie; u_char sc_cmap_red[256]; u_char sc_cmap_green[256]; u_char sc_cmap_blue[256]; @@ -133,6 +138,13 @@ NULL /* scroll */ }; +static void voyagerfb_brightness_up(device_t); +static void voyagerfb_brightness_down(device_t); +/* set backlight level */ +static void voyagerfb_set_backlight(struct voyagerfb_softc *, int); +/* turn backlight on and off without messing with the level */ +static void voyagerfb_switch_backlight(struct voyagerfb_softc *, int); + /* wait for FIFO empty so we can feed it another command */ static inline void voyagerfb_ready(struct voyagerfb_softc *sc) @@ -239,6 +251,16 @@ voyagerfb_accessops); sc-vd.init_screen = voyagerfb_init_screen; + /* backlight control */ + sc-sc_gpio_cookie = device_private(parent); + voyager_write_gpio(sc-sc_gpio_cookie, 0x, GPIO_BACKLIGHT); + sc-sc_bl_on = 1; + sc-sc_bl_level = 255; + pmf_event_register(sc-sc_dev, PMFE_DISPLAY_BRIGHTNESS_UP, + voyagerfb_brightness_up, TRUE); + pmf_event_register(sc-sc_dev, PMFE_DISPLAY_BRIGHTNESS_DOWN, + voyagerfb_brightness_down, TRUE); + /* init engine here */ voyagerfb_init(sc); @@ -298,6 +320,7 @@ struct voyagerfb_softc *sc = vd-cookie; struct wsdisplay_fbinfo *wdf; struct vcons_screen *ms = vd-active; + struct wsdisplay_param *param; switch (cmd) { case WSDISPLAYIO_GTYPE: @@ -347,6 +370,34 @@ } } return 0; + + case WSDISPLAYIO_GETPARAM: + param = (struct wsdisplay_param *)data; + switch (param-param) { + case WSDISPLAYIO_PARAM_BRIGHTNESS: + param-min = 0; + param-max = 255; + param-curval = sc-sc_bl_level; + return 0; + case WSDISPLAYIO_PARAM_BACKLIGHT: + param-min = 0; + param-max = 1; + param-curval = sc-sc_bl_on; + return 0; + } + return EPASSTHROUGH; + + case WSDISPLAYIO_SETPARAM: + param = (struct wsdisplay_param *)data; + switch (param-param) { + case WSDISPLAYIO_PARAM_BRIGHTNESS: + voyagerfb_set_backlight(sc, param-curval); + return 0; + case WSDISPLAYIO_PARAM_BACKLIGHT: + voyagerfb_switch_backlight(sc, param-curval); + return 0; + } + return EPASSTHROUGH; } return EPASSTHROUGH; } @@ -818,3 +869,53 @@ voyagerfb_rectfill(sc, x, y, width, height, ri-ri_devcmap[bg]); } } + +/* backlight control */ +static void +voyagerfb_set_backlight(struct voyagerfb_softc *sc, int level) +{ + + /* + * should we do nothing when backlight is off, should we just store the + * level and use it when turning back on or should we just flip sc_bl_on + * and turn the backlight on? + * For now turn it on so a crashed screensaver can't get the user stuck + * with a dark screen as long as hotkeys work + */ + if (level 255) level = 255; + if (level 0) level = 0; + if (level == sc-sc_bl_level) + return; + sc-sc_bl_level = level; + if (sc-sc_bl_on == 0) + sc-sc_bl_on = 1; + level = 255 - level; + /* and here we would actually muck with the hardware */ +} + +static void +voyagerfb_switch_backlight(struct voyagerfb_softc *sc, int on) +{ + + if (on == sc-sc_bl_on) + return; + sc-sc_bl_on = on; + voyager_write_gpio(sc-sc_gpio_cookie, ~GPIO_BACKLIGHT, on ? GPIO_BACKLIGHT : 0); +} + + +static void +voyagerfb_brightness_up(device_t dev) +{ + struct voyagerfb_softc *sc = device_private(dev); + + voyagerfb_set_backlight(sc, sc-sc_bl_level + 8); +} + +static void +voyagerfb_brightness_down(device_t dev) +{ + struct voyagerfb_softc *sc = device_private(dev); + + voyagerfb_set_backlight(sc, sc-sc_bl_level - 8); +}
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 08:44:39 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: pmap.c Log Message: Remove old comment that is no longer relevant To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/usermode/usermode/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/usermode/pmap.c diff -u src/sys/arch/usermode/usermode/pmap.c:1.55 src/sys/arch/usermode/usermode/pmap.c:1.56 --- src/sys/arch/usermode/usermode/pmap.c:1.55 Mon Sep 5 12:19:12 2011 +++ src/sys/arch/usermode/usermode/pmap.c Tue Sep 6 08:44:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.55 2011/09/05 12:19:12 reinoud Exp $ */ +/* $NetBSD: pmap.c,v 1.56 2011/09/06 08:44:39 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.55 2011/09/05 12:19:12 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.56 2011/09/06 08:44:39 reinoud Exp $); #include opt_memsize.h #include opt_kmempages.h @@ -452,8 +452,6 @@ uintptr_t lpn, ppn; int prot, cur_prot, diff; - /* get current protection settings */ - aprint_debug(pmap_fault pmap %p, va %p\n, pmap, (void *) va); /* get logical page from vaddr */
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 09:37:41 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: pmap.c Log Message: Implement switch to have a sparse memory file or to fill it beforehand. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/usermode/usermode/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/usermode/pmap.c diff -u src/sys/arch/usermode/usermode/pmap.c:1.56 src/sys/arch/usermode/usermode/pmap.c:1.57 --- src/sys/arch/usermode/usermode/pmap.c:1.56 Tue Sep 6 08:44:39 2011 +++ src/sys/arch/usermode/usermode/pmap.c Tue Sep 6 09:37:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.56 2011/09/06 08:44:39 reinoud Exp $ */ +/* $NetBSD: pmap.c,v 1.57 2011/09/06 09:37:41 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.56 2011/09/06 08:44:39 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.57 2011/09/06 09:37:41 reinoud Exp $); #include opt_memsize.h #include opt_kmempages.h @@ -104,6 +104,8 @@ vaddr_t kmem_user_start, kmem_user_end; vaddr_t kmem_ext_cur_start, kmem_ext_cur_end; +#define SPARSE_MEMFILE + void pmap_bootstrap(void) { @@ -119,7 +121,6 @@ vaddr_t va; uintptr_t pg; void *addr; - char dummy; int err; extern void _init(void); /* start of kernel */ @@ -188,7 +189,7 @@ aprint_debug(\tkmem_ext_end\t%p\n,(void *) kmem_ext_end); aprint_debug(\tkmem_user_start\t%p\n, (void *) kmem_user_start); aprint_debug(\tkmem_user_end\t%p\n, (void *) kmem_user_end); - aprint_debug(\n\n\n); + aprint_debug(\n\n); aprint_debug(Creating memory mapped backend\n); @@ -203,9 +204,32 @@ /* file_len is the backing store length, nothing to do with placement */ file_len = 1024 * MEMSIZE; - wlen = thunk_pwrite(mem_fh, dummy, 1, file_len - 1); - if (wlen != 1) - panic(pmap_bootstrap: can't grow file\n); + +#ifdef SPARSE_MEMFILE + { + char dummy; + + wlen = thunk_pwrite(mem_fh, dummy, 1, file_len - 1); + if (wlen != 1) + panic(pmap_bootstrap: can't grow file\n); + } +#else + { + void *block; + + printf(Creating memory file\r); + block = thunk_malloc(PAGE_SIZE); + if (!block) + panic(pmap_bootstrap: can't malloc writeout block); + + for (pg = 0; pg file_len; pg += PAGE_SIZE) { + wlen = thunk_pwrite(mem_fh, block, PAGE_SIZE, pg); + if (wlen != PAGE_SIZE) +panic(pmap_bootstrap: write fails, disc full?); + } + thunk_free(block); + } +#endif /* protect the current kernel section */ /* XXX kernel stack? */
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 09:38:27 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: Move sanity check before pmap since pmap and uvm can't be looking outside this box To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/usermode/usermode/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.28 src/sys/arch/usermode/usermode/trap.c:1.29 --- src/sys/arch/usermode/usermode/trap.c:1.28 Mon Sep 5 21:38:05 2011 +++ src/sys/arch/usermode/usermode/trap.c Tue Sep 6 09:38:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.28 2011/09/05 21:38:05 jmcneill Exp $ */ +/* $NetBSD: trap.c,v 1.29 2011/09/06 09:38:27 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.28 2011/09/05 21:38:05 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.29 2011/09/06 09:38:27 reinoud Exp $); #include sys/types.h #include sys/param.h @@ -165,6 +165,14 @@ va = (vaddr_t) info-si_addr; va = trunc_page(va); + /* sanity */ + if ((va VM_MIN_ADDRESS) || (va = VM_MAX_ADDRESS)) + panic(peeing outside the box! (va=%p), (void *)va); + + /* extra debug for now - should issue signal */ + if (va == 0) + panic(NULL deref\n); + kmem = 1; vm_map = kernel_map; if ((va = VM_MIN_ADDRESS) (va VM_MAXUSER_ADDRESS)) { @@ -187,14 +195,6 @@ pcb-pcb_onfault = onfault; } - /* sanity */ - if ((va VM_MIN_ADDRESS) || (va = VM_MAX_ADDRESS)) - panic(peeing outside the box! (va=%p), (void *)va); - - /* extra debug for now */ - if (va == 0) - panic(NULL deref\n); - #if 0 if (old_old_va) thunk_pwrite(debug_fh, (void *) old_old_va, PAGE_SIZE, old_old_va);
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Sep 6 09:48:34 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: mdocml-1.11.7 out. To generate a diff of this commit: cvs rdiff -u -r1.863 -r1.864 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.863 src/doc/3RDPARTY:1.864 --- src/doc/3RDPARTY:1.863 Sun Sep 4 10:23:06 2011 +++ src/doc/3RDPARTY Tue Sep 6 09:48:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.863 2011/09/04 10:23:06 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.864 2011/09/06 09:48:34 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -650,7 +650,7 @@ Package: mdocml Version: 1.11.1 -Current Vers: 1.11.6 +Current Vers: 1.11.7 Maintainer: Kristaps Džonsons Archive Site: http://mdocml.bsd.lv/snapshots/ Home Page: http://mdocml.bsd.lv/
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: jmcneill Date: Tue Sep 6 09:55:04 UTC 2011 Modified Files: src/sys/arch/usermode/dev: cpu.c src/sys/arch/usermode/usermode: trap.c urkelvisor.c Log Message: cpu_lwp_inkernel approach won't work, back to the drawing board To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/usermode/dev/cpu.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/usermode/usermode/trap.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/usermode/urkelvisor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/dev/cpu.c diff -u src/sys/arch/usermode/dev/cpu.c:1.33 src/sys/arch/usermode/dev/cpu.c:1.34 --- src/sys/arch/usermode/dev/cpu.c:1.33 Mon Sep 5 20:54:47 2011 +++ src/sys/arch/usermode/dev/cpu.c Tue Sep 6 09:55:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.33 2011/09/05 20:54:47 jmcneill Exp $ */ +/* $NetBSD: cpu.c,v 1.34 2011/09/06 09:55:04 jmcneill Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include opt_cpu.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.33 2011/09/05 20:54:47 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.34 2011/09/06 09:55:04 jmcneill Exp $); #include sys/param.h #include sys/conf.h @@ -58,8 +58,6 @@ #define cpu_unreachable() do { thunk_abort(); } while (0) #endif -int cpu_lwp_inkernel = 1; - static int cpu_match(device_t, cfdata_t, void *); static void cpu_attach(device_t, device_t, void *); @@ -188,7 +186,6 @@ ci-ci_stash = oldlwp; curlwp = newlwp; - cpu_lwp_inkernel = curproc-p_vmspace-vm_map.pmap == pmap_kernel(); if (oldpcb) { oldpcb-pcb_errno = thunk_geterrno(); Index: src/sys/arch/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.29 src/sys/arch/usermode/usermode/trap.c:1.30 --- src/sys/arch/usermode/usermode/trap.c:1.29 Tue Sep 6 09:38:27 2011 +++ src/sys/arch/usermode/usermode/trap.c Tue Sep 6 09:55:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.29 2011/09/06 09:38:27 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.30 2011/09/06 09:55:04 jmcneill Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.29 2011/09/06 09:38:27 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.30 2011/09/06 09:55:04 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -48,8 +48,6 @@ //#include machine/instr.h //#include machine/userret.h -extern int cpu_lwp_inkernel; - /* forwards and externals */ void setup_signal_handlers(void); static void mem_access_handler(int sig, siginfo_t *info, void *ctx); @@ -118,8 +116,6 @@ void *onfault; int kmem, lwp_errno, rv; - cpu_lwp_inkernel++; - recurse++; if (recurse 1) printf(enter trap recursion level %d\n, recurse); @@ -232,7 +228,6 @@ if (recurse 1) printf(leaving trap recursion level %d\n, recurse); recurse--; - cpu_lwp_inkernel--; } static void @@ -244,7 +239,6 @@ struct pcb *pcb; vaddr_t va; - cpu_lwp_inkernel++; recurse++; if (recurse 1) printf(enter trap recursion level %d\n, recurse); @@ -292,5 +286,4 @@ panic(illegal instruction encountered\n); } - cpu_lwp_inkernel--; } Index: src/sys/arch/usermode/usermode/urkelvisor.c diff -u src/sys/arch/usermode/usermode/urkelvisor.c:1.7 src/sys/arch/usermode/usermode/urkelvisor.c:1.8 --- src/sys/arch/usermode/usermode/urkelvisor.c:1.7 Mon Sep 5 20:54:48 2011 +++ src/sys/arch/usermode/usermode/urkelvisor.c Tue Sep 6 09:55:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: urkelvisor.c,v 1.7 2011/09/05 20:54:48 jmcneill Exp $ */ +/* $NetBSD: urkelvisor.c,v 1.8 2011/09/06 09:55:04 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifdef __NetBSD__ -__RCSID($NetBSD: urkelvisor.c,v 1.7 2011/09/05 20:54:48 jmcneill Exp $); +__RCSID($NetBSD: urkelvisor.c,v 1.8 2011/09/06 09:55:04 jmcneill Exp $); #endif #include sys/types.h @@ -114,15 +114,12 @@ static int handle_syscall(struct reg_struct *puregs, pid_t urkel_pid) { - extern int cpu_lwp_inkernel; + vaddr_t pc; int sig = 0; int inkernel; - errno = 0; - inkernel = ptrace(PT_READ_D, urkel_pid, cpu_lwp_inkernel, 0); - if (errno) - err(EXIT_FAILURE, ptrace(PT_READ_D, %d, %p, 0) failed, - urkel_pid, cpu_lwp_inkernel); + pc = (vaddr_t)R_PC(puregs); + inkernel = !(pc = kmem_user_start pc kmem_user_end); //fprintf(stderr, %s: pid=%d pc=%p inkernel=%d\n, //__func__, urkel_pid, (void *)R_PC(puregs), inkernel);
CVS commit: src/share/man/man8
Module Name:src Committed By: apb Date: Tue Sep 6 10:27:07 UTC 2011 Modified Files: src/share/man/man8: MAKEDEV.8 Log Message: regen for -u option and dtv device. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/man/man8/MAKEDEV.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/MAKEDEV.8 diff -u src/share/man/man8/MAKEDEV.8:1.39 src/share/man/man8/MAKEDEV.8:1.40 --- src/share/man/man8/MAKEDEV.8:1.39 Tue Mar 22 22:17:44 2011 +++ src/share/man/man8/MAKEDEV.8 Tue Sep 6 10:27:07 2011 @@ -6,7 +6,7 @@ .\ *** DO NOT EDIT - any changes will be lost!!! .\ *** -- .\ -.\ $NetBSD: MAKEDEV.8,v 1.39 2011/03/22 22:17:44 njoly Exp $ +.\ $NetBSD: MAKEDEV.8,v 1.40 2011/09/06 10:27:07 apb Exp $ .\ .\ Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -35,7 +35,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd March 22, 2011 +.Dd September 6, 2011 .Dt MAKEDEV 8 .Os .Sh NAME @@ -44,7 +44,7 @@ .Sh SYNOPSIS .\ Please keep this in sync with MAKEDEV.local.8 .Nm -.Op Fl fMs +.Op Fl fMsu .Op Fl m Ar mknod .Op Fl p Ar pax .Op Fl t Ar mtree @@ -135,6 +135,8 @@ .Xr mtree 8 program. [Usually, $TOOL_MTREE or mtree.] +.It Fl u +Don't re-create devices that already exist. .El .Pp .Nm @@ -671,7 +673,8 @@ AGP GART devices, see .Xr \agp 4 . It Ar altq -ALTQ control interface +ALTQ control interface, see +.Xr \altq 4 . It Ar amr# AMI MegaRaid control device, see .Xr \amr 4 @@ -720,6 +723,9 @@ . It Ar drm# Direct Rendering Manager interface, see .Xr \drm 4 +. It Ar dtv# +Digital TV interface, see +.Xr \dtv 4 . It Ar fb# PMAX generic framebuffer pseudo-device . It Ar fd
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Tue Sep 6 10:48:29 UTC 2011 Modified Files: src/sys/dev/pci/hdaudio: hdaudio.c hdaudioreg.h Log Message: For AC3, set the Non-PCM bit in the stream format structure used in the stream descriptors codec config. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/hdaudio/hdaudio.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/hdaudio/hdaudioreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hdaudio/hdaudio.c diff -u src/sys/dev/pci/hdaudio/hdaudio.c:1.14 src/sys/dev/pci/hdaudio/hdaudio.c:1.15 --- src/sys/dev/pci/hdaudio/hdaudio.c:1.14 Mon Aug 29 14:47:09 2011 +++ src/sys/dev/pci/hdaudio/hdaudio.c Tue Sep 6 10:48:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio.c,v 1.14 2011/08/29 14:47:09 jmcneill Exp $ */ +/* $NetBSD: hdaudio.c,v 1.15 2011/09/06 10:48:28 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.14 2011/08/29 14:47:09 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio.c,v 1.15 2011/09/06 10:48:28 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -1070,6 +1070,15 @@ { uint16_t fmt = 0; + switch (param-encoding) { + case AUDIO_ENCODING_AC3: + fmt |= HDAUDIO_FMT_TYPE_NONPCM; + break; + default: + fmt |= HDAUDIO_FMT_TYPE_PCM; + break; + } + switch (param-sample_rate) { case 8000: fmt |= HDAUDIO_FMT_BASE_48 | HDAUDIO_FMT_MULT(1) | Index: src/sys/dev/pci/hdaudio/hdaudioreg.h diff -u src/sys/dev/pci/hdaudio/hdaudioreg.h:1.6 src/sys/dev/pci/hdaudio/hdaudioreg.h:1.7 --- src/sys/dev/pci/hdaudio/hdaudioreg.h:1.6 Tue Sep 6 01:51:44 2011 +++ src/sys/dev/pci/hdaudio/hdaudioreg.h Tue Sep 6 10:48:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudioreg.h,v 1.6 2011/09/06 01:51:44 jmcneill Exp $ */ +/* $NetBSD: hdaudioreg.h,v 1.7 2011/09/06 10:48:28 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -123,6 +123,9 @@ #define HDAUDIO_SD_FIFOW(x) HDAUDIO_SD_REG(0x0e, x) #define HDAUDIO_SD_FIFOS(x) HDAUDIO_SD_REG(0x10, x) #define HDAUDIO_SD_FMT(x) HDAUDIO_SD_REG(0x12, x) +#define HDAUDIO_FMT_TYPE_MASK 0x8000 +#define HDAUDIO_FMT_TYPE_PCM 0x +#define HDAUDIO_FMT_TYPE_NONPCM 0x8000 #define HDAUDIO_FMT_BASE_MASK 0x4000 #define HDAUDIO_FMT_BASE_48 0x #define HDAUDIO_FMT_BASE_44 0x4000
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 10:54:03 UTC 2011 Modified Files: src/etc: MAKEDEV.tmpl Log Message: In most case patterns, change foo*) to foo[0-9]*). There are also a few where foo*) changes to foo|foo[0-9]*) or some other slightly more complex pattern. This should prevent MAKEDEV foobar0 from accidentally matching the foo* pattern when it should really give an error, and it should make the order of the patterns less critical. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.140 src/etc/MAKEDEV.tmpl:1.141 --- src/etc/MAKEDEV.tmpl:1.140 Sat Aug 6 12:29:39 2011 +++ src/etc/MAKEDEV.tmpl Tue Sep 6 10:54:03 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.140 2011/08/06 12:29:39 jmcneill Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.141 2011/09/06 10:54:03 apb Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -858,39 +858,39 @@ mkdev usb c %usb_chr% 255 444 ;; -usb*) +usb[0-9]*) unit=${i#usb} usb=usb$unit mkdev usb$unit c %usb_chr% $unit ;; -uhid*) +uhid[0-9]*) unit=${i#uhid} mkdev uhid$unit c %uhid_chr% $unit 666 ;; -ulpt*) +ulpt[0-9]*) unit=${i#ulpt} mkdev ulpt$unit c %ulpt_chr% $unit mkdev ulpn$unit c %ulpt_chr% $(($unit + 64)) ;; -urio*) +urio[0-9]*) unit=${i#urio} mkdev urio$unit c %urio_chr% $unit 666 ;; -uscanner*) +uscanner[0-9]*) unit=${i#uscanner} mkdev uscanner$unit c %uscanner_chr% $unit ;; -utoppy*) +utoppy[0-9]*) unit=${i#utoppy} mkdev utoppy$unit c %utoppy_chr% $unit ;; -ttyHS*) +ttyHS[0-9]*) unit=${i#ttyHS} for j in 00 01 02 03 04 05 06 07 08 09 10 do @@ -901,21 +901,21 @@ done ;; -ttyY*) +ttyY[0-9]*) unit=${i#ttyY} mkdev ttyY$unit c %ucycom_chr% $(($unit + $dialin )) $u_uucp mkdev dtyY$unit c %ucycom_chr% $(($unit + $dialout )) $u_uucp mkdev ctyY$unit c %ucycom_chr% $(($unit + $callunit)) $u_uucp ;; -ttyU*) +ttyU[0-9]*) unit=${i#ttyU} mkdev ttyU$unit c %ucom_chr% $(($unit + $dialin )) $u_uucp mkdev dtyU$unit c %ucom_chr% $(($unit + $dialout )) $u_uucp mkdev ctyU$unit c %ucom_chr% $(($unit + $callunit)) $u_uucp ;; -ugen*) +ugen[0-9]*) unit=${i#ugen} for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 do @@ -941,7 +941,7 @@ mkdev wskbd c %wsmux_chr% 1 ;; -wsmux*) +wsmux[0-9]*) unit=${i#wsmux} mkdev wsmux$unitc %wsmux_chr% $unit mkdev wsmuxctl$unit c %wsmux_chr% $(($unit + 128)) 200 @@ -967,17 +967,17 @@ mkdev ttyEcfg c %wsdisplay_chr% 255 ;; -ttyE*) +ttyE[0-9]*) unit=${i#ttyE} mkdev ttyE$unit c %wsdisplay_chr% $unit ;; -wsmouse*) +wsmouse[0-9]*) unit=${i#wsmouse} mkdev wsmouse$unit c %wsmouse_chr% $unit ;; -wskbd*) +wskbd[0-9]*) unit=${i#wskbd} mkdev wskbd$unit c %wskbd_chr% $unit ;; @@ -994,10 +994,8 @@ fi ;; -wt*) - case $i in - wt*) name=wt; unit=${i#wt}; chr=%wt_chr%; blk=%wt_blk%;; - esac +wt[0-9]*) + name=wt; unit=${i#wt}; chr=%wt_chr%; blk=%wt_blk% for sub in $unit $(($unit+8)) $(($unit+16)) do mkdev $name$sub b $blk $(($sub + 0)) 660 $g_operator @@ -1007,28 +1005,24 @@ done ;; -md*) +md[0-9]*) makedisk_minimal md ${i#md} %md_blk% %md_chr% ;; -fss*) - case $i in - fss*) name=fss; unit=${i#fss}; blk=%fss_blk%; chr=%fss_chr% - esac +fss[0-9]*) + name=fss; unit=${i#fss}; blk=%fss_blk%; chr=%fss_chr% mkdev $name$unit b $blk $unit 660 $g_operator mkdev r$name$unit c $chr $unit 660 $g_operator ;; -ss*) - case $i in - ss*) name=ss; unit=${i#ss}; chr=%ss_chr%;; - esac +ss[0-9]*) + name=ss; unit=${i#ss}; chr=%ss_chr% mkdev $name$unit c $chr $(($unit * 16 + 0)) 640 $g_operator mkdev n$name$unit c $chr $(($unit * 16 + 1)) 640 $g_operator mkdev en$name$unit c $chr $(($unit * 16 + 3)) 640 $g_operator ;; -ccd*|cgd*|raid*|vnd*) +ccd[0-9]*|cgd[0-9]*|raid[0-9]*|vnd[0-9]*) case $i in ccd*) name=ccd; unit=${i#ccd}; blk=%ccd_blk%; chr=%ccd_chr%;; cgd*) name=cgd; unit=${i#cgd}; blk=%cgd_blk%; chr=%cgd_chr%;; @@ -1038,44 +1032,44 @@ %MKDISK% $name $unit $blk $chr ;; -sd*) +sd[0-9]*) name=sd; unit=${i#sd}; blk=%sd_blk%; chr=%sd_chr% %MKDISK% $name $unit $blk $chr ;; -ace*) +ace[0-9]*) name=ace; unit=${i#ace}; blk=%ace_blk%; chr=%ace_chr% %MKDISK% $name $unit $blk $chr ;; -eflash*) +eflash[0-9]*) name=eflash; unit=${i#eflash}; blk=%eflash_blk%; chr=%eflash_chr% %MKDISK% $name $unit $blk $chr ;; -wd*) +wd[0-9]*) name=wd; unit=${i#wd}; blk=%wd_blk%; chr=%wd_chr% %MKDISK% $name $unit $blk $chr ;; -fd*) +fd[0-9]*) name=fd; unit=${i#fd}; blk=%fd_blk%; chr=%fd_chr% %MKDISK% $name $unit $blk $chr ;; -ld*) +ld[0-9]*) name=ld; unit=${i#ld}; blk=%ld_blk%; chr=%ld_chr% %MKDISK% $name $unit $blk $chr ;; -flash*) +flash[0-9]*)
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Tue Sep 6 11:14:17 UTC 2011 Modified Files: src/sys/dev/pci/hdaudio: hdafg.c Log Message: Set the /AUDIO digital converter control bit for non-PCM streams To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hdaudio/hdafg.c diff -u src/sys/dev/pci/hdaudio/hdafg.c:1.3 src/sys/dev/pci/hdaudio/hdafg.c:1.4 --- src/sys/dev/pci/hdaudio/hdafg.c:1.3 Tue Sep 6 01:51:44 2011 +++ src/sys/dev/pci/hdaudio/hdafg.c Tue Sep 6 11:14:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.3 2011/09/06 01:51:44 jmcneill Exp $ */ +/* $NetBSD: hdafg.c,v 1.4 2011/09/06 11:14:17 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.3 2011/09/06 01:51:44 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.4 2011/09/06 11:14:17 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -3050,6 +3050,9 @@ fmt = hdaudio_stream_param(sc-sc_audiodev.ad_capture, sc-sc_rparam); + if (fmt HDAUDIO_FMT_TYPE_NONPCM) + dfmt |= COP_DIGITAL_CONVCTRL1_NAUDIO; + for (i = 0; i sc-sc_nassocs; i++) { if (as[i].as_enable == false) continue;
CVS commit: src/sys/kern
Module Name:src Committed By: jmcneill Date: Tue Sep 6 11:22:43 UTC 2011 Modified Files: src/sys/kern: sys_process.c Log Message: PR# kern/45330: ptrace: signals can alter syscall return values process_stoptrace: defer signal processing to userret, ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/kern/sys_process.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_process.c diff -u src/sys/kern/sys_process.c:1.161 src/sys/kern/sys_process.c:1.162 --- src/sys/kern/sys_process.c:1.161 Fri Sep 2 20:07:41 2011 +++ src/sys/kern/sys_process.c Tue Sep 6 11:22:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_process.c,v 1.161 2011/09/02 20:07:41 christos Exp $ */ +/* $NetBSD: sys_process.c,v 1.162 2011/09/06 11:22:42 jmcneill Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_process.c,v 1.161 2011/09/02 20:07:41 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_process.c,v 1.162 2011/09/06 11:22:42 jmcneill Exp $); #include opt_ptrace.h #include opt_ktrace.h @@ -1102,7 +1102,6 @@ { struct lwp *l = curlwp; struct proc *p = l-l_proc, *pp; - int sig; mutex_enter(proc_lock); mutex_enter(p-p_lock); @@ -1118,15 +1117,11 @@ proc_stop(p, 1, SIGSTOP); mutex_exit(proc_lock); - /* - * Call issignal() once only, to have it take care of the - * pending stop. Signal processing will take place as usual - * from userret(). - */ - KERNEL_UNLOCK_ALL(l, l-l_biglocks); - if ((sig = issignal(l)) != 0) - postsig(sig); + if (sigispending(l, 0)) { + lwp_lock(l); + l-l_flag |= LW_PENDSIG; + lwp_unlock(l); + } mutex_exit(p-p_lock); - KERNEL_LOCK(l-l_biglocks, l); } #endif /* KTRACE || PTRACE */
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: christos Date: Tue Sep 6 11:31:47 UTC 2011 Modified Files: src/usr.bin/fstat: fstat.1 Log Message: move UNIX socket mention in the BUGS section. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/fstat/fstat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.1 diff -u src/usr.bin/fstat/fstat.1:1.27 src/usr.bin/fstat/fstat.1:1.28 --- src/usr.bin/fstat/fstat.1:1.27 Mon Sep 5 14:27:31 2011 +++ src/usr.bin/fstat/fstat.1 Tue Sep 6 07:31:47 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: fstat.1,v 1.27 2011/09/05 18:27:31 wiz Exp $ +.\ $NetBSD: fstat.1,v 1.28 2011/09/06 11:31:47 christos Exp $ .\ .\ Copyright (c) 1987, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ from: @(#)fstat.1 8.3 (Berkeley) 2/25/94 .\ -.Dd September 3, 2011 +.Dd September 5, 2011 .Dt FSTAT 1 .Os .Sh NAME @@ -64,14 +64,7 @@ .Pa /usr/src resides, type .Dq Li fstat -f /usr/src . -Note that this will not list -.Dv AF_LOCAL -domain sockets open in the file system. -To find all the -.Dv AF_LOCAL -domain sockets, use -.Nm -to list all the sockets, and look for the ones that belong in the file system. +Please see the BUGS section for issues with this option. .It Fl M Extract values associated with the name list from the specified core instead of the default @@ -207,9 +200,11 @@ For TCP, it is the address of the tcpcb, and for UDP, the inpcb (socket pcb). For .Ux -domain sockets, its the address of the socket pcb and the address -of the connected pcb (if connected). -Otherwise the protocol number and address of the socket itself are printed. +domain sockets, its the address of the socket pcb and the name of the +file if available. +Otherwise the address of the connected pcb is printed (if connected). +For other domains, the protocol number and address of the socket itself +are printed. The attempt is to make enough information available to permit further analysis without duplicating .Xr netstat 1 . @@ -219,10 +214,11 @@ command would print for TCP, UDP, and .Ux domain. -Note that since pipes are implemented using sockets, a pipe appears as a -connected +For kernels compiled with +.Dv PIPE_SOCKETPAIR +pipes appear as connected .Ux -domain stream socket. +domain stream sockets. A unidirectional .Ux domain socket indicates the direction of flow with an arrow @@ -268,3 +264,16 @@ .Nm does not attempt to translate the internet address and port numbers into symbolic names. +.Pp +Note that the +.Fl f +option will not list +.Ux +domain sockets open in the file system, because the pathnames in the sockets +may not be absolute and are not deterministic. +To find all the +.Ux +domain sockets, use +.Nm +to list all the sockets, and look for the ones that maybe belong in the +file system.
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 13:34:44 UTC 2011 Modified Files: src/etc: MAKEDEV.tmpl Log Message: MAKEDEV dkn should create only the dkn device, but it previously looped creating everything from dk0 to dkn. Reported by M. Levinson. Also add comments to cases where MAKEDEV loops creating multiple devices. To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.141 src/etc/MAKEDEV.tmpl:1.142 --- src/etc/MAKEDEV.tmpl:1.141 Tue Sep 6 10:54:03 2011 +++ src/etc/MAKEDEV.tmpl Tue Sep 6 13:34:44 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.141 2011/09/06 10:54:03 apb Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.142 2011/09/06 13:34:44 apb Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -984,6 +984,7 @@ fd) if ! $fdesc_mounted; then + # Create the fd subdirectory, and devices fd/0 to fd/63 makedir fd 755 n=0 while [ $n -lt 64 ] @@ -1095,16 +1096,14 @@ dk[0-9]*) name=dk; unit=${i#dk}; blk=%dk_blk%; chr=%dk_chr% - minor=0 - while [ $minor -le ${i#dk} ] - do - mkdev r$name$minor c $chr $minor 0640 $g_operator - mkdev $name$minor b $blk $minor 0640 $g_operator - minor=$(($minor + 1)) - done + mkdev r$name$unit c $chr $unit 0640 $g_operator + mkdev $name$unit b $blk $unit 0640 $g_operator ;; ttyCY[0-9]*) + # Each unit number creates 32 pairs of {tty,dty} device nodes: + # ttyCY0 = device nodes [td]tyCY000 to [td]tyCY031; + # ttyCY1 = device nodes [td]tyCY032 to [td]tyCY063; name=tyCY; chr=%cy_chr%; off=32 unit=${i#t${name}} minor=$(($unit * $off)) @@ -1120,6 +1119,9 @@ ;; ttyCZ[0-9]*) + # Each unit number creates 64 pairs of {tty,dty} device nodes: + # ttyCZ0 = device nodes [td]tyCZ to [td]tyCZ0063; + # ttyCZ1 = device nodes [td]tyCZ0064 to [td]tyCZ0127; name=tyCZ; chr=%cz_chr%; off=64 unit=${i#t${name}} minor=$(($unit * $off)) @@ -1180,6 +1182,8 @@ ;; opty) + # Create 16 device nodes, [pt]typ0 to [pt]typf, + # same as MAKEDEV pty0. for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f do case $j in @@ -1197,6 +1201,12 @@ ;; pty[0-9]*) + # Each unit number creates up to 16 pairs of {tty,pty} device nodes: + # pty0 = 16 pairs, [tp]typ0 to [tp]typf + # pty1 = 16 pairs, [tp]tyq0 to [tp]tyqf + # pty16 = 16 pairs, [tp]typg to [tp]typv + # pty17 = 16 pairs, [tp]typw to [tp]typL + # pty18 = 14 pairs, [tp]typM to [tp]typZ class=${i#pty} d1=p q r s t u v w x y z P Q R S T if [ $class -ge 64 ] @@ -1205,10 +1215,12 @@ continue elif [ $class -lt 16 ] then + # pty[p-zP-T][0-9a-f] offset=0 mult=0 d2=0 1 2 3 4 5 6 7 8 9 a b c d e f else + # pty[p-zP-T][g-zA-Z] class=$(($class - 16)) offset=256 mult=2
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: jym Date: Tue Sep 6 14:08:05 UTC 2011 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Check that $TGZMODE is true to deduce that the set is extracted from a .tgz instead of checking that $SRC_DIR != $SRC_ARG. These variables can be modified in different places, so it's less error prone. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.122 src/usr.sbin/postinstall/postinstall:1.123 --- src/usr.sbin/postinstall/postinstall:1.122 Tue Aug 9 18:24:46 2011 +++ src/usr.sbin/postinstall/postinstall Tue Sep 6 14:08:05 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.122 2011/08/09 18:24:46 jmmv Exp $ +# $NetBSD: postinstall,v 1.123 2011/09/06 14:08:05 jym Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1805,7 +1805,7 @@ list) echo Source directory: ${SRC_DIR:-/} echo Target directory: ${DEST_DIR:-/} - if [ ${SRC_DIR} != ${SRC_ARG} ]; then + if $TGZMODE; then echo (extracted from: ${SRC_ARG}) fi list @@ -1825,7 +1825,7 @@ # perform each check/fix # echo Source directory: ${SRC_DIR:-/} - if [ ${SRC_DIR} != ${SRC_ARG} ]; then + if $TGZMODE; then echo (extracted from: ${SRC_ARG}) fi echo Target directory: ${DEST_DIR:-/}
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: jym Date: Tue Sep 6 14:13:46 UTC 2011 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Set $SRC_DIR to its default value at the beginning of main() so that usage() can print the correct value even when called early. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.123 src/usr.sbin/postinstall/postinstall:1.124 --- src/usr.sbin/postinstall/postinstall:1.123 Tue Sep 6 14:08:05 2011 +++ src/usr.sbin/postinstall/postinstall Tue Sep 6 14:13:46 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.123 2011/09/06 14:08:05 jym Exp $ +# $NetBSD: postinstall,v 1.124 2011/09/06 14:13:46 jym Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1649,6 +1649,7 @@ { TGZLIST= # quoted list list of tgz files SRC_ARGLIST= # quoted list of one or more -s args + SRC_DIR=${SRC_ARG} # set default value for early usage() N_SRC_ARGS=0 # number of -s args TGZMODE=false # true if -s specifies a tgz file DIRMODE=false # true if -s specified a directory
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 14:40:11 UTC 2011 Modified Files: src/etc/etc.alpha: MAKEDEV.conf src/etc/etc.amiga: MAKEDEV.conf src/etc/etc.amigappc: MAKEDEV.conf src/etc/etc.atari: MAKEDEV.conf src/etc/etc.emips: MAKEDEV.conf src/etc/etc.evbppc: MAKEDEV.conf src/etc/etc.hp300: MAKEDEV.conf src/etc/etc.mvme68k: MAKEDEV.conf src/etc/etc.ofppc: MAKEDEV.conf src/etc/etc.pmax: MAKEDEV.conf src/etc/etc.sandpoint: MAKEDEV.conf src/etc/etc.sparc: MAKEDEV.conf src/etc/etc.vax: MAKEDEV.conf src/etc/etc.x68k: MAKEDEV.conf Log Message: Change foo*) case patterns to foo[0-9]*) in MD MAKEDEV.conf files, as was done earlier today for the MI MAKEDEV.tmpl. There are also a few instances of slightly different changes in the case patterns. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/etc/etc.alpha/MAKEDEV.conf cvs rdiff -u -r1.10 -r1.11 src/etc/etc.amiga/MAKEDEV.conf cvs rdiff -u -r1.1 -r1.2 src/etc/etc.amigappc/MAKEDEV.conf cvs rdiff -u -r1.8 -r1.9 src/etc/etc.atari/MAKEDEV.conf cvs rdiff -u -r1.1 -r1.2 src/etc/etc.emips/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.evbppc/MAKEDEV.conf cvs rdiff -u -r1.12 -r1.13 src/etc/etc.hp300/MAKEDEV.conf cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mvme68k/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.ofppc/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.pmax/MAKEDEV.conf cvs rdiff -u -r1.13 -r1.14 src/etc/etc.sandpoint/MAKEDEV.conf cvs rdiff -u -r1.13 -r1.14 src/etc/etc.sparc/MAKEDEV.conf cvs rdiff -u -r1.11 -r1.12 src/etc/etc.vax/MAKEDEV.conf cvs rdiff -u -r1.9 -r1.10 src/etc/etc.x68k/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.alpha/MAKEDEV.conf diff -u src/etc/etc.alpha/MAKEDEV.conf:1.7 src/etc/etc.alpha/MAKEDEV.conf:1.8 --- src/etc/etc.alpha/MAKEDEV.conf:1.7 Mon Jan 15 23:35:11 2007 +++ src/etc/etc.alpha/MAKEDEV.conf Tue Sep 6 14:40:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.7 2007/01/15 23:35:11 hubertf Exp $ +# $NetBSD: MAKEDEV.conf,v 1.8 2011/09/06 14:40:10 apb Exp $ all_md) makedev wscons stic0 sd0 sd1 sd2 sd3 sd4 @@ -30,9 +30,7 @@ makedev ttyB0 ttyB1 ttyC0 ttyC1 ttyE0 ttyE1 wsmouse0 wskbd0 ttyEcfg ;; -ttyB*) - case $i in - ttyB*) name=ttyB; unit=${i#ttyB}; major=15; minor=$(($unit * 2));; - esac +ttyB[0-9]*) + name=ttyB; unit=${i#ttyB}; major=15; minor=$(($unit * 2)) mkdev $name$unit c $major $minor $u_uucp ;; Index: src/etc/etc.amiga/MAKEDEV.conf diff -u src/etc/etc.amiga/MAKEDEV.conf:1.10 src/etc/etc.amiga/MAKEDEV.conf:1.11 --- src/etc/etc.amiga/MAKEDEV.conf:1.10 Mon Jan 15 23:35:11 2007 +++ src/etc/etc.amiga/MAKEDEV.conf Tue Sep 6 14:40:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.10 2007/01/15 23:35:11 hubertf Exp $ +# $NetBSD: MAKEDEV.conf,v 1.11 2011/09/06 14:40:10 apb Exp $ all_md) makedev wscons std_amiga fd0 fd1 fd2 fd3 kbd mouse0 mouse1 par0 @@ -33,7 +33,7 @@ mkdev reload c 2 20 ;; -tty0*|ttyA*|ttyB*) +tty0[0-9]*|ttyA[0-9]*|ttyB[0-9]*) case $i in tty0*) name=tty0; mname=ttym; unit=${i#tty0}; chr=12; mult=1; add=128;; ttyA*) name=ttyA; mname=ttyAm; unit=${i#ttyA}; chr=17; mult=1; add=128;; @@ -43,7 +43,7 @@ mkdev $mname$unit c $chr $(($unit * $mult + $add)) $u_uucp ;; -grf*) +grf[0-9]*) unit=${i#grf}; chr=10 case $unit in 0|1|2|3|4|5|6|7) Index: src/etc/etc.amigappc/MAKEDEV.conf diff -u src/etc/etc.amigappc/MAKEDEV.conf:1.1 src/etc/etc.amigappc/MAKEDEV.conf:1.2 --- src/etc/etc.amigappc/MAKEDEV.conf:1.1 Wed Jan 11 16:06:36 2006 +++ src/etc/etc.amigappc/MAKEDEV.conf Tue Sep 6 14:40:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.1 2006/01/11 16:06:36 is Exp $ +# $NetBSD: MAKEDEV.conf,v 1.2 2011/09/06 14:40:10 apb Exp $ all_md) makedev wscons std_amiga fd0 fd1 fd2 fd3 kbd mouse0 mouse1 par0 @@ -31,7 +31,7 @@ mkdev reload c 2 20 ;; -tty0*|ttyA*|ttyB*) +tty0[0-9]*|ttyA[0-9]*|ttyB[0-9]*) case $i in tty0*) name=tty0; mname=ttym; unit=${i#tty0}; chr=12; mult=1; add=128;; ttyA*) name=ttyA; mname=ttyAm; unit=${i#ttyA}; chr=17; mult=1; add=128;; @@ -41,7 +41,7 @@ mkdev $mname$unit c $chr $(($unit * $mult + $add)) $u_uucp ;; -grf*) +grf[0-9]*) unit=${i#grf}; chr=10 case $unit in 0|1|2|3|4|5|6|7) Index: src/etc/etc.atari/MAKEDEV.conf diff -u src/etc/etc.atari/MAKEDEV.conf:1.8 src/etc/etc.atari/MAKEDEV.conf:1.9 --- src/etc/etc.atari/MAKEDEV.conf:1.8 Sat Nov 8 22:34:57 2008 +++ src/etc/etc.atari/MAKEDEV.conf Tue Sep 6 14:40:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.8 2008/11/08 22:34:57 abs Exp $ +# $NetBSD: MAKEDEV.conf,v 1.9 2011/09/06 14:40:10 apb Exp $ all_md) makedev std_atari st0 ttye0 ttye1 ttye2 ttye3 ttye4 ttye5 grf0 grf1 @@ -26,7 +26,7 @@ mkdev reload c 2 20 640 $g_kmem ;; -ttyA*|ttyB*) +ttyA[0-9]*|ttyB[0-9]*) case $i in ttyA*) name=tyA;
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Tue Sep 6 16:41:55 UTC 2011 Modified Files: src/sys/uvm: uvm_aobj.c uvm_vnode.c Log Message: Allocate color appropriate pages. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_aobj.c cvs rdiff -u -r1.96 -r1.97 src/sys/uvm/uvm_vnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_aobj.c diff -u src/sys/uvm/uvm_aobj.c:1.115 src/sys/uvm/uvm_aobj.c:1.116 --- src/sys/uvm/uvm_aobj.c:1.115 Sun Jun 12 03:36:02 2011 +++ src/sys/uvm/uvm_aobj.c Tue Sep 6 16:41:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_aobj.c,v 1.115 2011/06/12 03:36:02 rmind Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.116 2011/09/06 16:41:55 matt Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_aobj.c,v 1.115 2011/06/12 03:36:02 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_aobj.c,v 1.116 2011/09/06 16:41:55 matt Exp $); #include opt_uvmhist.h @@ -962,7 +962,7 @@ if (ptmp == NULL uao_find_swslot(aobj-u_obj, current_offset PAGE_SHIFT) == 0) { ptmp = uvm_pagealloc(uobj, current_offset, -NULL, UVM_PGA_ZERO); +NULL, UVM_FLAG_COLORMATCH|UVM_PGA_ZERO); if (ptmp) { /* new page */ ptmp-flags = ~(PG_FAKE); Index: src/sys/uvm/uvm_vnode.c diff -u src/sys/uvm/uvm_vnode.c:1.96 src/sys/uvm/uvm_vnode.c:1.97 --- src/sys/uvm/uvm_vnode.c:1.96 Sun Jun 12 03:36:04 2011 +++ src/sys/uvm/uvm_vnode.c Tue Sep 6 16:41:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_vnode.c,v 1.96 2011/06/12 03:36:04 rmind Exp $ */ +/* $NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -45,7 +45,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_vnode.c,v 1.96 2011/06/12 03:36:04 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $); #include opt_uvmhist.h @@ -250,7 +250,8 @@ UVMHIST_LOG(ubchist, noalloc, 0,0,0,0); return 0; } - pg = uvm_pagealloc(uobj, offset, NULL, 0); + pg = uvm_pagealloc(uobj, offset, NULL, + UVM_FLAG_COLORMATCH); if (pg == NULL) { if (flags UFP_NOWAIT) { UVMHIST_LOG(ubchist, nowait,0,0,0,0); @@ -261,7 +262,8 @@ mutex_enter(uobj-vmobjlock); continue; } - UVMHIST_LOG(ubchist, alloced %p, pg,0,0,0); + UVMHIST_LOG(ubchist, alloced %p (color %u), pg, + VM_PGCOLOR_BUCKET(pg), 0,0); break; } else if (flags UFP_NOCACHE) { UVMHIST_LOG(ubchist, nocache,0,0,0,0); @@ -275,7 +277,8 @@ return 0; } pg-flags |= PG_WANTED; - UVMHIST_LOG(ubchist, wait %p, pg,0,0,0); + UVMHIST_LOG(ubchist, wait %p (color %u), pg, + VM_PGCOLOR_BUCKET(pg), 0,0); UVM_UNLOCK_AND_WAIT(pg, uobj-vmobjlock, 0, uvn_fp2, 0); mutex_enter(uobj-vmobjlock); @@ -302,7 +305,8 @@ /* mark the page BUSY and we're done. */ pg-flags |= PG_BUSY; UVM_PAGE_OWN(pg, uvn_findpage); - UVMHIST_LOG(ubchist, found %p, pg,0,0,0); + UVMHIST_LOG(ubchist, found %p (color %u), + pg, VM_PGCOLOR_BUCKET(pg), 0,0); break; } *pgp = pg;
CVS commit: src/usr.bin/m4
Module Name:src Committed By: joerg Date: Tue Sep 6 18:16:01 UTC 2011 Modified Files: src/usr.bin/m4: extern.h gnum4.c main.c misc.c Log Message: Move usage and onintr to make them static. Add __dead as needed. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/m4/extern.h cvs rdiff -u -r1.7 -r1.8 src/usr.bin/m4/gnum4.c cvs rdiff -u -r1.40 -r1.41 src/usr.bin/m4/main.c cvs rdiff -u -r1.21 -r1.22 src/usr.bin/m4/misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/m4/extern.h diff -u src/usr.bin/m4/extern.h:1.14 src/usr.bin/m4/extern.h:1.15 --- src/usr.bin/m4/extern.h:1.14 Mon Oct 26 21:12:47 2009 +++ src/usr.bin/m4/extern.h Tue Sep 6 18:16:01 2011 @@ -1,5 +1,5 @@ /* $OpenBSD: extern.h,v 1.49 2009/10/14 17:19:47 sthen Exp $ */ -/* $NetBSD: extern.h,v 1.14 2009/10/26 21:12:47 christos Exp $ */ +/* $NetBSD: extern.h,v 1.15 2011/09/06 18:16:01 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -96,7 +96,6 @@ extern ptrdiff_t indx(const char *, const char *); extern void initspaces(void); extern void killdiv(void); -extern void onintr(int); extern void pbnum(int); extern void pbnumbase(int, int, int); extern void pbunsigned(unsigned long); @@ -105,7 +104,6 @@ extern void *xalloc(size_t, const char *fmt, ...); extern void *xrealloc(void *, size_t, const char *fmt, ...); extern char *xstrdup(const char *); -extern void usage(void); extern void resizedivs(int); extern size_t buffer_mark(void); extern void dump_buffer(FILE *, size_t); Index: src/usr.bin/m4/gnum4.c diff -u src/usr.bin/m4/gnum4.c:1.7 src/usr.bin/m4/gnum4.c:1.8 --- src/usr.bin/m4/gnum4.c:1.7 Mon Oct 26 21:16:49 2009 +++ src/usr.bin/m4/gnum4.c Tue Sep 6 18:16:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gnum4.c,v 1.7 2009/10/26 21:16:49 christos Exp $ */ +/* $NetBSD: gnum4.c,v 1.8 2011/09/06 18:16:01 joerg Exp $ */ /* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */ /* @@ -33,7 +33,7 @@ #include nbtool_config.h #endif #include sys/cdefs.h -__RCSID($NetBSD: gnum4.c,v 1.7 2009/10/26 21:16:49 christos Exp $); +__RCSID($NetBSD: gnum4.c,v 1.8 2011/09/06 18:16:01 joerg Exp $); #include sys/param.h #include sys/types.h @@ -203,7 +203,7 @@ static void addchar(int); static char *twiddle(const char *); static char *getstring(void); -static void exit_regerror(int, regex_t *); +static void exit_regerror(int, regex_t *) __dead; static void do_subst(const char *, regex_t *, const char *, regmatch_t *); static void do_regexpindex(const char *, regex_t *, regmatch_t *); static void do_regexp(const char *, regex_t *, const char *, regmatch_t *); Index: src/usr.bin/m4/main.c diff -u src/usr.bin/m4/main.c:1.40 src/usr.bin/m4/main.c:1.41 --- src/usr.bin/m4/main.c:1.40 Sun Aug 14 12:59:25 2011 +++ src/usr.bin/m4/main.c Tue Sep 6 18:16:01 2011 @@ -1,5 +1,5 @@ /* $OpenBSD: main.c,v 1.77 2009/10/14 17:19:47 sthen Exp $ */ -/* $NetBSD: main.c,v 1.40 2011/08/14 12:59:25 christos Exp $ */ +/* $NetBSD: main.c,v 1.41 2011/09/06 18:16:01 joerg Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #include nbtool_config.h #endif #include sys/cdefs.h -__RCSID($NetBSD: main.c,v 1.40 2011/08/14 12:59:25 christos Exp $); +__RCSID($NetBSD: main.c,v 1.41 2011/09/06 18:16:01 joerg Exp $); #include assert.h #include signal.h #include err.h @@ -167,7 +167,22 @@ static void enlarge_stack(void); -int main(int, char *[]); +__dead static void +usage(void) +{ + fprintf(stderr, usage: %s [-gPs] [-Dname[=value]] [-d flags] + [-I dirname] [-o filename]\n + \t[-t macro] [-Uname] [file ...]\n, getprogname()); + exit(1); +} + +__dead static void +onintr(int signo) +{ + char intrmessage[] = m4: interrupted.\n; + write(STDERR_FILENO, intrmessage, sizeof(intrmessage)-1); + _exit(1); +} int main(int argc, char *argv[]) Index: src/usr.bin/m4/misc.c diff -u src/usr.bin/m4/misc.c:1.21 src/usr.bin/m4/misc.c:1.22 --- src/usr.bin/m4/misc.c:1.21 Sat Mar 5 16:37:50 2011 +++ src/usr.bin/m4/misc.c Tue Sep 6 18:16:01 2011 @@ -1,5 +1,5 @@ /* $OpenBSD: misc.c,v 1.41 2009/10/14 17:19:47 sthen Exp $ */ -/* $NetBSD: misc.c,v 1.21 2011/03/05 16:37:50 christos Exp $ */ +/* $NetBSD: misc.c,v 1.22 2011/09/06 18:16:01 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -36,7 +36,7 @@ #include nbtool_config.h #endif #include sys/cdefs.h -__RCSID($NetBSD: misc.c,v 1.21 2011/03/05 16:37:50 christos Exp $); +__RCSID($NetBSD: misc.c,v 1.22 2011/09/06 18:16:01 joerg Exp $); #include sys/types.h #include errno.h #include unistd.h @@ -240,19 +240,11 @@ outfile[n] = NULL; } -void -onintr(int signo) -{ -#define intrmessage m4: interrupted.\n - write(STDERR_FILENO, intrmessage, sizeof(intrmessage)-1); - _exit(1); -} - /* * killdiv - get rid of the diversion files */ void -killdiv() +killdiv(void) { int n; @@ -340,15 +332,6 @@ return p; } -void -usage(void) -{ - fprintf(stderr, usage:
CVS commit: src/usr.bin/menuc
Module Name:src Committed By: joerg Date: Tue Sep 6 18:16:39 UTC 2011 Modified Files: src/usr.bin/menuc: mdb.c Log Message: Mark __menu_initerror as dead in the output. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/menuc/mdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/menuc/mdb.c diff -u src/usr.bin/menuc/mdb.c:1.44 src/usr.bin/menuc/mdb.c:1.45 --- src/usr.bin/menuc/mdb.c:1.44 Wed Jan 16 09:21:33 2008 +++ src/usr.bin/menuc/mdb.c Tue Sep 6 18:16:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mdb.c,v 1.44 2008/01/16 09:21:33 tls Exp $ */ +/* $NetBSD: mdb.c,v 1.45 2011/09/06 18:16:38 joerg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -45,7 +45,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(lint) -__RCSID($NetBSD: mdb.c,v 1.44 2008/01/16 09:21:33 tls Exp $); +__RCSID($NetBSD: mdb.c,v 1.45 2011/09/06 18:16:38 joerg Exp $); #endif @@ -233,7 +233,7 @@ /* Prototypes */\n int menu_init(void);\n void process_menu(int, void *);\n - void __menu_initerror(void);\n + __dead void __menu_initerror(void);\n ); if (do_dynamic)
CVS commit: src/usr.bin/nfsstat
Module Name:src Committed By: joerg Date: Tue Sep 6 18:19:59 UTC 2011 Modified Files: src/usr.bin/nfsstat: nfsstat.c Log Message: ANSIfy, static + __dead. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/nfsstat/nfsstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nfsstat/nfsstat.c diff -u src/usr.bin/nfsstat/nfsstat.c:1.23 src/usr.bin/nfsstat/nfsstat.c:1.24 --- src/usr.bin/nfsstat/nfsstat.c:1.23 Sun Apr 12 23:34:11 2009 +++ src/usr.bin/nfsstat/nfsstat.c Tue Sep 6 18:19:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsstat.c,v 1.23 2009/04/12 23:34:11 lukem Exp $ */ +/* $NetBSD: nfsstat.c,v 1.24 2011/09/06 18:19:58 joerg Exp $ */ /* * Copyright (c) 1983, 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: nfsstat.c,v 1.23 2009/04/12 23:34:11 lukem Exp $); +__RCSID($NetBSD: nfsstat.c,v 1.24 2011/09/06 18:19:58 joerg Exp $); #endif #endif /* not lint */ @@ -68,7 +68,7 @@ #include string.h #include unistd.h -struct nlist nl[] = { +static struct nlist nl[] = { #define N_NFSSTAT 0 { _nfsstats, 0, 0, 0, 0 }, { , 0, 0, 0, 0 }, @@ -80,7 +80,7 @@ MASK(WRITE) | MASK(RENAME)| MASK(ACCESS) | MASK(READDIR) | \ MASK(READDIRPLUS)) #define OTHERMASK (((1 NFS_NPROCS) - 1) ~ALLMASK) -const struct shortprocs { +static const struct shortprocs { int mask; const char *name; } shortprocs[] = { @@ -97,22 +97,19 @@ #define NSHORTPROC (sizeof(shortprocs)/sizeof(shortprocs[0])) -void catchalarm __P((int)); -void getstats __P((struct nfsstats *)); -void intpr __P((void)); -int main __P((int, char **)); -void printhdr __P((void)); -void sidewaysintpr __P((u_int)); -void usage __P((void)); - -kvm_t *kd; -int printall, clientinfo, serverinfo; -u_long nfsstataddr; +static void catchalarm(int); +static void getstats(struct nfsstats *); +static void intpr(void); +static void printhdr(void); +__dead static void sidewaysintpr(u_int); +__dead static void usage(void); + +static kvm_t *kd; +static int printall, clientinfo, serverinfo; +static u_long nfsstataddr; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { u_int interval; int ch; @@ -178,9 +175,8 @@ exit(0); } -void -getstats(ns) - struct nfsstats *ns; +static void +getstats(struct nfsstats *ns) { size_t size; int mib[3]; @@ -203,8 +199,8 @@ /* * Print a description of the nfs stats. */ -void -intpr() +static void +intpr(void) { struct nfsstats nfsstats; int64_t total; @@ -379,7 +375,7 @@ } } -u_char signalled; /* set if alarm goes off early */ +static u_char signalled; /* set if alarm goes off early */ /* * Print a running summary of nfs statistics. @@ -387,9 +383,8 @@ * collected over that interval. Assumes that interval is non-zero. * First line printed at top of screen is always cumulative. */ -void -sidewaysintpr(interval) - u_int interval; +static void +sidewaysintpr(u_int interval) { struct nfsstats nfsstats; int hdrcnt, oldmask; @@ -450,8 +445,8 @@ /*NOTREACHED*/ } -void -printhdr() +static void +printhdr(void) { size_t i; @@ -466,16 +461,15 @@ * Called if an interval expires before sidewaysintpr has completed a loop. * Sets a flag to not wait for the alarm. */ -void -catchalarm(dummy) - int dummy; +static void +catchalarm(int dummy) { signalled = 1; } -void -usage() +static void +usage(void) { (void)fprintf(stderr,
CVS commit: src/usr.bin/nohup
Module Name:src Committed By: joerg Date: Tue Sep 6 18:24:15 UTC 2011 Modified Files: src/usr.bin/nohup: nohup.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/nohup/nohup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/nohup/nohup.c diff -u src/usr.bin/nohup/nohup.c:1.14 src/usr.bin/nohup/nohup.c:1.15 --- src/usr.bin/nohup/nohup.c:1.14 Sun Apr 12 23:38:17 2009 +++ src/usr.bin/nohup/nohup.c Tue Sep 6 18:24:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nohup.c,v 1.14 2009/04/12 23:38:17 lukem Exp $ */ +/* $NetBSD: nohup.c,v 1.15 2011/09/06 18:24:15 joerg Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)nohup.c 5.4 (Berkeley) 6/1/90; #endif -__RCSID($NetBSD: nohup.c,v 1.14 2009/04/12 23:38:17 lukem Exp $); +__RCSID($NetBSD: nohup.c,v 1.15 2011/09/06 18:24:15 joerg Exp $); #endif /* not lint */ #include sys/param.h @@ -53,9 +53,8 @@ #include string.h #include errno.h -static void dofile __P((void)); -static void usage __P((void)); -int main __P((int, char **)); +static void dofile(void); +__dead static void usage(void); /* nohup shall exit with one of the following values: 126 - The utility was found but could not be invoked. @@ -66,9 +65,7 @@ #define EXIT_MISC 127 int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int exit_status; @@ -100,7 +97,7 @@ } static void -dofile() +dofile(void) { int fd; char path[MAXPATHLEN]; @@ -138,7 +135,7 @@ } static void -usage() +usage(void) { (void)fprintf(stderr, usage: nohup utility [argument ...]\n); exit(EXIT_MISC);
CVS commit: src/usr.bin/paste
Module Name:src Committed By: joerg Date: Tue Sep 6 18:24:43 UTC 2011 Modified Files: src/usr.bin/paste: paste.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/paste/paste.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/paste/paste.c diff -u src/usr.bin/paste/paste.c:1.15 src/usr.bin/paste/paste.c:1.16 --- src/usr.bin/paste/paste.c:1.15 Tue Apr 7 01:52:26 2009 +++ src/usr.bin/paste/paste.c Tue Sep 6 18:24:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: paste.c,v 1.15 2009/04/07 01:52:26 dholland Exp $ */ +/* $NetBSD: paste.c,v 1.16 2011/09/06 18:24:43 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -40,7 +40,7 @@ #ifndef lint /*static char sccsid[] = from: @(#)paste.c 8.1 (Berkeley) 6/6/93;*/ -__RCSID($NetBSD: paste.c,v 1.15 2009/04/07 01:52:26 dholland Exp $); +__RCSID($NetBSD: paste.c,v 1.16 2011/09/06 18:24:43 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -52,14 +52,14 @@ #include string.h #include unistd.h -void parallel(int, char **); -void sequential(char **); -int tr(char *); -void usage(void); - -char dflt_delim[] = \t; -char *delim = dflt_delim; -int delimcnt = 1; +static void parallel(int, char **); +static void sequential(char **); +static int tr(char *); +__dead static void usage(void); + +static char dflt_delim[] = \t; +static char *delim = dflt_delim; +static int delimcnt = 1; int main(int argc, char **argv) @@ -91,7 +91,7 @@ exit(0); } -void +static void parallel(int argc, char **argv) { char ch, *dp, *line; @@ -157,7 +157,7 @@ free(fpp); } -void +static void sequential(char **argv) { FILE *fp; @@ -195,7 +195,7 @@ } } -int +static int tr(char *arg) { int cnt; @@ -225,8 +225,8 @@ return(cnt); } -void -usage() +static void +usage(void) { (void)fprintf(stderr, paste: [-s] [-d delimiters] file ...\n); exit(1);
CVS commit: src/usr.bin/patch
Module Name:src Committed By: joerg Date: Tue Sep 6 18:25:14 UTC 2011 Modified Files: src/usr.bin/patch: patch.c pch.c util.h Log Message: Consistently use __dead and __printflike. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/patch/patch.c cvs rdiff -u -r1.23 -r1.24 src/usr.bin/patch/pch.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/patch/util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/patch/patch.c diff -u src/usr.bin/patch/patch.c:1.28 src/usr.bin/patch/patch.c:1.29 --- src/usr.bin/patch/patch.c:1.28 Sat Mar 26 21:45:48 2011 +++ src/usr.bin/patch/patch.c Tue Sep 6 18:25:14 2011 @@ -1,7 +1,7 @@ /* * $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $ * $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $ - * $NetBSD: patch.c,v 1.28 2011/03/26 21:45:48 dholland Exp $ + * $NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: patch.c,v 1.28 2011/03/26 21:45:48 dholland Exp $); +__RCSID($NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $); #include sys/types.h #include sys/stat.h @@ -106,7 +106,7 @@ static void dump_line(LINENUM, bool); static bool patch_match(LINENUM, LINENUM, LINENUM); static bool similar(const char *, const char *, int); -static void usage(void); +__dead static void usage(void); /* true if -E was specified on command line. */ static bool remove_empty_files = false; Index: src/usr.bin/patch/pch.c diff -u src/usr.bin/patch/pch.c:1.23 src/usr.bin/patch/pch.c:1.24 --- src/usr.bin/patch/pch.c:1.23 Fri Sep 19 18:33:34 2008 +++ src/usr.bin/patch/pch.c Tue Sep 6 18:25:14 2011 @@ -1,7 +1,7 @@ /* * $OpenBSD: pch.c,v 1.37 2007/09/02 15:19:33 deraadt Exp $ * $DragonFly: src/usr.bin/patch/pch.c,v 1.6 2008/08/10 23:35:40 joerg Exp $ - * $NetBSD: pch.c,v 1.23 2008/09/19 18:33:34 joerg Exp $ + * $NetBSD: pch.c,v 1.24 2011/09/06 18:25:14 joerg Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pch.c,v 1.23 2008/09/19 18:33:34 joerg Exp $); +__RCSID($NetBSD: pch.c,v 1.24 2011/09/06 18:25:14 joerg Exp $); #include sys/types.h #include sys/stat.h @@ -448,7 +448,7 @@ } /* Make this a function for better debugging. */ -static void +__dead static void malformed(void) { fatal(malformed patch at line %ld: %s, p_input_line, buf); Index: src/usr.bin/patch/util.h diff -u src/usr.bin/patch/util.h:1.11 src/usr.bin/patch/util.h:1.12 --- src/usr.bin/patch/util.h:1.11 Fri Sep 19 18:33:34 2008 +++ src/usr.bin/patch/util.h Tue Sep 6 18:25:14 2011 @@ -1,7 +1,7 @@ /* * $OpenBSD: util.h,v 1.15 2005/06/20 07:14:06 otto Exp $ * $DragonFly: src/usr.bin/patch/util.h,v 1.2 2007/09/29 23:11:10 swildner Exp $ - * $NetBSD: util.h,v 1.11 2008/09/19 18:33:34 joerg Exp $ + * $NetBSD: util.h,v 1.12 2011/09/06 18:25:14 joerg Exp $ */ /* @@ -35,20 +35,16 @@ int backup_file(const char *); int move_file(const char *, const char *); int copy_file(const char *, const char *); -void say(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); -void fatal(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); -void pfatal(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); -void ask(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); +void say(const char *, ...) __printflike(1, 2); +void fatal(const char *, ...) __printflike(1, 2) __dead; +void pfatal(const char *, ...) __printflike(1, 2) __dead; +void ask(const char *, ...) __printflike(1, 2); char *savestr(const char *); void set_signals(int); void ignore_signals(void); void makedirs(const char *, bool); -void version(void); -void my_exit(int) __attribute__((noreturn)); +void version(void) __dead; +void my_exit(int) __dead; /* in mkpath.c */ extern int mkpath(char *);
CVS commit: src/usr.bin/pr
Module Name:src Committed By: joerg Date: Tue Sep 6 18:26:06 UTC 2011 Modified Files: src/usr.bin/pr: egetopt.c extern.h pr.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/pr/egetopt.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/pr/extern.h cvs rdiff -u -r1.20 -r1.21 src/usr.bin/pr/pr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/pr/egetopt.c diff -u src/usr.bin/pr/egetopt.c:1.8 src/usr.bin/pr/egetopt.c:1.9 --- src/usr.bin/pr/egetopt.c:1.8 Mon Apr 13 00:37:05 2009 +++ src/usr.bin/pr/egetopt.c Tue Sep 6 18:26:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: egetopt.c,v 1.8 2009/04/13 00:37:05 lukem Exp $ */ +/* $NetBSD: egetopt.c,v 1.9 2011/09/06 18:26:06 joerg Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -38,7 +38,7 @@ #if 0 from: static char sccsid[] = @(#)egetopt.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: egetopt.c,v 1.8 2009/04/13 00:37:05 lukem Exp $); +__RCSID($NetBSD: egetopt.c,v 1.9 2011/09/06 18:26:06 joerg Exp $); #endif #endif /* not lint */ @@ -67,13 +67,10 @@ char *eoptarg; /* argument associated with option */ #define BADCH (int)'?' -char EMSG[1] = { '\0' }; +static char EMSG[1] = { '\0' }; int -egetopt(nargc, nargv, ostr) - int nargc; - char * const *nargv; - const char *ostr; +egetopt(int nargc, char * const *nargv, const char *ostr) { static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ Index: src/usr.bin/pr/extern.h diff -u src/usr.bin/pr/extern.h:1.5 src/usr.bin/pr/extern.h:1.6 --- src/usr.bin/pr/extern.h:1.5 Mon Apr 13 00:37:05 2009 +++ src/usr.bin/pr/extern.h Tue Sep 6 18:26:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.5 2009/04/13 00:37:05 lukem Exp $ */ +/* $NetBSD: extern.h,v 1.6 2011/09/06 18:26:06 joerg Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -33,27 +33,10 @@ * SUCH DAMAGE. * * from: @(#)extern.h 8.1 (Berkeley) 6/6/93 - * $NetBSD: extern.h,v 1.5 2009/04/13 00:37:05 lukem Exp $ + * $NetBSD: extern.h,v 1.6 2011/09/06 18:26:06 joerg Exp $ */ extern int eoptind; extern char *eoptarg; -void addnum __P((char *, int, int)); -int egetopt __P((int, char * const *, const char *)); -void flsh_errs __P((void)); -int horzcol __P((int, char **)); -int inln __P((FILE *, char *, int, int *, int, int *)); -int inskip __P((FILE *, int, int)); -void mfail __P((void)); -int mulfile __P((int, char **)); -FILE *nxtfile __P((int, char **, const char **, char *, int)); -int onecol __P((int, char **)); -int otln __P((char *, int, int *, int *, int)); -void pfail __P((void)); -int prhead __P((char *, const char *, int)); -int prtail __P((int, int)); -int setup __P((int, char **)); -void terminate __P((int)); -void usage __P((void)); -int vertcol __P((int, char **)); +int egetopt(int, char * const *, const char *); Index: src/usr.bin/pr/pr.c diff -u src/usr.bin/pr/pr.c:1.20 src/usr.bin/pr/pr.c:1.21 --- src/usr.bin/pr/pr.c:1.20 Mon Apr 13 00:37:05 2009 +++ src/usr.bin/pr/pr.c Tue Sep 6 18:26:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pr.c,v 1.20 2009/04/13 00:37:05 lukem Exp $ */ +/* $NetBSD: pr.c,v 1.21 2011/09/06 18:26:06 joerg Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -43,7 +43,7 @@ #if 0 from: static char sccsid[] = @(#)pr.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: pr.c,v 1.20 2009/04/13 00:37:05 lukem Exp $); +__RCSID($NetBSD: pr.c,v 1.21 2011/09/06 18:26:06 joerg Exp $); #endif #endif /* not lint */ @@ -77,43 +77,57 @@ /* * parameter variables */ -int pgnm; /* starting page number */ -int clcnt; /* number of columns */ -int colwd; /* column data width - multiple columns */ -int across; /* mult col flag; write across page */ -int dspace; /* double space flag */ -char inchar; /* expand input char */ -int ingap; /* expand input gap */ -int formfeed; /* use formfeed as trailer */ -char *header; /* header name instead of file name */ -char ochar; /* contract output char */ -int ogap; /* contract output gap */ -int lines; /* number of lines per page */ -int merge; /* merge multiple files in output */ -char nmchar; /* line numbering append char */ -int nmwd; /* width of line number field */ -int offst; /* number of page offset spaces */ -int nodiag; /* do not report file open errors */ -char schar; /* text column separation character */ -int sflag; /* -s option for multiple columns */ -int nohead; /* do not write head and trailer */ -int pgwd; /* page width with multiple col output */ -const char *timefrmt = TIMEFMT; /* time conversion string */ +static int pgnm; /* starting page number */ +static int clcnt; /* number of columns */ +static int colwd; /* column data width - multiple columns */ +static int across; /* mult col flag; write across page */ +static int dspace; /* double space flag */ +static char inchar;
CVS commit: src/usr.bin/printenv
Module Name:src Committed By: joerg Date: Tue Sep 6 18:26:55 UTC 2011 Modified Files: src/usr.bin/printenv: printenv.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/printenv/printenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/printenv/printenv.c diff -u src/usr.bin/printenv/printenv.c:1.11 src/usr.bin/printenv/printenv.c:1.12 --- src/usr.bin/printenv/printenv.c:1.11 Sat Jul 25 08:20:24 2009 +++ src/usr.bin/printenv/printenv.c Tue Sep 6 18:26:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: printenv.c,v 1.11 2009/07/25 08:20:24 dholland Exp $ */ +/* $NetBSD: printenv.c,v 1.12 2011/09/06 18:26:55 joerg Exp $ */ /* * Copyright (c) 1987, 1993 @@ -37,7 +37,7 @@ #ifndef lint /*static char sccsid[] = from: @(#)printenv.c 8.2 (Berkeley) 5/4/95;*/ -__RCSID($NetBSD: printenv.c,v 1.11 2009/07/25 08:20:24 dholland Exp $); +__RCSID($NetBSD: printenv.c,v 1.12 2011/09/06 18:26:55 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -48,7 +48,7 @@ #include unistd.h #include err.h -void usage(void); +__dead static void usage(void); /* * printenv @@ -94,7 +94,7 @@ exit(1); } -void +static void usage(void) { (void)fprintf(stderr, Usage: printenv [name]\n);
CVS commit: src/usr.bin/radioctl
Module Name:src Committed By: joerg Date: Tue Sep 6 18:27:08 UTC 2011 Modified Files: src/usr.bin/radioctl: radioctl.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/radioctl/radioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/radioctl/radioctl.c diff -u src/usr.bin/radioctl/radioctl.c:1.12 src/usr.bin/radioctl/radioctl.c:1.13 --- src/usr.bin/radioctl/radioctl.c:1.12 Wed Aug 31 16:24:58 2011 +++ src/usr.bin/radioctl/radioctl.c Tue Sep 6 18:27:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: radioctl.c,v 1.12 2011/08/31 16:24:58 plunky Exp $ */ +/* $NetBSD: radioctl.c,v 1.13 2011/09/06 18:27:08 joerg Exp $ */ /* $OpenBSD: radioctl.c,v 1.5 2001/12/18 18:42:19 mickey Exp $ */ /* $RuOBSD: radioctl.c,v 1.4 2001/10/20 18:09:10 pva Exp $ */ @@ -29,7 +29,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: radioctl.c,v 1.12 2011/08/31 16:24:58 plunky Exp $); +__RCSID($NetBSD: radioctl.c,v 1.13 2011/09/06 18:27:08 joerg Exp $); #endif #include sys/ioctl.h @@ -45,7 +45,7 @@ #define RADIO_ENV RADIODEVICE #define RADIODEVICE /dev/radio -const char *varname[] = { +static const char *varname[] = { search, #define OPTION_SEARCH 0x00 volume, @@ -77,9 +77,9 @@ u_int32_t value; }; -const char *onchar = on; +static const char *onchar = on; #define ONCHAR_LEN 2 -const char *offchar = off; +static const char *offchar = off; #define OFFCHAR_LEN 3 static struct radio_info ri; @@ -94,7 +94,7 @@ static void update_value(int, u_int *, u_int); static void warn_unsupported(int); -static void usage(void); +__dead static void usage(void); static void show_verbose(const char *, int); static void show_int_val(u_long, const char *, const char *, int);
CVS commit: src/usr.bin/rdist
Module Name:src Committed By: joerg Date: Tue Sep 6 18:28:18 UTC 2011 Modified Files: src/usr.bin/rdist: defs.h main.c Log Message: Use __dead and __printflike. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rdist/defs.h cvs rdiff -u -r1.19 -r1.20 src/usr.bin/rdist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rdist/defs.h diff -u src/usr.bin/rdist/defs.h:1.18 src/usr.bin/rdist/defs.h:1.19 --- src/usr.bin/rdist/defs.h:1.18 Mon Apr 13 04:35:36 2009 +++ src/usr.bin/rdist/defs.h Tue Sep 6 18:28:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.18 2009/04/13 04:35:36 lukem Exp $ */ +/* $NetBSD: defs.h,v 1.19 2011/09/06 18:28:18 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -151,26 +151,23 @@ int any(int, const char *); char *colon(char *); -void cleanup(int); +void cleanup(int) __dead; void define(char *); void docmds(char **, int, char **); -void error(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))) ; +void error(const char *, ...) __printflike(1, 2); int except(char *); struct namelist * expand(struct namelist *, int); char *exptilde(char [], char *); -void fatal(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); +void fatal(const char *, ...) __printflike(1, 2); int inlist(struct namelist *, char *); void insert(char *, struct namelist *, struct namelist *, struct subcmd *); void install(char *, char *, int, int); -void dolog(FILE *, const char *, ...) - __attribute__((__format__(__printf__, 2, 3))); +void dolog(FILE *, const char *, ...) __printflike(2, 3); struct namelist * lookup(char *, int, struct namelist *); -void lostconn(int); +void lostconn(int) __dead; struct namelist * makenl(char *); void freenl(struct namelist *); Index: src/usr.bin/rdist/main.c diff -u src/usr.bin/rdist/main.c:1.19 src/usr.bin/rdist/main.c:1.20 --- src/usr.bin/rdist/main.c:1.19 Mon Jul 21 14:19:25 2008 +++ src/usr.bin/rdist/main.c Tue Sep 6 18:28:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.19 2008/07/21 14:19:25 lukem Exp $ */ +/* $NetBSD: main.c,v 1.20 2011/09/06 18:28:18 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 6/9/93; #else -__RCSID($NetBSD: main.c,v 1.19 2008/07/21 14:19:25 lukem Exp $); +__RCSID($NetBSD: main.c,v 1.20 2011/09/06 18:28:18 joerg Exp $); #endif #endif /* not lint */ @@ -80,8 +80,7 @@ struct passwd *pw; /* pointer to static area used by getpwent */ struct group *gr; /* pointer to static area used by getgrent */ -int main(int, char **); -static void usage(void); +__dead static void usage(void); static void docmdargs(int, char *[]); int
CVS commit: src/usr.bin/rlogin
Module Name:src Committed By: joerg Date: Tue Sep 6 18:28:35 UTC 2011 Modified Files: src/usr.bin/rlogin: rlogin.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.bin/rlogin/rlogin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rlogin/rlogin.c diff -u src/usr.bin/rlogin/rlogin.c:1.40 src/usr.bin/rlogin/rlogin.c:1.41 --- src/usr.bin/rlogin/rlogin.c:1.40 Mon Apr 13 04:37:53 2009 +++ src/usr.bin/rlogin/rlogin.c Tue Sep 6 18:28:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rlogin.c,v 1.40 2009/04/13 04:37:53 lukem Exp $ */ +/* $NetBSD: rlogin.c,v 1.41 2011/09/06 18:28:35 joerg Exp $ */ /* * Copyright (c) 1983, 1990, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)rlogin.c 8.4 (Berkeley) 4/29/95; #else -__RCSID($NetBSD: rlogin.c,v 1.40 2009/04/13 04:37:53 lukem Exp $); +__RCSID($NetBSD: rlogin.c,v 1.41 2011/09/06 18:28:35 joerg Exp $); #endif #endif /* not lint */ @@ -87,11 +87,11 @@ #define CCEQ(val, c) (c == val ? val != _POSIX_VDISABLE : 0) #endif -int eight, rem; -struct termios deftty; +static int eight, rem; +static struct termios deftty; -int noescape; -u_char escapechar = '~'; +static int noescape; +static u_char escapechar = '~'; #ifdef OLDSUN struct winsize { @@ -101,30 +101,29 @@ #else #define get_window_size(fd, wp) ioctl(fd, TIOCGWINSZ, wp) #endif -struct winsize winsize; +static struct winsize winsize; -void catch_child(int); -void copytochild(int); -void doit(sigset_t *); -void done(int); -void echo(int); -u_int getescape(char *); -void lostpeer(int); -int main(int, char **); -void mode(int); -void msg(const char *); -void oob(int); -int reader(sigset_t *); -void sendwindow(void); -void setsignal(int); -void sigwinch(int); -void stop(int); -void usage(void); -void writer(void); -void writeroob(int); +static void catch_child(int); +static void copytochild(int); +__dead static void doit(sigset_t *); +__dead static void done(int); +static void echo(int); +static u_int getescape(char *); +__dead static void lostpeer(int); +static void mode(int); +static void msg(const char *); +static void oob(int); +static int reader(sigset_t *); +static void sendwindow(void); +static void setsignal(int); +static void sigwinch(int); +static void stop(int); +__dead static void usage(void); +static void writer(void); +static void writeroob(int); #ifdef OLDSUN -int get_window_size(int, struct winsize *); +static int get_window_size(int, struct winsize *); #endif int @@ -294,9 +293,9 @@ return (0); } -pid_t child; +static pid_t child; -void +static void doit(sigset_t *smask) { struct sigaction sa; @@ -340,7 +339,7 @@ } /* trap a signal, unless it is being ignored. */ -void +static void setsignal(int sig) { struct sigaction sa; @@ -360,7 +359,7 @@ (void)sigprocmask(SIG_SETMASK, sigs, (sigset_t *) 0); } -void +static void done(int status) { pid_t w; @@ -381,13 +380,13 @@ exit(status); } -int dosigwinch; +static int dosigwinch; /* * This is called when the reader process gets the out-of-band (urgent) * request to turn on the window-changing protocol. */ -void +static void writeroob(int signo) { struct sigaction sa; @@ -402,7 +401,7 @@ dosigwinch = 1; } -void +static void catch_child(int signo) { int status; @@ -425,7 +424,7 @@ * ~^Zsuspend rlogin process. * ~delayed-suspend char suspend rlogin process, but leave reader alone. */ -void +static void writer(void) { int bol, local, n; @@ -489,7 +488,7 @@ } } -void +static void echo(int i) { char c = (char)i; @@ -512,7 +511,7 @@ (void)write(STDOUT_FILENO, buf, p - buf); } -void +static void stop(int all) { struct sigaction sa; @@ -529,7 +528,7 @@ sigwinch(0); /* check for size changes */ } -void +static void sigwinch(int signo) { struct winsize ws; @@ -544,7 +543,7 @@ /* * Send the window size to the server via the magic escape */ -void +static void sendwindow(void) { struct winsize *wp; @@ -569,12 +568,12 @@ #define READING 1 #define WRITING 2 -jmp_buf rcvtop; -pid_t ppid; -int rcvcnt, rcvstate; -char rcvbuf[8 * 1024]; +static jmp_buf rcvtop; +static pid_t ppid; +static int rcvcnt, rcvstate; +static char rcvbuf[8 * 1024]; -void +static void oob(int signo) { struct termios tty; @@ -655,7 +654,7 @@ } /* reader: read from remote: line - 1 */ -int +static int reader(sigset_t *smask) { pid_t pid; @@ -703,7 +702,7 @@ } } -void +static void mode(int f) { struct termios tty; @@ -734,7 +733,7 @@ } } -void +static void lostpeer(int signo) { struct sigaction sa; @@ -746,14 +745,14 @@ } /* copy SIGURGs to the child process. */ -void +static void copytochild(int signo) { (void)kill(child, SIGURG); } -void +static void msg(const char *str) { @@ -761,7 +760,7 @@ } -void +static
CVS commit: src/usr.bin/rs
Module Name:src Committed By: joerg Date: Tue Sep 6 18:28:58 UTC 2011 Modified Files: src/usr.bin/rs: rs.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rs/rs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rs/rs.c diff -u src/usr.bin/rs/rs.c:1.14 src/usr.bin/rs/rs.c:1.15 --- src/usr.bin/rs/rs.c:1.14 Mon Jul 13 19:05:41 2009 +++ src/usr.bin/rs/rs.c Tue Sep 6 18:28:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rs.c,v 1.14 2009/07/13 19:05:41 roy Exp $ */ +/* $NetBSD: rs.c,v 1.15 2011/09/06 18:28:58 joerg Exp $ */ /*- * Copyright (c) 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)rs.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: rs.c,v 1.14 2009/07/13 19:05:41 roy Exp $); +__RCSID($NetBSD: rs.c,v 1.15 2011/09/06 18:28:58 joerg Exp $); #endif #endif /* not lint */ @@ -56,7 +56,7 @@ #include string.h #include stdarg.h -long flags; +static long flags; #define TRANSPOSE 01 #define MTRANSPOSE 02 #define ONEPERLINE 04 @@ -75,36 +75,34 @@ #define ONEPERCHAR 010 #define NOARGS 020 -short *colwidths; -short *cord; -short *icbd; -short *ocbd; -int nelem; -char **elem; -char **endelem; -char *curline; -int allocsize = BUFSIZ; -int curlen; -int irows, icols; -int orows, ocols; -int maxlen; -int skip; -int propgutter; -char isep = ' ', osep = ' '; -int owidth = 80, gutter = 2; - -void usage __P((const char *, ...)) - __attribute__((__format__(__printf__, 1, 2))); -void getargs __P((int, char *[])); -void getfile __P((void)); -int get_line __P((void)); -char *getlist __P((short **, char *)); -char *getnum __P((int *, char *, int)); -char **getptrs __P((char **)); -int main __P((int, char **)); -void prepfile __P((void)); -void prints __P((char *, int)); -void putfile __P((void)); +static short *colwidths; +static short *cord; +static short *icbd; +static short *ocbd; +static int nelem; +static char **elem; +static char **endelem; +static char *curline; +static int allocsize = BUFSIZ; +static int curlen; +static int irows, icols; +static int orows, ocols; +static int maxlen; +static int skip; +static int propgutter; +static char isep = ' ', osep = ' '; +static int owidth = 80, gutter = 2; + +static void usage(const char *, ...) __dead __printflike(1, 2); +static void getargs(int, char *[]); +static void getfile(void); +static int get_line(void); +static char *getlist(short **, char *); +static char *getnum(int *, char *, int); +static char **getptrs(char **); +static void prepfile(void); +static void prints(char *, int); +static void putfile(void); #define INCR(ep) do { \ if (++ep = endelem) \ @@ -112,9 +110,7 @@ } while(0) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { getargs(argc, argv); getfile(); @@ -127,8 +123,8 @@ exit(0); } -void -getfile() +static void +getfile(void) { char empty[1] = { '\0' }; char *p; @@ -194,8 +190,8 @@ nelem = ep - elem; } -void -putfile() +static void +putfile(void) { char **ep; int i, j, n; @@ -219,10 +215,8 @@ } } -void -prints(s, col) - char *s; - int col; +static void +prints(char *s, int col) { int n; char *p = s; @@ -239,7 +233,7 @@ putchar(osep); } -void +static void usage(const char *msg, ...) { va_list ap; @@ -252,8 +246,8 @@ exit(1); } -void -prepfile() +static void +prepfile(void) { char **ep; int i; @@ -345,8 +339,8 @@ #define BSIZE 2048 char ibuf[BSIZE]; /* two screenfuls should do */ -int -get_line() /* get line; maintain curline, curlen; manage storage */ +static int +get_line(void) /* get line; maintain curline, curlen; manage storage */ { static int putlength; static char *endblock = ibuf + BSIZE; @@ -378,9 +372,8 @@ return(c); } -char ** -getptrs(sp) - char **sp; +static char ** +getptrs(char **sp) { char **p; @@ -394,10 +387,8 @@ return(sp); } -void -getargs(ac, av) - int ac; - char *av[]; +static void +getargs(int ac, char *av[]) { char *p; @@ -505,10 +496,8 @@ } } -char * -getlist(list, p) - short **list; - char *p; +static char * +getlist(short **list, char *p) { int count = 1; char *t; @@ -538,10 +527,9 @@ return(t - 1); } -char * -getnum(num, p, strict) /* num = number p points to; if (strict) complain */ - int *num, strict; /* returns pointer to end of num */ - char *p; +static char * +getnum(int *num, char *p, int strict) /* num = number p points to; if (strict) complain */ + /* returns pointer to end of num */ { char *t = p;
CVS commit: src/usr.bin/ruptime
Module Name:src Committed By: joerg Date: Tue Sep 6 18:29:19 UTC 2011 Modified Files: src/usr.bin/ruptime: ruptime.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/ruptime/ruptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ruptime/ruptime.c diff -u src/usr.bin/ruptime/ruptime.c:1.14 src/usr.bin/ruptime/ruptime.c:1.15 --- src/usr.bin/ruptime/ruptime.c:1.14 Mon Apr 13 07:10:25 2009 +++ src/usr.bin/ruptime/ruptime.c Tue Sep 6 18:29:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ruptime.c,v 1.14 2009/04/13 07:10:25 lukem Exp $ */ +/* $NetBSD: ruptime.c,v 1.15 2011/09/06 18:29:19 joerg Exp $ */ /* * Copyright (c) 1983, 1993, 1994 @@ -37,7 +37,7 @@ #ifndef lint /*static char sccsid[] = from: @(#)ruptime.c 8.2 (Berkeley) 4/5/94;*/ -__RCSID($NetBSD: ruptime.c,v 1.14 2009/04/13 07:10:25 lukem Exp $); +__RCSID($NetBSD: ruptime.c,v 1.15 2011/09/06 18:29:19 joerg Exp $); #endif /* not lint */ #include sys/param.h @@ -55,7 +55,7 @@ #include tzfile.h #include unistd.h -struct hs { +static struct hs { struct whod *hs_wd; int hs_nusers; } *hs; @@ -64,18 +64,16 @@ #define WHDRSIZE (sizeof(struct whod) - \ sizeof (((struct whod *)0)-wd_we)) -size_t nhosts; -time_t now; -int rflg = 1; - -int hscmp(const void *, const void *); -char *interval(time_t, const char *); -int lcmp(const void *, const void *); -int main(int, char **); -void morehosts(void); -int tcmp(const void *, const void *); -int ucmp(const void *, const void *); -void usage(void); +static size_t nhosts; +static time_t now; +static int rflg = 1; + +static int hscmp(const void *, const void *); +static char *interval(time_t, const char *); +static int lcmp(const void *, const void *); +static int tcmp(const void *, const void *); +static int ucmp(const void *, const void *); +__dead static void usage(void); int main(int argc, char **argv) @@ -186,7 +184,7 @@ exit(0); } -char * +static char * interval(time_t tval, const char *updown) { static char resbuf[32]; @@ -214,16 +212,15 @@ #define HS(a) ((const struct hs *)(a)) /* Alphabetical comparison. */ -int -hscmp(a1, a2) - const void *a1, *a2; +static int +hscmp(const void *a1, const void *a2) { return (rflg * strcmp(HS(a1)-hs_wd-wd_hostname, HS(a2)-hs_wd-wd_hostname)); } /* Load average comparison. */ -int +static int lcmp(const void *a1, const void *a2) { if (ISDOWN(HS(a1))) { @@ -239,7 +236,7 @@ } /* Number of users comparison. */ -int +static int ucmp(const void *a1, const void *a2) { if (ISDOWN(HS(a1))) { @@ -254,7 +251,7 @@ } /* Uptime comparison. */ -int +static int tcmp(const void *a1, const void *a2) { return (rflg * ( @@ -266,7 +263,7 @@ )); } -void +static void usage(void) { (void)fprintf(stderr, usage: ruptime [-alrtu]\n);
CVS commit: src/usr.bin/rusers
Module Name:src Committed By: joerg Date: Tue Sep 6 18:29:35 UTC 2011 Modified Files: src/usr.bin/rusers: rusers.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/rusers/rusers.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rusers/rusers.c diff -u src/usr.bin/rusers/rusers.c:1.24 src/usr.bin/rusers/rusers.c:1.25 --- src/usr.bin/rusers/rusers.c:1.24 Tue Aug 30 17:06:21 2011 +++ src/usr.bin/rusers/rusers.c Tue Sep 6 18:29:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rusers.c,v 1.24 2011/08/30 17:06:21 plunky Exp $ */ +/* $NetBSD: rusers.c,v 1.25 2011/09/06 18:29:35 joerg Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -30,7 +30,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rusers.c,v 1.24 2011/08/30 17:06:21 plunky Exp $); +__RCSID($NetBSD: rusers.c,v 1.25 2011/09/06 18:29:35 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -58,19 +58,18 @@ #define MAX_INT 0x7fff -struct timeval timeout = { 25, 0 }; -int longopt; -int allopt; - -void allhosts(void); -int main(int, char *[]); -void onehost(char *); -void remember_host(struct sockaddr *); -int rusers_reply(char *, struct netbuf *, struct netconfig *); -int search_host(struct sockaddr *); -void usage(void); +static struct timeval timeout = { 25, 0 }; +static int longopt; +static int allopt; + +static void allhosts(void); +static void onehost(char *); +static void remember_host(struct sockaddr *); +static int rusers_reply(char *, struct netbuf *, struct netconfig *); +static int search_host(struct sockaddr *); +__dead static void usage(void); -struct host_list { +static struct host_list { struct host_list *next; int family; union { @@ -82,7 +81,7 @@ #define addr6 addr._addr6 #define addr4 addr._addr4 -int +static int search_host(struct sockaddr *sa) { struct host_list *hp; @@ -111,7 +110,7 @@ return(0); } -void +static void remember_host(struct sockaddr *sa) { struct host_list *hp; @@ -138,7 +137,7 @@ hosts = hp; } -int +static int rusers_reply(char *replyp, struct netbuf *raddrp, struct netconfig *nconf) { char host[NI_MAXHOST]; @@ -223,7 +222,7 @@ return(0); } -void +static void onehost(char *host) { struct utmpidlearr up; @@ -254,7 +253,7 @@ freeaddrinfo(ai); } -void +static void allhosts(void) { struct utmpidlearr up; @@ -269,7 +268,7 @@ errx(1, %s, clnt_sperrno(clnt_stat)); } -void +static void usage(void) { fprintf(stderr, usage: %s [-la] [hosts ...]\n, getprogname());
CVS commit: src/usr.bin/script
Module Name:src Committed By: joerg Date: Tue Sep 6 18:29:56 UTC 2011 Modified Files: src/usr.bin/script: script.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/script/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/script/script.c diff -u src/usr.bin/script/script.c:1.20 src/usr.bin/script/script.c:1.21 --- src/usr.bin/script/script.c:1.20 Wed Jun 8 13:51:13 2011 +++ src/usr.bin/script/script.c Tue Sep 6 18:29:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: script.c,v 1.20 2011/06/08 13:51:13 yamt Exp $ */ +/* $NetBSD: script.c,v 1.21 2011/09/06 18:29:56 joerg Exp $ */ /* * Copyright (c) 1980, 1992, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)script.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: script.c,v 1.20 2011/06/08 13:51:13 yamt Exp $); +__RCSID($NetBSD: script.c,v 1.21 2011/09/06 18:29:56 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -73,26 +73,25 @@ uint32_t scr_direction; /* 'i', 'o', etc (also indicates endianness) */ }; -FILE *fscript; -int master, slave; -int child, subchild; -int outcc; -int usesleep, rawout; -int quiet, flush; -const char *fname; - -struct termios tt; - -void done(void); -void dooutput(void); -void doshell(const char *); -void fail(void); -void finish(int); -int main(int, char **); -void scriptflush(int); -void record(FILE *, char *, size_t, int); -void consume(FILE *, off_t, char *, int); -void playback(FILE *); +static FILE *fscript; +static int master, slave; +static int child, subchild; +static int outcc; +static int usesleep, rawout; +static int quiet, flush; +static const char *fname; + +static struct termios tt; + +__dead static void done(void); +__dead static void dooutput(void); +__dead static void doshell(const char *); +__dead static void fail(void); +static void finish(int); +static void scriptflush(int); +static void record(FILE *, char *, size_t, int); +static void consume(FILE *, off_t, char *, int); +__dead static void playback(FILE *); int main(int argc, char *argv[]) @@ -197,7 +196,7 @@ return (0); } -void +static void finish(int signo) { int die, pid, status; @@ -211,7 +210,7 @@ done(); } -void +static void dooutput(void) { struct itimerval value; @@ -247,7 +246,7 @@ done(); } -void +static void scriptflush(int signo) { if (outcc) { @@ -256,7 +255,7 @@ } } -void +static void doshell(const char *command) { const char *shell; @@ -278,16 +277,16 @@ fail(); } -void -fail() +static void +fail(void) { (void)kill(0, SIGTERM); done(); } -void -done() +static void +done(void) { time_t tvec; @@ -308,7 +307,7 @@ exit(0); } -void +static void record(FILE *fp, char *buf, size_t cc, int direction) { struct iovec iov[2]; @@ -328,7 +327,7 @@ err(1, writev); } -void +static void consume(FILE *fp, off_t len, char *buf, int reg) { size_t l; @@ -356,7 +355,7 @@ } \ } while (0/*CONSTCOND*/) -void +static void playback(FILE *fp) { struct timespec tsi, tso;
CVS commit: src/usr.bin/shlock
Module Name:src Committed By: joerg Date: Tue Sep 6 18:30:39 UTC 2011 Modified Files: src/usr.bin/shlock: shlock.c Log Message: Use pid_t directly. Apply static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/shlock/shlock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/shlock/shlock.c diff -u src/usr.bin/shlock/shlock.c:1.11 src/usr.bin/shlock/shlock.c:1.12 --- src/usr.bin/shlock/shlock.c:1.11 Wed Aug 31 16:24:58 2011 +++ src/usr.bin/shlock/shlock.c Tue Sep 6 18:30:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: shlock.c,v 1.11 2011/08/31 16:24:58 plunky Exp $ */ +/* $NetBSD: shlock.c,v 1.12 2011/09/06 18:30:38 joerg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: shlock.c,v 1.11 2011/08/31 16:24:58 plunky Exp $); +__RCSID($NetBSD: shlock.c,v 1.12 2011/09/06 18:30:38 joerg Exp $); #endif #include sys/types.h @@ -88,11 +88,11 @@ #define TRUE 1 #define FALSE 0 -int Debug = FALSE; -char *Pname; -const char USAGE[] = %s: USAGE: %s [-du] [-p PID] -f file\n; -const char E_unlk[] = %s: unlink(%s): %s\n; -const char E_open[] = %s: open(%s): %s\n; +static int Debug = FALSE; +static char *Pname; +static const char USAGE[] = %s: USAGE: %s [-du] [-p PID] -f file\n; +static const char E_unlk[] = %s: unlink(%s): %s\n; +static const char E_open[] = %s: open(%s): %s\n; #define dprintf if (Debug) printf @@ -103,12 +103,11 @@ */ /* the following is in case you need to make the prototypes go away. */ -char *xtmpfile(char *, pid_t, int); -int p_exists(pid_t); -int cklock(char *, int); -int mklock(char *, pid_t, int); -void bad_usage(void); -int main(int, char **); +static char *xtmpfile(char *, pid_t, int); +static int p_exists(pid_t); +static int cklock(char *, int); +static int mklock(char *, pid_t, int); +__dead static void bad_usage(void); /* ** Create a temporary file, all ready to lock with. @@ -116,8 +115,8 @@ ** gave us a full path, instead of using the current directory ** which might not be in the same filesystem. */ -char * -xtmpfile(char *file, __pid_t pid, int uucpstyle) +static char * +xtmpfile(char *file, pid_t pid, int uucpstyle) { int fd; int len; @@ -182,8 +181,8 @@ ** Does the PID exist? ** Send null signal to find out. */ -int -p_exists(__pid_t pid) +static int +p_exists(pid_t pid) { dprintf(%s: process %ld is , Pname, (u_long)pid); if (pid = 0) { @@ -222,7 +221,7 @@ ** o No clean up to do if the system or application crashes. ** */ -int +static int cklock(char *file, int uucpstyle) { int fd = open(file, O_RDONLY); @@ -250,8 +249,8 @@ return(p_exists(uucpstyle ? pid : atoi(buf))); } -int -mklock(char *file, __pid_t pid, int uucpstyle) +static int +mklock(char *file, pid_t pid, int uucpstyle) { char *tmp; int retcode = FALSE; @@ -298,7 +297,7 @@ return(retcode); } -void +static void bad_usage(void) { fprintf(stderr, USAGE, Pname, Pname);
CVS commit: src/usr.bin/showmount
Module Name:src Committed By: joerg Date: Tue Sep 6 18:30:56 UTC 2011 Modified Files: src/usr.bin/showmount: showmount.c Log Message: Use static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/showmount/showmount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/showmount/showmount.c diff -u src/usr.bin/showmount/showmount.c:1.19 src/usr.bin/showmount/showmount.c:1.20 --- src/usr.bin/showmount/showmount.c:1.19 Tue Aug 30 17:06:21 2011 +++ src/usr.bin/showmount/showmount.c Tue Sep 6 18:30:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: showmount.c,v 1.19 2011/08/30 17:06:21 plunky Exp $ */ +/* $NetBSD: showmount.c,v 1.20 2011/09/06 18:30:56 joerg Exp $ */ /* * Copyright (c) 1989, 1993, 1995 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)showmount.c 8.3 (Berkeley) 3/29/95; #endif -__RCSID($NetBSD: showmount.c,v 1.19 2011/08/30 17:06:21 plunky Exp $); +__RCSID($NetBSD: showmount.c,v 1.20 2011/09/06 18:30:56 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -89,13 +89,12 @@ static struct exportslist *exports; static int type = 0; -int main(int, char **); -void print_dump(struct mountlist *); -void usage(void); -int xdr_mntdump(XDR *, struct mountlist **); -int xdr_exports(XDR *, struct exportslist **); -int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, -xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); +static void print_dump(struct mountlist *); +__dead static void usage(void); +static int xdr_mntdump(XDR *, struct mountlist **); +static int xdr_exports(XDR *, struct exportslist **); +static int tcp_callrpc(const char *host, int prognum, int versnum, +int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); /* * This command queries the NFS mount daemon for it's mount list and/or @@ -212,7 +211,7 @@ * use tcp as transport method in order to handle large replies. */ -int +static int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out) { @@ -237,7 +236,7 @@ /* * Xdr routine for retrieving the mount dump list */ -int +static int xdr_mntdump(XDR *xdrsp, struct mountlist **mlp) { struct mountlist *mp, **otp, *tp; @@ -315,7 +314,7 @@ /* * Xdr routine to retrieve exports list */ -int +static int xdr_exports(XDR *xdrsp, struct exportslist **exp) { struct exportslist *ep; @@ -356,8 +355,8 @@ return (1); } -void -usage() +static void +usage(void) { fprintf(stderr, usage: showmount [-ade3] host\n); @@ -367,7 +366,7 @@ /* * Print the binary tree in inorder so that output is sorted. */ -void +static void print_dump(struct mountlist *mp) {
CVS commit: src/usr.bin/stat
Module Name:src Committed By: joerg Date: Tue Sep 6 18:31:22 UTC 2011 Modified Files: src/usr.bin/stat: stat.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.34 src/usr.bin/stat/stat.c:1.35 --- src/usr.bin/stat/stat.c:1.34 Wed Feb 16 23:08:29 2011 +++ src/usr.bin/stat/stat.c Tue Sep 6 18:31:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.34 2011/02/16 23:08:29 christos Exp $ */ +/* $NetBSD: stat.c,v 1.35 2011/09/06 18:31:22 joerg Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: stat.c,v 1.34 2011/02/16 23:08:29 christos Exp $); +__RCSID($NetBSD: stat.c,v 1.35 2011/09/06 18:31:22 joerg Exp $); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -174,18 +174,18 @@ #define SHOW_filename 'N' #define SHOW_sizerdev 'Z' -void usage(const char *); -void output(const struct stat *, const char *, +static void usage(const char *) __dead; +static void output(const struct stat *, const char *, const char *, int, int, int); -int format1(const struct stat *, /* stat info */ +static int format1(const struct stat *, /* stat info */ const char *, /* the file name */ const char *, int, /* the format string itself */ char *, size_t, /* a place to put the output */ int, int, int, int, /* the parsed format */ int, int, int); -const char *timefmt; -int linkfail; +static const char *timefmt; +static int linkfail; #define addchar(s, c, nl) \ do { \ @@ -349,7 +349,7 @@ return (am_readlink ? linkfail : errs); } -void +static void usage(const char *synopsis) { @@ -360,7 +360,7 @@ /* * Parses a format string. */ -void +static void output(const struct stat *st, const char *file, const char *statfmt, int fn, int nonl, int quiet) { @@ -553,7 +553,7 @@ /* * Arranges output according to a single parsed format substring. */ -int +static int format1(const struct stat *st, const char *file, const char *fmt, int flen,
CVS commit: src/usr.bin/systat
Module Name:src Committed By: joerg Date: Tue Sep 6 18:31:44 UTC 2011 Modified Files: src/usr.bin/systat: extern.h main.c Log Message: Consistently use __dead and __printflike. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.bin/systat/extern.h cvs rdiff -u -r1.45 -r1.46 src/usr.bin/systat/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/extern.h diff -u src/usr.bin/systat/extern.h:1.40 src/usr.bin/systat/extern.h:1.41 --- src/usr.bin/systat/extern.h:1.40 Thu Apr 10 17:14:25 2008 +++ src/usr.bin/systat/extern.h Tue Sep 6 18:31:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.40 2008/04/10 17:14:25 thorpej Exp $ */ +/* $NetBSD: extern.h,v 1.41 2011/09/06 18:31:44 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -88,13 +88,12 @@ void command(char *); void df_all(char *); void df_some(char *); -void die(int); +void die(int) __dead; void disks_add(char *); void disks_remove(char *); void disks_drives(char *); void display(int); -void error(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); +void error(const char *, ...) __printflike(1, 2); void fetchbufcache(void); void fetchdf(void); void fetchicmp(void); @@ -111,7 +110,7 @@ void global_help(char *); void global_interval(char *); void global_load(char *); -void global_quit(char *); +void global_quit(char *) __dead; void global_stop(char *); void icmp_boot(char *); void icmp_run(char *); @@ -138,7 +137,7 @@ void ip_run(char *); void ip_time(char *); void ip_zero(char *); -void keyboard(void) __attribute__((__noreturn__)); +void keyboard(void) __dead; ssize_t kvm_ckread(const void *, void *, size_t, const char *); void labelbufcache(void); void labeldf(void); @@ -164,7 +163,7 @@ void netstat_show(char *); void netstat_tcp(char *); void netstat_udp(char *); -void nlisterr(struct nlist []) __attribute__((__noreturn__)); +void nlisterr(struct nlist []) __dead; WINDOW *openbufcache(void); WINDOW *opendf(void); WINDOW *openicmp(void); Index: src/usr.bin/systat/main.c diff -u src/usr.bin/systat/main.c:1.45 src/usr.bin/systat/main.c:1.46 --- src/usr.bin/systat/main.c:1.45 Wed Nov 4 21:46:24 2009 +++ src/usr.bin/systat/main.c Tue Sep 6 18:31:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.45 2009/11/04 21:46:24 dsl Exp $ */ +/* $NetBSD: main.c,v 1.46 2011/09/06 18:31:44 joerg Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: main.c,v 1.45 2009/11/04 21:46:24 dsl Exp $); +__RCSID($NetBSD: main.c,v 1.46 2011/09/06 18:31:44 joerg Exp $); #endif /* not lint */ #include sys/param.h @@ -93,8 +93,7 @@ static void (*sv_stop_handler)(int); static void stop(int); -static void usage(void); -int main(int, char **); +__dead static void usage(void); gid_t egid; /* XXX needed by initiostat() and initkre() */
CVS commit: src/usr.bin/talk
Module Name:src Committed By: joerg Date: Tue Sep 6 18:32:03 UTC 2011 Modified Files: src/usr.bin/talk: ctl.c ctl_transact.c display.c get_addrs.c get_names.c init_disp.c invite.c io.c msgs.c talk.c talk.h Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/talk/ctl.c src/usr.bin/talk/display.c \ src/usr.bin/talk/invite.c src/usr.bin/talk/talk.h cvs rdiff -u -r1.10 -r1.11 src/usr.bin/talk/ctl_transact.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/talk/get_addrs.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/talk/get_names.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/talk/init_disp.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/talk/io.c cvs rdiff -u -r1.6 -r1.7 src/usr.bin/talk/msgs.c cvs rdiff -u -r1.7 -r1.8 src/usr.bin/talk/talk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/talk/ctl.c diff -u src/usr.bin/talk/ctl.c:1.8 src/usr.bin/talk/ctl.c:1.9 --- src/usr.bin/talk/ctl.c:1.8 Mon Apr 13 23:43:36 2009 +++ src/usr.bin/talk/ctl.c Tue Sep 6 18:32:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ctl.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */ +/* $NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)ctl.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: ctl.c,v 1.8 2009/04/13 23:43:36 lukem Exp $); +__RCSID($NetBSD: ctl.c,v 1.9 2011/09/06 18:32:03 joerg Exp $); #endif /* not lint */ /* @@ -64,7 +64,7 @@ CTL_MSG msg; void -open_sockt() +open_sockt(void) { socklen_t length; @@ -113,8 +113,7 @@ /* print_addr is a debug print routine */ void -print_addr(addr) - struct sockaddr_in addr; +print_addr(struct sockaddr_in addr) { int i; Index: src/usr.bin/talk/display.c diff -u src/usr.bin/talk/display.c:1.8 src/usr.bin/talk/display.c:1.9 --- src/usr.bin/talk/display.c:1.8 Mon Apr 13 23:43:36 2009 +++ src/usr.bin/talk/display.c Tue Sep 6 18:32:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: display.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */ +/* $NetBSD: display.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)display.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: display.c,v 1.8 2009/04/13 23:43:36 lukem Exp $); +__RCSID($NetBSD: display.c,v 1.9 2011/09/06 18:32:03 joerg Exp $); #endif /* not lint */ /* @@ -55,8 +55,7 @@ * a argument of the form --foo at least once. */ int -max(a,b) - int a, b; +max(int a, int b) { return (a b ? a : b); @@ -67,10 +66,7 @@ * characters while we are at it. */ void -display(win, text, size) - xwin_t *win; - char *text; - int size; +display(xwin_t *win, char *text, int size) { int i; char cch; @@ -163,9 +159,7 @@ * Read the character at the indicated position in win */ int -readwin(win, line, col) - WINDOW *win; - int line, col; +readwin(WINDOW *win, int line, int col) { int oldline, oldcol; int c; @@ -182,9 +176,7 @@ * so that the current position is obvious */ void -xscroll(win, flag) - xwin_t *win; - int flag; +xscroll(xwin_t *win, int flag) { if (flag == -1) { Index: src/usr.bin/talk/invite.c diff -u src/usr.bin/talk/invite.c:1.8 src/usr.bin/talk/invite.c:1.9 --- src/usr.bin/talk/invite.c:1.8 Mon Apr 13 23:43:36 2009 +++ src/usr.bin/talk/invite.c Tue Sep 6 18:32:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: invite.c,v 1.8 2009/04/13 23:43:36 lukem Exp $ */ +/* $NetBSD: invite.c,v 1.9 2011/09/06 18:32:03 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)invite.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: invite.c,v 1.8 2009/04/13 23:43:36 lukem Exp $); +__RCSID($NetBSD: invite.c,v 1.9 2011/09/06 18:32:03 joerg Exp $); #endif /* not lint */ #include talk.h @@ -57,11 +57,11 @@ * These are used to delete the * invitations. */ -int local_id, remote_id; -jmp_buf invitebuf; +static int local_id, remote_id; +static jmp_buf invitebuf; void -invite_remote() +invite_remote(void) { int new_sockt; struct itimerval itimer; @@ -117,8 +117,7 @@ * Routine called on interrupt to re-invite the callee */ void -re_invite(dummy) - int dummy; +re_invite(int dummy) { message(Ringing your party again); @@ -146,7 +145,7 @@ * Transmit the invitation and process the response */ void -announce_invite() +announce_invite(void) { CTL_RESPONSE response; @@ -167,7 +166,7 @@ * Tell the daemon to remove your invitation */ void -send_delete() +send_delete(void) { msg.type = DELETE; Index: src/usr.bin/talk/talk.h diff -u src/usr.bin/talk/talk.h:1.8 src/usr.bin/talk/talk.h:1.9 --- src/usr.bin/talk/talk.h:1.8 Mon Apr 13 23:43:36 2009 +++ src/usr.bin/talk/talk.h Tue Sep 6 18:32:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: talk.h,v 1.8 2009/04/13 23:43:36 lukem Exp $ */ +/* $NetBSD: talk.h,v 1.9 2011/09/06 18:32:03 joerg Exp $ */ /* *
CVS commit: src/usr.bin/tcopy
Module Name:src Committed By: joerg Date: Tue Sep 6 18:32:26 UTC 2011 Modified Files: src/usr.bin/tcopy: tcopy.c Log Message: ANSIfy + static + __dead To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tcopy/tcopy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tcopy/tcopy.c diff -u src/usr.bin/tcopy/tcopy.c:1.16 src/usr.bin/tcopy/tcopy.c:1.17 --- src/usr.bin/tcopy/tcopy.c:1.16 Mon Apr 13 23:44:49 2009 +++ src/usr.bin/tcopy/tcopy.c Tue Sep 6 18:32:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tcopy.c,v 1.16 2009/04/13 23:44:49 lukem Exp $ */ +/* $NetBSD: tcopy.c,v 1.17 2011/09/06 18:32:26 joerg Exp $ */ /* * Copyright (c) 1985, 1987, 1993, 1995 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)tcopy.c 8.3 (Berkeley) 1/23/95; #endif -__RCSID($NetBSD: tcopy.c,v 1.16 2009/04/13 23:44:49 lukem Exp $); +__RCSID($NetBSD: tcopy.c,v 1.17 2011/09/06 18:32:26 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -61,22 +61,19 @@ #define MAXREC (64 * 1024) #define NOCOUNT (-2) -int filen, guesslen, maxblk = MAXREC; -long lastrec, record; -off_t size, tsize; -FILE *msg = stdout; - -void *getspace __P((int)); -void intr __P((int)); -int main __P((int, char **)); -void usage __P((void)); -void verify __P((int, int, char *)); -void writeop __P((int, int)); +static int filen, guesslen, maxblk = MAXREC; +static long lastrec, record; +static off_t size, tsize; +static FILE *msg = stdout; + +static void *getspace(int); +__dead static void intr(int); +__dead static void usage(void); +static void verify(int, int, char *); +static void writeop(int, int); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, needeof, nw, inp, outp; ssize_t lastnread, nread; @@ -233,10 +230,8 @@ exit(0); } -void -verify(inp, outp, outb) - int inp, outp; - char *outb; +static void +verify(int inp, int outp, char *outb) { int eot, inmaxblk, inn, outmaxblk, outn; char *inb; @@ -291,9 +286,8 @@ exit(1); } -void -intr(signo) - int signo; +static void +intr(int signo) { if (record) { if (record - lastrec 1) @@ -307,9 +301,8 @@ exit(1); } -void * -getspace(blk) - int blk; +static void * +getspace(int blk) { void *bp; @@ -319,9 +312,8 @@ return (bp); } -void -writeop(fd, type) - int fd, type; +static void +writeop(int fd, int type) { struct mtop op; @@ -331,8 +323,8 @@ err(6, tape op); } -void -usage() +static void +usage(void) { fprintf(stderr, usage: tcopy [-cvx] [-s maxblk] src [dest]\n);
CVS commit: src/usr.bin/tip
Module Name:src Committed By: joerg Date: Tue Sep 6 18:33:01 UTC 2011 Modified Files: src/usr.bin/tip: acu.c cmds.c cu.c hunt.c tip.c tip.h tipout.c src/usr.bin/tip/aculib: hayes.c Log Message: Use __dead. Make a bunch of local functions static. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/tip/acu.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/tip/cmds.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/tip/cu.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/tip/hunt.c cvs rdiff -u -r1.50 -r1.51 src/usr.bin/tip/tip.c cvs rdiff -u -r1.31 -r1.32 src/usr.bin/tip/tip.h cvs rdiff -u -r1.14 -r1.15 src/usr.bin/tip/tipout.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tip/aculib/hayes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tip/acu.c diff -u src/usr.bin/tip/acu.c:1.15 src/usr.bin/tip/acu.c:1.16 --- src/usr.bin/tip/acu.c:1.15 Thu Dec 14 17:09:43 2006 +++ src/usr.bin/tip/acu.c Tue Sep 6 18:33:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acu.c,v 1.15 2006/12/14 17:09:43 christos Exp $ */ +/* $NetBSD: acu.c,v 1.16 2011/09/06 18:33:01 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)acu.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: acu.c,v 1.15 2006/12/14 17:09:43 christos Exp $); +__RCSID($NetBSD: acu.c,v 1.16 2011/09/06 18:33:01 joerg Exp $); #endif /* not lint */ #include tip.h @@ -43,7 +43,7 @@ static int conflag; static jmp_buf jmpbuf; -static void acuabort(int); +__dead static void acuabort(int); static acu_t *acutype(char *); /* Index: src/usr.bin/tip/cmds.c diff -u src/usr.bin/tip/cmds.c:1.32 src/usr.bin/tip/cmds.c:1.33 --- src/usr.bin/tip/cmds.c:1.32 Thu Dec 14 17:09:43 2006 +++ src/usr.bin/tip/cmds.c Tue Sep 6 18:33:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.32 2006/12/14 17:09:43 christos Exp $ */ +/* $NetBSD: cmds.c,v 1.33 2011/09/06 18:33:01 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)cmds.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: cmds.c,v 1.32 2006/12/14 17:09:43 christos Exp $); +__RCSID($NetBSD: cmds.c,v 1.33 2011/09/06 18:33:01 joerg Exp $); #endif /* not lint */ #include tip.h @@ -55,7 +55,7 @@ int args(char *, char **); int anyof(char *, const char *); void execute(char *); -void intcopy(int); +__dead static void intcopy(int); void prtime(const char *, time_t); void stopsnd(int); void transfer(char *, int, const char *); Index: src/usr.bin/tip/cu.c diff -u src/usr.bin/tip/cu.c:1.20 src/usr.bin/tip/cu.c:1.21 --- src/usr.bin/tip/cu.c:1.20 Thu Dec 14 17:09:43 2006 +++ src/usr.bin/tip/cu.c Tue Sep 6 18:33:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cu.c,v 1.20 2006/12/14 17:09:43 christos Exp $ */ +/* $NetBSD: cu.c,v 1.21 2011/09/06 18:33:01 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -36,13 +36,13 @@ #if 0 static char sccsid[] = @(#)cu.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: cu.c,v 1.20 2006/12/14 17:09:43 christos Exp $); +__RCSID($NetBSD: cu.c,v 1.21 2011/09/06 18:33:01 joerg Exp $); #endif /* not lint */ #include tip.h -static void cuhelp(void); -static void cuusage(void); +__dead static void cuhelp(void); +__dead static void cuusage(void); /* * Botch the interface to look like cu's Index: src/usr.bin/tip/hunt.c diff -u src/usr.bin/tip/hunt.c:1.17 src/usr.bin/tip/hunt.c:1.18 --- src/usr.bin/tip/hunt.c:1.17 Tue May 24 12:46:16 2011 +++ src/usr.bin/tip/hunt.c Tue Sep 6 18:33:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.17 2011/05/24 12:46:16 joerg Exp $ */ +/* $NetBSD: hunt.c,v 1.18 2011/09/06 18:33:01 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)hunt.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: hunt.c,v 1.17 2011/05/24 12:46:16 joerg Exp $); +__RCSID($NetBSD: hunt.c,v 1.18 2011/09/06 18:33:01 joerg Exp $); #endif /* not lint */ #include tip.h @@ -42,9 +42,9 @@ static jmp_buf deadline; static int deadfl; -void dead(int); +__dead static void dead(int); -void +static void /*ARGSUSED*/ dead(int dummy __unused) { Index: src/usr.bin/tip/tip.c diff -u src/usr.bin/tip/tip.c:1.50 src/usr.bin/tip/tip.c:1.51 --- src/usr.bin/tip/tip.c:1.50 Sun Jan 18 07:12:39 2009 +++ src/usr.bin/tip/tip.c Tue Sep 6 18:33:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tip.c,v 1.50 2009/01/18 07:12:39 lukem Exp $ */ +/* $NetBSD: tip.c,v 1.51 2011/09/06 18:33:01 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)tip.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: tip.c,v 1.50 2009/01/18 07:12:39 lukem Exp $); +__RCSID($NetBSD: tip.c,v 1.51 2011/09/06 18:33:01 joerg Exp $); #endif /* not lint */ /* @@ -54,12 +54,12 @@ #include tip.h #include pathnames.h -static void tipusage(void); +__dead static void tipusage(void); int escape(void); int main(int, char **); -void
CVS commit: src/usr.bin/touch
Module Name:src Committed By: joerg Date: Tue Sep 6 18:33:18 UTC 2011 Modified Files: src/usr.bin/touch: touch.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/touch/touch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/touch/touch.c diff -u src/usr.bin/touch/touch.c:1.29 src/usr.bin/touch/touch.c:1.30 --- src/usr.bin/touch/touch.c:1.29 Tue Feb 22 15:03:30 2011 +++ src/usr.bin/touch/touch.c Tue Sep 6 18:33:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $ */ +/* $NetBSD: touch.c,v 1.30 2011/09/06 18:33:18 joerg Exp $ */ /* * Copyright (c) 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)touch.c 8.2 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $); +__RCSID($NetBSD: touch.c,v 1.30 2011/09/06 18:33:18 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -57,24 +57,20 @@ #include tzfile.h #include unistd.h -int main __P((int, char **)); -int rw __P((char *, struct stat *, int)); -void stime_arg1 __P((char *, struct timeval *)); -void stime_arg2 __P((char *, int, struct timeval *)); -void stime_file __P((char *, struct timeval *)); -void usage __P((void)); +static void stime_arg1(char *, struct timeval *); +static void stime_arg2(char *, int, struct timeval *); +static void stime_file(char *, struct timeval *); +__dead static void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct stat sb; struct timeval tv[2]; int aflag, cflag, hflag, mflag, ch, fd, len, rval, timeset; char *p; - int (*change_file_times) __P((const char *, const struct timeval *)); - int (*get_file_status) __P((const char *, struct stat *)); + int (*change_file_times)(const char *, const struct timeval *); + int (*get_file_status)(const char *, struct stat *); setlocale(LC_ALL, ); @@ -197,10 +193,8 @@ #define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0')) -void -stime_arg1(arg, tvp) - char *arg; - struct timeval *tvp; +static void +stime_arg1(char *arg, struct timeval *tvp) { struct tm *t; time_t tmptime; @@ -263,11 +257,8 @@ tvp[0].tv_usec = tvp[1].tv_usec = 0; } -void -stime_arg2(arg, year, tvp) - char *arg; - int year; - struct timeval *tvp; +static void +stime_arg2(char *arg, int year, struct timeval *tvp) { struct tm *t; time_t tmptime; @@ -299,10 +290,8 @@ tvp[0].tv_usec = tvp[1].tv_usec = 0; } -void -stime_file(fname, tvp) - char *fname; - struct timeval *tvp; +static void +stime_file(char *fname, struct timeval *tvp) { struct stat sb; @@ -312,8 +301,8 @@ TIMESPEC_TO_TIMEVAL(tvp[1], sb.st_mtimespec); } -__dead void -usage() +static void +usage(void) { (void)fprintf(stderr, usage: touch [-acfhm] [-r file] [-t time] file ...\n);
CVS commit: src/usr.bin/tr
Module Name:src Committed By: joerg Date: Tue Sep 6 18:33:46 UTC 2011 Modified Files: src/usr.bin/tr: extern.h str.c tr.c Log Message: ANSIfy. Sprinkle const and __dead. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/tr/extern.h cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tr/str.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tr/tr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tr/extern.h diff -u src/usr.bin/tr/extern.h:1.6 src/usr.bin/tr/extern.h:1.7 --- src/usr.bin/tr/extern.h:1.6 Thu Aug 7 11:16:46 2003 +++ src/usr.bin/tr/extern.h Tue Sep 6 18:33:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.6 2003/08/07 11:16:46 agc Exp $ */ +/* $NetBSD: extern.h,v 1.7 2011/09/06 18:33:46 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -45,4 +45,4 @@ #define NCHARS (UCHAR_MAX + 1) /* Number of possible characters. */ #define OOBCH (UCHAR_MAX + 1) /* Out of band character value. */ -int next __P((STR *)); +int next(STR *); Index: src/usr.bin/tr/str.c diff -u src/usr.bin/tr/str.c:1.12 src/usr.bin/tr/str.c:1.13 --- src/usr.bin/tr/str.c:1.12 Mon Apr 13 23:50:49 2009 +++ src/usr.bin/tr/str.c Tue Sep 6 18:33:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.12 2009/04/13 23:50:49 lukem Exp $ */ +/* $NetBSD: str.c,v 1.13 2011/09/06 18:33:46 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)str.c 8.2 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: str.c,v 1.12 2009/04/13 23:50:49 lukem Exp $); +__RCSID($NetBSD: str.c,v 1.13 2011/09/06 18:33:46 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -49,17 +49,16 @@ #include extern.h -static int backslash __P((STR *)); -static int bracket __P((STR *)); -static int c_class __P((const void *, const void *)); -static void genclass __P((STR *)); -static void genequiv __P((STR *)); -static int genrange __P((STR *)); -static void genseq __P((STR *)); +static int backslash(STR *); +static int bracket(STR *); +static int c_class(const void *, const void *); +static void genclass(STR *); +static void genequiv(STR *); +static int genrange(STR *); +static void genseq(STR *); int -next(s) - STR *s; +next(STR *s) { int ch; @@ -115,8 +114,7 @@ } static int -bracket(s) - STR *s; +bracket(STR *s) { char *p; @@ -149,11 +147,11 @@ typedef struct { const char *name; - int (*func) __P((int)); + int (*func)(int); int *set; } CLASS; -static CLASS classes[] = { +static const CLASS classes[] = { { alnum, isalnum, NULL, }, { alpha, isalpha, NULL, }, { blank, isblank, NULL, }, @@ -169,10 +167,9 @@ }; static void -genclass(s) - STR *s; +genclass(STR *s) { - int cnt, (*func) __P((int)); + int cnt, (*func)(int); CLASS *cp, tmp; int *p; @@ -195,8 +192,7 @@ } static int -c_class(a, b) - const void *a, *b; +c_class(const void *a, const void *b) { return (strcmp(((const CLASS *)a)-name, ((const CLASS *)b)-name)); } @@ -206,8 +202,7 @@ * we just syntax check and grab the character. */ static void -genequiv(s) - STR *s; +genequiv(STR *s) { if (*s-str == '\\') { s-equiv[0] = backslash(s); @@ -225,8 +220,7 @@ } static int -genrange(s) - STR *s; +genrange(STR *s) { int stopval; char *savestart; @@ -244,8 +238,7 @@ } static void -genseq(s) - STR *s; +genseq(STR *s) { char *ep; @@ -287,8 +280,7 @@ * an escape code or a literal character. */ static int -backslash(s) - STR *s; +backslash(STR *s) { int ch, cnt, val; Index: src/usr.bin/tr/tr.c diff -u src/usr.bin/tr/tr.c:1.8 src/usr.bin/tr/tr.c:1.9 --- src/usr.bin/tr/tr.c:1.8 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/tr/tr.c Tue Sep 6 18:33:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tr.c,v 1.8 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: tr.c,v 1.9 2011/09/06 18:33:46 joerg Exp $ */ /* * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)tr.c 8.2 (Berkeley) 5/4/95; #endif -__RCSID($NetBSD: tr.c,v 1.8 2008/07/21 14:19:27 lukem Exp $); +__RCSID($NetBSD: tr.c,v 1.9 2011/09/06 18:33:46 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -90,14 +90,11 @@ STR s1 = { STRING1, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; STR s2 = { STRING2, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; -int main __P((int, char **)); -static void setup __P((int *, char *, STR *, int)); -static void usage __P((void)); +static void setup(int *, char *, STR *, int); +__dead static void usage(void); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch, cnt, lastch, *p; int cflag, dflag, sflag, isstring2; @@ -236,11 +233,7 @@ } static void -setup(string, arg, str, cflag) - int *string; - char *arg; - STR *str; - int cflag; +setup(int *string, char *arg, STR *str, int cflag) { int cnt, *p; @@ -254,7 +247,7 @@ } static void -usage() +usage(void) { (void)fprintf(stderr, usage: tr
CVS commit: src/usr.bin/tset
Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:12 UTC 2011 Modified Files: src/usr.bin/tset: extern.h map.c set.c term.c tset.c wrterm.c Log Message: ANSIfy. Sprinkle static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/tset/extern.h cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tset/map.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/tset/set.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tset/term.c cvs rdiff -u -r1.19 -r1.20 src/usr.bin/tset/tset.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tset/wrterm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tset/extern.h diff -u src/usr.bin/tset/extern.h:1.13 src/usr.bin/tset/extern.h:1.14 --- src/usr.bin/tset/extern.h:1.13 Wed Feb 10 10:33:45 2010 +++ src/usr.bin/tset/extern.h Tue Sep 6 18:34:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.13 2010/02/10 10:33:45 roy Exp $ */ +/* $NetBSD: extern.h,v 1.14 2011/09/06 18:34:12 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,13 +34,13 @@ extern struct termios mode, oldmode; extern int ncolumns, isreset, nlines; -void add_mapping __P((const char *, char *)); -void tset_cat __P((const char *)); -const char *get_terminfo_entry __P((const char *)); -const char *mapped __P((const char *)); -int outc __P((int)); -void reset_mode __P((void)); -void set_control_chars __P((int, int, int)); -void set_conversions __P((int)); -void set_init __P((void)); -void wrtermcap __P((char *)); +void add_mapping(const char *, char *); +void tset_cat(const char *); +const char *get_terminfo_entry(const char *); +const char *mapped(const char *); +int outc(int); +void reset_mode(void); +void set_control_chars(int, int, int); +void set_conversions(int); +void set_init(void); +void wrtermcap(char *); Index: src/usr.bin/tset/map.c diff -u src/usr.bin/tset/map.c:1.12 src/usr.bin/tset/map.c:1.13 --- src/usr.bin/tset/map.c:1.12 Wed Feb 3 15:34:46 2010 +++ src/usr.bin/tset/map.c Tue Sep 6 18:34:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: map.c,v 1.12 2010/02/03 15:34:46 roy Exp $ */ +/* $NetBSD: map.c,v 1.13 2011/09/06 18:34:12 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)map.c 8.1 (Berkeley) 6/9/93; #endif -__RCSID($NetBSD: map.c,v 1.12 2010/02/03 15:34:46 roy Exp $); +__RCSID($NetBSD: map.c,v 1.13 2011/09/06 18:34:12 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -46,7 +46,7 @@ #include termios.h #include extern.h -int baudrate __P((char *)); +static int baudrate(char *); /* Baud rate conditionals for mapping. */ #define GT 0x01 @@ -64,7 +64,7 @@ int speed; /* Baud rate to compare against. */ } MAP; -MAP *cur, *maplist; +static MAP *cur, *maplist; /* * Syntax for -m: @@ -72,9 +72,7 @@ * The baud rate tests are: , , @, =, ! */ void -add_mapping(port, arg) - const char *port; - char *arg; +add_mapping(const char *port, char *arg) { MAP *mapp; char *copy, *p, *termp; @@ -188,8 +186,7 @@ * 'type'. */ const char * -mapped(type) - const char *type; +mapped(const char *type) { MAP *mapp; int match; @@ -224,9 +221,8 @@ return (type); } -int -baudrate(rate) - char *rate; +static int +baudrate(char *rate) { /* The baudrate number can be preceded by a 'B', which is ignored. */ Index: src/usr.bin/tset/set.c diff -u src/usr.bin/tset/set.c:1.14 src/usr.bin/tset/set.c:1.15 --- src/usr.bin/tset/set.c:1.14 Wed Feb 10 10:34:59 2010 +++ src/usr.bin/tset/set.c Tue Sep 6 18:34:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: set.c,v 1.14 2010/02/10 10:34:59 roy Exp $ */ +/* $NetBSD: set.c,v 1.15 2011/09/06 18:34:12 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: set.c,v 1.14 2010/02/10 10:34:59 roy Exp $); +__RCSID($NetBSD: set.c,v 1.15 2011/09/06 18:34:12 joerg Exp $); #include err.h #include stdio.h @@ -41,14 +41,14 @@ #define CHK(val, dft) (val = 0 ? dft : val) -int set_tabs __P((void)); +static int set_tabs(void); /* * Reset the terminal mode bits to a sensible state. Very useful after * a child program dies in raw mode. */ void -reset_mode() +reset_mode(void) { tcgetattr(STDERR_FILENO, mode); @@ -198,10 +198,9 @@ mode.c_lflag |= (ECHOE | ECHOK); } -# /* Output startup string. */ void -set_init() +set_init(void) { const char *bp; int settle; @@ -242,8 +241,8 @@ * This is done before if and is, so they can patch in case we blow this. * Return nonzero if we set any tab stops, zero if not. */ -int -set_tabs() +static int +set_tabs(void) { int c; char *out; Index: src/usr.bin/tset/term.c diff -u src/usr.bin/tset/term.c:1.16 src/usr.bin/tset/term.c:1.17 --- src/usr.bin/tset/term.c:1.16 Wed Feb 3 15:34:46 2010 +++ src/usr.bin/tset/term.c Tue Sep 6 18:34:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: term.c,v 1.16 2010/02/03 15:34:46 roy Exp $ */ +/* $NetBSD:
CVS commit: src/usr.bin/tsort
Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:38 UTC 2011 Modified Files: src/usr.bin/tsort: tsort.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/tsort/tsort.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tsort/tsort.c diff -u src/usr.bin/tsort/tsort.c:1.22 src/usr.bin/tsort/tsort.c:1.23 --- src/usr.bin/tsort/tsort.c:1.22 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/tsort/tsort.c Tue Sep 6 18:34:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tsort.c,v 1.22 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: tsort.c,v 1.23 2011/09/06 18:34:37 joerg Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = @(#)tsort.c 8.3 (Berkeley) 5/4/95; #endif -__RCSID($NetBSD: tsort.c,v 1.22 2008/07/21 14:19:27 lukem Exp $); +__RCSID($NetBSD: tsort.c,v 1.23 2011/09/06 18:34:37 joerg Exp $); #endif /* not lint */ #include sys/types.h @@ -97,24 +97,21 @@ int b_bsize; } BUF; -DB *db; -NODE *graph, **cycle_buf, **longest_cycle; -int debug, longest, quiet; - -void add_arc __P((char *, char *)); -void clear_cycle __P((void)); -int find_cycle __P((NODE *, NODE *, int, int)); -NODE *get_node __P((char *)); -void *grow_buf __P((void *, int)); -int main __P((int, char **)); -void remove_node __P((NODE *)); -void tsort __P((void)); -void usage __P((void)); +static DB *db; +static NODE *graph, **cycle_buf, **longest_cycle; +static int debug, longest, quiet; + +static void add_arc(char *, char *); +static void clear_cycle(void); +static int find_cycle(NODE *, NODE *, int, int); +static NODE *get_node(char *); +static void *grow_buf(void *, int); +static void remove_node(NODE *); +static void tsort(void); +__dead static void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { BUF *b; int c, n; @@ -191,10 +188,8 @@ } /* double the size of oldbuf and return a pointer to the new buffer. */ -void * -grow_buf(bp, size) - void *bp; - int size; +static void * +grow_buf(void *bp, int size) { void *n; @@ -208,9 +203,8 @@ * add an arc from node s1 to node s2 in the graph. If s1 or s2 are not in * the graph, then add them. */ -void -add_arc(s1, s2) - char *s1, *s2; +static void +add_arc(char *s1, char *s2) { NODE *n1; NODE *n2; @@ -244,9 +238,8 @@ } /* Find a node in the graph (insert if not found) and return a pointer to it. */ -NODE * -get_node(name) - char *name; +static NODE * +get_node(char *name) { DBT data, key; NODE *n; @@ -297,8 +290,8 @@ /* * Clear the NODEST flag from all nodes. */ -void -clear_cycle() +static void +clear_cycle(void) { NODE *n; @@ -307,8 +300,8 @@ } /* do topological sort on graph */ -void -tsort() +static void +tsort(void) { NODE *n, *next; int cnt, i; @@ -370,9 +363,8 @@ } /* print node and remove from graph (does not actually free node) */ -void -remove_node(n) - NODE *n; +static void +remove_node(NODE *n) { NODE **np; int i; @@ -388,10 +380,8 @@ /* look for the longest? cycle from node from to node to. */ -int -find_cycle(from, to, longest_len, depth) - NODE *from, *to; - int depth, longest_len; +static int +find_cycle(NODE *from, NODE *to, int longest_len, int depth) { NODE **np; int i, len; @@ -435,8 +425,8 @@ return (longest_len); } -void -usage() +static void +usage(void) { (void)fprintf(stderr, usage: tsort [-lq] [file]\n); exit(1);
CVS commit: src/usr.bin/tty
Module Name:src Committed By: joerg Date: Tue Sep 6 18:34:57 UTC 2011 Modified Files: src/usr.bin/tty: tty.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/tty/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tty/tty.c diff -u src/usr.bin/tty/tty.c:1.7 src/usr.bin/tty/tty.c:1.8 --- src/usr.bin/tty/tty.c:1.7 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/tty/tty.c Tue Sep 6 18:34:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.7 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: tty.c,v 1.8 2011/09/06 18:34:57 joerg Exp $ */ /* * Copyright (c) 1988, 1993 @@ -39,20 +39,17 @@ #if 0 static char sccsid[] = @(#)tty.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: tty.c,v 1.7 2008/07/21 14:19:27 lukem Exp $); +__RCSID($NetBSD: tty.c,v 1.8 2011/09/06 18:34:57 joerg Exp $); #endif /* not lint */ #include stdio.h #include stdlib.h #include unistd.h -int main __P((int, char **)); -static void usage __P((void)); +__dead static void usage(void); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch, sflag; char *t; @@ -76,9 +73,8 @@ exit(t ? 0 : 1); } - static void -usage () +usage(void) { fprintf(stderr, usage: tty [-s]\n); exit(2);
CVS commit: src/usr.bin/uname
Module Name:src Committed By: joerg Date: Tue Sep 6 18:35:13 UTC 2011 Modified Files: src/usr.bin/uname: uname.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/uname/uname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/uname/uname.c diff -u src/usr.bin/uname/uname.c:1.10 src/usr.bin/uname/uname.c:1.11 --- src/usr.bin/uname/uname.c:1.10 Mon Nov 9 13:24:05 1998 +++ src/usr.bin/uname/uname.c Tue Sep 6 18:35:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uname.c,v 1.10 1998/11/09 13:24:05 kleink Exp $ */ +/* $NetBSD: uname.c,v 1.11 2011/09/06 18:35:13 joerg Exp $ */ /* * Copyright (c) 1994 Winning Strategies, Inc. @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: uname.c,v 1.10 1998/11/09 13:24:05 kleink Exp $); +__RCSID($NetBSD: uname.c,v 1.11 2011/09/06 18:35:13 joerg Exp $); #endif /* not lint */ #include sys/param.h @@ -47,8 +47,7 @@ #include sys/sysctl.h #include sys/utsname.h -int main __P((int, char **)); -static void usage __P((void)); +__dead static void usage(void); /* Note that PRINT_MACHINE_ARCH is excluded from PRINT_ALL! */ #define PRINT_SYSNAME 0x01 @@ -61,9 +60,7 @@ (PRINT_SYSNAME|PRINT_NODENAME|PRINT_RELEASE|PRINT_VERSION|PRINT_MACHINE) int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct utsname u; char machine_arch[SYS_NMLN]; @@ -155,7 +152,7 @@ } static void -usage() +usage(void) { fprintf(stderr, usage: uname [-amnprsv]\n); exit(EXIT_FAILURE);
CVS commit: src/usr.bin/units
Module Name:src Committed By: joerg Date: Tue Sep 6 18:35:41 UTC 2011 Modified Files: src/usr.bin/units: units.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/units/units.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/units/units.c diff -u src/usr.bin/units/units.c:1.16 src/usr.bin/units/units.c:1.17 --- src/usr.bin/units/units.c:1.16 Tue Apr 14 05:55:12 2009 +++ src/usr.bin/units/units.c Tue Sep 6 18:35:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: units.c,v 1.16 2009/04/14 05:55:12 lukem Exp $ */ +/* $NetBSD: units.c,v 1.17 2011/09/06 18:35:41 joerg Exp $ */ /* * units.c Copyright (c) 1993 by Adrian Mariano (adr...@cam.cornell.edu) @@ -39,9 +39,9 @@ #define PRIMITIVECHAR '!' -const char *powerstring = ^; +static const char *powerstring = ^; -struct { +static struct { const char *uname; const char *uval; } unittable[MAXUNITS]; @@ -58,36 +58,34 @@ } prefixtable[MAXPREFIXES]; -const char *NULLUNIT = ; - -int unitcount; -int prefixcount; +static const char *NULLUNIT = ; +static int unitcount; +static int prefixcount; -int addsubunit __P((const char *[], const char *)); -int addunit __P((struct unittype *, const char *, int)); -void cancelunit __P((struct unittype *)); -int compare __P((const void *, const void *)); -int compareproducts __P((const char **, const char **)); -int compareunits __P((struct unittype *, struct unittype *)); -int compareunitsreciprocal __P((struct unittype *, struct unittype *)); -int completereduce __P((struct unittype *)); -void initializeunit __P((struct unittype *)); -int main __P((int, char **)); -void readerror __P((int)); -void readunits __P((const char *)); -int reduceproduct __P((struct unittype *, int)); -int reduceunit __P((struct unittype *)); -void showanswer __P((struct unittype *, struct unittype *)); -void showunit __P((struct unittype *)); -void sortunit __P((struct unittype *)); -void usage __P((void)); -void zeroerror __P((void)); -char *dupstr __P((const char *)); -const char *lookupunit __P((const char *)); +static int addsubunit(const char *[], const char *); +static int addunit(struct unittype *, const char *, int); +static void cancelunit(struct unittype *); +static int compare(const void *, const void *); +static int compareproducts(const char **, const char **); +static int compareunits(struct unittype *, struct unittype *); +static int compareunitsreciprocal(struct unittype *, struct unittype *); +static int completereduce(struct unittype *); +static void initializeunit(struct unittype *); +static void readerror(int); +static void readunits(const char *); +static int reduceproduct(struct unittype *, int); +static int reduceunit(struct unittype *); +static void showanswer(struct unittype *, struct unittype *); +static void showunit(struct unittype *); +static void sortunit(struct unittype *); +__dead static void usage(void); +static void zeroerror(void); +static char *dupstr(const char *); +static const char *lookupunit(const char *); -char * +static char * dupstr(const char *str) { char *ret; @@ -99,14 +97,14 @@ } -void +static void readerror(int linenum) { warnx(Error in units file '%s' line %d, UNITSFILE, linenum); } -void +static void readunits(const char *userfile) { FILE *unitfile; @@ -221,15 +219,14 @@ fclose(unitfile); } -void +static void initializeunit(struct unittype * theunit) { theunit-factor = 1.0; theunit-numerator[0] = theunit-denominator[0] = NULL; } - -int +static int addsubunit(const char *product[], const char *toadd) { const char **ptr; @@ -245,8 +242,7 @@ return 0; } - -void +static void showunit(struct unittype * theunit) { const char **ptr; @@ -291,8 +287,7 @@ printf(\n); } - -void +static void zeroerror() { warnx(Unit reduces to zero); @@ -305,7 +300,7 @@ Returns 0 for successful addition, nonzero on error. */ -int +static int addunit(struct unittype * theunit, const char *toadd, int flip) { char *scratch, *savescr; @@ -389,16 +384,14 @@ return 0; } - -int +static int compare(const void *item1, const void *item2) { return strcmp(*(const char * const *) item1, *(const char * const *) item2); } - -void +static void sortunit(struct unittype * theunit) { const char **ptr; @@ -410,8 +403,7 @@ qsort(theunit-denominator, count, sizeof(char *), compare); } - -void +static void cancelunit(struct unittype * theunit) { const char **den, **num; @@ -447,7 +439,7 @@ static char buffer[100]; /* buffer for lookupunit answers with prefixes */ -const char * +static const char * lookupunit(const char *unit) { int i; @@ -522,7 +514,7 @@ #define ERROR 4 -int +static int reduceproduct(struct unittype * theunit, int flip) { @@ -565,7 +557,7 @@ Returns 0 on success, or 1 on unknown
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: joerg Date: Tue Sep 6 18:42:13 UTC 2011 Modified Files: src/usr.bin/unzip: unzip.c Log Message: Use __dead and __printflike. Fix one format string and one error() argument as hinted by the new format string checking. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.17 src/usr.bin/unzip/unzip.c:1.18 --- src/usr.bin/unzip/unzip.c:1.17 Thu Aug 18 11:29:27 2011 +++ src/usr.bin/unzip/unzip.c Tue Sep 6 18:42:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.17 2011/08/18 11:29:27 christos Exp $ */ +/* $NetBSD: unzip.c,v 1.18 2011/09/06 18:42:13 joerg Exp $ */ /*- * Copyright (c) 2009, 2010 Joerg Sonnenberger jo...@netbsd.org @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: unzip.c,v 1.17 2011/08/18 11:29:27 christos Exp $); +__RCSID($NetBSD: unzip.c,v 1.18 2011/09/06 18:42:13 joerg Exp $); #include sys/queue.h #include sys/stat.h @@ -98,7 +98,7 @@ static int noeol; /* fatal error message + errno */ -static void +__dead __printflike(1, 2) static void error(const char *fmt, ...) { va_list ap; @@ -115,7 +115,7 @@ } /* fatal error message, no errno */ -static void +__dead __printflike(1, 2) static void errorx(const char *fmt, ...) { va_list ap; @@ -133,7 +133,7 @@ #if 0 /* non-fatal error message + errno */ -static void +__printflike(1, 2) static void warning(const char *fmt, ...) { va_list ap; @@ -148,9 +148,8 @@ fprintf(stderr, : %s\n, strerror(errno)); } #endif - /* non-fatal error message, no errno */ -static void +__printflike(1, 2) static void warningx(const char *fmt, ...) { va_list ap; @@ -166,7 +165,7 @@ } /* informational message (if not -q) */ -static void +__printflike(1, 2) static void info(const char *fmt, ...) { va_list ap; @@ -185,7 +184,7 @@ } /* debug message (if unzip_debug) */ -static void +__printflike(1, 2) static void debug(const char *fmt, ...) { va_list ap; @@ -580,7 +579,7 @@ /* simple case */ if (!a_opt || !text) { if (write(fd, buffer, len) != len) -error(write('%s'), path); +error(write('%s'), *path); continue; } @@ -946,7 +945,7 @@ if (t_opt) { if (error_count 0) { - errorx(%d checksum error(s) found., error_count); + errorx(%jd checksum error(s) found., error_count); } else { printf(No errors detected in compressed data of %s.\n,
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: joerg Date: Tue Sep 6 18:43:41 UTC 2011 Modified Files: src/usr.bin/unzip: unzip.c Log Message: error_count is unsigned, so use %ju To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.18 src/usr.bin/unzip/unzip.c:1.19 --- src/usr.bin/unzip/unzip.c:1.18 Tue Sep 6 18:42:13 2011 +++ src/usr.bin/unzip/unzip.c Tue Sep 6 18:43:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.18 2011/09/06 18:42:13 joerg Exp $ */ +/* $NetBSD: unzip.c,v 1.19 2011/09/06 18:43:41 joerg Exp $ */ /*- * Copyright (c) 2009, 2010 Joerg Sonnenberger jo...@netbsd.org @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: unzip.c,v 1.18 2011/09/06 18:42:13 joerg Exp $); +__RCSID($NetBSD: unzip.c,v 1.19 2011/09/06 18:43:41 joerg Exp $); #include sys/queue.h #include sys/stat.h @@ -945,7 +945,7 @@ if (t_opt) { if (error_count 0) { - errorx(%jd checksum error(s) found., error_count); + errorx(%ju checksum error(s) found., error_count); } else { printf(No errors detected in compressed data of %s.\n,
CVS commit: src/usr.bin/uudecode
Module Name:src Committed By: joerg Date: Tue Sep 6 18:44:26 UTC 2011 Modified Files: src/usr.bin/uudecode: uudecode.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/uudecode/uudecode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/uudecode/uudecode.c diff -u src/usr.bin/uudecode/uudecode.c:1.25 src/usr.bin/uudecode/uudecode.c:1.26 --- src/usr.bin/uudecode/uudecode.c:1.25 Tue Apr 14 06:16:59 2009 +++ src/usr.bin/uudecode/uudecode.c Tue Sep 6 18:44:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uudecode.c,v 1.25 2009/04/14 06:16:59 lukem Exp $ */ +/* $NetBSD: uudecode.c,v 1.26 2011/09/06 18:44:26 joerg Exp $ */ /*- * Copyright (c) 1983, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = @(#)uudecode.c 8.2 (Berkeley) 4/2/94; #endif -__RCSID($NetBSD: uudecode.c,v 1.25 2009/04/14 06:16:59 lukem Exp $); +__RCSID($NetBSD: uudecode.c,v 1.26 2011/09/06 18:44:26 joerg Exp $); #endif /* not lint */ /* @@ -68,13 +68,12 @@ #endif static int decode(void); -static void usage(void); +__dead static void usage(void); static int checkend(const char *, const char *, const char *); static int base64_decode(void); -int main(int, char *[]); -int base64, pflag; -const char *filename; +static int base64, pflag; +static const char *filename; int main(int argc, char *argv[]) @@ -286,7 +285,7 @@ } static void -usage() +usage(void) { (void)fprintf(stderr, usage: %s [-m | -p] [encoded-file ...]\n, getprogname());
CVS commit: src/usr.bin/vmstat
Module Name:src Committed By: joerg Date: Tue Sep 6 18:44:46 UTC 2011 Modified Files: src/usr.bin/vmstat: vmstat.c Log Message: Mark usage as static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.182 -r1.183 src/usr.bin/vmstat/vmstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vmstat/vmstat.c diff -u src/usr.bin/vmstat/vmstat.c:1.182 src/usr.bin/vmstat/vmstat.c:1.183 --- src/usr.bin/vmstat/vmstat.c:1.182 Tue Jul 26 13:24:38 2011 +++ src/usr.bin/vmstat/vmstat.c Tue Sep 6 18:44:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.182 2011/07/26 13:24:38 yamt Exp $ */ +/* $NetBSD: vmstat.c,v 1.183 2011/09/06 18:44:46 joerg Exp $ */ /*- * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ #if 0 static char sccsid[] = @(#)vmstat.c 8.2 (Berkeley) 3/1/95; #else -__RCSID($NetBSD: vmstat.c,v 1.182 2011/07/26 13:24:38 yamt Exp $); +__RCSID($NetBSD: vmstat.c,v 1.183 2011/09/06 18:44:46 joerg Exp $); #endif #endif /* not lint */ @@ -316,7 +316,7 @@ long getuptime(void); void printhdr(void); long pct(long, long); -void usage(void); +__dead static void usage(void); void doforkst(void); void hist_traverse(int, const char *); @@ -1881,7 +1881,7 @@ free(fn); } -void +static void usage(void) {
CVS commit: src/usr.bin/vndcompress
Module Name:src Committed By: joerg Date: Tue Sep 6 18:45:04 UTC 2011 Modified Files: src/usr.bin/vndcompress: vndcompress.c vndcompress.h Log Message: Use static and __dead To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/vndcompress/vndcompress.c cvs rdiff -u -r1.2 -r1.3 src/usr.bin/vndcompress/vndcompress.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vndcompress/vndcompress.c diff -u src/usr.bin/vndcompress/vndcompress.c:1.6 src/usr.bin/vndcompress/vndcompress.c:1.7 --- src/usr.bin/vndcompress/vndcompress.c:1.6 Tue Apr 14 07:36:16 2009 +++ src/usr.bin/vndcompress/vndcompress.c Tue Sep 6 18:45:04 2011 @@ -1,4 +1,4 @@ -/* $Id: vndcompress.c,v 1.6 2009/04/14 07:36:16 lukem Exp $ */ +/* $Id: vndcompress.c,v 1.7 2011/09/06 18:45:04 joerg Exp $ */ /* * Copyright (c) 2005 by Florian Stoehr net...@wolfnode.de @@ -60,12 +60,12 @@ */ static const char *cloop_sh = #!/bin/sh\n #V2.0 Format\n insmod cloop.o file=$0 mount -r -t iso9660 /dev/cloop $1\n exit $?\n; -int opmode; +static int opmode; /* * Print usage information, then exit program */ -void +__dead static void usage(void) { if (opmode == OM_COMPRESS) { @@ -80,7 +80,7 @@ /* * Compress a given file system */ -void +static void vndcompress(const char *fs, const char *comp, uint32_t blocksize) { int fd_in, fd_out; @@ -243,7 +243,7 @@ /* * Read in header and offset table from compressed image */ -uint64_t * +static uint64_t * readheader(int fd, struct cloop_header *clh, off_t *dstart) { uint32_t offtable_size; @@ -273,7 +273,7 @@ /* * Decompress a given file system image */ -void +static void vnduncompress(const char *comp, const char *fs) { int fd_in, fd_out; Index: src/usr.bin/vndcompress/vndcompress.h diff -u src/usr.bin/vndcompress/vndcompress.h:1.2 src/usr.bin/vndcompress/vndcompress.h:1.3 --- src/usr.bin/vndcompress/vndcompress.h:1.2 Mon Feb 18 03:34:04 2008 +++ src/usr.bin/vndcompress/vndcompress.h Tue Sep 6 18:45:04 2011 @@ -1,4 +1,4 @@ -/* $Id: vndcompress.h,v 1.2 2008/02/18 03:34:04 dyoung Exp $ */ +/* $Id: vndcompress.h,v 1.3 2011/09/06 18:45:04 joerg Exp $ */ /* * Copyright (c) 2005 by Florian Stoehr @@ -51,11 +51,6 @@ struct cloop_header; -void usage(void); -void vndcompress(const char *, const char *, uint32_t); -uint64_t * readheader(int, struct cloop_header *, off_t *); -void vnduncompress(const char *, const char *); - /* Size of the shell command (Linux compatibility) */ #define CLOOP_SH_SIZE 128
CVS commit: src/usr.bin/wall
Module Name:src Committed By: joerg Date: Tue Sep 6 18:45:21 UTC 2011 Modified Files: src/usr.bin/wall: wall.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/wall/wall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/wall/wall.c diff -u src/usr.bin/wall/wall.c:1.28 src/usr.bin/wall/wall.c:1.29 --- src/usr.bin/wall/wall.c:1.28 Tue Apr 14 07:54:51 2009 +++ src/usr.bin/wall/wall.c Tue Sep 6 18:45:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wall.c,v 1.28 2009/04/14 07:54:51 lukem Exp $ */ +/* $NetBSD: wall.c,v 1.29 2011/09/06 18:45:21 joerg Exp $ */ /* * Copyright (c) 1988, 1990, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)wall.c 8.2 (Berkeley) 11/16/93; #endif -__RCSID($NetBSD: wall.c,v 1.28 2009/04/14 07:54:51 lukem Exp $); +__RCSID($NetBSD: wall.c,v 1.29 2011/09/06 18:45:21 joerg Exp $); #endif /* not lint */ /* @@ -67,21 +67,20 @@ #include utmpentry.h #include term_chk.h -void addgroup(char *); -void makemsg(const char *); -int main(int, char **); -void usage(void); +static void addgroup(char *); +static void makemsg(const char *); +__dead static void usage(void); -struct wallgroup { +static struct wallgroup { gid_t gid; char *name; char **mem; struct wallgroup *next; } *grouplist; -int nobanner; -size_t mbufsize; -char *mbuf; +static int nobanner; +static size_t mbufsize; +static char *mbuf; /* ARGSUSED */ int @@ -157,7 +156,7 @@ exit(0); } -void +static void addgroup(char *name) { int i; @@ -188,7 +187,7 @@ grouplist = g; } -void +static void makemsg(const char *fname) { int ch, cnt; @@ -267,7 +266,7 @@ (void)fclose(fp); } -void +static void usage(void) {
CVS commit: src/usr.bin/what
Module Name:src Committed By: joerg Date: Tue Sep 6 18:45:49 UTC 2011 Modified Files: src/usr.bin/what: what.c Log Message: ANSIfy, static + __dead To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/what/what.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/what/what.c diff -u src/usr.bin/what/what.c:1.10 src/usr.bin/what/what.c:1.11 --- src/usr.bin/what/what.c:1.10 Mon Jul 21 14:19:28 2008 +++ src/usr.bin/what/what.c Tue Sep 6 18:45:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: what.c,v 1.10 2008/07/21 14:19:28 lukem Exp $ */ +/* $NetBSD: what.c,v 1.11 2011/09/06 18:45:49 joerg Exp $ */ /* * Copyright (c) 1980, 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)what.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: what.c,v 1.10 2008/07/21 14:19:28 lukem Exp $); +__RCSID($NetBSD: what.c,v 1.11 2011/09/06 18:45:49 joerg Exp $); #endif /* not lint */ #include locale.h @@ -47,9 +47,8 @@ #include stdlib.h #include unistd.h -int main __P((int, char **)); -static void search __P((void)); -static void usage __P((void)); +static void search(void); +__dead static void usage(void); static int matches; static int sflag; @@ -59,9 +58,7 @@ */ /* ARGSUSED */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int c; @@ -98,7 +95,7 @@ } static void -search() +search(void) { int c; @@ -123,7 +120,7 @@ } static void -usage() +usage(void) { (void)fprintf(stderr, usage: what [-s] file ...\n);
CVS commit: src/usr.bin/whatis
Module Name:src Committed By: joerg Date: Tue Sep 6 18:46:03 UTC 2011 Modified Files: src/usr.bin/whatis: whatis.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/whatis/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/whatis/whatis.c diff -u src/usr.bin/whatis/whatis.c:1.23 src/usr.bin/whatis/whatis.c:1.24 --- src/usr.bin/whatis/whatis.c:1.23 Mon Jul 21 14:19:28 2008 +++ src/usr.bin/whatis/whatis.c Tue Sep 6 18:46:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: whatis.c,v 1.23 2008/07/21 14:19:28 lukem Exp $ */ +/* $NetBSD: whatis.c,v 1.24 2011/09/06 18:46:03 joerg Exp $ */ /* * Copyright (c) 1987, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = @(#)whatis.c 8.5 (Berkeley) 1/2/94; #else -__RCSID($NetBSD: whatis.c,v 1.23 2008/07/21 14:19:28 lukem Exp $); +__RCSID($NetBSD: whatis.c,v 1.24 2011/09/06 18:46:03 joerg Exp $); #endif #endif /* not lint */ @@ -62,11 +62,10 @@ static int *found, foundman; -int main(int, char **); -void dashtrunc(char *, char *); -int match(char *, char *); -void usage(void); -void whatis(char **, char *, int); +static void dashtrunc(char *, char *); +static int match(char *, char *); +__dead static void usage(void); +static void whatis(char **, char *, int); int main(int argc, char **argv) @@ -147,7 +146,7 @@ exit(rv); } -void +static void whatis(char **argv, char *path, int buildpath) { char *end, *name, **p; @@ -190,7 +189,7 @@ * match -- * match a full word */ -int +static int match(char *bp, char *str) { int len; @@ -227,7 +226,7 @@ * dashtrunc -- * truncate a string at - */ -void +static void dashtrunc(char *from, char *to) { int ch; @@ -242,7 +241,7 @@ * usage -- * print usage message and die */ -void +static void usage(void) { (void)fprintf(stderr,
CVS commit: src/usr.bin/write
Module Name:src Committed By: joerg Date: Tue Sep 6 18:46:36 UTC 2011 Modified Files: src/usr.bin/write: write.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/write/write.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/write/write.c diff -u src/usr.bin/write/write.c:1.26 src/usr.bin/write/write.c:1.27 --- src/usr.bin/write/write.c:1.26 Wed Aug 31 16:24:58 2011 +++ src/usr.bin/write/write.c Tue Sep 6 18:46:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $ */ +/* $NetBSD: write.c,v 1.27 2011/09/06 18:46:35 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)write.c 8.2 (Berkeley) 4/27/95; #else -__RCSID($NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $); +__RCSID($NetBSD: write.c,v 1.27 2011/09/06 18:46:35 joerg Exp $); #endif #endif /* not lint */ @@ -65,13 +65,11 @@ #include utmpentry.h #include term_chk.h -void done(int); -void do_write(int, const char *, const uid_t); -void wr_fputs(char *); -int search_utmp(char *, char *, uid_t, gid_t); -int utmp_chk(const char *, const char *); -int main(int, char **); - +__dead static void done(int); +static void do_write(int, const char *, const uid_t); +static void wr_fputs(char *); +static int search_utmp(char *, char *, uid_t, gid_t); +static int utmp_chk(const char *, const char *); int main(int argc, char **argv) @@ -127,7 +125,7 @@ * utmp_chk - checks that the given user is actually logged in on * the given tty */ -int +static int utmp_chk(const char *user, const char *tty) { struct utmpentry *ep; @@ -151,7 +149,7 @@ * Special case for writing to yourself - ignore the terminal you're * writing from, unless that's the only terminal with messages enabled. */ -int +static int search_utmp(char *user, char *mytty, uid_t myuid, gid_t saved_egid) { char tty[MAXPATHLEN]; @@ -214,7 +212,7 @@ /* * do_write - actually make the connection */ -void +static void do_write(int ttyfd, const char *mytty, const uid_t myuid) { const char *login; @@ -255,7 +253,7 @@ /* * done - cleanup and exit */ -void +static void done(int signo) { @@ -270,7 +268,7 @@ * wr_fputs - like fputs(), but makes control characters visible and * turns \n into \r\n */ -void +static void wr_fputs(char *s) { unsigned char c;
CVS commit: src/usr.bin/xinstall
Module Name:src Committed By: joerg Date: Tue Sep 6 18:50:33 UTC 2011 Modified Files: src/usr.bin/xinstall: xinstall.c Log Message: Use static and __dead. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/usr.bin/xinstall/xinstall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xinstall/xinstall.c diff -u src/usr.bin/xinstall/xinstall.c:1.114 src/usr.bin/xinstall/xinstall.c:1.115 --- src/usr.bin/xinstall/xinstall.c:1.114 Thu Nov 12 10:10:49 2009 +++ src/usr.bin/xinstall/xinstall.c Tue Sep 6 18:50:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xinstall.c,v 1.114 2009/11/12 10:10:49 tron Exp $ */ +/* $NetBSD: xinstall.c,v 1.115 2011/09/06 18:50:32 joerg Exp $ */ /* * Copyright (c) 1987, 1993 @@ -46,7 +46,7 @@ #if 0 static char sccsid[] = @(#)xinstall.c 8.1 (Berkeley) 7/21/93; #else -__RCSID($NetBSD: xinstall.c,v 1.114 2009/11/12 10:10:49 tron Exp $); +__RCSID($NetBSD: xinstall.c,v 1.115 2011/09/06 18:50:32 joerg Exp $); #endif #endif /* not lint */ @@ -83,21 +83,21 @@ #define STRIP_ARGS_MAX 32 #define BACKUP_SUFFIX .old -int dobackup, dodir, dostrip, dolink, dopreserve, dorename, dounpriv; -int haveopt_f, haveopt_g, haveopt_m, haveopt_o; -int numberedbackup; -int mode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; -char pathbuf[MAXPATHLEN]; -uid_t uid = -1; -gid_t gid = -1; -char *group, *owner, *fflags, *tags; -FILE *metafp; -char *metafile; -u_long fileflags; -char *stripArgs; -char *afterinstallcmd; -const char *suffix = BACKUP_SUFFIX; -char *destdir; +static int dobackup, dodir, dostrip, dolink, dopreserve, dorename, dounpriv; +static int haveopt_f, haveopt_g, haveopt_m, haveopt_o; +static int numberedbackup; +static int mode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; +static char pathbuf[MAXPATHLEN]; +static uid_t uid = -1; +static gid_t gid = -1; +static char *group, *owner, *fflags, *tags; +static FILE *metafp; +static char *metafile; +static u_long fileflags; +static char *stripArgs; +static char *afterinstallcmd; +static const char *suffix = BACKUP_SUFFIX; +static char *destdir; enum { DIGEST_NONE = 0, @@ -108,7 +108,8 @@ DIGEST_SHA384, DIGEST_SHA512, } digesttype = DIGEST_NONE; -char *digest; + +static char *digest; #define LN_ABSOLUTE 0x01 #define LN_RELATIVE 0x02 @@ -121,22 +122,21 @@ #define HASUID 0x04 /* Tell install the uid was given */ #define HASGID 0x08 /* Tell install the gid was given */ -void afterinstall(const char *, const char *, int); -void backup(const char *); -char *copy(int, char *, int, char *, off_t); -int do_link(char *, char *); -void do_symlink(char *, char *); -void install(char *, char *, u_int); -void install_dir(char *, u_int); -int main(int, char *[]); -void makelink(char *, char *); -void metadata_log(const char *, const char *, struct timeval *, +static void afterinstall(const char *, const char *, int); +static void backup(const char *); +static char *copy(int, char *, int, char *, off_t); +static int do_link(char *, char *); +static void do_symlink(char *, char *); +static void install(char *, char *, u_int); +static void install_dir(char *, u_int); +static void makelink(char *, char *); +static void metadata_log(const char *, const char *, struct timeval *, const char *, const char *, off_t); -int parseid(char *, id_t *); -void strip(char *); -void usage(void); -char *xbasename(char *); -char *xdirname(char *); +static int parseid(char *, id_t *); +static void strip(char *); +__dead static void usage(void); +static char *xbasename(char *); +static char *xdirname(char *); int main(int argc, char *argv[]) @@ -403,7 +403,7 @@ * parseid -- * parse uid or gid from arg into id, returning non-zero if successful */ -int +static int parseid(char *name, id_t *id) { char *ep; @@ -420,7 +420,7 @@ * make a hard link, obeying dorename if set * return -1 on failure */ -int +static int do_link(char *from_name, char *to_name) { char tmpl[MAXPATHLEN]; @@ -450,7 +450,7 @@ * make a symbolic link, obeying dorename if set * exit on failure */ -void +static void do_symlink(char *from_name, char *to_name) { char tmpl[MAXPATHLEN]; @@ -478,7 +478,7 @@ * makelink -- * make a link from source to destination */ -void +static void makelink(char *from_name, char *to_name) { char src[MAXPATHLEN], dst[MAXPATHLEN], lnk[MAXPATHLEN]; @@ -616,7 +616,7 @@ * install -- * build a path name and install the file */ -void +static void install(char *from_name, char *to_name, u_int flags) { struct stat from_sb; @@ -808,7 +808,7 @@ * * If to_fd 0, just calculate a digest, don't copy. */ -char * +static char * copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size) { ssize_t nr, nw; @@ -962,7 +962,7 @@ * strip -- * use strip(1) to strip the target file */ -void +static void strip(char *to_name) { static const char exec_failure[]
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: wiz Date: Tue Sep 6 19:22:05 UTC 2011 Modified Files: src/usr.bin/fstat: fstat.1 Log Message: Remove trailing whitespace and use Sx for section crossreference. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/fstat/fstat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.1 diff -u src/usr.bin/fstat/fstat.1:1.28 src/usr.bin/fstat/fstat.1:1.29 --- src/usr.bin/fstat/fstat.1:1.28 Tue Sep 6 11:31:47 2011 +++ src/usr.bin/fstat/fstat.1 Tue Sep 6 19:22:05 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: fstat.1,v 1.28 2011/09/06 11:31:47 christos Exp $ +.\ $NetBSD: fstat.1,v 1.29 2011/09/06 19:22:05 wiz Exp $ .\ .\ Copyright (c) 1987, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -64,7 +64,9 @@ .Pa /usr/src resides, type .Dq Li fstat -f /usr/src . -Please see the BUGS section for issues with this option. +Please see the +.Sx BUGS +section for issues with this option. .It Fl M Extract values associated with the name list from the specified core instead of the default @@ -214,7 +216,7 @@ command would print for TCP, UDP, and .Ux domain. -For kernels compiled with +For kernels compiled with .Dv PIPE_SOCKETPAIR pipes appear as connected .Ux
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: rjs Date: Tue Sep 6 19:38:23 UTC 2011 Modified Files: src/sys/dev/marvell: if_mvgbe.c Log Message: Only zero MVGBE_MTU on Orion platforms. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/marvell/if_mvgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/marvell/if_mvgbe.c diff -u src/sys/dev/marvell/if_mvgbe.c:1.12 src/sys/dev/marvell/if_mvgbe.c:1.13 --- src/sys/dev/marvell/if_mvgbe.c:1.12 Thu Sep 1 14:46:23 2011 +++ src/sys/dev/marvell/if_mvgbe.c Tue Sep 6 19:38:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.12 2011/09/01 14:46:23 jakllsch Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.13 2011/09/06 19:38:23 rjs Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.12 2011/09/01 14:46:23 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.13 2011/09/06 19:38:23 rjs Exp $); #include rnd.h @@ -190,7 +190,7 @@ kmutex_t sc_mtx; - int sc_fix_tqtb; + int sc_flags; }; struct mvgbe_softc { @@ -286,6 +286,7 @@ int irqs[3]; int flags; #define FLAGS_FIX_TQTB (1 0) +#define FLAGS_FIX_MTU (1 1) } mvgbe_ports[] = { { MARVELL_DISCOVERY_II, 0, 3, { 32, 33, 34 }, 0 }, { MARVELL_DISCOVERY_III, 0, 3, { 32, 33, 34 }, 0 }, @@ -294,13 +295,13 @@ { MARVELL_DISCOVERY_V, 0, ?, { }, 0 }, { MARVELL_DISCOVERY_VI, 0, ?, { }, 0 }, #endif - { MARVELL_ORION_1_88F5082, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_1_88F5180N, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_1_88F5181, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_1_88F5182, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_2_88F5281, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_1_88F6082, 0, 1, { 21 }, 0 }, - { MARVELL_ORION_1_88W8660, 0, 1, { 21 }, 0 }, + { MARVELL_ORION_1_88F5082, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_1_88F5180N, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_1_88F5181, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_1_88F5182, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_2_88F5281, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_1_88F6082, 0, 1, { 21 }, FLAGS_FIX_MTU }, + { MARVELL_ORION_1_88W8660, 0, 1, { 21 }, FLAGS_FIX_MTU }, { MARVELL_KIRKWOOD_88F6180, 0, 1, { 11 }, FLAGS_FIX_TQTB }, { MARVELL_KIRKWOOD_88F6192, 0, 1, { 11 }, FLAGS_FIX_TQTB }, @@ -380,7 +381,7 @@ mvgbe_ports[i].unit != mva-mva_unit) continue; - sc-sc_fix_tqtb = mvgbe_ports[i].flags FLAGS_FIX_TQTB; + sc-sc_flags = mvgbe_ports[i].flags; for (j = 0; j mvgbe_ports[i].ports; j++) { gbea.mva_name = mvgbe; @@ -980,7 +981,8 @@ return ENOBUFS; } - MVGBE_WRITE(sc, MVGBE_MTU, 0); /* hw reset value is wrong */ + if (csc-sc_flags FLAGS_FIX_MTU) + MVGBE_WRITE(sc, MVGBE_MTU, 0); /* hw reset value is wrong */ MVGBE_WRITE(sc, MVGBE_PSC, MVGBE_PSC_ANFC | /* Enable Auto-Neg Flow Ctrl */ MVGBE_PSC_RESERVED | /* Must be set to 1 */ @@ -996,7 +998,7 @@ MVGBE_WRITE(sc, MVGBE_CRDP(0), MVGBE_RX_RING_ADDR(sc, 0)); MVGBE_WRITE(sc, MVGBE_TCQDP, MVGBE_TX_RING_ADDR(sc, 0)); - if (csc-sc_fix_tqtb) { + if (csc-sc_flags FLAGS_FIX_TQTB) { /* * Queue 0 (offset 0x72700) must be programmed to 0x3fff. * And offset 0x72704 must be programmed to 0x03ff.
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Tue Sep 6 20:14:35 UTC 2011 Modified Files: src/crypto/external/bsd/openssh/dist: openssh2netbsd Log Message: some stuff got removed in 5.9 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/dist/openssh2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/openssh2netbsd diff -u src/crypto/external/bsd/openssh/dist/openssh2netbsd:1.3 src/crypto/external/bsd/openssh/dist/openssh2netbsd:1.4 --- src/crypto/external/bsd/openssh/dist/openssh2netbsd:1.3 Sun Jul 24 23:03:10 2011 +++ src/crypto/external/bsd/openssh/dist/openssh2netbsd Tue Sep 6 16:14:35 2011 @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: openssh2netbsd,v 1.3 2011/07/25 03:03:10 christos Exp $ +# $NetBSD: openssh2netbsd,v 1.4 2011/09/06 20:14:35 christos Exp $ # # Copyright (c) 2001 The NetBSD Foundation, Inc. # All rights reserved. @@ -33,6 +33,6 @@ ### Remove Makefile and subdirs rm -r Makefile Makefile.inc -rm -r lib ssh-add ssh scp ssh-agent sshd sftp-server ssh-keygen sftp ssh-keyscan ssh-keysign ssh-pkcs11-helper scard ssh-pkcs11-helper +rm -r lib ssh-add ssh scp ssh-agent sshd sftp-server ssh-keygen sftp ssh-keyscan ssh-keysign ssh-pkcs11-helper exit 0
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Tue Sep 6 20:17:29 UTC 2011 Update of /cvsroot/src/crypto/external/bsd/openssh/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18387 Log Message: new openssh: See http://www.openssh.com/txt/release-5.9 Status: Vendor Tag: OPENSSH Release Tags: v59-20110906 U src/crypto/external/bsd/openssh/dist/PROTOCOL.agent C src/crypto/external/bsd/openssh/dist/readconf.h U src/crypto/external/bsd/openssh/dist/LICENCE U src/crypto/external/bsd/openssh/dist/OVERVIEW U src/crypto/external/bsd/openssh/dist/PROTOCOL U src/crypto/external/bsd/openssh/dist/cipher-3des1.c U src/crypto/external/bsd/openssh/dist/PROTOCOL.certkeys C src/crypto/external/bsd/openssh/dist/PROTOCOL.mux U src/crypto/external/bsd/openssh/dist/README U src/crypto/external/bsd/openssh/dist/addrmatch.c U src/crypto/external/bsd/openssh/dist/atomicio.c U src/crypto/external/bsd/openssh/dist/atomicio.h U src/crypto/external/bsd/openssh/dist/auth-bsdauth.c U src/crypto/external/bsd/openssh/dist/auth-chall.c U src/crypto/external/bsd/openssh/dist/auth-krb5.c U src/crypto/external/bsd/openssh/dist/auth-options.c U src/crypto/external/bsd/openssh/dist/auth-options.h U src/crypto/external/bsd/openssh/dist/auth-passwd.c U src/crypto/external/bsd/openssh/dist/auth-rh-rsa.c C src/crypto/external/bsd/openssh/dist/channels.c U src/crypto/external/bsd/openssh/dist/auth-rhosts.c C src/crypto/external/bsd/openssh/dist/auth.c C src/crypto/external/bsd/openssh/dist/auth-rsa.c C src/crypto/external/bsd/openssh/dist/auth.h U src/crypto/external/bsd/openssh/dist/auth1.c U src/crypto/external/bsd/openssh/dist/auth2-chall.c C src/crypto/external/bsd/openssh/dist/auth2-gss.c U src/crypto/external/bsd/openssh/dist/auth2-hostbased.c U src/crypto/external/bsd/openssh/dist/auth2-jpake.c U src/crypto/external/bsd/openssh/dist/auth2-kbdint.c U src/crypto/external/bsd/openssh/dist/auth2-none.c U src/crypto/external/bsd/openssh/dist/auth2-passwd.c C src/crypto/external/bsd/openssh/dist/auth2-pubkey.c C src/crypto/external/bsd/openssh/dist/auth2.c C src/crypto/external/bsd/openssh/dist/authfd.c U src/crypto/external/bsd/openssh/dist/authfd.h C src/crypto/external/bsd/openssh/dist/authfile.c C src/crypto/external/bsd/openssh/dist/authfile.h U src/crypto/external/bsd/openssh/dist/bufaux.c U src/crypto/external/bsd/openssh/dist/bufbn.c U src/crypto/external/bsd/openssh/dist/bufec.c U src/crypto/external/bsd/openssh/dist/buffer.c U src/crypto/external/bsd/openssh/dist/buffer.h U src/crypto/external/bsd/openssh/dist/canohost.c U src/crypto/external/bsd/openssh/dist/canohost.h C src/crypto/external/bsd/openssh/dist/channels.h U src/crypto/external/bsd/openssh/dist/cipher.c U src/crypto/external/bsd/openssh/dist/groupaccess.c U src/crypto/external/bsd/openssh/dist/cipher-bf1.c U src/crypto/external/bsd/openssh/dist/cipher-ctr.c U src/crypto/external/bsd/openssh/dist/cipher.h U src/crypto/external/bsd/openssh/dist/cleanup.c C src/crypto/external/bsd/openssh/dist/clientloop.c C src/crypto/external/bsd/openssh/dist/clientloop.h U src/crypto/external/bsd/openssh/dist/compat.c U src/crypto/external/bsd/openssh/dist/compat.h U src/crypto/external/bsd/openssh/dist/compress.c U src/crypto/external/bsd/openssh/dist/compress.h U src/crypto/external/bsd/openssh/dist/crc32.c U src/crypto/external/bsd/openssh/dist/crc32.h U src/crypto/external/bsd/openssh/dist/deattack.c U src/crypto/external/bsd/openssh/dist/deattack.h U src/crypto/external/bsd/openssh/dist/dh.c U src/crypto/external/bsd/openssh/dist/dh.h U src/crypto/external/bsd/openssh/dist/dispatch.c U src/crypto/external/bsd/openssh/dist/dispatch.h U src/crypto/external/bsd/openssh/dist/dns.c U src/crypto/external/bsd/openssh/dist/dns.h U src/crypto/external/bsd/openssh/dist/fatal.c U src/crypto/external/bsd/openssh/dist/gss-genr.c U src/crypto/external/bsd/openssh/dist/groupaccess.h U src/crypto/external/bsd/openssh/dist/gss-serv-krb5.c C src/crypto/external/bsd/openssh/dist/gss-serv.c U src/crypto/external/bsd/openssh/dist/hostfile.c U src/crypto/external/bsd/openssh/dist/hostfile.h U src/crypto/external/bsd/openssh/dist/jpake.c U src/crypto/external/bsd/openssh/dist/jpake.h U src/crypto/external/bsd/openssh/dist/kex.c U src/crypto/external/bsd/openssh/dist/kex.h U src/crypto/external/bsd/openssh/dist/kexdh.c U src/crypto/external/bsd/openssh/dist/kexdhc.c U src/crypto/external/bsd/openssh/dist/kexdhs.c U src/crypto/external/bsd/openssh/dist/kexecdh.c U src/crypto/external/bsd/openssh/dist/kexecdhc.c U src/crypto/external/bsd/openssh/dist/kexecdhs.c U src/crypto/external/bsd/openssh/dist/kexgex.c U src/crypto/external/bsd/openssh/dist/kexgexc.c U src/crypto/external/bsd/openssh/dist/kexgexs.c C src/crypto/external/bsd/openssh/dist/key.c U src/crypto/external/bsd/openssh/dist/key.h C src/crypto/external/bsd/openssh/dist/log.c C src/crypto/external/bsd/openssh/dist/log.h C src/crypto/external/bsd/openssh/dist/mac.c U src/crypto/external/bsd/openssh/dist/mac.h
CVS commit: src
Module Name:src Committed By: riz Date: Tue Sep 6 21:30:13 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi src/sbin/devpubd: Makefile Log Message: Build and install the skeleton manpage for devpubd - it's better than nothing. To generate a diff of this commit: cvs rdiff -u -r1.1338 -r1.1339 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.1 -r1.2 src/sbin/devpubd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1338 src/distrib/sets/lists/man/mi:1.1339 --- src/distrib/sets/lists/man/mi:1.1338 Tue Aug 30 07:07:05 2011 +++ src/distrib/sets/lists/man/mi Tue Sep 6 21:30:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1338 2011/08/30 07:07:05 jruoho Exp $ +# $NetBSD: mi,v 1.1339 2011/09/06 21:30:12 riz Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2203,6 +2203,7 @@ ./usr/share/man/cat8/dbsym.0 man-sysutil-catman binutils,.cat ./usr/share/man/cat8/defer.0 man-postfix-catman postfix,.cat ./usr/share/man/cat8/dev_mkdb.0 man-sysutil-catman .cat +./usr/share/man/cat8/devpubd.0 man-sysutil-catman .cat ./usr/share/man/cat8/dhclient-script.0 man-dhclient-catman .cat ./usr/share/man/cat8/dhclient.0 man-dhclient-catman .cat ./usr/share/man/cat8/dhcpcd-run-hooks.0 man-dhcpcd-catman .cat @@ -4882,6 +4883,7 @@ ./usr/share/man/html8/dbsym.html man-sysutil-htmlman binutils,html ./usr/share/man/html8/defer.html man-postfix-htmlman postfix,html ./usr/share/man/html8/dev_mkdb.html man-sysutil-htmlman html +./usr/share/man/html8/devpubd.html man-sysutil-htmlman html ./usr/share/man/html8/dhclient-script.html man-dhclient-htmlman html ./usr/share/man/html8/dhclient.html man-dhclient-htmlman html ./usr/share/man/html8/dhcpcd-run-hooks.html man-dhcpcd-htmlman html @@ -7617,6 +7619,7 @@ ./usr/share/man/man8/dbsym.8 man-sysutil-man binutils,.man ./usr/share/man/man8/defer.8 man-postfix-man postfix,.man ./usr/share/man/man8/dev_mkdb.8 man-sysutil-man .man +./usr/share/man/man8/devpubd.8 man-sysutil-man .man ./usr/share/man/man8/dhclient-script.8 man-dhclient-man .man ./usr/share/man/man8/dhclient.8 man-dhclient-man .man ./usr/share/man/man8/dhcpcd-run-hooks.8 man-dhcpcd-man .man Index: src/sbin/devpubd/Makefile diff -u src/sbin/devpubd/Makefile:1.1 src/sbin/devpubd/Makefile:1.2 --- src/sbin/devpubd/Makefile:1.1 Mon Aug 29 11:38:48 2011 +++ src/sbin/devpubd/Makefile Tue Sep 6 21:30:12 2011 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2011/08/29 11:38:48 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/09/06 21:30:12 riz Exp $ PROG= devpubd SRCS= devpubd.c -NOMAN= # defined +MAN= devpubd.8 WARNS= 4 BINDIR?= /sbin
CVS commit: src
Module Name:src Committed By: riz Date: Tue Sep 6 21:32:30 UTC 2011 Modified Files: src/distrib/sets/lists/etc: mi src/etc/defaults: rc.conf src/etc/rc.d: Makefile Added Files: src/etc/rc.d: devpubd Log Message: Create and install an rc.d file for devpubd - a daemon to listen on drvctl and autocreate device nodes in /dev for those which don't have any. Set the default to NO for now. To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.114 -r1.115 src/etc/defaults/rc.conf cvs rdiff -u -r1.84 -r1.85 src/etc/rc.d/Makefile cvs rdiff -u -r0 -r1.1 src/etc/rc.d/devpubd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/etc/mi diff -u src/distrib/sets/lists/etc/mi:1.224 src/distrib/sets/lists/etc/mi:1.225 --- src/distrib/sets/lists/etc/mi:1.224 Fri May 27 09:28:41 2011 +++ src/distrib/sets/lists/etc/mi Tue Sep 6 21:32:30 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.224 2011/05/27 09:28:41 plunky Exp $ +# $NetBSD: mi,v 1.225 2011/09/06 21:32:30 riz Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked obsolete; they should just be removed from @@ -183,6 +183,7 @@ ./etc/rc.d/cgd etc-sys-rc ./etc/rc.d/cleartmpetc-sys-rc ./etc/rc.d/cron etc-cron-rc +./etc/rc.d/devpubdetc-sys-rc ./etc/rc.d/dhclientetc-dhclient-rc ./etc/rc.d/dhcpcdetc-dhcpcd-rc ./etc/rc.d/dhcpdetc-dhcpd-rc Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.114 src/etc/defaults/rc.conf:1.115 --- src/etc/defaults/rc.conf:1.114 Mon Aug 22 18:54:06 2011 +++ src/etc/defaults/rc.conf Tue Sep 6 21:32:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.114 2011/08/22 18:54:06 jym Exp $ +# $NetBSD: rc.conf,v 1.115 2011/09/06 21:32:29 riz Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -316,6 +316,7 @@ # Other daemons. # rwhod=NO rwhod_flags=-u _rwhod +devpubd=NO devpubd_flags= # autocreate nodes for new devs envsys=NO # Set /etc/envsys.conf preferences # Hardware daemons. Index: src/etc/rc.d/Makefile diff -u src/etc/rc.d/Makefile:1.84 src/etc/rc.d/Makefile:1.85 --- src/etc/rc.d/Makefile:1.84 Fri May 27 09:28:42 2011 +++ src/etc/rc.d/Makefile Tue Sep 6 21:32:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.84 2011/05/27 09:28:42 plunky Exp $ +# $NetBSD: Makefile,v 1.85 2011/09/06 21:32:29 riz Exp $ .include bsd.own.mk @@ -17,7 +17,7 @@ DAEMON DISKS LOGIN NETWORKING SERVERS \ accounting altqd amd apmd \ bluetooth bootconf.sh bootparams \ - ccd cgd cleartmp cron \ + ccd cgd cleartmp cron devpubd \ dhclient dhcpcd dhcpd dhcrelay dmesg downinterfaces envsys \ fsck fsck_root ftp_proxy ftpd \ gpio \ Added files: Index: src/etc/rc.d/devpubd diff -u /dev/null src/etc/rc.d/devpubd:1.1 --- /dev/null Tue Sep 6 21:32:30 2011 +++ src/etc/rc.d/devpubd Tue Sep 6 21:32:29 2011 @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $NetBSD: devpubd,v 1.1 2011/09/06 21:32:29 riz Exp $ +# + +# PROVIDE: devpubd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +$_rc_subr_loaded . /etc/rc.subr + +name=devpubd +rcvar=$name +command=/sbin/${name} + +load_rc_config $name +run_rc_command $1
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: jym Date: Tue Sep 6 21:39:30 UTC 2011 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: /etc/defaults/rc.conf can be modified at build time by getting additional arch-specific hooks appended to its end (currently: i386 and amd64). Handle this case in postinstall(8) by checking whether we are in $SOURCEMODE or not, and generate the correct rc.conf file on the fly in case we have to. Otherwise, postinstall(8) may install the default one obtained from a source directory that does not have the MD hooks appended to it. Problem reported by wiz@. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.124 src/usr.sbin/postinstall/postinstall:1.125 --- src/usr.sbin/postinstall/postinstall:1.124 Tue Sep 6 14:13:46 2011 +++ src/usr.sbin/postinstall/postinstall Tue Sep 6 21:39:30 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.124 2011/09/06 14:13:46 jym Exp $ +# $NetBSD: postinstall,v 1.125 2011/09/06 21:39:30 jym Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -747,9 +747,32 @@ op=$1 failed=0 + # Except for i386 and amd64, rc.conf(5) should be the same as the + # one obtained from a source directory + extra_scripts=rc.conf + if [ $MACHINE = i386 -o $MACHINE = amd64 ]; then + if $SOURCEMODE; then + extra_scripts= # clear + + # Generate and compare the correct rc.conf(5) file + mkdir ${SCRATCHDIR}/defaults + + cat ${SRC_DIR}/etc/defaults/rc.conf \ + ${SRC_DIR}/etc/etc.${MACHINE}/rc.conf.append \ + ${SCRATCHDIR}/defaults/rc.conf + + compare_dir ${op} ${SCRATCHDIR}/defaults \ + ${DEST_DIR}/etc/defaults \ + 444 \ + rc.conf + failed=$(( ${failed} + $? )) + fi + fi + compare_dir $op ${SRC_DIR}/etc/defaults ${DEST_DIR}/etc/defaults \ 444 \ - daily.conf monthly.conf rc.conf security.conf weekly.conf + daily.conf monthly.conf security.conf \ + weekly.conf ${extra_scripts} failed=$(( ${failed} + $? )) find_file_in_dirlist pf.boot.conf pf.boot.conf \
CVS commit: src/usr.bin/audio/common
Module Name:src Committed By: jmcneill Date: Tue Sep 6 22:41:54 UTC 2011 Modified Files: src/usr.bin/audio/common: audio.c Log Message: recognize AUDIO_ENCODING_AC3 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/audio/common/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/common/audio.c diff -u src/usr.bin/audio/common/audio.c:1.20 src/usr.bin/audio/common/audio.c:1.21 --- src/usr.bin/audio/common/audio.c:1.20 Sun Aug 28 01:17:47 2011 +++ src/usr.bin/audio/common/audio.c Tue Sep 6 22:41:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.20 2011/08/28 01:17:47 joerg Exp $ */ +/* $NetBSD: audio.c,v 1.21 2011/09/06 22:41:53 jmcneill Exp $ */ /* * Copyright (c) 1999 Matthew R. Green @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: audio.c,v 1.20 2011/08/28 01:17:47 joerg Exp $); +__RCSID($NetBSD: audio.c,v 1.21 2011/09/06 22:41:53 jmcneill Exp $); #endif @@ -104,6 +104,7 @@ { AudioEmpeg_l2_stream, AUDIO_ENCODING_MPEG_L2_STREAM }, { AudioEmpeg_l2_packets,AUDIO_ENCODING_MPEG_L2_PACKETS }, { AudioEmpeg_l2_system, AUDIO_ENCODING_MPEG_L2_SYSTEM }, + { AudioEac3, AUDIO_ENCODING_AC3 }, { NULL, -1 } };
CVS commit: src/sys/dev
Module Name:src Committed By: jmcneill Date: Wed Sep 7 00:11:58 UTC 2011 Modified Files: src/sys/dev: auconv.c Log Message: auconv_exact_match: don't check precision, validbits, or channels for AC3 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/auconv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/auconv.c diff -u src/sys/dev/auconv.c:1.23 src/sys/dev/auconv.c:1.24 --- src/sys/dev/auconv.c:1.23 Tue Sep 6 01:16:44 2011 +++ src/sys/dev/auconv.c Wed Sep 7 00:11:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: auconv.c,v 1.23 2011/09/06 01:16:44 jmcneill Exp $ */ +/* $NetBSD: auconv.c,v 1.24 2011/09/07 00:11:58 jmcneill Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: auconv.c,v 1.23 2011/09/06 01:16:44 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: auconv.c,v 1.24 2011/09/07 00:11:58 jmcneill Exp $); #include sys/types.h #include sys/audioio.h @@ -826,14 +826,16 @@ /** * XXX we need encoding-dependent check. * XXX Is to check precision/channels meaningful for - * MPEG/AC3 encodings? + * MPEG encodings? */ - if (formats[i].validbits != param-validbits) - continue; - if (formats[i].precision != param-precision) - continue; - if (formats[i].channels != param-channels) - continue; + if (enc != AUDIO_ENCODING_AC3) { + if (formats[i].validbits != param-validbits) +continue; + if (formats[i].precision != param-precision) +continue; + if (formats[i].channels != param-channels) +continue; + } if (!auconv_is_supported_rate(formats[i], param-sample_rate)) continue;
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Wed Sep 7 00:16:40 UTC 2011 Modified Files: src/sys/dev/pci/hdaudio: hdafg.c Log Message: hdafg_stream_connect: if connecting a non-PCM stream, make sure only converters that support non-PCM formats are configured to decode it To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hdaudio/hdafg.c diff -u src/sys/dev/pci/hdaudio/hdafg.c:1.4 src/sys/dev/pci/hdaudio/hdafg.c:1.5 --- src/sys/dev/pci/hdaudio/hdafg.c:1.4 Tue Sep 6 11:14:17 2011 +++ src/sys/dev/pci/hdaudio/hdafg.c Wed Sep 7 00:16:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.4 2011/09/06 11:14:17 jmcneill Exp $ */ +/* $NetBSD: hdafg.c,v 1.5 2011/09/07 00:16:40 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.4 2011/09/06 11:14:17 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.5 2011/09/07 00:16:40 jmcneill Exp $); #include sys/types.h #include sys/param.h @@ -3100,6 +3100,15 @@ if (as[i].as_activated == false) c = 0; + /* + * If a non-PCM stream is being connected, and the + * converter doesn't support non-PCM streams, then + * don't decode it + */ + if ((fmt HDAUDIO_FMT_TYPE_NONPCM) + !(w-w_p.stream_format COP_STREAM_FORMAT_AC3)) +c = 0; + hdaudio_command(sc-sc_codec, w-w_nid, CORB_SET_CONVERTER_FORMAT, fmt); if (w-w_p.aw_cap COP_AWCAP_DIGITAL) { @@ -3118,7 +3127,8 @@ } hdaudio_command(sc-sc_codec, w-w_nid, CORB_SET_CONVERTER_STREAM_CHANNEL, c); - chn += COP_AWCAP_CHANNEL_COUNT(w-w_p.aw_cap); + if (c != 0) +chn += COP_AWCAP_CHANNEL_COUNT(w-w_p.aw_cap); } for (j = 0; j HDAUDIO_MAXPINS; j++) {
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: macallan Date: Wed Sep 7 02:35:00 UTC 2011 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: support ioctl(POWER_EVENT_RECVDICT) - now powerd turns my gdium's backlight off when the lid is closed To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.39 -r1.40 src/sys/compat/netbsd32/netbsd32_ioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.60 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.61 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.60 Tue Aug 30 14:22:22 2011 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Wed Sep 7 02:35:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.60 2011/08/30 14:22:22 bouyer Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.61 2011/09/07 02:35:00 macallan Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.60 2011/08/30 14:22:22 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.61 2011/09/07 02:35:00 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -873,6 +873,9 @@ case SIOCS80211NWKEY32: IOCTL_STRUCT_CONV_TO(SIOCG80211NWKEY, ieee80211_nwkey); + case POWER_EVENT_RECVDICT32: + IOCTL_STRUCT_CONV_TO(POWER_EVENT_RECVDICT, plistref); + default: #ifdef NETBSD32_MD_IOCTL error = netbsd32_md_ioctl(fp, com, data32, l); Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.39 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.40 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.39 Tue Aug 30 14:22:22 2011 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Wed Sep 7 02:35:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.h,v 1.39 2011/08/30 14:22:22 bouyer Exp $ */ +/* $NetBSD: netbsd32_ioctl.h,v 1.40 2011/09/07 02:35:00 macallan Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -127,6 +127,9 @@ #define SIOCS80211NWKEY32 _IOW('i', 232, struct netbsd32_ieee80211_nwkey) #define SIOCG80211NWKEY32 _IOWR('i', 233, struct netbsd32_ieee80211_nwkey) +/* for powerd */ +#define POWER_EVENT_RECVDICT32 _IOWR('P', 1, struct netbsd32_plistref) + /* can wait! */ #if 0 dev/ccdvar.h:219:#define CCDIOCSET _IOWR('F', 16, struct ccd_ioctl) /* enable ccd */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Tue Sep 6 06:26:14 UTC 2011 Modified Files: src/sys/dev/pci: voyager.c voyagervar.h Log Message: add a function to mess with gpios which locks against the i2c stuff To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/voyager.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/voyagervar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/voyager
Module Name:src Committed By: macallan Date: Tue Sep 6 06:27:15 UTC 2011 Modified Files: src/sys/dev/pci/voyager: voyagerfb.c Log Message: add simple backlight control support, only on/off for now To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/voyager/voyagerfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 08:44:39 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: pmap.c Log Message: Remove old comment that is no longer relevant To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/usermode/usermode/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 09:37:41 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: pmap.c Log Message: Implement switch to have a sparse memory file or to fill it beforehand. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/usermode/usermode/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Tue Sep 6 09:38:27 UTC 2011 Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: Move sanity check before pmap since pmap and uvm can't be looking outside this box To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/usermode/usermode/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Sep 6 09:48:34 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: mdocml-1.11.7 out. To generate a diff of this commit: cvs rdiff -u -r1.863 -r1.864 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: jmcneill Date: Tue Sep 6 09:55:04 UTC 2011 Modified Files: src/sys/arch/usermode/dev: cpu.c src/sys/arch/usermode/usermode: trap.c urkelvisor.c Log Message: cpu_lwp_inkernel approach won't work, back to the drawing board To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/usermode/dev/cpu.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/usermode/usermode/trap.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/usermode/urkelvisor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8
Module Name:src Committed By: apb Date: Tue Sep 6 10:27:07 UTC 2011 Modified Files: src/share/man/man8: MAKEDEV.8 Log Message: regen for -u option and dtv device. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/man/man8/MAKEDEV.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Tue Sep 6 10:48:29 UTC 2011 Modified Files: src/sys/dev/pci/hdaudio: hdaudio.c hdaudioreg.h Log Message: For AC3, set the Non-PCM bit in the stream format structure used in the stream descriptors codec config. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/hdaudio/hdaudio.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/hdaudio/hdaudioreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 10:54:03 UTC 2011 Modified Files: src/etc: MAKEDEV.tmpl Log Message: In most case patterns, change foo*) to foo[0-9]*). There are also a few where foo*) changes to foo|foo[0-9]*) or some other slightly more complex pattern. This should prevent MAKEDEV foobar0 from accidentally matching the foo* pattern when it should really give an error, and it should make the order of the patterns less critical. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: jmcneill Date: Tue Sep 6 11:14:17 UTC 2011 Modified Files: src/sys/dev/pci/hdaudio: hdafg.c Log Message: Set the /AUDIO digital converter control bit for non-PCM streams To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: jmcneill Date: Tue Sep 6 11:22:43 UTC 2011 Modified Files: src/sys/kern: sys_process.c Log Message: PR# kern/45330: ptrace: signals can alter syscall return values process_stoptrace: defer signal processing to userret, ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/kern/sys_process.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 13:34:44 UTC 2011 Modified Files: src/etc: MAKEDEV.tmpl Log Message: MAKEDEV dkn should create only the dkn device, but it previously looped creating everything from dk0 to dkn. Reported by M. Levinson. Also add comments to cases where MAKEDEV loops creating multiple devices. To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: jym Date: Tue Sep 6 14:08:05 UTC 2011 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Check that $TGZMODE is true to deduce that the set is extracted from a .tgz instead of checking that $SRC_DIR != $SRC_ARG. These variables can be modified in different places, so it's less error prone. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: jym Date: Tue Sep 6 14:13:46 UTC 2011 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Set $SRC_DIR to its default value at the beginning of main() so that usage() can print the correct value even when called early. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: apb Date: Tue Sep 6 14:40:11 UTC 2011 Modified Files: src/etc/etc.alpha: MAKEDEV.conf src/etc/etc.amiga: MAKEDEV.conf src/etc/etc.amigappc: MAKEDEV.conf src/etc/etc.atari: MAKEDEV.conf src/etc/etc.emips: MAKEDEV.conf src/etc/etc.evbppc: MAKEDEV.conf src/etc/etc.hp300: MAKEDEV.conf src/etc/etc.mvme68k: MAKEDEV.conf src/etc/etc.ofppc: MAKEDEV.conf src/etc/etc.pmax: MAKEDEV.conf src/etc/etc.sandpoint: MAKEDEV.conf src/etc/etc.sparc: MAKEDEV.conf src/etc/etc.vax: MAKEDEV.conf src/etc/etc.x68k: MAKEDEV.conf Log Message: Change foo*) case patterns to foo[0-9]*) in MD MAKEDEV.conf files, as was done earlier today for the MI MAKEDEV.tmpl. There are also a few instances of slightly different changes in the case patterns. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/etc/etc.alpha/MAKEDEV.conf cvs rdiff -u -r1.10 -r1.11 src/etc/etc.amiga/MAKEDEV.conf cvs rdiff -u -r1.1 -r1.2 src/etc/etc.amigappc/MAKEDEV.conf cvs rdiff -u -r1.8 -r1.9 src/etc/etc.atari/MAKEDEV.conf cvs rdiff -u -r1.1 -r1.2 src/etc/etc.emips/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.evbppc/MAKEDEV.conf cvs rdiff -u -r1.12 -r1.13 src/etc/etc.hp300/MAKEDEV.conf cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mvme68k/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.ofppc/MAKEDEV.conf cvs rdiff -u -r1.7 -r1.8 src/etc/etc.pmax/MAKEDEV.conf cvs rdiff -u -r1.13 -r1.14 src/etc/etc.sandpoint/MAKEDEV.conf cvs rdiff -u -r1.13 -r1.14 src/etc/etc.sparc/MAKEDEV.conf cvs rdiff -u -r1.11 -r1.12 src/etc/etc.vax/MAKEDEV.conf cvs rdiff -u -r1.9 -r1.10 src/etc/etc.x68k/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Tue Sep 6 16:41:55 UTC 2011 Modified Files: src/sys/uvm: uvm_aobj.c uvm_vnode.c Log Message: Allocate color appropriate pages. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_aobj.c cvs rdiff -u -r1.96 -r1.97 src/sys/uvm/uvm_vnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/menuc
Module Name:src Committed By: joerg Date: Tue Sep 6 18:16:39 UTC 2011 Modified Files: src/usr.bin/menuc: mdb.c Log Message: Mark __menu_initerror as dead in the output. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/menuc/mdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/m4
Module Name:src Committed By: joerg Date: Tue Sep 6 18:16:01 UTC 2011 Modified Files: src/usr.bin/m4: extern.h gnum4.c main.c misc.c Log Message: Move usage and onintr to make them static. Add __dead as needed. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/m4/extern.h cvs rdiff -u -r1.7 -r1.8 src/usr.bin/m4/gnum4.c cvs rdiff -u -r1.40 -r1.41 src/usr.bin/m4/main.c cvs rdiff -u -r1.21 -r1.22 src/usr.bin/m4/misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/nfsstat
Module Name:src Committed By: joerg Date: Tue Sep 6 18:19:59 UTC 2011 Modified Files: src/usr.bin/nfsstat: nfsstat.c Log Message: ANSIfy, static + __dead. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/nfsstat/nfsstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/nohup
Module Name:src Committed By: joerg Date: Tue Sep 6 18:24:15 UTC 2011 Modified Files: src/usr.bin/nohup: nohup.c Log Message: ANSIfy + __dead To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/nohup/nohup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/paste
Module Name:src Committed By: joerg Date: Tue Sep 6 18:24:43 UTC 2011 Modified Files: src/usr.bin/paste: paste.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/paste/paste.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.