Re: CVS commit: src/sys/modules/lua
Marc Balmer wrote: Module Name: src Committed By: mbalmer Date: Wed Oct 16 19:44:58 UTC 2013 Added Files: src/sys/modules/lua: Makefile assert.h ctype.h errno.h infinite.lua inttypes.h limits.h locale.h lua.c luaconf.h luavar.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h test.lua Log Message: welcome lua(4), a devide driver that can create and control Lua states inside the kernel First of all, the code has been imported the wrong way as I stated in the previous email. You should properly import Lua 5.2 to sys/external/ and then apply local changes required to run it in kernel space. Second, lua device driver has a limited application. We need a generic lua module. Your lua device driver can then use it. For example, if I want to generate bpf code when a user sends a filter program to /dev/bpf* with Lua, I don't need a device driver. I need to open a regular lua_State, load sljit module, run bfjit.lua script and close the state afterwards. Also, I have a couple of small things. 1. Why do you use lua_ prefix for private functions? You get very close to lua names: lua_reader vs lua_Reader of lua_require vs luaL_requiref. 2. When you call lua_tostring() you often (or never???) don't check whether it returns NULL. You can easily panic the kernel when you try to print a table. Alex
Re: CVS commit: src/sys/modules/lua
Am 18.10.13 09:16, schrieb Alexander Nasonov: Marc Balmer wrote: Module Name: src Committed By:mbalmer Date:Wed Oct 16 19:44:58 UTC 2013 Added Files: src/sys/modules/lua: Makefile assert.h ctype.h errno.h infinite.lua inttypes.h limits.h locale.h lua.c luaconf.h luavar.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h test.lua Log Message: welcome lua(4), a devide driver that can create and control Lua states inside the kernel First of all, the code has been imported the wrong way as I stated in the previous email. You should properly import Lua 5.2 to sys/external/ and then apply local changes required to run it in kernel space. This was not an import of Lua. The Lua sources already are in the tree. When we are ready to move from Lua 5.1 to Lua 5.2, Lua 5.2 will be imported to sys/external, as I already mentioned. Second, lua device driver has a limited application. We need a generic lua module. Your lua device driver can then use it. This is generic. The device driver is only there to control Lua states, load code into it, provide an ioctl interface to userland applications. When code in the kernel needs a Lua state, it does not use the lua(4) driver to create one (but the lua kernel module must be loaded, of course). For example, if I want to generate bpf code when a user sends a filter program to /dev/bpf* with Lua, I don't need a device driver. I need to open a regular lua_State, load sljit module, run bfjit.lua script and close the state afterwards. Which you can already do. I will have an example for that later. The function prototypes ar in sys/sys/lua.h, btw. Also, I have a couple of small things. 1. Why do you use lua_ prefix for private functions? You get very close to lua names: lua_reader vs lua_Reader of lua_require vs luaL_requiref. It does not really matter as long as the names don't clash. 2. When you call lua_tostring() you often (or never???) don't check whether it returns NULL. You can easily panic the kernel when you try to print a table. I will look into this. The return values should be checked, for sure. Thanks for your feedback, Marc
re: CVS commit: src/external/mit/xorg/lib
Module Name: src Committed By: riz Date: Fri Oct 18 01:12:00 UTC 2013 Modified Files: src/external/mit/xorg/lib/libX11: Makefile.libx11 src/external/mit/xorg/lib/libXi: Makefile Log Message: Before testing the value of HAVE_GCC, test if it's defined. this probably should make sure to include bsd.own.mk then?
Re: CVS commit: src/sys/modules/lua
On Fri, Oct 18, 2013 at 08:16:32AM +0100, Alexander Nasonov wrote: First of all, the code has been imported the wrong way as I stated in the previous email. You should properly import Lua 5.2 to sys/external/ and then apply local changes required to run it in kernel space. I agree. Already for the sake of consistency and sanity; if one looks at at sys/modules, there is no existing code in it. On Fri, Oct 18, 2013 at 09:29:44AM +0200, Marc Balmer wrote: This was not an import of Lua. The Lua sources already are in the tree. When we are ready to move from Lua 5.1 to Lua 5.2, Lua 5.2 will be imported to sys/external, as I already mentioned. Why not do things right the first time? Sounds a like a recipe for a mess. - Jukka.
Re: CVS commit: src/sys/modules/lua
From: Marc Balmer mbal...@netbsd.org Date: Wed, 16 Oct 2013 19:44:58 + welcome lua(4), a devide driver that can create and control Lua states inside the kernel Did you get core approval for this? The public discussion is still ongoing, and still lacking in evidence, and there has been no public statement by core as far as I am aware, nor did any members of core I asked have any recollection of approving this. Please don't steamroll over public discussions like this.
Re: CVS commit: src/sys/modules/lua
Am 18.10.13 14:24, schrieb Taylor R Campbell: From: Marc Balmer mbal...@netbsd.org Date: Wed, 16 Oct 2013 19:44:58 + welcome lua(4), a devide driver that can create and control Lua states inside the kernel Did you get core approval for this? The public discussion is still ongoing, and still lacking in evidence, and there has been no public statement by core as far as I am aware, nor did any members of core I asked have any recollection of approving this. Please don't steamroll over public discussions like this. Just for the record, yes, I got core's approval.
Re: CVS commit: xsrc/external/mit/xdm/dist/xdm
In article 20131018163140.a391...@cvs.netbsd.org, Alan Barrett source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: xsrc Committed By: apb Date: Fri Oct 18 16:31:40 UTC 2013 Modified Files: xsrc/external/mit/xdm/dist/xdm: xdmauth.c Log Message: The result from strlen() has type size_t, so print it with %zd format. %zu is correct. christos
Re: CVS commit: src/sys/modules/lua
Marc Balmer wrote: This was not an import of Lua. The Lua sources already are in the tree. When we are ready to move from Lua 5.1 to Lua 5.2, Lua 5.2 will be imported to sys/external, as I already mentioned. In this case, kernel changes should have been added to 5.1 source and later ported to 5.2 code. For example, if I want to generate bpf code when a user sends a filter program to /dev/bpf* with Lua, I don't need a device driver. I need to open a regular lua_State, load sljit module, run bfjit.lua script and close the state afterwards. Which you can already do. I will have an example for that later. The function prototypes ar in sys/sys/lua.h, btw. ok It does not really matter as long as the names don't clash. It potentially makes upgrading to a newer version of Lua more difficult because your private names may conflict with the new version of Lua API. It also harder to read code. Alex
Re: CVS commit: src/sys/modules/lua
Am 18.10.13 19:13, schrieb Alexander Nasonov: Marc Balmer wrote: This was not an import of Lua. The Lua sources already are in the tree. When we are ready to move from Lua 5.1 to Lua 5.2, Lua 5.2 will be imported to sys/external, as I already mentioned. In this case, kernel changes should have been added to 5.1 source and later ported to 5.2 code. I don't understand you here. The Lua codes wher imported unaltered. For example, if I want to generate bpf code when a user sends a filter program to /dev/bpf* with Lua, I don't need a device driver. I need to open a regular lua_State, load sljit module, run bfjit.lua script and close the state afterwards. Which you can already do. I will have an example for that later. The function prototypes ar in sys/sys/lua.h, btw. ok It does not really matter as long as the names don't clash. It potentially makes upgrading to a newer version of Lua more difficult because your private names may conflict with the new version of Lua API. That would be spotted immediately when doing a test build. It also harder to read code. That is only a matter of taste, imo.
Re: CVS commit: xsrc/external/mit/xdm/dist/xdm
On Fri, 18 Oct 2013, Christos Zoulas wrote: The result from strlen() has type size_t, so print it with %zd format. %zu is correct. Fixed, thanks.
Re: CVS commit: xsrc/external/mit/xdm/dist/xdm
On Fri, Oct 18, 2013 at 03:59:38PM +, Alan Barrett wrote: Module Name: xsrc Committed By: apb Date: Fri Oct 18 15:59:38 UTC 2013 Modified Files: xsrc/external/mit/xdm/dist/xdm: dm.c Log Message: Print time_t values by casting to intmax_t and using %ji format. Wouldn't the right way be PRIdMAX from inttypes(3)? Anyways, for curiosity: is there actually a portable way across operating systems to deal with this? - Jukka.
Re: CVS commit: src/sys/modules/lua
On Fri, 18 Oct 2013, Marc Balmer wrote: Did you get core approval for this? The public discussion is still ongoing, and still lacking in evidence, and there has been no public statement by core as far as I am aware, nor did any members of core I asked have any recollection of approving this. Please don't steamroll over public discussions like this. Just for the record, yes, I got core's approval. Could you tell us approximately when you got that approval? It wasn't in the past two years while I have been a member of core. --apb (Alan Barrett)
Re: CVS commit: src/sys/modules/lua
apb@ wrote: On Fri, 18 Oct 2013, Marc Balmer wrote: Did you get core approval for this? The public discussion is still ongoing, and still lacking in evidence, and there has been no public statement by core as far as I am aware, nor did any members of core I asked have any recollection of approving this. Please don't steamroll over public discussions like this. Just for the record, yes, I got core's approval. Could you tell us approximately when you got that approval? It wasn't in the past two years while I have been a member of core. Lua was initially imported ~three years ago http://www.netbsd.org/changes/changes-6.0.html#lua%281%29 as a result of GSoC 2010: http://mail-index.netbsd.org/tech-kern/2010/10/05/msg008900.html http://netbsd-soc.sourceforge.net/projects/luakern/ IMO, importing lua is a good material for advocacy (there are so many mentions about it on Twitter/Facebook etc.) while it took too long.. --- Izumi Tsutsui
CVS commit: src/sys/modules/luacore
Module Name:src Committed By: mbalmer Date: Fri Oct 18 07:46:55 UTC 2013 Modified Files: src/sys/modules/luacore: luacore.c Log Message: check lua_tostring()'s return value To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/modules/luacore/luacore.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/modules/luacore/luacore.c diff -u src/sys/modules/luacore/luacore.c:1.2 src/sys/modules/luacore/luacore.c:1.3 --- src/sys/modules/luacore/luacore.c:1.2 Wed Oct 16 21:55:56 2013 +++ src/sys/modules/luacore/luacore.c Fri Oct 18 07:46:55 2013 @@ -1,7 +1,7 @@ -/* $NetBSD */ +/* $NetBSD: luacore.c,v 1.3 2013/10/18 07:46:55 mbalmer Exp $ */ /* - * Copyright (c) 2011, Marc Balmer mbal...@netbsd.org. + * Copyright (c) 2011, 2013 Marc Balmer mbal...@netbsd.org. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,56 +47,88 @@ MODULE(MODULE_CLASS_LUA_BINDING, luacore static int print(lua_State *L) { - printf(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + printf(%s, s); return 0; } static int print_nolog(lua_State *L) { - printf_nolog(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + printf_nolog(%s, s); return 0; } static int uprint(lua_State *L) { - uprintf(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + uprintf(%s, s); return 0; } static int core_aprint_normal(lua_State *L) { - aprint_normal(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + aprint_normal(%s, s); return 0; } static int core_aprint_naive(lua_State *L) { - aprint_naive(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + aprint_naive(%s, s); return 0; } static int core_aprint_verbose(lua_State *L) { - aprint_verbose(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + aprint_verbose(%s, s); return 0; } static int core_aprint_debug(lua_State *L) { - aprint_debug(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + aprint_debug(%s, s); return 0; } static int core_aprint_error(lua_State *L) { - aprint_error(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + aprint_error(%s, s); return 0; } @@ -112,7 +144,11 @@ core_aprint_get_error_count(lua_State *L static int core_panic(lua_State *L) { - panic(%s, lua_tostring(L, -1)); + const char *s; + + s = lua_tostring(L, -1); + if (s) + panic(%s, s); return 0; }
CVS commit: src/sys/modules/lua
Module Name:src Committed By: mbalmer Date: Fri Oct 18 07:49:06 UTC 2013 Modified Files: src/sys/modules/lua: lua.c Log Message: fix CVS marker and copyright year To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/lua/lua.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/modules/lua/lua.c diff -u src/sys/modules/lua/lua.c:1.1 src/sys/modules/lua/lua.c:1.2 --- src/sys/modules/lua/lua.c:1.1 Wed Oct 16 19:44:57 2013 +++ src/sys/modules/lua/lua.c Fri Oct 18 07:49:06 2013 @@ -1,7 +1,7 @@ -/* $NetBSD */ +/* $NetBSD: lua.c,v 1.2 2013/10/18 07:49:06 mbalmer Exp $ */ /* - * Copyright (c) 2011 by Marc Balmer mbal...@netbsd.org. + * Copyright (c) 2011, 2013 by Marc Balmer mbal...@netbsd.org. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
CVS commit: src/sys/conf
Module Name:src Committed By: mbalmer Date: Fri Oct 18 08:03:48 UTC 2013 Modified Files: src/sys/conf: Makefile.kern.inc majors Log Message: add a device-major for lua(4) To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.66 -r1.67 src/sys/conf/majors Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.162 src/sys/conf/Makefile.kern.inc:1.163 --- src/sys/conf/Makefile.kern.inc:1.162 Sat Sep 21 22:28:12 2013 +++ src/sys/conf/Makefile.kern.inc Fri Oct 18 08:03:48 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.162 2013/09/21 22:28:12 joerg Exp $ +# $NetBSD: Makefile.kern.inc,v 1.163 2013/10/18 08:03:48 mbalmer Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -56,7 +56,8 @@ S!= cd ../../../..; pwd ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ - -I$S -nostdinc + -I$S -nostdinc -I${S}/../external/mit/lua/dist/src \ + -I${S}/modules/lua CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 Index: src/sys/conf/majors diff -u src/sys/conf/majors:1.66 src/sys/conf/majors:1.67 --- src/sys/conf/majors:1.66 Mon Apr 22 16:49:14 2013 +++ src/sys/conf/majors Fri Oct 18 08:03:48 2013 @@ -1,4 +1,4 @@ -# $NetBSD: majors,v 1.66 2013/04/22 16:49:14 rkujawa Exp $ +# $NetBSD: majors,v 1.67 2013/10/18 08:03:48 mbalmer Exp $ # # Device majors for Machine-Independent drivers. # @@ -54,3 +54,4 @@ device-major mfi char 205 mfi device-major seeprom char 206 seeprom device-major dtracechar 207 dtrace device-major spiflash char 208 block 208 spiflash +device-major lua char 209lua
CVS commit: src/external/bsd/libelf/dist
Module Name:src Committed By: mrg Date: Fri Oct 18 08:04:47 UTC 2013 Modified Files: src/external/bsd/libelf/dist: elf_update.c libelf_phdr.c Log Message: remove some set-but unused variables. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libelf/dist/elf_update.c \ src/external/bsd/libelf/dist/libelf_phdr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libelf/dist/elf_update.c diff -u src/external/bsd/libelf/dist/elf_update.c:1.4 src/external/bsd/libelf/dist/elf_update.c:1.5 --- src/external/bsd/libelf/dist/elf_update.c:1.4 Mon Feb 22 10:48:32 2010 +++ src/external/bsd/libelf/dist/elf_update.c Fri Oct 18 08:04:47 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_update.c,v 1.4 2010/02/22 10:48:32 darran Exp $ */ +/* $NetBSD: elf_update.c,v 1.5 2013/10/18 08:04:47 mrg Exp $ */ /*- * Copyright (c) 2006-2008 Joseph Koshy @@ -357,7 +357,7 @@ _libelf_resync_sections(Elf *e, off_t rc static off_t _libelf_resync_elf(Elf *e) { - int ec, eh_class, eh_type; + int ec, eh_class; unsigned int eh_byteorder, eh_version; size_t align, fsz; size_t phnum, shnum; @@ -386,14 +386,12 @@ _libelf_resync_elf(Elf *e) eh_class = eh32-e_ident[EI_CLASS]; phoff= (uint64_t) eh32-e_phoff; shoff= (uint64_t) eh32-e_shoff; - eh_type = eh32-e_type; eh_version = eh32-e_version; } else { eh_byteorder = eh64-e_ident[EI_DATA]; eh_class = eh64-e_ident[EI_CLASS]; phoff= eh64-e_phoff; shoff= eh64-e_shoff; - eh_type = eh64-e_type; eh_version = eh64-e_version; } Index: src/external/bsd/libelf/dist/libelf_phdr.c diff -u src/external/bsd/libelf/dist/libelf_phdr.c:1.4 src/external/bsd/libelf/dist/libelf_phdr.c:1.5 --- src/external/bsd/libelf/dist/libelf_phdr.c:1.4 Mon Feb 22 10:48:33 2010 +++ src/external/bsd/libelf/dist/libelf_phdr.c Fri Oct 18 08:04:47 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: libelf_phdr.c,v 1.4 2010/02/22 10:48:33 darran Exp $ */ +/* $NetBSD: libelf_phdr.c,v 1.5 2013/10/18 08:04:47 mrg Exp $ */ /*- * Copyright (c) 2006 Joseph Koshy @@ -45,7 +45,7 @@ void * _libelf_getphdr(Elf *e, int ec) { - size_t phnum, phentsize; + size_t phnum; size_t fsz, msz; uint64_t phoff; Elf32_Ehdr *eh32; @@ -76,11 +76,9 @@ _libelf_getphdr(Elf *e, int ec) if (ec == ELFCLASS32) { eh32 = (Elf32_Ehdr *) ehdr; - phentsize = eh32-e_phentsize; phoff = (uint64_t) eh32-e_phoff; } else { eh64 = (Elf64_Ehdr *) ehdr; - phentsize = eh64-e_phentsize; phoff = (uint64_t) eh64-e_phoff; }
CVS commit: src/sys/conf
Module Name:src Committed By: mbalmer Date: Fri Oct 18 08:06:06 UTC 2013 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: revert previous To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.163 src/sys/conf/Makefile.kern.inc:1.164 --- src/sys/conf/Makefile.kern.inc:1.163 Fri Oct 18 08:03:48 2013 +++ src/sys/conf/Makefile.kern.inc Fri Oct 18 08:06:06 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.163 2013/10/18 08:03:48 mbalmer Exp $ +# $NetBSD: Makefile.kern.inc,v 1.164 2013/10/18 08:06:06 mbalmer Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -56,8 +56,7 @@ S!= cd ../../../..; pwd ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ - -I$S -nostdinc -I${S}/../external/mit/lua/dist/src \ - -I${S}/modules/lua + -I$S -nostdinc CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2
CVS commit: src/sys/dev/isa
Module Name:src Committed By: apb Date: Fri Oct 18 08:09:37 UTC 2013 Modified Files: src/sys/dev/isa: if_eg.c Log Message: Delete unused function static inline void egprintstat(u_char); To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/isa/if_eg.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/isa/if_eg.c diff -u src/sys/dev/isa/if_eg.c:1.85 src/sys/dev/isa/if_eg.c:1.86 --- src/sys/dev/isa/if_eg.c:1.85 Sat Oct 27 17:18:24 2012 +++ src/sys/dev/isa/if_eg.c Fri Oct 18 08:09:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.85 2012/10/27 17:18:24 chs Exp $ */ +/* $NetBSD: if_eg.c,v 1.86 2013/10/18 08:09:37 apb Exp $ */ /* * Copyright (c) 1993 Dean Huxley d...@fsa.ca @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_eg.c,v 1.85 2012/10/27 17:18:24 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: if_eg.c,v 1.86 2013/10/18 08:09:37 apb Exp $); #include opt_inet.h @@ -131,7 +131,6 @@ struct mbuf *egget(struct eg_softc *, vo void egstop(struct eg_softc *); static inline void egprintpcb(u_int8_t *); -static inline void egprintstat(u_char); static int egoutPCB(bus_space_tag_t, bus_space_handle_t, u_int8_t); static int egreadPCBstat(bus_space_tag_t, bus_space_handle_t, u_int8_t); static int egreadPCBready(bus_space_tag_t, bus_space_handle_t); @@ -151,20 +150,6 @@ egprintpcb(u_int8_t *pcb) DPRINTF((pcb[%2d] = %x\n, i, pcb[i])); } - -static inline void -egprintstat(u_char b) -{ - DPRINTF((%s %s %s %s %s %s %s\n, - (b EG_STAT_HCRE)?HCRE:, - (b EG_STAT_ACRF)?ACRF:, - (b EG_STAT_DIR )?DIR :, - (b EG_STAT_DONE)?DONE:, - (b EG_STAT_ASF3)?ASF3:, - (b EG_STAT_ASF2)?ASF2:, - (b EG_STAT_ASF1)?ASF1:)); -} - static int egoutPCB(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t b) {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: apb Date: Fri Oct 18 08:25:49 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Don't refer to uninitialised variable 'v' in case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE) in xhci_root_ctrl_start(). This code was apparently pasted from the ehci driver. OK nick. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/xhci.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/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.1 src/sys/dev/usb/xhci.c:1.2 --- src/sys/dev/usb/xhci.c:1.1 Sat Sep 14 00:40:31 2013 +++ src/sys/dev/usb/xhci.c Fri Oct 18 08:25:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.1 2013/09/14 00:40:31 jakllsch Exp $ */ +/* $NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.1 2013/09/14 00:40:31 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $); #include sys/param.h #include sys/systm.h @@ -2207,7 +2207,7 @@ xhci_root_ctrl_start(usbd_xfer_handle xf hubd.bNbrPorts = sc-sc_hs_port_count; USETW(hubd.wHubCharacteristics, UHD_PWR_NO_SWITCH); hubd.bPwrOn2PwrGood = 200; - for (i = 0, l = sc-sc_maxports; l 0; i++, l -= 8, v = 8) + for (i = 0, l = sc-sc_maxports; l 0; i++, l -= 8) hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */ hubd.bDescLength = USB_HUB_DESCRIPTOR_SIZE + i; l = min(len, hubd.bDescLength); totlen = l;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Oct 18 08:35:24 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Wrap some long lines. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/xhci.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/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.2 src/sys/dev/usb/xhci.c:1.3 --- src/sys/dev/usb/xhci.c:1.2 Fri Oct 18 08:25:49 2013 +++ src/sys/dev/usb/xhci.c Fri Oct 18 08:35:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $ */ +/* $NetBSD: xhci.c,v 1.3 2013/10/18 08:35:24 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.3 2013/10/18 08:35:24 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1488,7 +1488,8 @@ xhci_new_device(device_t parent, usbd_bu if (err) return err; USETW(dev-def_ep_desc.wMaxPacketSize, dd-bMaxPacketSize); - device_printf(sc-sc_dev, %s bMaxPacketSize %u\n, __func__, dd-bMaxPacketSize); + device_printf(sc-sc_dev, %s bMaxPacketSize %u\n, __func__, + dd-bMaxPacketSize); xhci_update_ep0_mps(sc, xs, dd-bMaxPacketSize); err = usbd_reload_device_desc(dev); if (err) @@ -2208,7 +2209,8 @@ xhci_root_ctrl_start(usbd_xfer_handle xf USETW(hubd.wHubCharacteristics, UHD_PWR_NO_SWITCH); hubd.bPwrOn2PwrGood = 200; for (i = 0, l = sc-sc_maxports; l 0; i++, l -= 8) - hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */ hubd.bDescLength = USB_HUB_DESCRIPTOR_SIZE + i; + hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */ + hubd.bDescLength = USB_HUB_DESCRIPTOR_SIZE + i; l = min(len, hubd.bDescLength); totlen = l; memcpy(buf, hubd, l);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: apb Date: Fri Oct 18 08:39:22 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Wrap several unused static inline functions with #if 0. I didn't delete them because I suspect that they might be needed later. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/xhci.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/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.3 src/sys/dev/usb/xhci.c:1.4 --- src/sys/dev/usb/xhci.c:1.3 Fri Oct 18 08:35:24 2013 +++ src/sys/dev/usb/xhci.c Fri Oct 18 08:39:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.3 2013/10/18 08:35:24 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.4 2013/10/18 08:39:22 apb Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.3 2013/10/18 08:35:24 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.4 2013/10/18 08:39:22 apb Exp $); #include sys/param.h #include sys/systm.h @@ -215,12 +215,14 @@ xhci_read_4(const struct xhci_softc * co return bus_space_read_4(sc-sc_iot, sc-sc_ioh, offset); } +#if 0 /* unused */ static inline void xhci_write_4(const struct xhci_softc * const sc, bus_size_t offset, uint32_t value) { bus_space_write_4(sc-sc_iot, sc-sc_ioh, offset, value); } +#endif /* unused */ static inline uint32_t xhci_cap_read_4(const struct xhci_softc * const sc, bus_size_t offset) @@ -241,6 +243,7 @@ xhci_op_write_4(const struct xhci_softc bus_space_write_4(sc-sc_iot, sc-sc_obh, offset, value); } +#if 0 /* unused */ static inline uint64_t xhci_op_read_8(const struct xhci_softc * const sc, bus_size_t offset) { @@ -260,6 +263,7 @@ xhci_op_read_8(const struct xhci_softc * return value; } +#endif /* unused */ static inline void xhci_op_write_8(const struct xhci_softc * const sc, bus_size_t offset, @@ -292,6 +296,7 @@ xhci_rt_write_4(const struct xhci_softc bus_space_write_4(sc-sc_iot, sc-sc_rbh, offset, value); } +#if 0 /* unused */ static inline uint64_t xhci_rt_read_8(const struct xhci_softc * const sc, bus_size_t offset) { @@ -311,6 +316,7 @@ xhci_rt_read_8(const struct xhci_softc * return value; } +#endif /* unused */ static inline void xhci_rt_write_8(const struct xhci_softc * const sc, bus_size_t offset, @@ -330,11 +336,13 @@ xhci_rt_write_8(const struct xhci_softc } } +#if 0 /* unused */ static inline uint32_t xhci_db_read_4(const struct xhci_softc * const sc, bus_size_t offset) { return bus_space_read_4(sc-sc_iot, sc-sc_dbh, offset); } +#endif /* unused */ static inline void xhci_db_write_4(const struct xhci_softc * const sc, bus_size_t offset, @@ -399,12 +407,14 @@ xhci_slot_get_dcv(struct xhci_softc * co return KERNADDR(xs-xs_dc_dma, sc-sc_ctxsz * dci); } +#if 0 /* unused */ static inline bus_addr_t xhci_slot_get_dcp(struct xhci_softc * const sc, struct xhci_slot * const xs, const u_int dci) { return DMAADDR(xs-xs_dc_dma, sc-sc_ctxsz * dci); } +#endif /* unused */ static inline void * xhci_slot_get_icv(struct xhci_softc * const sc, struct xhci_slot * const xs,
CVS commit: src
Module Name:src Committed By: kefren Date: Fri Oct 18 10:49:19 UTC 2013 Modified Files: src/distrib/sets/lists/man: mi src/usr.sbin/ldpd: Makefile Added Files: src/usr.sbin/ldpd: ldpd.conf.5 Log Message: Attempt to write a manpage for ldpd.conf To generate a diff of this commit: cvs rdiff -u -r1.1438 -r1.1439 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/ldpd/ldpd.conf.5 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.1438 src/distrib/sets/lists/man/mi:1.1439 --- src/distrib/sets/lists/man/mi:1.1438 Tue Oct 15 19:20:19 2013 +++ src/distrib/sets/lists/man/mi Fri Oct 18 10:49:19 2013 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1438 2013/10/15 19:20:19 jdc Exp $ +# $NetBSD: mi,v 1.1439 2013/10/18 10:49:19 kefren Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2037,6 +2037,7 @@ ./usr/share/man/cat5/lastlogx.0 man-sys-catman .cat ./usr/share/man/cat5/ld.so.conf.0 man-sys-catman .cat ./usr/share/man/cat5/ldap_table.0 man-postfix-catman postfix,.cat +./usr/share/man/cat5/ldpd.conf.0 man-router-catman .cat ./usr/share/man/cat5/link.0 man-sys-catman .cat ./usr/share/man/cat5/lkm.conf.0 man-obsolete obsolete ./usr/share/man/cat5/locale.alias.0 man-sys-catman .cat @@ -4929,6 +4930,7 @@ ./usr/share/man/html5/lastlogx.html man-sys-htmlman html ./usr/share/man/html5/ld.so.conf.html man-sys-htmlman html ./usr/share/man/html5/ldap_table.html man-postfix-htmlman postfix,html +./usr/share/man/html5/ldpd.conf.html man-router-htmlman html ./usr/share/man/html5/link.html man-sys-htmlman html ./usr/share/man/html5/lkm.conf.html man-obsolete obsolete ./usr/share/man/html5/locale.alias.html man-sys-htmlman html @@ -7767,6 +7769,7 @@ ./usr/share/man/man5/lastlogx.5 man-sys-man .man ./usr/share/man/man5/ld.so.conf.5 man-sys-man .man ./usr/share/man/man5/ldap_table.5 man-postfix-man postfix,.man +./usr/share/man/man5/ldpd.conf.5 man-router-man .man ./usr/share/man/man5/link.5 man-sys-man .man ./usr/share/man/man5/lkm.conf.5 man-obsolete obsolete ./usr/share/man/man5/locale.alias.5 man-sys-man .man Index: src/usr.sbin/ldpd/Makefile diff -u src/usr.sbin/ldpd/Makefile:1.4 src/usr.sbin/ldpd/Makefile:1.5 --- src/usr.sbin/ldpd/Makefile:1.4 Mon Nov 12 18:39:00 2012 +++ src/usr.sbin/ldpd/Makefile Fri Oct 18 10:49:19 2013 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2012/11/12 18:39:00 kefren Exp $ +# $NetBSD: Makefile,v 1.5 2013/10/18 10:49:19 kefren Exp $ .include bsd.own.mk PROG= ldpd -MAN=ldpd.8 +MAN=ldpd.8 ldpd.conf.5 SRCS= conffile.c \ fsm.c \ Added files: Index: src/usr.sbin/ldpd/ldpd.conf.5 diff -u /dev/null src/usr.sbin/ldpd/ldpd.conf.5:1.1 --- /dev/null Fri Oct 18 10:49:19 2013 +++ src/usr.sbin/ldpd/ldpd.conf.5 Fri Oct 18 10:49:19 2013 @@ -0,0 +1,127 @@ +.\ $NetBSD: ldpd.conf.5,v 1.1 2013/10/18 10:49:19 kefren Exp $ +.\ +.\ Copyright (c) 2013 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\ POSSIBILITY OF SUCH DAMAGE. +.\ +.Dd October 18, 2013 +.Dt LDPD.CONF 5 +.Os +.Sh NAME +.Nm ldpd.conf +.Nd ldpd configuration file +.Sh SYNOPSIS +.Nm +.Sh DESCRIPTION +The +.Nm +file defines the +.Xr ldpd 8 +initial setup and may contain information about LDP identificator, network, +neighbour and interface parameters. +Blank lines are allowed and comments lines should start with +.Sq # . +Non block lines should end with a semicolon. +.Sh FILES +.Bl -tag -width /etc/ldpd.conf
CVS commit: src/etc
Module Name:src Committed By: njoly Date: Fri Oct 18 11:42:59 UTC 2013 Modified Files: src/etc: Makefile.params Log Message: Add HAVE_LLVM/HAVE_PCC, MKLLVM/MKPCC to RELEASEVARS. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/etc/Makefile.params Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile.params diff -u src/etc/Makefile.params:1.2 src/etc/Makefile.params:1.3 --- src/etc/Makefile.params:1.2 Sat Mar 9 14:12:08 2013 +++ src/etc/Makefile.params Fri Oct 18 11:42:59 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.params,v 1.2 2013/03/09 14:12:08 jmmv Exp $ +# $NetBSD: Makefile.params,v 1.3 2013/10/18 11:42:59 njoly Exp $ # # Makefile fragment for printing build parameters. # @@ -35,7 +35,7 @@ RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID \ DESTDIR DISTRIBVER EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \ - INSTALLWORLDDIR \ + HAVE_LLVM HAVE_PCC INSTALLWORLDDIR \ KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \ MACHINE MACHINE_ARCH MAKE MAKECONF MAKEFLAGS \ MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \ @@ -44,9 +44,10 @@ RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID MKDEBUG MKDEBUGLIB MKDOC MKDTRACE MKDYNAMICROOT \ MKGCC MKGCCCMDS MKGDB \ MKHESIOD MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \ - MKKERBEROS MKKYUA MKLDAP MKLINKLIB MKLINT \ + MKKERBEROS MKKYUA MKLDAP MKLINKLIB MKLINT MKLLVM \ MKMAN MKMANZ MKMDNS MKNLS MKNPF MKOBJ MKOBJDIRS \ - MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ + MKPAM MKPCC MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX \ + MKPROFILE \ MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \ MKUNPRIVED MKUPDATE MKX11 MKYP \ NBUILDJOBS NETBSDSRCDIR \
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: wiz Date: Fri Oct 18 12:29:52 UTC 2013 Modified Files: src/usr.sbin/ldpd: ldpd.conf.5 Log Message: Sort SEE ALSO. Grammar consistency. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/ldpd/ldpd.conf.5 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/ldpd/ldpd.conf.5 diff -u src/usr.sbin/ldpd/ldpd.conf.5:1.1 src/usr.sbin/ldpd/ldpd.conf.5:1.2 --- src/usr.sbin/ldpd/ldpd.conf.5:1.1 Fri Oct 18 10:49:19 2013 +++ src/usr.sbin/ldpd/ldpd.conf.5 Fri Oct 18 12:29:52 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: ldpd.conf.5,v 1.1 2013/10/18 10:49:19 kefren Exp $ +.\ $NetBSD: ldpd.conf.5,v 1.2 2013/10/18 12:29:52 wiz Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -79,7 +79,7 @@ will try to tag also the default route ( Interface block supports the following parameters .Bl -tag -width transport-address .It Li passive -Doesn't send hellos on interface +Don't send hellos on interface .It Li transport-address Transport INET4 address advertised in hellos sent on the mentioned interface .El @@ -87,7 +87,7 @@ Transport INET4 address advertised in he Neighbour block supports the following parameters .Bl -tag -width authenticate .It Li authenticate -Authenticates peer using TCP MD5 signature - needs options TCP_SIGNATURE. +Authenticate peer using TCP MD5 signature - needs options TCP_SIGNATURE. Default: off .El .Sh EXAMPLES @@ -118,8 +118,8 @@ neighbour 192.168.2.1 { } .Ed .Sh SEE ALSO -.Xr ldpd 8 , .Xr mpls 4 , +.Xr ldpd 8 .Sh HISTORY Support for .Nm
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Fri Oct 18 14:14:14 UTC 2013 Modified Files: src/usr.sbin/ldpd: conffile.c Log Message: sync behaviour with man page: accept spaces, empty lines and comments To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ldpd/conffile.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.sbin/ldpd/conffile.c diff -u src/usr.sbin/ldpd/conffile.c:1.7 src/usr.sbin/ldpd/conffile.c:1.8 --- src/usr.sbin/ldpd/conffile.c:1.7 Thu Oct 17 18:10:23 2013 +++ src/usr.sbin/ldpd/conffile.c Fri Oct 18 14:14:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: conffile.c,v 1.7 2013/10/17 18:10:23 kefren Exp $ */ +/* $NetBSD: conffile.c,v 1.8 2013/10/18 14:14:14 kefren Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include arpa/inet.h #include netinet/in.h - +#include sys/mman.h #include ctype.h #include fcntl.h #include stdlib.h @@ -44,13 +44,15 @@ #define NextCommand(x) strsep(x, ) #define LINEMAXSIZE 1024 +char *mapped, *nextline; +size_t mapsize; + extern int ldp_hello_time, ldp_keepalive_time, ldp_holddown_time, command_port, min_label, max_label, no_default_route, loop_detection; -int confh; struct in_addr conf_ldp_id; static int conf_dispatch(char*); -static int conf_readline(char*, size_t); +static char * conf_getlinelimit(void); static int checkeol(char*); static int Fhellotime(char*); static int Fport(char*); @@ -108,52 +110,59 @@ static int parseline; int conf_parsefile(const char *fname) { - char buf[LINEMAXSIZE + 1]; + char line[LINEMAXSIZE+1]; + struct stat fs; SLIST_INIT(conei_head); SLIST_INIT(coifs_head); conf_ldp_id.s_addr = 0; - confh = open(fname, O_RDONLY, 0); + int confh = open(fname, O_RDONLY, 0); - if (confh == -1) + if (confh == -1 || fstat(confh, fs) == -1 || + (mapped = mmap(NULL, fs.st_size, PROT_READ, MAP_SHARED, confh, 0)) + == MAP_FAILED) return E_CONF_IO; - for (parseline = 1; conf_readline(buf, sizeof(buf)) = 0; parseline++) - if (conf_dispatch(buf) != 0) { - close(confh); - return parseline; - } - + mapsize = fs.st_size; + nextline = mapped; + for (parseline = 1; ; parseline++) { + char *prev = nextline; + if ((nextline = conf_getlinelimit()) == NULL) + break; + while (isspace((int)*prev) != 0 prev nextline) + prev++; + if (nextline - prev 2) + continue; + else if (nextline - prev LINEMAXSIZE) + goto parerr; + memcpy(line, prev, nextline - prev); + if (line[0] == '#') + continue; + else + line[nextline - prev] = '\0'; + if (conf_dispatch(line) != 0) + goto parerr; + } + munmap(mapped, mapsize); close(confh); return 0; +parerr: + munmap(mapped, mapsize); + close(confh); + return parseline; } -/* - * Reads a line from config file - */ -int -conf_readline(char *buf, size_t bufsize) +char * +conf_getlinelimit(void) { - size_t i; + char *p = nextline; - for (i = 0; i bufsize; i++) { - if (read(confh, buf[i], 1) != 1) { - if (i == 0) -return E_CONF_IO; - break; - } - if (buf[i] == '\n') - break; - if (i == 0 isspace((unsigned char)buf[i]) != 0) { - i--; - continue; - } - } - if (i == bufsize) - return E_CONF_MEM; - buf[i] = '\0'; - return i; + if (nextline mapped || (size_t)(nextline - mapped) = mapsize) + return NULL; + + for (p = nextline; *p != '\n' (size_t)(p - mapped) mapsize; p++); + return p + 1; } /* @@ -179,7 +188,7 @@ conf_dispatch(char *line) else if (matched 1) return E_CONF_AMBIGUOUS; - if (checkeol(nline) != 0) + if (nline == NULL || checkeol(nline) != 0) return E_CONF_PARAM; return main_commands[last_match].func(nline); } @@ -193,6 +202,10 @@ int checkeol(char *line) { size_t len = strlen(line); + if (len 0 line[len - 1] == '\n') { + line[len - 1] = '\0'; + len--; + } if (len 0 line[len - 1] == ';') { line[len - 1] = '\0'; return 0; @@ -289,7 +302,7 @@ Fneighbour(char *line) char *peer; struct conf_neighbour *nei; struct in_addr ad; - char buf[1024]; + char buf[LINEMAXSIZE]; peer = NextCommand(line); if (inet_pton(AF_INET, peer, ad) != 1) @@ -301,10 +314,21 @@ Fneighbour(char *line) nei-address.s_addr = ad.s_addr; SLIST_INSERT_HEAD(conei_head, nei, neilist); - while (conf_readline(buf, sizeof(buf)) = 0) { + for ( ; ; ) { + char *prev = nextline; parseline++; - if (buf[0] == '}') - return 0; + nextline = conf_getlinelimit(); + if (nextline == NULL || (size_t)(nextline - prev) LINEMAXSIZE) + return -1; + while (isspace((int)*prev) != 0 prev nextline) + prev++; + memcpy(buf, prev, nextline - prev); + if (nextline - prev 2 || buf[0] == '#') + continue; + else if (buf[0] == '}') + break; + else + buf[nextline - prev] = '\0'; if (Gneighbour(nei, buf) == -1) return -1; } @@ -352,7 +376,7 @@ Finterface(char *line) { char *ifname; struct conf_interface *conf_if = calloc(1,
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: christos Date: Fri Oct 18 15:15:22 UTC 2013 Modified Files: src/sys/ufs/lfs: lfs_vnops.c ulfs_bswap.h ulfs_quota2.c Log Message: use __USE() in the right place, instead of (void)var. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/lfs/ulfs_bswap.h cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/lfs/ulfs_quota2.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/ufs/lfs/lfs_vnops.c diff -u src/sys/ufs/lfs/lfs_vnops.c:1.258 src/sys/ufs/lfs/lfs_vnops.c:1.259 --- src/sys/ufs/lfs/lfs_vnops.c:1.258 Thu Oct 17 17:01:08 2013 +++ src/sys/ufs/lfs/lfs_vnops.c Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vnops.c,v 1.258 2013/10/17 21:01:08 christos Exp $ */ +/* $NetBSD: lfs_vnops.c,v 1.259 2013/10/18 15:15:22 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lfs_vnops.c,v 1.258 2013/10/17 21:01:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: lfs_vnops.c,v 1.259 2013/10/18 15:15:22 christos Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -621,7 +621,6 @@ lfs_mknod(void *v) if (vap-va_rdev != VNOVAL) { struct ulfsmount *ump = ip-i_ump; struct lfs *fs = ip-i_lfs; - (void)fs; /* temporary: needed when LFS_EI is off */ /* * Want to be able to use this to make badblock * inodes, so don't truncate the dev number. Index: src/sys/ufs/lfs/ulfs_bswap.h diff -u src/sys/ufs/lfs/ulfs_bswap.h:1.5 src/sys/ufs/lfs/ulfs_bswap.h:1.6 --- src/sys/ufs/lfs/ulfs_bswap.h:1.5 Thu Oct 17 17:01:08 2013 +++ src/sys/ufs/lfs/ulfs_bswap.h Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_bswap.h,v 1.5 2013/10/17 21:01:08 christos Exp $ */ +/* $NetBSD: ulfs_bswap.h,v 1.6 2013/10/18 15:15:22 christos Exp $ */ /* from NetBSD: ufs_bswap.h,v 1.19 2009/10/19 18:41:17 bouyer Exp */ /* @@ -41,9 +41,9 @@ #define ULFS_FSNEEDSWAP(fs) ((fs)-fs_flags FS_SWAPPED) #define ULFS_IPNEEDSWAP(ip) ULFS_MPNEEDSWAP((ip)-i_lfs) #else -#define ULFS_MPNEEDSWAP(ump) (0) -#define ULFS_FSNEEDSWAP(fs) (0) -#define ULFS_IPNEEDSWAP(ip) (0) +#define ULFS_MPNEEDSWAP(ump) (__USE(ump), 0) +#define ULFS_FSNEEDSWAP(fs) (__USE(fs), 0) +#define ULFS_IPNEEDSWAP(ip) (__USE(ip), 0) #endif #if !defined(_KERNEL) || defined(LFS_EI) Index: src/sys/ufs/lfs/ulfs_quota2.c diff -u src/sys/ufs/lfs/ulfs_quota2.c:1.13 src/sys/ufs/lfs/ulfs_quota2.c:1.14 --- src/sys/ufs/lfs/ulfs_quota2.c:1.13 Mon Jul 29 12:40:46 2013 +++ src/sys/ufs/lfs/ulfs_quota2.c Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_quota2.c,v 1.13 2013/07/29 16:40:46 dholland Exp $ */ +/* $NetBSD: ulfs_quota2.c,v 1.14 2013/10/18 15:15:22 christos Exp $ */ /* from NetBSD: ufs_quota2.c,v 1.35 2012/09/27 07:47:56 bouyer Exp */ /* from NetBSD: ffs_quota2.c,v 1.4 2011/06/12 03:36:00 rmind Exp */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ulfs_quota2.c,v 1.13 2013/07/29 16:40:46 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ulfs_quota2.c,v 1.14 2013/10/18 15:15:22 christos Exp $); #include sys/buf.h #include sys/param.h @@ -142,10 +142,8 @@ static int getq2h(struct ulfsmount *ump, int type, struct buf **bpp, struct quota2_header **q2hp, int flags) { -#ifdef LFS_EI struct lfs *fs = ump-um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); -#endif int error; struct buf *bp; struct quota2_header *q2h; @@ -199,10 +197,8 @@ quota2_walk_list(struct ulfsmount *ump, uint64_t *offp, int flags, void *a, int (*func)(struct ulfsmount *, uint64_t *, struct quota2_entry *, uint64_t, void *)) { -#ifdef LFS_EI struct lfs *fs = ump-um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); -#endif daddr_t off = ulfs_rw64(*offp, needswap); struct buf *bp, *obp = hbp; int ret = 0, ret2 = 0; @@ -308,8 +304,6 @@ quota2_q2ealloc(struct ulfsmount *ump, i struct lfs *fs = ump-um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); - (void)fs; /* temporary: needed when LFS_EI is off */ - KASSERT(mutex_owned(dq-dq_interlock)); KASSERT(mutex_owned(lfs_dqlock)); error = getq2h(ump, type, hbp, q2h, B_MODIFY); @@ -459,8 +453,6 @@ quota2_check(struct inode *ip, int vtype const int needswap = ULFS_MPNEEDSWAP(fs); int i; - (void)fs; /* temporary: needed when LFS_EI is off */ - if ((error = getinoquota2(ip, change 0, change != 0, bp, q2e)) != 0) return error; if (change == 0) { @@ -597,8 +589,6 @@ lfsquota2_handle_cmd_put(struct ulfsmoun struct lfs *fs = ump-um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); - (void)fs; /* temporary: needed when LFS_EI is off */ - /* make sure we can index by the fs-independent idtype */ CTASSERT(QUOTA_IDTYPE_USER == ULFS_USRQUOTA); CTASSERT(QUOTA_IDTYPE_GROUP == ULFS_GRPQUOTA); @@ -804,8 +794,6 @@
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jdc Date: Fri Oct 18 15:16:08 UTC 2013 Modified Files: src/sys/dev/i2c: lm87.c Log Message: Remove extraneous printf(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/lm87.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/i2c/lm87.c diff -u src/sys/dev/i2c/lm87.c:1.1 src/sys/dev/i2c/lm87.c:1.2 --- src/sys/dev/i2c/lm87.c:1.1 Tue Oct 15 19:12:41 2013 +++ src/sys/dev/i2c/lm87.c Fri Oct 18 15:16:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lm87.c,v 1.1 2013/10/15 19:12:41 jdc Exp $ */ +/* $NetBSD: lm87.c,v 1.2 2013/10/18 15:16:08 jdc Exp $ */ /* $OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $ */ /* @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lm87.c,v 1.1 2013/10/15 19:12:41 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: lm87.c,v 1.2 2013/10/18 15:16:08 jdc Exp $); #include sys/param.h #include sys/systm.h @@ -219,7 +219,6 @@ lmenv_attach(device_t parent, device_t s printf(, cannot write Configuration Register 1\n); return; } - printf(, starting scan); } iic_release_bus(sc-sc_tag, 0);
CVS commit: xsrc/external/mit/xdm/dist/xdm
Module Name:xsrc Committed By: apb Date: Fri Oct 18 15:59:38 UTC 2013 Modified Files: xsrc/external/mit/xdm/dist/xdm: dm.c Log Message: Print time_t values by casting to intmax_t and using %ji format. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/xdm/dm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xdm/dist/xdm/dm.c diff -u xsrc/external/mit/xdm/dist/xdm/dm.c:1.2 xsrc/external/mit/xdm/dist/xdm/dm.c:1.3 --- xsrc/external/mit/xdm/dist/xdm/dm.c:1.2 Fri Jun 28 17:25:47 2013 +++ xsrc/external/mit/xdm/dist/xdm/dm.c Fri Oct 18 15:59:38 2013 @@ -536,7 +536,8 @@ WaitForChild (void) time(now); crash = d-lastReserv ((now - d-lastReserv) XDM_BROKEN_INTERVAL); - Debug(time %li %li try %i of %i%s\n, now, d-lastReserv, + Debug(time %ji %ji try %i of %i%s\n, + (intmax_t)now, (intmax_t)d-lastReserv, d-reservTries, d-reservAttempts, crash ? crash : );
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Fri Oct 18 16:06:52 UTC 2013 Modified Files: src/share/mk: bsd.lib.mk Log Message: change if HAVE_GCC is defined To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.341 src/share/mk/bsd.lib.mk:1.342 --- src/share/mk/bsd.lib.mk:1.341 Mon Oct 14 12:00:16 2013 +++ src/share/mk/bsd.lib.mk Fri Oct 18 12:06:52 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.341 2013/10/14 16:00:16 joerg Exp $ +# $NetBSD: bsd.lib.mk,v 1.342 2013/10/18 16:06:52 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include bsd.init.mk @@ -599,7 +599,7 @@ LDADD+= -lgcc LIBCC:= ${CXX} . if ${MKLIBCXX} == yes LIBDPLIBS+= c++ ${.CURDIR}/../../../../../external/bsd/libc++/lib -. elif ${HAVE_GCC} == 4 +. elif defined(HAVE_GCC) ${HAVE_GCC} == 4 LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4 . else LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3
CVS commit: xsrc/external/mit/xdm/dist/xdm
Module Name:xsrc Committed By: apb Date: Fri Oct 18 16:31:40 UTC 2013 Modified Files: xsrc/external/mit/xdm/dist/xdm: xdmauth.c Log Message: The result from strlen() has type size_t, so print it with %zd format. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/xdm/xdmauth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xdm/dist/xdm/xdmauth.c diff -u xsrc/external/mit/xdm/dist/xdm/xdmauth.c:1.2 xsrc/external/mit/xdm/dist/xdm/xdmauth.c:1.3 --- xsrc/external/mit/xdm/dist/xdm/xdmauth.c:1.2 Fri Jun 28 17:25:47 2013 +++ xsrc/external/mit/xdm/dist/xdm/xdmauth.c Fri Oct 18 16:31:40 2013 @@ -234,7 +234,7 @@ XdmGetKey(struct protoDisplay *pdpy, ARR if (line[0] == '#' || sscanf (line, %s %s, id, key) != 2) continue; bzero(line, sizeof(line)); - Debug (Key entry for \%s\ %ld bytes\n, id, strlen(key)); + Debug (Key entry for \%s\ %zd bytes\n, id, strlen(key)); if (strlen (id) == displayID-length !strncmp (id, (char *)displayID-data, displayID-length)) {
CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src
Module Name:xsrc Committed By: apb Date: Fri Oct 18 16:58:50 UTC 2013 Modified Files: xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c Log Message: CARD32 might be unsigned int or unsigned long, depending on platform, so cast to unsigned int when printing. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 \ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.19 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.20 --- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.19 Wed Jun 5 02:11:44 2013 +++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Fri Oct 18 16:58:50 2013 @@ -575,8 +575,10 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags msk = msk fPtr-fbi.fbi_subtype.fbi_rgbmasks.blue_size; msk = ~msk; masks.blue = msk fPtr-fbi.fbi_subtype.fbi_rgbmasks.blue_offset; - xf86Msg(X_INFO, masks generated: %08x %08x %08x\n, - masks.red, masks.green, masks.blue); + xf86Msg(X_INFO, masks generated: %08lx %08lx %08lx\n, + (unsigned long)masks.red, + (unsigned long)masks.green, + (unsigned long)masks.blue); } else { masks.red = 0; masks.green = 0;
CVS commit: src/lib/libm/arch/x86_64
Module Name:src Committed By: christos Date: Fri Oct 18 17:03:02 UTC 2013 Modified Files: src/lib/libm/arch/x86_64: fenv.c Log Message: use the masked variable To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libm/arch/x86_64/fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/x86_64/fenv.c diff -u src/lib/libm/arch/x86_64/fenv.c:1.4 src/lib/libm/arch/x86_64/fenv.c:1.5 --- src/lib/libm/arch/x86_64/fenv.c:1.4 Tue May 28 22:27:39 2013 +++ src/lib/libm/arch/x86_64/fenv.c Fri Oct 18 13:03:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.c,v 1.4 2013/05/29 02:27:39 riastradh Exp $ */ +/* $NetBSD: fenv.c,v 1.5 2013/10/18 17:03:02 christos Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz das (at) FreeBSD.ORG @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: fenv.c,v 1.4 2013/05/29 02:27:39 riastradh Exp $); +__RCSID($NetBSD: fenv.c,v 1.5 2013/10/18 17:03:02 christos Exp $); #include assert.h #include fenv.h @@ -181,7 +181,7 @@ feraiseexcept(int excepts) _DIAGASSERT((excepts ~FE_ALL_EXCEPT) == 0); ex = excepts FE_ALL_EXCEPT; - fesetexceptflag((unsigned int *)excepts, excepts); + fesetexceptflag((unsigned int *)ex, ex); __fwait(); /* Success */
CVS commit: src/sys/uvm
Module Name:src Committed By: christos Date: Fri Oct 18 17:48:44 UTC 2013 Modified Files: src/sys/uvm: uvm_aobj.h Log Message: use __USE() for empty macro To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/uvm/uvm_aobj.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/uvm/uvm_aobj.h diff -u src/sys/uvm/uvm_aobj.h:1.22 src/sys/uvm/uvm_aobj.h:1.23 --- src/sys/uvm/uvm_aobj.h:1.22 Fri Sep 14 14:56:15 2012 +++ src/sys/uvm/uvm_aobj.h Fri Oct 18 13:48:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_aobj.h,v 1.22 2012/09/14 18:56:15 rmind Exp $ */ +/* $NetBSD: uvm_aobj.h,v 1.23 2013/10/18 17:48:44 christos Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -61,7 +61,7 @@ void uao_dropswap(struct uvm_object *, i bool uao_swap_off(int, int); void uao_dropswap_range(struct uvm_object *, voff_t, voff_t); #else -#define uao_find_swslot(obj, off) 0 +#define uao_find_swslot(obj, off) (__USE(off), 0) #define uao_dropswap(obj, off) /* nothing */ #define uao_dropswap_range(obj, lo, hi) /* nothing */ #endif
CVS commit: src/common/lib/libprop
Module Name:src Committed By: martin Date: Fri Oct 18 18:26:20 UTC 2013 Modified Files: src/common/lib/libprop: prop_dictionary.c prop_number.c prop_object.c Log Message: Make this compilable with gcc 4.8.1 without options DIAGNOSTIC. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/common/lib/libprop/prop_dictionary.c cvs rdiff -u -r1.24 -r1.25 src/common/lib/libprop/prop_number.c cvs rdiff -u -r1.28 -r1.29 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_dictionary.c diff -u src/common/lib/libprop/prop_dictionary.c:1.38 src/common/lib/libprop/prop_dictionary.c:1.39 --- src/common/lib/libprop/prop_dictionary.c:1.38 Fri Jul 27 09:10:59 2012 +++ src/common/lib/libprop/prop_dictionary.c Fri Oct 18 18:26:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.c,v 1.38 2012/07/27 09:10:59 pooka Exp $ */ +/* $NetBSD: prop_dictionary.c,v 1.39 2013/10/18 18:26:20 martin Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -338,7 +338,7 @@ _prop_dict_keysym_alloc(const char *key) rpdk = _prop_rb_tree_insert_node(_prop_dict_keysym_tree, pdk); _PROP_ASSERT(rpdk == pdk); _PROP_MUTEX_UNLOCK(_prop_dict_keysym_tree_mutex); - return (pdk); + return (rpdk); } static _prop_object_free_rv_t Index: src/common/lib/libprop/prop_number.c diff -u src/common/lib/libprop/prop_number.c:1.24 src/common/lib/libprop/prop_number.c:1.25 --- src/common/lib/libprop/prop_number.c:1.24 Fri Jul 27 09:10:59 2012 +++ src/common/lib/libprop/prop_number.c Fri Oct 18 18:26:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_number.c,v 1.24 2012/07/27 09:10:59 pooka Exp $ */ +/* $NetBSD: prop_number.c,v 1.25 2013/10/18 18:26:20 martin Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -314,7 +314,7 @@ _prop_number_alloc(const struct _prop_nu rpn = _prop_rb_tree_insert_node(_prop_number_tree, pn); _PROP_ASSERT(rpn == pn); _PROP_MUTEX_UNLOCK(_prop_number_tree_mutex); - return (pn); + return (rpn); } /* Index: src/common/lib/libprop/prop_object.c diff -u src/common/lib/libprop/prop_object.c:1.28 src/common/lib/libprop/prop_object.c:1.29 --- src/common/lib/libprop/prop_object.c:1.28 Fri Jul 27 09:10:59 2012 +++ src/common/lib/libprop/prop_object.c Fri Oct 18 18:26:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object.c,v 1.28 2012/07/27 09:10:59 pooka Exp $ */ +/* $NetBSD: prop_object.c,v 1.29 2013/10/18 18:26:20 martin Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -987,7 +987,7 @@ void prop_object_retain(prop_object_t obj) { struct _prop_object *po = obj; - uint32_t ncnt; + uint32_t ncnt __unused; _PROP_ATOMIC_INC32_NV(po-po_refcnt, ncnt); _PROP_ASSERT(ncnt != 0);
CVS commit: src/sys/arch/mac68k/dev
Module Name:src Committed By: martin Date: Fri Oct 18 18:38:49 UTC 2013 Modified Files: src/sys/arch/mac68k/dev: adb_direct.c Log Message: Remove set but unused variables. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mac68k/dev/adb_direct.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/mac68k/dev/adb_direct.c diff -u src/sys/arch/mac68k/dev/adb_direct.c:1.63 src/sys/arch/mac68k/dev/adb_direct.c:1.64 --- src/sys/arch/mac68k/dev/adb_direct.c:1.63 Fri Apr 4 09:16:59 2008 +++ src/sys/arch/mac68k/dev/adb_direct.c Fri Oct 18 18:38:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: adb_direct.c,v 1.63 2008/04/04 09:16:59 yamt Exp $ */ +/* $NetBSD: adb_direct.c,v 1.64 2013/10/18 18:38:49 martin Exp $ */ /* From: adb_direct.c 2.02 4/18/97 jpw */ @@ -62,7 +62,7 @@ #ifdef __NetBSD__ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: adb_direct.c,v 1.63 2008/04/04 09:16:59 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: adb_direct.c,v 1.64 2013/10/18 18:38:49 martin Exp $); #include opt_adb.h @@ -1238,7 +1238,7 @@ void adb_intr_IIsi(void *arg) { struct adbCommand packet; - int i, ending; + int ending; unsigned int s; s = splhigh(); /* can't be too careful - might be called */ @@ -1351,7 +1351,7 @@ switch_start: break; case ADB_ACTION_OUT: - i = ADB_SR(); /* reset SR-intr in IFR */ + (void)ADB_SR(); /* reset SR-intr in IFR */ ADB_SET_SR_OUTPUT(); /* set shift register for OUT */ ADB_SET_STATE_ACKOFF(); /* finish ACK */ @@ -2040,7 +2040,6 @@ void adb_hw_setup_IIsi(u_char *buffer) { int i; - int dummy; int s; long my_time; int endofframe; @@ -2066,7 +2065,7 @@ adb_hw_setup_IIsi(u_char *buffer) */ my_time = ADB_DELAY * 5; while ((ADB_SR_INTR_IS_OFF) (my_time-- 0)) -dummy = via_reg(VIA1, vBufB); +(void)via_reg(VIA1, vBufB); buffer[i++] = ADB_SR(); /* reset interrupt flag by * reading vSR */
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: christos Date: Fri Oct 18 19:45:40 UTC 2013 Modified Files: src/sys/ufs/lfs: ulfs_quota.c ulfs_quota2.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/lfs/ulfs_quota.c cvs rdiff -u -r1.14 -r1.15 src/sys/ufs/lfs/ulfs_quota2.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/ufs/lfs/ulfs_quota.c diff -u src/sys/ufs/lfs/ulfs_quota.c:1.7 src/sys/ufs/lfs/ulfs_quota.c:1.8 --- src/sys/ufs/lfs/ulfs_quota.c:1.7 Sat Jul 27 21:10:49 2013 +++ src/sys/ufs/lfs/ulfs_quota.c Fri Oct 18 15:45:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_quota.c,v 1.7 2013/07/28 01:10:49 dholland Exp $ */ +/* $NetBSD: ulfs_quota.c,v 1.8 2013/10/18 19:45:40 christos Exp $ */ /* from NetBSD: ufs_quota.c,v 1.112 2012/09/09 04:27:49 manu Exp */ /* @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ulfs_quota.c,v 1.7 2013/07/28 01:10:49 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ulfs_quota.c,v 1.8 2013/10/18 19:45:40 christos Exp $); #if defined(_KERNEL_OPT) #include opt_quota.h @@ -230,16 +230,15 @@ quota_handle_cmd_stat(struct mount *mp, { struct ulfsmount *ump = VFSTOULFS(mp); struct lfs *fs = ump-um_lfs; - struct quotastat *info; KASSERT(args-qc_op == QUOTACTL_STAT); - info = args-u.stat.qc_info; if ((fs-um_flags (ULFS_QUOTA|ULFS_QUOTA2)) == 0) return EOPNOTSUPP; #ifdef LFS_QUOTA if (fs-um_flags ULFS_QUOTA) { + struct quotastat *info = args-u.stat.qc_info; strcpy(info-qs_implname, lfs quota v1); info-qs_numidtypes = ULFS_MAXQUOTAS; /* XXX no define for this */ @@ -252,6 +251,7 @@ quota_handle_cmd_stat(struct mount *mp, #endif #ifdef LFS_QUOTA2 if (fs-um_flags ULFS_QUOTA2) { + struct quotastat *info = args-u.stat.qc_info; strcpy(info-qs_implname, lfs quota v2); info-qs_numidtypes = ULFS_MAXQUOTAS; info-qs_numobjtypes = N_QL; @@ -353,11 +353,9 @@ quota_handle_cmd_get(struct mount *mp, s struct lfs *fs = ump-um_lfs; int error; const struct quotakey *qk; - struct quotaval *qv; KASSERT(args-qc_op == QUOTACTL_GET); qk = args-u.get.qc_key; - qv = args-u.get.qc_val; if ((fs-um_flags (ULFS_QUOTA|ULFS_QUOTA2)) == 0) return EOPNOTSUPP; @@ -367,11 +365,13 @@ quota_handle_cmd_get(struct mount *mp, s return error; #ifdef LFS_QUOTA if (fs-um_flags ULFS_QUOTA) { + struct quotaval *qv = args-u.get.qc_val; error = lfsquota1_handle_cmd_get(ump, qk, qv); } else #endif #ifdef LFS_QUOTA2 if (fs-um_flags ULFS_QUOTA2) { + struct quotaval *qv = args-u.get.qc_val; error = lfsquota2_handle_cmd_get(ump, qk, qv); } else #endif @@ -390,13 +390,11 @@ quota_handle_cmd_put(struct mount *mp, s struct ulfsmount *ump = VFSTOULFS(mp); struct lfs *fs = ump-um_lfs; const struct quotakey *qk; - const struct quotaval *qv; id_t kauth_id; int error; KASSERT(args-qc_op == QUOTACTL_PUT); qk = args-u.put.qc_key; - qv = args-u.put.qc_val; if ((fs-um_flags (ULFS_QUOTA|ULFS_QUOTA2)) == 0) return EOPNOTSUPP; @@ -414,12 +412,14 @@ quota_handle_cmd_put(struct mount *mp, s } #ifdef LFS_QUOTA - if (fs-um_flags ULFS_QUOTA) + if (fs-um_flags ULFS_QUOTA) { + const struct quotaval *qv = args-u.put.qc_val; error = lfsquota1_handle_cmd_put(ump, qk, qv); - else + } else #endif #ifdef LFS_QUOTA2 if (fs-um_flags ULFS_QUOTA2) { + const struct quotaval *qv = args-u.put.qc_val; error = lfsquota2_handle_cmd_put(ump, qk, qv); } else #endif @@ -482,19 +482,9 @@ quota_handle_cmd_cursorget(struct mount { struct ulfsmount *ump = VFSTOULFS(mp); struct lfs *fs = ump-um_lfs; - struct quotakcursor *cursor; - struct quotakey *keys; - struct quotaval *vals; - unsigned maxnum; - unsigned *ret; int error; KASSERT(args-qc_op == QUOTACTL_CURSORGET); - cursor = args-u.cursorget.qc_cursor; - keys = args-u.cursorget.qc_keys; - vals = args-u.cursorget.qc_vals; - maxnum = args-u.cursorget.qc_maxnum; - ret = args-u.cursorget.qc_ret; if ((fs-um_flags ULFS_QUOTA2) == 0) return EOPNOTSUPP; @@ -506,8 +496,14 @@ quota_handle_cmd_cursorget(struct mount #ifdef LFS_QUOTA2 if (fs-um_flags ULFS_QUOTA2) { + struct quotacursor *cursor = args-u.cursorget.qc_cursor; + struct quotakey *keys = args-u.cursorget.qc_keys; + struct quotaval *vals = args-u.cursorget.qc_vals; + unsigned maxnum = args-u.cursorget.qc_maxnum; + unsigned *ret = args-u.cursorget.qc_ret; + error = lfsquota2_handle_cmd_cursorget(ump, cursor, keys, vals, - maxnum, ret); + maxnum, ret); } else #endif panic(quota_handle_cmd_cursorget: no support ?); @@ -522,12 +518,11 @@ quota_handle_cmd_cursoropen(struct mount #ifdef LFS_QUOTA2 struct ulfsmount *ump = VFSTOULFS(mp); struct lfs *fs = ump-um_lfs; -#endif struct quotakcursor *cursor; +#endif int error; KASSERT(args-qc_op == QUOTACTL_CURSOROPEN); - cursor =
CVS commit: src/sys/netinet
Module Name:src Committed By: christos Date: Fri Oct 18 19:48:36 UTC 2013 Modified Files: src/sys/netinet: ip_carp.c Log Message: remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/netinet/ip_carp.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/netinet/ip_carp.c diff -u src/sys/netinet/ip_carp.c:1.50 src/sys/netinet/ip_carp.c:1.51 --- src/sys/netinet/ip_carp.c:1.50 Mon Aug 20 12:01:37 2012 +++ src/sys/netinet/ip_carp.c Fri Oct 18 15:48:36 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_carp.c,v 1.50 2012/08/20 16:01:37 christos Exp $ */ +/* $NetBSD: ip_carp.c,v 1.51 2013/10/18 19:48:36 christos Exp $ */ /* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */ /* @@ -30,7 +30,7 @@ #include opt_inet.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip_carp.c,v 1.50 2012/08/20 16:01:37 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ip_carp.c,v 1.51 2013/10/18 19:48:36 christos Exp $); /* * TODO: @@ -457,11 +457,10 @@ carp_proto_input(struct mbuf *m, ...) struct ip *ip = mtod(m, struct ip *); struct carp_softc *sc = NULL; struct carp_header *ch; - int iplen, len, hlen; + int iplen, len; va_list ap; va_start(ap, m); - hlen = va_arg(ap, int); va_end(ap); CARP_STATINC(CARP_STAT_IPACKETS);
CVS commit: src/lib
Module Name:src Committed By: christos Date: Fri Oct 18 19:54:00 UTC 2013 Modified Files: src/lib/libcurses: mvwin.c src/lib/libmenu: internals.c Log Message: fix unused warnings To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libcurses/mvwin.c cvs rdiff -u -r1.16 -r1.17 src/lib/libmenu/internals.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/mvwin.c diff -u src/lib/libcurses/mvwin.c:1.17 src/lib/libcurses/mvwin.c:1.18 --- src/lib/libcurses/mvwin.c:1.17 Fri Sep 28 02:03:45 2012 +++ src/lib/libcurses/mvwin.c Fri Oct 18 15:53:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mvwin.c,v 1.17 2012/09/28 06:03:45 blymn Exp $ */ +/* $NetBSD: mvwin.c,v 1.18 2013/10/18 19:53:59 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)mvwin.c 8.2 (Berkeley) 5/4/94; #else -__RCSID($NetBSD: mvwin.c,v 1.17 2012/09/28 06:03:45 blymn Exp $); +__RCSID($NetBSD: mvwin.c,v 1.18 2013/10/18 19:53:59 christos Exp $); #endif #endif/* not lint */ @@ -52,7 +52,7 @@ int mvderwin(WINDOW *win, int dy, int dx) { WINDOW *parent; - int x, y, i; + int x, i; __LINE *lp, *olp; #ifdef HAVE_WCHAR __LDATA *cp; @@ -73,7 +73,6 @@ mvderwin(WINDOW *win, int dy, int dx) return ERR; x = parent-begx + dx; - y = parent-begy + dy; win-ch_off = x; /* Point the line pointers to line space */ Index: src/lib/libmenu/internals.c diff -u src/lib/libmenu/internals.c:1.16 src/lib/libmenu/internals.c:1.17 --- src/lib/libmenu/internals.c:1.16 Sun Dec 30 07:27:09 2012 +++ src/lib/libmenu/internals.c Fri Oct 18 15:53:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: internals.c,v 1.16 2012/12/30 12:27:09 blymn Exp $ */ +/* $NetBSD: internals.c,v 1.17 2013/10/18 19:53:59 christos Exp $ */ /*- * Copyright (c) 1998-1999 Brett Lymn (bl...@baea.com.au, brett_l...@yahoo.com.au) @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: internals.c,v 1.16 2012/12/30 12:27:09 blymn Exp $); +__RCSID($NetBSD: internals.c,v 1.17 2013/10/18 19:53:59 christos Exp $); #include menu.h #include ctype.h @@ -517,7 +517,7 @@ _menui_draw_item(MENU *menu, int item) int _menui_draw_menu(MENU *menu) { - int rowmajor, i, j, k, row = -1, col = -1, stride; + int rowmajor, i, j, k, row = -1, stride; int incr, cur_row, offset, row_count; rowmajor = ((menu-opts O_ROWMAJOR) == O_ROWMAJOR); @@ -555,7 +555,6 @@ _menui_draw_menu(MENU *menu) wattrset(menu-scrwin, menu-back); if (row 0) { row = menu-items[menu-item_count - 1]-row; - col = menu-items[menu-item_count - 1]-col; } wmove(menu-scrwin, cur_row,
CVS commit: src/bin
Module Name:src Committed By: christos Date: Fri Oct 18 19:53:34 UTC 2013 Modified Files: src/bin/ksh: c_sh.c eval.c expand.h src/bin/pax: tables.c Log Message: Fixed unused warnings. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/c_sh.c src/bin/ksh/eval.c cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/expand.h cvs rdiff -u -r1.30 -r1.31 src/bin/pax/tables.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ksh/c_sh.c diff -u src/bin/ksh/c_sh.c:1.14 src/bin/ksh/c_sh.c:1.15 --- src/bin/ksh/c_sh.c:1.14 Wed Aug 31 12:24:54 2011 +++ src/bin/ksh/c_sh.c Fri Oct 18 15:53:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: c_sh.c,v 1.14 2011/08/31 16:24:54 plunky Exp $ */ +/* $NetBSD: c_sh.c,v 1.15 2013/10/18 19:53:34 christos Exp $ */ /* * built-in Bourne commands @@ -6,7 +6,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: c_sh.c,v 1.14 2011/08/31 16:24:54 plunky Exp $); +__RCSID($NetBSD: c_sh.c,v 1.15 2013/10/18 19:53:34 christos Exp $); #endif @@ -506,6 +506,8 @@ c_trap(wp) shprintf( %s, p-name); shprintf(newline); } +#else + __USE(anydfl); #endif return 0; } Index: src/bin/ksh/eval.c diff -u src/bin/ksh/eval.c:1.14 src/bin/ksh/eval.c:1.15 --- src/bin/ksh/eval.c:1.14 Sun Aug 21 17:24:34 2011 +++ src/bin/ksh/eval.c Fri Oct 18 15:53:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.14 2011/08/21 21:24:34 dholland Exp $ */ +/* $NetBSD: eval.c,v 1.15 2013/10/18 19:53:34 christos Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -6,7 +6,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: eval.c,v 1.14 2011/08/21 21:24:34 dholland Exp $); +__RCSID($NetBSD: eval.c,v 1.15 2013/10/18 19:53:34 christos Exp $); #endif #include stdint.h @@ -729,13 +729,11 @@ varsub(xp, sp, word, stypep, slenp) /* Check for size of array */ if ((p=strchr(sp,'[')) (p[1]=='*'||p[1]=='@') p[2]==']') { int n = 0; - int max = 0; vp = global(arrayname(sp)); if (vp-flag (ISSET|ARRAY)) zero_ok = 1; for (; vp; vp = vp-u.array) if (vp-flag ISSET) { - max = vp-index + 1; n++; } c = n; /* ksh88/ksh93 go for number, not max index */ Index: src/bin/ksh/expand.h diff -u src/bin/ksh/expand.h:1.4 src/bin/ksh/expand.h:1.5 --- src/bin/ksh/expand.h:1.4 Thu Jul 26 11:05:07 2001 +++ src/bin/ksh/expand.h Fri Oct 18 15:53:34 2013 @@ -1,9 +1,9 @@ -/* $NetBSD: expand.h,v 1.4 2001/07/26 15:05:07 wiz Exp $ */ +/* $NetBSD: expand.h,v 1.5 2013/10/18 19:53:34 christos Exp $ */ /* * Expanding strings */ -/* $Id: expand.h,v 1.4 2001/07/26 15:05:07 wiz Exp $ */ +/* $Id: expand.h,v 1.5 2013/10/18 19:53:34 christos Exp $ */ #define X_EXTRA 8 /* this many extra bytes in X string */ @@ -40,6 +40,7 @@ typedef char * XStringP; (xs).beg = alloc((xs).len + X_EXTRA, (xs).areap); \ (xs).end = (xs).beg + (xs).len; \ xp = (xs).beg; \ + __USE(xp); \ } while (0) /* stuff char into string */ Index: src/bin/pax/tables.c diff -u src/bin/pax/tables.c:1.30 src/bin/pax/tables.c:1.31 --- src/bin/pax/tables.c:1.30 Wed Jan 9 23:24:51 2008 +++ src/bin/pax/tables.c Fri Oct 18 15:53:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tables.c,v 1.30 2008/01/10 04:24:51 tls Exp $ */ +/* $NetBSD: tables.c,v 1.31 2013/10/18 19:53:34 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)tables.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: tables.c,v 1.30 2008/01/10 04:24:51 tls Exp $); +__RCSID($NetBSD: tables.c,v 1.31 2013/10/18 19:53:34 christos Exp $); #endif #endif /* not lint */ @@ -1155,7 +1155,9 @@ add_dir(char *name, int nlen, struct sta return; } name = rp; +#ifdef DIRS_USE_FILE nlen = strlen(name); +#endif } #ifdef DIRS_USE_FILE
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Fri Oct 18 19:54:56 UTC 2013 Modified Files: src/sys/dev/usb: usb.c Log Message: move compat var in compat code. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/dev/usb/usb.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.145 src/sys/dev/usb/usb.c:1.146 --- src/sys/dev/usb/usb.c:1.145 Sat Oct 12 12:49:01 2013 +++ src/sys/dev/usb/usb.c Fri Oct 18 15:54:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.145 2013/10/12 16:49:01 christos Exp $ */ +/* $NetBSD: usb.c,v 1.146 2013/10/18 19:54:56 christos Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usb.c,v 1.145 2013/10/12 16:49:01 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: usb.c,v 1.146 2013/10/18 19:54:56 christos Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -507,13 +507,13 @@ usbread(dev_t dev, struct uio *uio, int struct usb_event *ue; #ifdef COMPAT_30 struct usb_event_old *ueo = NULL; /* XXXGCC */ + int useold = 0; #endif - int error, n, useold; + int error, n; if (minor(dev) != USB_DEV_MINOR) return (ENXIO); - useold = 0; switch (uio-uio_resid) { #ifdef COMPAT_30 case sizeof(struct usb_event_old):
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: christos Date: Fri Oct 18 19:56:11 UTC 2013 Modified Files: src/sys/rump/librump/rumpvfs: vm_vfs.c Log Message: remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/rump/librump/rumpvfs/vm_vfs.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/rump/librump/rumpvfs/vm_vfs.c diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.33 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.34 --- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.33 Sun Jun 3 12:46:08 2012 +++ src/sys/rump/librump/rumpvfs/vm_vfs.c Fri Oct 18 15:56:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_vfs.c,v 1.33 2012/06/03 16:46:08 rmind Exp $ */ +/* $NetBSD: vm_vfs.c,v 1.34 2013/10/18 19:56:11 christos Exp $ */ /* * Copyright (c) 2008-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.33 2012/06/03 16:46:08 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.34 2013/10/18 19:56:11 christos Exp $); #include sys/param.h @@ -110,7 +110,7 @@ ubc_zerorange(struct uvm_object *uobj, o { struct vm_page **pgs; int maxpages = MIN(32, round_page(len) PAGE_SHIFT); - int rv, npages, i; + int npages, i; if (maxpages == 0) return; @@ -120,7 +120,7 @@ ubc_zerorange(struct uvm_object *uobj, o while (len) { npages = MIN(maxpages, round_page(len) PAGE_SHIFT); memset(pgs, 0, npages * sizeof(struct vm_page *)); - rv = uobj-pgops-pgo_get(uobj, trunc_page(off), + (void)uobj-pgops-pgo_get(uobj, trunc_page(off), pgs, npages, 0, VM_PROT_READ | VM_PROT_WRITE, 0, PAGERFLAGS | PGO_PASTEOF); KASSERT(npages 0);
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: christos Date: Fri Oct 18 19:55:38 UTC 2013 Modified Files: src/sys/ufs/ufs: ufs_quota.c Log Message: move code inside ifdef To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/ufs/ufs/ufs_quota.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/ufs/ufs/ufs_quota.c diff -u src/sys/ufs/ufs/ufs_quota.c:1.112 src/sys/ufs/ufs/ufs_quota.c:1.113 --- src/sys/ufs/ufs/ufs_quota.c:1.112 Sun Sep 9 00:27:49 2012 +++ src/sys/ufs/ufs/ufs_quota.c Fri Oct 18 15:55:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.c,v 1.112 2012/09/09 04:27:49 manu Exp $ */ +/* $NetBSD: ufs_quota.c,v 1.113 2013/10/18 19:55:37 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.112 2012/09/09 04:27:49 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.113 2013/10/18 19:55:37 christos Exp $); #if defined(_KERNEL_OPT) #include opt_quota.h @@ -641,13 +641,9 @@ quota_handle_cmd_quotaon(struct mount *m struct quotactl_args *args) { struct ufsmount *ump = VFSTOUFS(mp); - int idtype; - const char *qfile; int error; KASSERT(args-qc_op == QUOTACTL_QUOTAON); - idtype = args-u.quotaon.qc_idtype; - qfile = args-u.quotaon.qc_quotafile; if ((ump-um_flags UFS_QUOTA2) != 0) return EBUSY; @@ -658,6 +654,8 @@ quota_handle_cmd_quotaon(struct mount *m return error; } #ifdef QUOTA + int idtype = args-u.quotaon.qc_idtype; + const char *qfile = args-u.quotaon.qc_quotafile; error = quota1_handle_cmd_quotaon(l, ump, idtype, qfile); #else error = EOPNOTSUPP; @@ -671,11 +669,9 @@ quota_handle_cmd_quotaoff(struct mount * struct quotactl_args *args) { struct ufsmount *ump = VFSTOUFS(mp); - int idtype; int error; KASSERT(args-qc_op == QUOTACTL_QUOTAOFF); - idtype = args-u.quotaoff.qc_idtype; if ((ump-um_flags UFS_QUOTA2) != 0) return EOPNOTSUPP; @@ -686,6 +682,7 @@ quota_handle_cmd_quotaoff(struct mount * return error; } #ifdef QUOTA + int idtype = args-u.quotaoff.qc_idtype; error = quota1_handle_cmd_quotaoff(l, ump, idtype); #else error = EOPNOTSUPP;
CVS commit: src/sys/dev/dm
Module Name:src Committed By: christos Date: Fri Oct 18 19:56:30 UTC 2013 Modified Files: src/sys/dev/dm: device-mapper.c dm_ioctl.c Log Message: remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/dm/device-mapper.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/dm/dm_ioctl.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/dm/device-mapper.c diff -u src/sys/dev/dm/device-mapper.c:1.30 src/sys/dev/dm/device-mapper.c:1.31 --- src/sys/dev/dm/device-mapper.c:1.30 Tue May 28 20:47:48 2013 +++ src/sys/dev/dm/device-mapper.c Fri Oct 18 15:56:30 2013 @@ -1,4 +1,4 @@ -/*$NetBSD: device-mapper.c,v 1.30 2013/05/29 00:47:48 christos Exp $ */ +/*$NetBSD: device-mapper.c,v 1.31 2013/10/18 19:56:30 christos Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -487,7 +487,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd, { dm_table_entry_t *table_en; dm_table_t *tbl; - int err; if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL) return ENODEV; @@ -501,7 +500,7 @@ disk_ioctl_switch(dev_t dev, u_long cmd, */ SLIST_FOREACH(table_en, tbl, next) { - err = table_en-target-sync(table_en); + (void)table_en-target-sync(table_en); } dm_table_release(dmv-table_head, DM_TABLE_ACTIVE); dm_dev_unbusy(dmv); @@ -529,8 +528,6 @@ dmstrategy(struct buf *bp) dm_table_entry_t *table_en; struct buf *nestbuf; - uint32_t dev_type; - uint64_t buf_start, buf_len, issued_len; uint64_t table_start, table_end; uint64_t start, end; @@ -541,7 +538,6 @@ dmstrategy(struct buf *bp) tbl = NULL; table_end = 0; - dev_type = 0; issued_len = 0; if ((dmv = dm_dev_lookup(NULL, NULL, minor(bp-b_dev))) == NULL) { Index: src/sys/dev/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.26 src/sys/dev/dm/dm_ioctl.c:1.27 --- src/sys/dev/dm/dm_ioctl.c:1.26 Sat Aug 27 13:07:49 2011 +++ src/sys/dev/dm/dm_ioctl.c Fri Oct 18 15:56:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_ioctl.c,v 1.26 2011/08/27 17:07:49 ahoka Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.27 2013/10/18 19:56:30 christos Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -614,15 +614,12 @@ dm_table_deps_ioctl(prop_dictionary_t dm uint32_t flags, minor; int table_type; - size_t i; name = NULL; uuid = NULL; dmv = NULL; flags = 0; - i = 0; - prop_dictionary_get_cstring_nocopy(dm_dict, DM_IOCTL_NAME, name); prop_dictionary_get_cstring_nocopy(dm_dict, DM_IOCTL_UUID, uuid); prop_dictionary_get_uint32(dm_dict, DM_IOCTL_FLAGS, flags); @@ -842,7 +839,7 @@ dm_table_status_ioctl(prop_dictionary_t prop_array_t cmd_array; prop_dictionary_t target_dict; - uint32_t rec_size, minor; + uint32_t minor; const char *name, *uuid; char *params; @@ -854,7 +851,6 @@ dm_table_status_ioctl(prop_dictionary_t name = NULL; params = NULL; flags = 0; - rec_size = 0; prop_dictionary_get_cstring_nocopy(dm_dict, DM_IOCTL_NAME, name); prop_dictionary_get_cstring_nocopy(dm_dict, DM_IOCTL_UUID, uuid);
CVS commit: src/sys/fs/udf
Module Name:src Committed By: christos Date: Fri Oct 18 19:56:55 UTC 2013 Modified Files: src/sys/fs/udf: udf.h udf_allocation.c udf_strat_direct.c udf_strat_rmw.c udf_strat_sequential.c udf_subr.c udf_vnops.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/fs/udf/udf.h cvs rdiff -u -r1.34 -r1.35 src/sys/fs/udf/udf_allocation.c cvs rdiff -u -r1.10 -r1.11 src/sys/fs/udf/udf_strat_direct.c cvs rdiff -u -r1.22 -r1.23 src/sys/fs/udf/udf_strat_rmw.c cvs rdiff -u -r1.11 -r1.12 src/sys/fs/udf/udf_strat_sequential.c cvs rdiff -u -r1.120 -r1.121 src/sys/fs/udf/udf_subr.c cvs rdiff -u -r1.86 -r1.87 src/sys/fs/udf/udf_vnops.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/fs/udf/udf.h diff -u src/sys/fs/udf/udf.h:1.45 src/sys/fs/udf/udf.h:1.46 --- src/sys/fs/udf/udf.h:1.45 Fri Jul 27 18:55:30 2012 +++ src/sys/fs/udf/udf.h Fri Oct 18 15:56:55 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: udf.h,v 1.45 2012/07/27 22:55:30 drochner Exp $ */ +/* $NetBSD: udf.h,v 1.46 2013/10/18 19:56:55 christos Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -78,7 +78,7 @@ extern int udf_verbose; /* initial value of udf_verbose */ #define UDF_DEBUGGING 0 -#ifdef DEBUG +#ifdef UDF_DEBUG #define DPRINTF(name, arg) { \ if (udf_verbose UDF_DEBUG_##name) {\ printf arg;\ Index: src/sys/fs/udf/udf_allocation.c diff -u src/sys/fs/udf/udf_allocation.c:1.34 src/sys/fs/udf/udf_allocation.c:1.35 --- src/sys/fs/udf/udf_allocation.c:1.34 Fri Aug 9 16:13:18 2013 +++ src/sys/fs/udf/udf_allocation.c Fri Oct 18 15:56:55 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_allocation.c,v 1.34 2013/08/09 20:13:18 reinoud Exp $ */ +/* $NetBSD: udf_allocation.c,v 1.35 2013/10/18 19:56:55 christos Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.34 2013/08/09 20:13:18 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.35 2013/10/18 19:56:55 christos Exp $); #endif /* not lint */ @@ -342,23 +342,15 @@ udf_node_sanity_check(struct udf_node *u uint64_t *cnt_inflen, uint64_t *cnt_logblksrec) { struct file_entry*fe; struct extfile_entry *efe; - struct icb_tag *icbtag; uint64_t inflen, logblksrec; - int dscr_size, lb_size; - - lb_size = udf_rw32(udf_node-ump-logical_vol-lb_size); fe = udf_node-fe; efe = udf_node-efe; if (fe) { - icbtag = fe-icbtag; inflen = udf_rw64(fe-inf_len); - dscr_size = sizeof(struct file_entry) -1; logblksrec = udf_rw64(fe-logblks_rec); } else { - icbtag = efe-icbtag; inflen = udf_rw64(efe-inf_len); - dscr_size = sizeof(struct extfile_entry) -1; logblksrec = udf_rw64(efe-logblks_rec); } *cnt_logblksrec = logblksrec; @@ -1311,9 +1303,8 @@ udf_free_allocated_space(struct udf_moun uint16_t vpart_num, uint32_t num_lb) { struct udf_bitmap *bitmap; - struct part_desc *pdesc; struct logvol_int_desc *lvid; - uint32_t ptov, lb_map, udf_rw32_lbmap; + uint32_t lb_map, udf_rw32_lbmap; uint32_t *freepos, free_lbs; int phys_part; int error; @@ -1327,14 +1318,10 @@ udf_free_allocated_space(struct udf_moun mutex_enter(ump-allocate_mutex); - /* get partition backing up this vpart_num */ - pdesc = ump-partitions[ump-vtop[vpart_num]]; - switch (ump-vtop_tp[vpart_num]) { case UDF_VTOP_TYPE_PHYS : case UDF_VTOP_TYPE_SPARABLE : /* free space to freed or unallocated space bitmap */ - ptov = udf_rw32(pdesc-start_loc); phys_part = ump-vtop[vpart_num]; /* first try freed space bitmap */ @@ -1653,7 +1640,7 @@ udf_late_allocate_buf(struct udf_mount * uint64_t *lmapping, struct long_ad *node_ad_cpy, uint16_t *vpart_nump) { struct udf_node *udf_node = VTOI(buf-b_vp); - int lb_size, blks, udf_c_type; + int lb_size, udf_c_type; int vpart_num, num_lb; int error, s; @@ -1666,7 +1653,6 @@ udf_late_allocate_buf(struct udf_mount * lb_size= udf_rw32(ump-logical_vol-lb_size); num_lb = (buf-b_bcount + lb_size -1) / lb_size; - blks = lb_size / DEV_BSIZE; udf_c_type = buf-b_udf_c_type; KASSERT(lb_size == ump-discinfo.sector_size); @@ -1774,8 +1760,7 @@ udf_wipe_adslots(struct udf_node *udf_no struct file_entry *fe; struct extfile_entry *efe; struct alloc_ext_entry *ext; - uint64_t inflen, objsize; - uint32_t lb_size, dscr_size, l_ea, l_ad, max_l_ad, crclen; + uint32_t lb_size, dscr_size, l_ea, max_l_ad, crclen; uint8_t *data_pos; int extnr; @@ -1784,18 +1769,12 @@ udf_wipe_adslots(struct udf_node *udf_no fe = udf_node-fe; efe = udf_node-efe; if (fe) { - inflen = udf_rw64(fe-inf_len); - objsize = inflen; dscr_size = sizeof(struct file_entry) -1; l_ea = udf_rw32(fe-l_ea); - l_ad = udf_rw32(fe-l_ad); data_pos = (uint8_t *) fe + dscr_size + l_ea; } else { - inflen =
CVS commit: src/sys/fs/nilfs
Module Name:src Committed By: christos Date: Fri Oct 18 19:57:28 UTC 2013 Modified Files: src/sys/fs/nilfs: nilfs.h nilfs_subr.c nilfs_vfsops.c nilfs_vnops.c Log Message: remove unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nilfs/nilfs.h cvs rdiff -u -r1.9 -r1.10 src/sys/fs/nilfs/nilfs_subr.c cvs rdiff -u -r1.11 -r1.12 src/sys/fs/nilfs/nilfs_vfsops.c cvs rdiff -u -r1.23 -r1.24 src/sys/fs/nilfs/nilfs_vnops.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/fs/nilfs/nilfs.h diff -u src/sys/fs/nilfs/nilfs.h:1.3 src/sys/fs/nilfs/nilfs.h:1.4 --- src/sys/fs/nilfs/nilfs.h:1.3 Fri Jul 27 20:43:23 2012 +++ src/sys/fs/nilfs/nilfs.h Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs.h,v 1.3 2012/07/28 00:43:23 matt Exp $ */ +/* $NetBSD: nilfs.h,v 1.4 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -66,7 +66,7 @@ extern int nilfs_verbose; /* initial value of nilfs_verbose */ #define NILFS_DEBUGGING 0 -#ifdef DEBUG +#ifdef NILFS_DEBUG #define DPRINTF(name, arg) { \ if (nilfs_verbose NILFS_DEBUG_##name) {\ printf arg;\ Index: src/sys/fs/nilfs/nilfs_subr.c diff -u src/sys/fs/nilfs/nilfs_subr.c:1.9 src/sys/fs/nilfs/nilfs_subr.c:1.10 --- src/sys/fs/nilfs/nilfs_subr.c:1.9 Thu Dec 20 03:03:43 2012 +++ src/sys/fs/nilfs/nilfs_subr.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_subr.c,v 1.9 2012/12/20 08:03:43 hannken Exp $ */ +/* $NetBSD: nilfs_subr.c,v 1.10 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__KERNEL_RCSID(0, $NetBSD: nilfs_subr.c,v 1.9 2012/12/20 08:03:43 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: nilfs_subr.c,v 1.10 2013/10/18 19:57:28 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -725,7 +725,6 @@ static void nilfs_register_node(struct nilfs_node *node) { struct nilfs_mount *ump; - struct nilfs_node *chk; uint32_t hashline; ump = node-ump; @@ -734,13 +733,12 @@ nilfs_register_node(struct nilfs_node *n /* add to our hash table */ hashline = nilfs_calchash(node-ino) NILFS_INODE_HASHMASK; #ifdef DEBUG + struct nilfs_node *chk; LIST_FOREACH(chk, ump-nilfs_nodes[hashline], hashchain) { assert(chk); if (chk-ino == node-ino) panic(Double node entered\n); } -#else - chk = NULL; #endif LIST_INSERT_HEAD(ump-nilfs_nodes[hashline], node, hashchain); Index: src/sys/fs/nilfs/nilfs_vfsops.c diff -u src/sys/fs/nilfs/nilfs_vfsops.c:1.11 src/sys/fs/nilfs/nilfs_vfsops.c:1.12 --- src/sys/fs/nilfs/nilfs_vfsops.c:1.11 Mon Sep 30 14:57:59 2013 +++ src/sys/fs/nilfs/nilfs_vfsops.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vfsops.c,v 1.11 2013/09/30 18:57:59 hannken Exp $ */ +/* $NetBSD: nilfs_vfsops.c,v 1.12 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__KERNEL_RCSID(0, $NetBSD: nilfs_vfsops.c,v 1.11 2013/09/30 18:57:59 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: nilfs_vfsops.c,v 1.12 2013/10/18 19:57:28 christos Exp $); #endif /* not lint */ @@ -693,6 +693,10 @@ nilfs_mount_checkpoint(struct nilfs_moun DPRINTF(VOLUMES, (mount_nilfs: checkpoint header read in\n)); DPRINTF(VOLUMES, (\tNumber of checkpoints %PRIu64\n, ncp)); DPRINTF(VOLUMES, (\tNumber of snapshots %PRIu64\n, nsn)); +#ifndef NILFS_DEBUG + __USE(ncp); + __USE(nsn); +#endif /* read in our specified checkpoint */ dlen = nilfs_rw16(ump-nilfsdev-super.s_checkpoint_size); Index: src/sys/fs/nilfs/nilfs_vnops.c diff -u src/sys/fs/nilfs/nilfs_vnops.c:1.23 src/sys/fs/nilfs/nilfs_vnops.c:1.24 --- src/sys/fs/nilfs/nilfs_vnops.c:1.23 Wed May 8 06:39:17 2013 +++ src/sys/fs/nilfs/nilfs_vnops.c Fri Oct 18 15:57:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vnops.c,v 1.23 2013/05/08 10:39:17 reinoud Exp $ */ +/* $NetBSD: nilfs_vnops.c,v 1.24 2013/10/18 19:57:28 christos Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__KERNEL_RCSID(0, $NetBSD: nilfs_vnops.c,v 1.23 2013/05/08 10:39:17 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: nilfs_vnops.c,v 1.24 2013/10/18 19:57:28 christos Exp $); #endif /* not lint */ @@ -212,7 +212,7 @@ nilfs_write(void *v) int advice = IO_ADV_DECODE(ap-a_ioflag); struct uvm_object*uobj; struct nilfs_node *nilfs_node = VTOI(vp); - uint64_t file_size, old_size; + uint64_t file_size; vsize_t len; int error, resid, extended; @@ -235,12 +235,10 @@ nilfs_write(void *v) assert(nilfs_node); panic(nilfs_write() called\n); -return EIO; /* remember old file size */ assert(nilfs_node); file_size = nilfs_rw64(nilfs_node-inode.i_size); - old_size = file_size; /* if explicitly asked to append, uio_offset can be wrong?
CVS commit: src/sys/fs/hfs
Module Name:src Committed By: christos Date: Fri Oct 18 19:58:11 UTC 2013 Modified Files: src/sys/fs/hfs: hfs_vnops.c Log Message: remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/fs/hfs/hfs_vnops.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/fs/hfs/hfs_vnops.c diff -u src/sys/fs/hfs/hfs_vnops.c:1.27 src/sys/fs/hfs/hfs_vnops.c:1.28 --- src/sys/fs/hfs/hfs_vnops.c:1.27 Mon Mar 18 15:35:37 2013 +++ src/sys/fs/hfs/hfs_vnops.c Fri Oct 18 15:58:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: hfs_vnops.c,v 1.27 2013/03/18 19:35:37 plunky Exp $ */ +/* $NetBSD: hfs_vnops.c,v 1.28 2013/10/18 19:58:11 christos Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hfs_vnops.c,v 1.27 2013/03/18 19:35:37 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: hfs_vnops.c,v 1.28 2013/10/18 19:58:11 christos Exp $); #ifdef _KERNEL_OPT #include opt_ipsec.h @@ -325,7 +325,6 @@ hfs_vop_lookup(void *v) struct vnode ** a_vpp; struct componentname * a_cnp; } */ *ap = v; - struct buf *bp; /* a buffer of directory entries */ struct componentname *cnp; struct hfsnode *dp; /* hfsnode for directory being searched */ kauth_cred_t cred; @@ -343,7 +342,6 @@ hfs_vop_lookup(void *v) DPRINTF((VOP = hfs_vop_lookup()\n)); - bp = NULL; cnp = ap-a_cnp; cred = cnp-cn_cred; vdp = ap-a_dvp; @@ -1027,13 +1025,11 @@ hfs_vop_reclaim(void *v) } */ *ap = v; struct vnode *vp; struct hfsnode *hp; - struct hfsmount *hmp; DPRINTF((VOP = hfs_vop_reclaim()\n)); vp = ap-a_vp; hp = VTOH(vp); - hmp = hp-h_hmp; /* Remove the hfsnode from its hash chain. */ hfs_nhashremove(hp);
CVS commit: src/usr.bin/mail
Module Name:src Committed By: christos Date: Fri Oct 18 20:17:59 UTC 2013 Modified Files: src/usr.bin/mail: cmd1.c Log Message: avoid longjmp clobber. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.bin/mail/cmd1.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/mail/cmd1.c diff -u src/usr.bin/mail/cmd1.c:1.33 src/usr.bin/mail/cmd1.c:1.34 --- src/usr.bin/mail/cmd1.c:1.33 Tue Jun 12 15:03:26 2012 +++ src/usr.bin/mail/cmd1.c Fri Oct 18 16:17:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cmd1.c,v 1.33 2012/06/12 19:03:26 christos Exp $ */ +/* $NetBSD: cmd1.c,v 1.34 2013/10/18 20:17:59 christos Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)cmd1.c 8.2 (Berkeley) 4/20/95; #else -__RCSID($NetBSD: cmd1.c,v 1.33 2012/06/12 19:03:26 christos Exp $); +__RCSID($NetBSD: cmd1.c,v 1.34 2013/10/18 20:17:59 christos Exp $); #endif #endif /* not lint */ @@ -325,6 +325,7 @@ type1(int *msgvec, int doign, int mime_d * not what it is pointing at! */ FILE *volatile obuf; /* avoid longjmp clobbering */ + int * volatile mvec; sig_t volatile oldsigpipe; /* avoid longjmp clobbering? */ #ifdef MIME_SUPPORT struct mime_info *volatile mip; /* avoid longjmp clobbering? */ @@ -332,6 +333,7 @@ type1(int *msgvec, int doign, int mime_d mip = NULL; #endif + mvec = msgvec; if ((obuf = last_registered_file(0)) == NULL) obuf = stdout; @@ -348,7 +350,7 @@ type1(int *msgvec, int doign, int mime_d msgCount = get_msgCount(); recursive = do_recursion(); - for (ip = msgvec; *ip ip - msgvec msgCount; ip++) { + for (ip = mvec; *ip ip - mvec msgCount; ip++) { struct type1_core_args_s args; struct message *mp;
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: christos Date: Fri Oct 18 20:18:42 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.c Log Message: avoid pointer gymnastics To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/usr.bin/fstat/fstat.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/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.100 src/usr.bin/fstat/fstat.c:1.101 --- src/usr.bin/fstat/fstat.c:1.100 Sat Nov 24 19:36:23 2012 +++ src/usr.bin/fstat/fstat.c Fri Oct 18 16:18:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.100 2012/11/25 00:36:23 christos Exp $ */ +/* $NetBSD: fstat.c,v 1.101 2013/10/18 20:18:42 christos Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = @(#)fstat.c 8.3 (Berkeley) 5/2/95; #else -__RCSID($NetBSD: fstat.c,v 1.100 2012/11/25 00:36:23 christos Exp $); +__RCSID($NetBSD: fstat.c,v 1.101 2013/10/18 20:18:42 christos Exp $); #endif #endif /* not lint */ @@ -895,6 +895,7 @@ inet6_addrstr(char *buf, size_t len, con { char addr[256], serv[256]; struct sockaddr_in6 sin6; + uint16_t ad2; const int niflags = nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0; (void)memset(sin6, 0, sizeof(sin6)); @@ -903,10 +904,9 @@ inet6_addrstr(char *buf, size_t len, con sin6.sin6_addr = *a; sin6.sin6_port = htons(p); - if (IN6_IS_ADDR_LINKLOCAL(a) - *(u_int16_t *)sin6.sin6_addr.s6_addr[2] != 0) { - sin6.sin6_scope_id = - ntohs(*(uint16_t *)sin6.sin6_addr.s6_addr[2]); + memcpy(ad2, sin6.sin6_addr.s6_addr[2], sizeof(ad2)); + if (IN6_IS_ADDR_LINKLOCAL(a) ad2 != 0) { + sin6.sin6_scope_id = ntohs(ad2); sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; }
CVS commit: src/usr.bin/hexdump
Module Name:src Committed By: christos Date: Fri Oct 18 20:19:03 UTC 2013 Modified Files: src/usr.bin/hexdump: display.c Log Message: don't read random garbage from the stack To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/hexdump/display.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/hexdump/display.c diff -u src/usr.bin/hexdump/display.c:1.21 src/usr.bin/hexdump/display.c:1.22 --- src/usr.bin/hexdump/display.c:1.21 Sun Jan 18 16:34:32 2009 +++ src/usr.bin/hexdump/display.c Fri Oct 18 16:19:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: display.c,v 1.21 2009/01/18 21:34:32 apb Exp $ */ +/* $NetBSD: display.c,v 1.22 2013/10/18 20:19:03 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = @(#)display.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: display.c,v 1.21 2009/01/18 21:34:32 apb Exp $); +__RCSID($NetBSD: display.c,v 1.22 2013/10/18 20:19:03 christos Exp $); #endif #endif /* not lint */ @@ -344,7 +344,9 @@ doskip(const char *fname, int statok) skip -= sb.st_size; return; } - } + } else + sb.st_mode = S_IFIFO; + if (S_ISREG(sb.st_mode)) { if (fseek(stdin, skip, SEEK_SET)) err(1, fseek %s, fname);
CVS commit: src/usr.bin
Module Name:src Committed By: christos Date: Fri Oct 18 20:19:37 UTC 2013 Modified Files: src/usr.bin/m4: mdef.h src/usr.bin/menuc: defs.h src/usr.bin/msgc: defs.h Log Message: avoid redefinitions To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/m4/mdef.h cvs rdiff -u -r1.9 -r1.10 src/usr.bin/menuc/defs.h cvs rdiff -u -r1.5 -r1.6 src/usr.bin/msgc/defs.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/m4/mdef.h diff -u src/usr.bin/m4/mdef.h:1.14 src/usr.bin/m4/mdef.h:1.15 --- src/usr.bin/m4/mdef.h:1.14 Sat Mar 5 11:37:50 2011 +++ src/usr.bin/m4/mdef.h Fri Oct 18 16:19:36 2013 @@ -1,5 +1,5 @@ /* $OpenBSD: mdef.h,v 1.29 2006/03/20 20:27:45 espie Exp $ */ -/* $NetBSD: mdef.h,v 1.14 2011/03/05 16:37:50 christos Exp $ */ +/* $NetBSD: mdef.h,v 1.15 2013/10/18 20:19:36 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -127,8 +127,12 @@ #define ALL 1 #define TOP 0 -#define TRUE1 -#define FALSE 0 +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif #define cycle for(;;) /* Index: src/usr.bin/menuc/defs.h diff -u src/usr.bin/menuc/defs.h:1.9 src/usr.bin/menuc/defs.h:1.10 --- src/usr.bin/menuc/defs.h:1.9 Tue Mar 6 11:55:18 2012 +++ src/usr.bin/menuc/defs.h Fri Oct 18 16:19:36 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.9 2012/03/06 16:55:18 mbalmer Exp $ */ +/* $NetBSD: defs.h,v 1.10 2013/10/18 20:19:36 christos Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -50,10 +50,12 @@ #define INIT(x) #endif -/* some constants */ -#define TRUE 1 -#define FALSE 0 - +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif /* Global variables .. to be defined in main.c, extern elsewhere. */ EXTERN char *prog_name; Index: src/usr.bin/msgc/defs.h diff -u src/usr.bin/msgc/defs.h:1.5 src/usr.bin/msgc/defs.h:1.6 --- src/usr.bin/msgc/defs.h:1.5 Tue Mar 6 11:26:01 2012 +++ src/usr.bin/msgc/defs.h Fri Oct 18 16:19:36 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.5 2012/03/06 16:26:01 mbalmer Exp $ */ +/* $NetBSD: defs.h,v 1.6 2013/10/18 20:19:36 christos Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -49,9 +49,12 @@ #define INIT(x) #endif -/* some constants */ -#define TRUE 1 -#define FALSE 0 +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif /* Global variables .. to be defined in main.c, extern elsewhere. */
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: christos Date: Fri Oct 18 20:26:45 UTC 2013 Modified Files: src/usr.bin/netstat: atalk.c if.c inet6.c mroute6.c show.c vtw.c Log Message: - avoid pointer gymnastics - remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/netstat/atalk.c cvs rdiff -u -r1.76 -r1.77 src/usr.bin/netstat/if.c cvs rdiff -u -r1.62 -r1.63 src/usr.bin/netstat/inet6.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/netstat/mroute6.c cvs rdiff -u -r1.15 -r1.16 src/usr.bin/netstat/show.c cvs rdiff -u -r1.6 -r1.7 src/usr.bin/netstat/vtw.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/netstat/atalk.c diff -u src/usr.bin/netstat/atalk.c:1.14 src/usr.bin/netstat/atalk.c:1.15 --- src/usr.bin/netstat/atalk.c:1.14 Sun Apr 12 12:08:37 2009 +++ src/usr.bin/netstat/atalk.c Fri Oct 18 16:26:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: atalk.c,v 1.14 2009/04/12 16:08:37 lukem Exp $ */ +/* $NetBSD: atalk.c,v 1.15 2013/10/18 20:26:45 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from @(#)atalk.c 1.1 (Whistle) 6/6/96; #else -__RCSID($NetBSD: atalk.c,v 1.14 2009/04/12 16:08:37 lukem Exp $); +__RCSID($NetBSD: atalk.c,v 1.15 2013/10/18 20:26:45 christos Exp $); #endif #endif /* not lint */ @@ -229,17 +229,16 @@ atalk_print2(const struct sockaddr *sa, void atalkprotopr(u_long off, const char *name) { - struct ddpcbcb; - struct ddpcb *prev, *next; - struct ddpcb *initial; + struct ddpcb cb; + struct ddpcb *next; + struct ddpcb *initial; int width = 22; if (off == 0) return; if (kread(off, (char *)initial, sizeof(struct ddpcb *)) 0) return; ddpcb = cb; - prev = (struct ddpcb *)off; - for (next = initial; next != NULL; prev = next) { + for (next = initial; next != NULL;) { u_long ppcb = (u_long)next; if (kread((u_long)next, (char *)ddpcb, sizeof(ddpcb)) 0) Index: src/usr.bin/netstat/if.c diff -u src/usr.bin/netstat/if.c:1.76 src/usr.bin/netstat/if.c:1.77 --- src/usr.bin/netstat/if.c:1.76 Fri Mar 1 13:26:11 2013 +++ src/usr.bin/netstat/if.c Fri Oct 18 16:26:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.76 2013/03/01 18:26:11 joerg Exp $ */ +/* $NetBSD: if.c,v 1.77 2013/10/18 20:26:45 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)if.c 8.2 (Berkeley) 2/21/94; #else -__RCSID($NetBSD: if.c,v 1.76 2013/03/01 18:26:11 joerg Exp $); +__RCSID($NetBSD: if.c,v 1.77 2013/10/18 20:26:45 christos Exp $); #endif #endif /* not lint */ @@ -401,9 +401,10 @@ print_addr(struct sockaddr *sa, struct s sin6 = (struct sockaddr_in6 *)sa; #ifdef __KAME__ if (IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr)) { - sin6-sin6_scope_id = -ntohs(*(u_int16_t *) - sin6-sin6_addr.s6_addr[2]); + uint16_t scope; + memcpy(scope, sin6-sin6_addr.s6_addr[2], + sizeof(scope)); + sin6-sin6_scope_id = ntohs(scope); /* too little width */ if (!vflag) sin6-sin6_scope_id = 0; @@ -455,9 +456,11 @@ print_addr(struct sockaddr *sa, struct s as6.sin6_addr = inm.in6m_addr; #ifdef __KAME__ if (IN6_IS_ADDR_MC_LINKLOCAL(as6.sin6_addr)) { - as6.sin6_scope_id = - ntohs(*(u_int16_t *) - as6.sin6_addr.s6_addr[2]); + uint16_t scope; + memcpy(scope, + sin6-sin6_addr.s6_addr[2], + sizeof(scope)); + as6.sin6_scope_id = ntohs(scope); as6.sin6_addr.s6_addr[2] = 0; as6.sin6_addr.s6_addr[3] = 0; } Index: src/usr.bin/netstat/inet6.c diff -u src/usr.bin/netstat/inet6.c:1.62 src/usr.bin/netstat/inet6.c:1.63 --- src/usr.bin/netstat/inet6.c:1.62 Thu Jun 20 06:43:18 2013 +++ src/usr.bin/netstat/inet6.c Fri Oct 18 16:26:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.62 2013/06/20 10:43:18 martin Exp $ */ +/* $NetBSD: inet6.c,v 1.63 2013/10/18 20:26:45 christos Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = @(#)inet.c 8.4 (Berkeley) 4/20/94; #else -__RCSID($NetBSD: inet6.c,v 1.62 2013/06/20 10:43:18 martin Exp $); +__RCSID($NetBSD: inet6.c,v 1.63 2013/10/18 20:26:45 christos Exp $); #endif #endif /* not lint */ @@ -1423,8 +1423,10 @@ inet6name(const struct in6_addr *in6p) #ifdef __KAME__ if (IN6_IS_ADDR_LINKLOCAL(in6p) || IN6_IS_ADDR_MC_LINKLOCAL(in6p)) { - sin6.sin6_scope_id = - ntohs(*(const u_int16_t *)in6p-s6_addr[2]); + uint16_t scope; + memcpy(scope, sin6.sin6_addr.s6_addr[2], + sizeof(scope)); + sin6.sin6_scope_id = ntohs(scope); sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; } Index: src/usr.bin/netstat/mroute6.c diff -u src/usr.bin/netstat/mroute6.c:1.13 src/usr.bin/netstat/mroute6.c:1.14 --- src/usr.bin/netstat/mroute6.c:1.13 Tue Mar 20 16:34:58 2012 +++ src/usr.bin/netstat/mroute6.c Fri Oct 18 16:26:45 2013 @@ -1,4 +1,4 @@
CVS commit: src/dist/nvi
Module Name:src Committed By: christos Date: Fri Oct 18 20:40:15 UTC 2013 Modified Files: src/dist/nvi/cl: cl_funcs.c cl_screen.c src/dist/nvi/common: exf.c key.c src/dist/nvi/ex: ex.c ex_args.c ex_argv.c ex_bang.c ex_display.c ex_global.c ex_print.c ex_script.c ex_subst.c ex_tag.c ex_usage.c src/dist/nvi/regex: engine.c src/dist/nvi/vi: v_mark.c v_search.c v_txt.c vs_line.c vs_msg.c vs_split.c Log Message: remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/cl/cl_funcs.c cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/cl/cl_screen.c cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/common/exf.c cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/common/key.c cvs rdiff -u -r1.9 -r1.10 src/dist/nvi/ex/ex.c cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/ex/ex_args.c src/dist/nvi/ex/ex_bang.c \ src/dist/nvi/ex/ex_display.c cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/ex/ex_argv.c \ src/dist/nvi/ex/ex_global.c src/dist/nvi/ex/ex_subst.c cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/ex/ex_print.c cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/ex/ex_script.c cvs rdiff -u -r1.11 -r1.12 src/dist/nvi/ex/ex_tag.c cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/ex/ex_usage.c cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/regex/engine.c cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/vi/v_mark.c cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/vi/v_search.c cvs rdiff -u -r1.8 -r1.9 src/dist/nvi/vi/v_txt.c cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/vi/vs_line.c cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/vi/vs_msg.c cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/vi/vs_split.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/cl/cl_funcs.c diff -u src/dist/nvi/cl/cl_funcs.c:1.4 src/dist/nvi/cl/cl_funcs.c:1.5 --- src/dist/nvi/cl/cl_funcs.c:1.4 Sun Nov 15 13:43:28 2009 +++ src/dist/nvi/cl/cl_funcs.c Fri Oct 18 16:40:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cl_funcs.c,v 1.4 2009/11/15 18:43:28 dsl Exp $ */ +/* $NetBSD: cl_funcs.c,v 1.5 2013/10/18 20:40:15 christos Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -37,12 +37,10 @@ static void cl_rdiv __P((SCR *)); static int addstr4(SCR *sp, const void *str, size_t len, int wide) { - CL_PRIVATE *clp; WINDOW *win; size_t y, x; int iv; - clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* @@ -51,6 +49,7 @@ addstr4(SCR *sp, const void *str, size_t */ iv = 0; getyx(win, y, x); + __USE(x); if (!F_ISSET(sp, SC_SCR_EXWROTE) y == RLNO(sp, LASTLINE(sp)) IS_SPLIT(sp)) { iv = 1; @@ -312,11 +311,9 @@ int cl_deleteln(SCR *sp) { CHAR_T ch; - CL_PRIVATE *clp; WINDOW *win; size_t col, lno, spcnt, y, x; - clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* @@ -548,13 +545,11 @@ cl_move(SCR *sp, size_t lno, size_t cno) int cl_refresh(SCR *sp, int repaint) { - GS *gp; CL_PRIVATE *clp; WINDOW *win; SCR *psp, *tsp; size_t y, x; - gp = sp-gp; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; @@ -741,11 +736,9 @@ cl_suspend(SCR *sp, int *allowedp) struct termios t; CL_PRIVATE *clp; WINDOW *win; - GS *gp; size_t y, x; int changed; - gp = sp-gp; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; *allowedp = 1; Index: src/dist/nvi/cl/cl_screen.c diff -u src/dist/nvi/cl/cl_screen.c:1.2 src/dist/nvi/cl/cl_screen.c:1.3 --- src/dist/nvi/cl/cl_screen.c:1.2 Fri Dec 5 17:51:42 2008 +++ src/dist/nvi/cl/cl_screen.c Fri Oct 18 16:40:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cl_screen.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */ +/* $NetBSD: cl_screen.c,v 1.3 2013/10/18 20:40:15 christos Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -185,11 +185,9 @@ static int cl_vi_init(SCR *sp) { CL_PRIVATE *clp; - GS *gp; char *o_cols, *o_lines, *o_term; const char *ttype; - gp = sp-gp; clp = CLP(sp); /* If already initialized, just set the terminal modes. */ Index: src/dist/nvi/common/exf.c diff -u src/dist/nvi/common/exf.c:1.5 src/dist/nvi/common/exf.c:1.6 --- src/dist/nvi/common/exf.c:1.5 Sun Jul 15 05:13:59 2012 +++ src/dist/nvi/common/exf.c Fri Oct 18 16:40:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: exf.c,v 1.5 2012/07/15 09:13:59 spz Exp $ */ +/* $NetBSD: exf.c,v 1.6 2013/10/18 20:40:15 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -131,10 +131,10 @@ file_init(SCR *sp, FREF *frp, char *rcv_ EXF *ep; struct stat sb; size_t psize; - int fd, exists, open_err, readonly, stolen; + int fd, exists, open_err, readonly; char *oname = NULL, tname[MAXPATHLEN]; - stolen = open_err = readonly = 0; + open_err = readonly = 0; /* * If the file is a recovery file, let the recovery code handle it. Index: src/dist/nvi/common/key.c diff -u src/dist/nvi/common/key.c:1.6 src/dist/nvi/common/key.c:1.7 --- src/dist/nvi/common/key.c:1.6 Mon Mar 21 10:53:02 2011 +++ src/dist/nvi/common/key.c Fri Oct 18 16:40:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.6 2011/03/21 14:53:02 tnozaki Exp $ */ +/*
CVS commit: src/usr.bin/rdist
Module Name:src Committed By: christos Date: Fri Oct 18 20:41:49 UTC 2013 Modified Files: src/usr.bin/rdist: server.c Log Message: remove unused To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/rdist/server.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/server.c diff -u src/usr.bin/rdist/server.c:1.31 src/usr.bin/rdist/server.c:1.32 --- src/usr.bin/rdist/server.c:1.31 Mon Apr 13 00:35:36 2009 +++ src/usr.bin/rdist/server.c Fri Oct 18 16:41:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: server.c,v 1.31 2009/04/13 04:35:36 lukem Exp $ */ +/* $NetBSD: server.c,v 1.32 2013/10/18 20:41:49 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)server.c 8.1 (Berkeley) 6/9/93; #else -__RCSID($NetBSD: server.c,v 1.31 2009/04/13 04:35:36 lukem Exp $); +__RCSID($NetBSD: server.c,v 1.32 2013/10/18 20:41:49 christos Exp $); #endif #endif /* not lint */ @@ -748,7 +748,7 @@ static void recvf(char *cmd, int type) { char *cp = cmd; - int f = -1, opts = 0, wrerr, olderrno; + int f = -1, opts = 0, wrerr; mode_t mode; off_t i, size; time_t mtime; @@ -924,7 +924,6 @@ recvf(char *cmd, int type) if (i + amt size) amt = size - i; if (wrerr == 0 write(f, buf, amt) != amt) { - olderrno = errno; wrerr++; } }
CVS commit: src/usr.bin/rdist
Module Name:src Committed By: christos Date: Fri Oct 18 20:41:58 UTC 2013 Modified Files: src/usr.bin/rdist: docmd.c Log Message: fix clobbered variable To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/rdist/docmd.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/docmd.c diff -u src/usr.bin/rdist/docmd.c:1.28 src/usr.bin/rdist/docmd.c:1.29 --- src/usr.bin/rdist/docmd.c:1.28 Mon Apr 13 00:35:36 2009 +++ src/usr.bin/rdist/docmd.c Fri Oct 18 16:41:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: docmd.c,v 1.28 2009/04/13 04:35:36 lukem Exp $ */ +/* $NetBSD: docmd.c,v 1.29 2013/10/18 20:41:58 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)docmd.c 8.1 (Berkeley) 6/9/93; #else -__RCSID($NetBSD: docmd.c,v 1.28 2009/04/13 04:35:36 lukem Exp $); +__RCSID($NetBSD: docmd.c,v 1.29 2013/10/18 20:41:58 christos Exp $); #endif #endif /* not lint */ @@ -123,7 +123,7 @@ docmds(char **dhosts, int argc, char **a * Process commands for sending files to other machines. */ static void -doarrow(char **filev, struct namelist *files, char *rhost, struct subcmd *cmds) +doarrow(char **filev, struct namelist *xfiles, char *rhost, struct subcmd *cmds) { struct namelist *f; struct subcmd *sc; @@ -131,6 +131,7 @@ doarrow(char **filev, struct namelist *f int n; int volatile ddir; int volatile opts; + struct namelist * volatile files = xfiles; opts = options; if (debug)
CVS commit: src/usr.bin/rdist
Module Name:src Committed By: christos Date: Fri Oct 18 20:43:46 UTC 2013 Modified Files: src/usr.bin/rdist: docmd.c Log Message: more clobbering fixes. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/rdist/docmd.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/docmd.c diff -u src/usr.bin/rdist/docmd.c:1.29 src/usr.bin/rdist/docmd.c:1.30 --- src/usr.bin/rdist/docmd.c:1.29 Fri Oct 18 16:41:58 2013 +++ src/usr.bin/rdist/docmd.c Fri Oct 18 16:43:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: docmd.c,v 1.29 2013/10/18 20:41:58 christos Exp $ */ +/* $NetBSD: docmd.c,v 1.30 2013/10/18 20:43:45 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)docmd.c 8.1 (Berkeley) 6/9/93; #else -__RCSID($NetBSD: docmd.c,v 1.29 2013/10/18 20:41:58 christos Exp $); +__RCSID($NetBSD: docmd.c,v 1.30 2013/10/18 20:43:45 christos Exp $); #endif #endif /* not lint */ @@ -123,7 +123,8 @@ docmds(char **dhosts, int argc, char **a * Process commands for sending files to other machines. */ static void -doarrow(char **filev, struct namelist *xfiles, char *rhost, struct subcmd *cmds) +doarrow(char **filev, struct namelist *xfiles, char *rhost, +struct subcmd *xcmds) { struct namelist *f; struct subcmd *sc; @@ -132,6 +133,7 @@ doarrow(char **filev, struct namelist *x int volatile ddir; int volatile opts; struct namelist * volatile files = xfiles; + struct subcmd * volatile cmds = xcmds; opts = options; if (debug)
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Fri Oct 18 20:46:09 UTC 2013 Modified Files: src/usr.bin/xlint/lint1: scan.l Log Message: fix sequence point violations To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.bin/xlint/lint1/scan.l 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/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.52 src/usr.bin/xlint/lint1/scan.l:1.53 --- src/usr.bin/xlint/lint1/scan.l:1.52 Fri Apr 19 14:51:14 2013 +++ src/usr.bin/xlint/lint1/scan.l Fri Oct 18 16:46:09 2013 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.52 2013/04/19 18:51:14 christos Exp $ */ +/* $NetBSD: scan.l,v 1.53 2013/10/18 20:46:09 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(lint) -__RCSID($NetBSD: scan.l,v 1.52 2013/04/19 18:51:14 christos Exp $); +__RCSID($NetBSD: scan.l,v 1.53 2013/10/18 20:46:09 christos Exp $); #endif #include stdlib.h @@ -318,7 +318,8 @@ initscan(void) h = hash(sym-s_name); if ((sym-s_link = symtab[h]) != NULL) symtab[h]-s_rlink = sym-s_link; - (symtab[h] = sym)-s_rlink = symtab[h]; + sym-s_rlink = symtab[h]; + symtab[h] = sym; } /* initialize bit-masks for quads */ @@ -1391,7 +1392,8 @@ getsym(sbuf_t *sb) if ((sym-s_link = symtab[sb-sb_hash]) != NULL) symtab[sb-sb_hash]-s_rlink = sym-s_link; - (symtab[sb-sb_hash] = sym)-s_rlink = symtab[sb-sb_hash]; + sym-s_rlink = symtab[sb-sb_hash]; + symtab[sb-sb_hash] = sym; *di-d_ldlsym = sym; di-d_ldlsym = sym-s_dlnxt; @@ -1425,7 +1427,8 @@ mktempsym(type_t *t) if ((sym-s_link = symtab[h]) != NULL) symtab[h]-s_rlink = sym-s_link; - (symtab[h] = sym)-s_rlink = symtab[h]; + sym-s_rlink = symtab[h]; + symtab[h] = sym; *dcs-d_ldlsym = sym; dcs-d_ldlsym = sym-s_dlnxt; @@ -1478,7 +1481,8 @@ inssym(int bl, sym_t *sym) h = hash(sym-s_name); if ((sym-s_link = symtab[h]) != NULL) symtab[h]-s_rlink = sym-s_link; - (symtab[h] = sym)-s_rlink = symtab[h]; + sym-s_rlink = symtab[h]; + symtab[h] = sym; sym-s_blklev = bl; if (sym-s_link != NULL sym-s_blklev sym-s_link-s_blklev) LERROR(inssym()); @@ -1530,7 +1534,8 @@ pushdown(sym_t *sym) if ((nsym-s_link = symtab[h]) != NULL) symtab[h]-s_rlink = nsym-s_link; - (symtab[h] = nsym)-s_rlink = symtab[h]; + nsym-s_rlink = symtab[h]; + symtab[h] = nsym; *dcs-d_ldlsym = nsym; dcs-d_ldlsym = nsym-s_dlnxt;
CVS commit: src/usr.bin
Module Name:src Committed By: christos Date: Fri Oct 18 20:47:07 UTC 2013 Modified Files: src/usr.bin/audio/common: wav.c src/usr.bin/cksum: cksum.c src/usr.bin/deroff: deroff.c src/usr.bin/fgen: fgen.l src/usr.bin/lock: lock.c src/usr.bin/login: login_pam.c src/usr.bin/mail: mime_attach.c src/usr.bin/make: parse.c src/usr.bin/msgs: msgs.c src/usr.bin/sdpquery: print.c src/usr.bin/sort: init.c src/usr.bin/systat: bufcache.c src/usr.bin/tail: forward.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/audio/common/wav.c cvs rdiff -u -r1.45 -r1.46 src/usr.bin/cksum/cksum.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/deroff/deroff.c cvs rdiff -u -r1.35 -r1.36 src/usr.bin/fgen/fgen.l cvs rdiff -u -r1.32 -r1.33 src/usr.bin/lock/lock.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/login/login_pam.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/mail/mime_attach.c cvs rdiff -u -r1.191 -r1.192 src/usr.bin/make/parse.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/msgs/msgs.c cvs rdiff -u -r1.19 -r1.20 src/usr.bin/sdpquery/print.c cvs rdiff -u -r1.28 -r1.29 src/usr.bin/sort/init.c cvs rdiff -u -r1.25 -r1.26 src/usr.bin/systat/bufcache.c cvs rdiff -u -r1.31 -r1.32 src/usr.bin/tail/forward.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/wav.c diff -u src/usr.bin/audio/common/wav.c:1.11 src/usr.bin/audio/common/wav.c:1.12 --- src/usr.bin/audio/common/wav.c:1.11 Fri Aug 30 16:57:26 2013 +++ src/usr.bin/audio/common/wav.c Fri Oct 18 16:47:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: wav.c,v 1.11 2013/08/30 20:57:26 mrg Exp $ */ +/* $NetBSD: wav.c,v 1.12 2013/10/18 20:47:06 christos Exp $ */ /* * Copyright (c) 2002, 2009 Matthew R. Green @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: wav.c,v 1.11 2013/08/30 20:57:26 mrg Exp $); +__RCSID($NetBSD: wav.c,v 1.12 2013/10/18 20:47:06 christos Exp $); #endif @@ -261,7 +261,7 @@ wav_prepare_header(struct write_info *wi *fact = fact, *data = data; u_int32_t filelen, fmtsz, sps, abps, factsz = 4, nsample, datalen; - u_int16_t fmttag, nchan, align, bps, extln = 0; + u_int16_t fmttag, nchan, align, extln = 0; if (wi-header_info) warnx(header information not supported for WAV); @@ -269,13 +269,10 @@ wav_prepare_header(struct write_info *wi switch (wi-precision) { case 8: - bps = 8; break; case 16: - bps = 16; break; case 32: - bps = 32; break; default: { Index: src/usr.bin/cksum/cksum.c diff -u src/usr.bin/cksum/cksum.c:1.45 src/usr.bin/cksum/cksum.c:1.46 --- src/usr.bin/cksum/cksum.c:1.45 Mon Aug 29 10:12:29 2011 +++ src/usr.bin/cksum/cksum.c Fri Oct 18 16:47:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cksum.c,v 1.45 2011/08/29 14:12:29 joerg Exp $ */ +/* $NetBSD: cksum.c,v 1.46 2013/10/18 20:47:06 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1991, 19 #if 0 static char sccsid[] = @(#)cksum.c 8.2 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: cksum.c,v 1.45 2011/08/29 14:12:29 joerg Exp $); +__RCSID($NetBSD: cksum.c,v 1.46 2013/10/18 20:47:06 christos Exp $); #endif /* not lint */ #include sys/types.h @@ -149,7 +149,7 @@ __dead static void usage(void); int main(int argc, char **argv) { - int ch, fd, rval, dosum, pflag, nohashstdin; + int ch, fd, rval, pflag, nohashstdin; u_int32_t val; off_t len; char *fn; @@ -161,7 +161,7 @@ main(int argc, char **argv) cfncn = NULL; pfncn = NULL; - dosum = pflag = nohashstdin = 0; + pflag = nohashstdin = 0; normal = 0; check_warn = 0; do_check = 0; @@ -178,7 +178,6 @@ main(int argc, char **argv) hash = NULL; if (!strcmp(progname, sum)) { - dosum = 1; cfncn = csum1; pfncn = psum1; } else { Index: src/usr.bin/deroff/deroff.c diff -u src/usr.bin/deroff/deroff.c:1.10 src/usr.bin/deroff/deroff.c:1.11 --- src/usr.bin/deroff/deroff.c:1.10 Fri Sep 13 16:51:20 2013 +++ src/usr.bin/deroff/deroff.c Fri Oct 18 16:47:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: deroff.c,v 1.10 2013/09/13 20:51:20 joerg Exp $ */ +/* $NetBSD: deroff.c,v 1.11 2013/10/18 20:47:06 christos Exp $ */ /* taken from: OpenBSD: deroff.c,v 1.6 2004/06/02 14:58:46 tom Exp */ @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: deroff.c,v 1.10 2013/09/13 20:51:20 joerg Exp $); +__RCSID($NetBSD: deroff.c,v 1.11 2013/10/18 20:47:06 christos Exp $); #include err.h #include limits.h @@ -166,7 +166,7 @@ typedef int pacmac; /* compressed macro static int argconcat = 0; /* concat arguments together (-me only) */ #define tomac(c1, c2) c1) 0xFF) 8) | ((c2) 0xFF)) -#define frommac(src, c1, c2) (((c1)=((src)8)0xFF),((c2) =(src)0xFF)) +#define frommac(src, c1, c2) (((c1)=((src)8)0xFF),((c2) =(src)0xFF), __USE(c1), __USE(c2))
CVS commit: src/sbin/route
Module Name:src Committed By: christos Date: Fri Oct 18 21:01:00 UTC 2013 Modified Files: src/sbin/route: route.c Log Message: avoid pointer gymnastics To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sbin/route/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.140 src/sbin/route/route.c:1.141 --- src/sbin/route/route.c:1.140 Fri Mar 1 13:25:17 2013 +++ src/sbin/route/route.c Fri Oct 18 17:01:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.140 2013/03/01 18:25:17 joerg Exp $ */ +/* $NetBSD: route.c,v 1.141 2013/10/18 21:01:00 christos Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = @(#)route.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: route.c,v 1.140 2013/03/01 18:25:17 joerg Exp $); +__RCSID($NetBSD: route.c,v 1.141 2013/10/18 21:01:00 christos Exp $); #endif #endif /* not lint */ @@ -543,8 +543,10 @@ routename(const struct sockaddr *sa, str (IN6_IS_ADDR_LINKLOCAL(sin6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(sin6.sin6_addr)) sin6.sin6_scope_id == 0) { - sin6.sin6_scope_id = - ntohs(*(u_int16_t *)sin6.sin6_addr.s6_addr[2]); + uint16_t scope; + memcpy(scope, sin6.sin6_addr.s6_addr[2], + sizeof(scope)); + sin6.sin6_scope_id = ntohs(scope); sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; } @@ -710,8 +712,10 @@ netname(const struct sockaddr *sa, struc (IN6_IS_ADDR_LINKLOCAL(sin6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(sin6.sin6_addr)) sin6.sin6_scope_id == 0) { - sin6.sin6_scope_id = - ntohs(*(u_int16_t *)sin6.sin6_addr.s6_addr[2]); + uint16_t scope; + memcpy(scope, sin6.sin6_addr.s6_addr[2], + sizeof(scope)); + sin6.sin6_scope_id = ntohs(scope); sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; } @@ -1259,8 +1263,10 @@ getaddr(int which, const char *s, struct if ((IN6_IS_ADDR_LINKLOCAL(su-sin6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(su-sin6.sin6_addr)) su-sin6.sin6_scope_id) { - *(u_int16_t *)su-sin6.sin6_addr.s6_addr[2] = -htons(su-sin6.sin6_scope_id); + uint16_t scope; + scope = htons(su-sin6.sin6_scope_id); + memcpy(su-sin6.sin6_addr.s6_addr[2], scope, + sizeof(scope)); su-sin6.sin6_scope_id = 0; } #endif
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: bad Date: Fri Oct 18 22:18:14 UTC 2013 Modified Files: src/usr.bin/netstat: main.c netstat.1 Log Message: Make the -f option accept multiple address families. Bump man page date. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/usr.bin/netstat/main.c cvs rdiff -u -r1.66 -r1.67 src/usr.bin/netstat/netstat.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/netstat/main.c diff -u src/usr.bin/netstat/main.c:1.86 src/usr.bin/netstat/main.c:1.87 --- src/usr.bin/netstat/main.c:1.86 Wed Jun 19 21:12:03 2013 +++ src/usr.bin/netstat/main.c Fri Oct 18 22:18:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.86 2013/06/19 21:12:03 christos Exp $ */ +/* $NetBSD: main.c,v 1.87 2013/10/18 22:18:14 bad Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = from: @(#)main.c 8.4 (Berkeley) 3/1/94; #else -__RCSID($NetBSD: main.c,v 1.86 2013/06/19 21:12:03 christos Exp $); +__RCSID($NetBSD: main.c,v 1.87 2013/10/18 22:18:14 bad Exp $); #endif #endif /* not lint */ @@ -395,6 +395,7 @@ main(int argc, char *argv[]) struct protox *tp; /* for printing cblocks stats */ int ch; char *cp; + char *afname, *afnames; u_long pcbaddr; if (prog_init) { @@ -407,6 +408,7 @@ main(int argc, char *argv[]) (void)setegid(getgid()); tp = NULL; af = AF_UNSPEC; + afnames = NULL; pcbaddr = 0; while ((ch = getopt(argc, argv, @@ -428,24 +430,7 @@ main(int argc, char *argv[]) dflag = 1; break; case 'f': - if (strcmp(optarg, inet) == 0) -af = AF_INET; - else if (strcmp(optarg, inet6) == 0) -af = AF_INET6; - else if (strcmp(optarg, arp) == 0) -af = AF_ARP; - else if (strcmp(optarg, pfkey) == 0) -af = PF_KEY; - else if (strcmp(optarg, unix) == 0 - || strcmp(optarg, local) == 0) -af = AF_LOCAL; - else if (strcmp(optarg, atalk) == 0) -af = AF_APPLETALK; - else if (strcmp(optarg, mpls) == 0) -af = AF_MPLS; - else -errx(1, %s: unknown address family, -optarg); + afnames = optarg; break; #ifndef SMALL case 'g': @@ -603,91 +588,124 @@ main(int argc, char *argv[]) */ sethostent(1); setnetent(1); - if (iflag) { - if (af != AF_UNSPEC) - goto protostat; + /* + * If -f was used afnames != NULL, loop over the address families. + * Otherwise do this at least once (with af == AF_UNSPEC). + */ + afname = NULL; + do { + if (afnames != NULL) { + afname = strsep(afnames, ,); + if (afname == NULL) +break; /* Exit early */ + if (strcmp(afname, inet) == 0) +af = AF_INET; + else if (strcmp(afname, inet6) == 0) +af = AF_INET6; + else if (strcmp(afname, arp) == 0) +af = AF_ARP; + else if (strcmp(afname, pfkey) == 0) +af = PF_KEY; + else if (strcmp(afname, unix) == 0 + || strcmp(afname, local) == 0) +af = AF_LOCAL; + else if (strcmp(afname, atalk) == 0) +af = AF_APPLETALK; + else if (strcmp(afname, mpls) == 0) +af = AF_MPLS; + else { +warnx(%s: unknown address family, +afname); +continue; + } + } - intpr(interval, nl[N_IFNET].n_value, NULL); - exit(0); - } - if (rflag) { - if (sflag) - rt_stats(use_sysctl ? 0 : nl[N_RTSTAT].n_value); - else { - if (!use_sysctl) -err(1, -r is not supported -for post-mortem analysis.); - p_rttables(af); + if (iflag) { + if (af != AF_UNSPEC) +goto protostat; + + intpr(interval, nl[N_IFNET].n_value, NULL); + break; + } + if (rflag) { + if (sflag) +rt_stats(use_sysctl ? 0 : nl[N_RTSTAT].n_value); + else { +if (!use_sysctl) + err(1, -r is not supported + for post-mortem analysis.); +p_rttables(af); + } + break; } - exit(0); - } #ifndef SMALL - if (gflag) { - if (sflag) { - if (af == AF_INET || af == AF_UNSPEC) -mrt_stats(nl[N_MRTPROTO].n_value, - nl[N_MRTSTAT].n_value); + if (gflag) { + if (sflag) { +if (af == AF_INET || af == AF_UNSPEC) + mrt_stats(nl[N_MRTPROTO].n_value, + nl[N_MRTSTAT].n_value); #ifdef INET6 - if (af == AF_INET6 || af == AF_UNSPEC) -mrt6_stats(nl[N_MRT6PROTO].n_value, - nl[N_MRT6STAT].n_value); +if (af == AF_INET6 || af == AF_UNSPEC) + mrt6_stats(nl[N_MRT6PROTO].n_value, + nl[N_MRT6STAT].n_value); #endif - } - else { - if (af == AF_INET || af == AF_UNSPEC) -mroutepr(nl[N_MRTPROTO].n_value, - nl[N_MFCHASHTBL].n_value, - nl[N_MFCHASH].n_value, - nl[N_VIFTABLE].n_value); + } + else { +if (af == AF_INET || af == AF_UNSPEC) + mroutepr(nl[N_MRTPROTO].n_value, + nl[N_MFCHASHTBL].n_value, + nl[N_MFCHASH].n_value, + nl[N_VIFTABLE].n_value); #ifdef INET6 - if (af == AF_INET6 || af == AF_UNSPEC) -mroute6pr(nl[N_MRT6PROTO].n_value, - nl[N_MF6CTABLE].n_value, - nl[N_MIF6TABLE].n_value);
CVS commit: src/usr.bin/systat
Module Name:src Committed By: bad Date: Fri Oct 18 22:42:31 UTC 2013 Modified Files: src/usr.bin/systat: disks.c systat.1 Log Message: Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives. Bump man page date. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/systat/disks.c cvs rdiff -u -r1.42 -r1.43 src/usr.bin/systat/systat.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/systat/disks.c diff -u src/usr.bin/systat/disks.c:1.17 src/usr.bin/systat/disks.c:1.18 --- src/usr.bin/systat/disks.c:1.17 Mon Apr 13 23:20:27 2009 +++ src/usr.bin/systat/disks.c Fri Oct 18 22:42:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.17 2009/04/13 23:20:27 lukem Exp $ */ +/* $NetBSD: disks.c,v 1.18 2013/10/18 22:42:31 bad Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -34,11 +34,12 @@ #if 0 static char sccsid[] = @(#)disks.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: disks.c,v 1.17 2009/04/13 23:20:27 lukem Exp $); +__RCSID($NetBSD: disks.c,v 1.18 2013/10/18 22:42:31 bad Exp $); #endif /* not lint */ #include ctype.h #include string.h +#include fnmatch.h #include systat.h #include extern.h @@ -99,9 +100,8 @@ drvselect(char *args, int truefalse, int if (cp - args == 0) break; for (i = 0; i ndrive; i++) - if (strcmp(args, dr_name[i]) == 0) { + if (fnmatch(args, dr_name[i], 0) == 0) { selections[i] = truefalse; -break; } if (i = ndrive) error(%s: unknown drive, args); Index: src/usr.bin/systat/systat.1 diff -u src/usr.bin/systat/systat.1:1.42 src/usr.bin/systat/systat.1:1.43 --- src/usr.bin/systat/systat.1:1.42 Thu Mar 22 07:58:20 2012 +++ src/usr.bin/systat/systat.1 Fri Oct 18 22:42:31 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: systat.1,v 1.42 2012/03/22 07:58:20 wiz Exp $ +.\ $NetBSD: systat.1,v 1.43 2013/10/18 22:42:31 bad Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)systat.1 8.2 (Berkeley) 12/30/93 .\ -.Dd January 5, 2012 +.Dd October 19, 2012 .Dt SYSTAT 1 .Os .Sh NAME @@ -500,6 +500,9 @@ information about disk drives. These commands are used to select a set of drives to report on, should your system have more drives configured than can normally be displayed on the screen. +Drives may be specified as drive names or as patterns specified in the +notation described by +.Xr fnmatch 3 . .Pp .Bl -tag -width Ar -compact .It Cm display Op Ar drives
CVS commit: src/doc
Module Name:src Committed By: bad Date: Fri Oct 18 22:49:40 UTC 2013 Modified Files: src/doc: CHANGES Log Message: netstat -f takes multiple address families. systat now allows fnmatch(3) patterns to select drives. To generate a diff of this commit: cvs rdiff -u -r1.1853 -r1.1854 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1853 src/doc/CHANGES:1.1854 --- src/doc/CHANGES:1.1853 Sun Oct 13 17:03:00 2013 +++ src/doc/CHANGES Fri Oct 18 22:49:40 2013 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1853 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1854 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -288,4 +288,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: binutils: updated to FSF binutils 2.23.2. [christos 20130929] gdb(1): Updated to 7.6.1. [christos 20131003] httpd(8): Added Lua scripting for content creation. [mbalmer 20131012] - + netstat(1): Accept -faddress_family[,family ...]. [bad 20131019] + systat(1): Accept shell patterns to select drives. [bad 20131019]
CVS import: src/external/bsd/lutok/dist
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:35:26 UTC 2013 Update of /cvsroot/src/external/bsd/lutok/dist In directory ivanova.netbsd.org:/tmp/cvs-serv10623 Log Message: Import lutok-0.3. The main reason for this update is the addition of support for Lua 5.2, which we will want to import sometime. Released on 2013/06/14. * Issue 1: Added support for Lua 5.2 while maintaining support for Lua 5.1. Applications using Lutok can be modified to use the new interface in this new version and thus support both Lua releases. However, because of incompatible changes to the Lua API, this release of Lutok is incompatible with previous releases as well. * Issue 3: Tweaked configure to look for Lua using the pkg-config names lua-5.2 and lua-5.1. These are the names used by FreeBSD. Interface changes: * New global constants: registry_index. * New methods added to the state class: get_global_table. * Removed global constants: globals_index. Status: Vendor Tag: GOOGLE-CODE Release Tags: lutok-0-3 U src/external/bsd/lutok/dist/Atffile U src/external/bsd/lutok/dist/state.hpp U src/external/bsd/lutok/dist/README U src/external/bsd/lutok/dist/Kyuafile U src/external/bsd/lutok/dist/debug.hpp U src/external/bsd/lutok/dist/AUTHORS U src/external/bsd/lutok/dist/NEWS U src/external/bsd/lutok/dist/c_gate_test.cpp U src/external/bsd/lutok/dist/exceptions_test.cpp U src/external/bsd/lutok/dist/operations.cpp U src/external/bsd/lutok/dist/exceptions.cpp U src/external/bsd/lutok/dist/lutok.pc.in U src/external/bsd/lutok/dist/debug.cpp U src/external/bsd/lutok/dist/stack_cleaner.cpp U src/external/bsd/lutok/dist/operations.hpp U src/external/bsd/lutok/dist/state.cpp U src/external/bsd/lutok/dist/debug_test.cpp U src/external/bsd/lutok/dist/test_utils.hpp U src/external/bsd/lutok/dist/operations_test.cpp U src/external/bsd/lutok/dist/state_test.cpp U src/external/bsd/lutok/dist/exceptions.hpp U src/external/bsd/lutok/dist/examples_test.sh U src/external/bsd/lutok/dist/stack_cleaner.hpp U src/external/bsd/lutok/dist/COPYING U src/external/bsd/lutok/dist/state.ipp U src/external/bsd/lutok/dist/c_gate.cpp U src/external/bsd/lutok/dist/c_gate.hpp U src/external/bsd/lutok/dist/stack_cleaner_test.cpp U src/external/bsd/lutok/dist/examples/hello.cpp U src/external/bsd/lutok/dist/examples/interpreter.cpp U src/external/bsd/lutok/dist/examples/bindings.cpp U src/external/bsd/lutok/dist/examples/raii.cpp No conflicts created by this import
CVS commit: src/external/bsd/lutok
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:36:10 UTC 2013 Modified Files: src/external/bsd/lutok/lib/liblutok: Makefile config.h shlib_version src/external/bsd/lutok/tests/lib/liblutok: Makefile Log Message: Update reachover build files for lutok-0.3. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/lutok/lib/liblutok/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/lutok/lib/liblutok/config.h \ src/external/bsd/lutok/lib/liblutok/shlib_version cvs rdiff -u -r1.1 -r1.2 src/external/bsd/lutok/tests/lib/liblutok/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/lutok/lib/liblutok/Makefile diff -u src/external/bsd/lutok/lib/liblutok/Makefile:1.3 src/external/bsd/lutok/lib/liblutok/Makefile:1.4 --- src/external/bsd/lutok/lib/liblutok/Makefile:1.3 Thu Sep 12 17:14:20 2013 +++ src/external/bsd/lutok/lib/liblutok/Makefile Fri Oct 18 23:36:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/09/12 17:14:20 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2013/10/18 23:36:10 jmmv Exp $ #NOLINT= # defined @@ -48,7 +48,7 @@ lutok.pc: Makefile lutok.pc.in -e 's,__LIBDIR__,/usr/lib,g' \ -e 's,__LUA_CFLAGS__,-I/usr/include,g' \ -e 's,__LUA_LIBS,-llua,g' \ - -e 's,__VERSION__,0.2,g' \ + -e 's,__VERSION__,0.3,g' \ ${SRCDIR}/lutok.pc.in lutok.pc CLEANFILES+= lutok.pc .endif Index: src/external/bsd/lutok/lib/liblutok/config.h diff -u src/external/bsd/lutok/lib/liblutok/config.h:1.1 src/external/bsd/lutok/lib/liblutok/config.h:1.2 --- src/external/bsd/lutok/lib/liblutok/config.h:1.1 Sat Feb 16 21:29:47 2013 +++ src/external/bsd/lutok/lib/liblutok/config.h Fri Oct 18 23:36:10 2013 @@ -45,7 +45,7 @@ #define PACKAGE_NAME Lutok /* Define to the full name and version of this package. */ -#define PACKAGE_STRING Lutok 0.2 +#define PACKAGE_STRING Lutok 0.3 /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME lutok @@ -54,10 +54,10 @@ #define PACKAGE_URL http://code.google.com/p/lutok/; /* Define to the version of this package. */ -#define PACKAGE_VERSION 0.2 +#define PACKAGE_VERSION 0.3 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION 0.2 +#define VERSION 0.3 Index: src/external/bsd/lutok/lib/liblutok/shlib_version diff -u src/external/bsd/lutok/lib/liblutok/shlib_version:1.1 src/external/bsd/lutok/lib/liblutok/shlib_version:1.2 --- src/external/bsd/lutok/lib/liblutok/shlib_version:1.1 Sat Feb 16 21:29:47 2013 +++ src/external/bsd/lutok/lib/liblutok/shlib_version Fri Oct 18 23:36:10 2013 @@ -1,3 +1,3 @@ -# $NetBSD: shlib_version,v 1.1 2013/02/16 21:29:47 jmmv Exp $ -major=1 +# $NetBSD: shlib_version,v 1.2 2013/10/18 23:36:10 jmmv Exp $ +major=2 minor=0 Index: src/external/bsd/lutok/tests/lib/liblutok/Makefile diff -u src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.1 src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.2 --- src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.1 Sat Feb 16 21:29:50 2013 +++ src/external/bsd/lutok/tests/lib/liblutok/Makefile Fri Oct 18 23:36:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/16 21:29:50 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2013/10/18 23:36:10 jmmv Exp $ .include bsd.own.mk @@ -19,7 +19,7 @@ TESTS_CXX= c_gate_test \ stack_cleaner_test \ state_test -LDADD+= -llutok -DPADD+= ${LIBLUTOK} +LDADD+= -llutok -llua +DPADD+= ${LIBLUTOK} ${LIBLUA} .include bsd.test.mk
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:37:37 UTC 2013 Modified Files: src/distrib/sets/lists/base: ad.arm ad.mips md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/debug: ad.arm ad.mips md.amd64 md.sparc64 shl.mi Log Message: Add liblutok.so.2. Also mark liblutok.so.1 as obsolete. While this should not be done in the general case, I think it's fine here because MKKYUA still defaults to NO and therefore lutok is not built by default. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.211 -r1.212 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.198 -r1.199 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.673 -r1.674 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/debug/ad.arm cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/debug/shl.mi 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/base/ad.arm diff -u src/distrib/sets/lists/base/ad.arm:1.21 src/distrib/sets/lists/base/ad.arm:1.22 --- src/distrib/sets/lists/base/ad.arm:1.21 Sun Sep 29 14:03:37 2013 +++ src/distrib/sets/lists/base/ad.arm Fri Oct 18 23:37:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.21 2013/09/29 14:03:37 christos Exp $ +# $NetBSD: ad.arm,v 1.22 2013/10/18 23:37:37 jmmv Exp $ ./lib/oabi base-compat-shlib compat ./lib/oabi/npf base-npf-shlib compat ./lib/oabi/npf/ext_log.so base-npf-shlib compat,pic @@ -191,8 +191,10 @@ ./usr/lib/oabi/libldap_r.so.4.2 base-compat-shlib compat,pic,ldap ./usr/lib/oabi/liblua.so.1 base-compat-shlib compat,pic ./usr/lib/oabi/liblua.so.1.0 base-compat-shlib compat,pic -./usr/lib/oabi/liblutok.so.1 base-compat-shlib compat,pic,kyua -./usr/lib/oabi/liblutok.so.1.0 base-compat-shlib compat,pic,kyua +./usr/lib/oabi/liblutok.so.2 base-compat-shlib compat,pic,kyua +./usr/lib/oabi/liblutok.so.2.0 base-compat-shlib compat,pic,kyua +./usr/lib/oabi/liblutok.so.1 base-obsolete obsolete +./usr/lib/oabi/liblutok.so.1.0 base-obsolete obsolete ./usr/lib/oabi/liblwres.so.7 base-compat-shlib compat,pic ./usr/lib/oabi/liblwres.so.7.0 base-compat-shlib compat,pic ./usr/lib/oabi/liblzf.so.1 base-compat-shlib compat,pic Index: src/distrib/sets/lists/base/ad.mips diff -u src/distrib/sets/lists/base/ad.mips:1.16 src/distrib/sets/lists/base/ad.mips:1.17 --- src/distrib/sets/lists/base/ad.mips:1.16 Sun Sep 29 14:03:37 2013 +++ src/distrib/sets/lists/base/ad.mips Fri Oct 18 23:37:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.16 2013/09/29 14:03:37 christos Exp $ +# $NetBSD: ad.mips,v 1.17 2013/10/18 23:37:37 jmmv Exp $ ./lib/64 base-compat-shlib compat,arch64 ./lib/64/npf base-npf-shlib compat,arch64 ./lib/64/npf/ext_log.sobase-npf-shlib compat,pic,arch64 @@ -191,8 +191,10 @@ ./usr/lib/64/libldap_r.so.4.2 base-compat-shlib compat,pic,ldap,arch64 ./usr/lib/64/liblua.so.1 base-compat-shlib compat,pic,arch64 ./usr/lib/64/liblua.so.1.0 base-compat-shlib compat,pic,arch64 -./usr/lib/64/liblutok.so.1 base-compat-shlib compat,pic,kyua,arch64 -./usr/lib/64/liblutok.so.1.0 base-compat-shlib compat,pic,kyua,arch64 +./usr/lib/64/liblutok.so.2 base-compat-shlib compat,pic,kyua,arch64 +./usr/lib/64/liblutok.so.2.0 base-compat-shlib compat,pic,kyua,arch64 +./usr/lib/64/liblutok.so.1 base-obsolete obsolete +./usr/lib/64/liblutok.so.1.0 base-obsolete obsolete ./usr/lib/64/liblwres.so.7 base-compat-shlib compat,pic,arch64 ./usr/lib/64/liblwres.so.7.0 base-compat-shlib compat,pic,arch64 ./usr/lib/64/liblzf.so.1 base-compat-shlib compat,pic,arch64 Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.211 src/distrib/sets/lists/base/md.amd64:1.212 --- src/distrib/sets/lists/base/md.amd64:1.211 Sun Sep 29 14:03:37 2013 +++ src/distrib/sets/lists/base/md.amd64 Fri Oct 18 23:37:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.211 2013/09/29 14:03:37 christos Exp $ +# $NetBSD: md.amd64,v 1.212 2013/10/18 23:37:37 jmmv Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./lib/i386 base-compat-shlib compat @@ -188,8 +188,10 @@ ./usr/lib/i386/liblua.so.1 base-compat-shlib compat,pic ./usr/lib/i386/liblua.so.1.0 base-compat-shlib compat,pic ./usr/lib/i386/liblutok.so base-compat-shlib compat,pic,kyua -./usr/lib/i386/liblutok.so.1 base-compat-shlib compat,pic,kyua -./usr/lib/i386/liblutok.so.1.0 base-compat-shlib compat,pic,kyua +./usr/lib/i386/liblutok.so.2 base-compat-shlib compat,pic,kyua +./usr/lib/i386/liblutok.so.2.0 base-compat-shlib
CVS import: src/external/bsd/kyua-cli/dist
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:40:48 UTC 2013 Update of /cvsroot/src/external/bsd/kyua-cli/dist In directory ivanova.netbsd.org:/tmp/cvs-serv22893 Log Message: Update kyua-cli to 0.7: The major reason for this update is to support the just-imported lutok-0.3 and, in turn, support the eventual update of the in-tree lua to 5.2. Changes: Experimental version released on October 18th, 2013. * Made failures from testers more resilent. If a tester fails, the corresponding test case will be marked as broken instead of causing kyua to exit. * Added the '--results-filter' option to the 'report-html' command and set its default value to skip passed results from HTML reports. This is to keep these reports more succint and to avoid generating tons of detail files that will be, in general, useless. * Switched to use Lutok 0.3 to gain compatibility with Lua 5.2. * Issue 69: Cope with the lack of AM_PROG_AR in configure.ac, which first appeared in Automake 1.11.2. Fixes a problem in Ubuntu 10.04 LTS, which appears stuck in 1.11.1. Status: Vendor Tag: GOOGLE-CODE Release Tags: kyua-cli-0-7 U src/external/bsd/kyua-cli/dist/AUTHORS U src/external/bsd/kyua-cli/dist/COPYING U src/external/bsd/kyua-cli/dist/NEWS U src/external/bsd/kyua-cli/dist/README U src/external/bsd/kyua-cli/dist/main.cpp U src/external/bsd/kyua-cli/dist/Kyuafile U src/external/bsd/kyua-cli/dist/bootstrap/plain_helpers.cpp U src/external/bsd/kyua-cli/dist/bootstrap/atf_helpers.cpp U src/external/bsd/kyua-cli/dist/bootstrap/testsuite U src/external/bsd/kyua-cli/dist/bootstrap/Kyuafile U src/external/bsd/kyua-cli/dist/bootstrap/package.m4 U src/external/bsd/kyua-cli/dist/bootstrap/testsuite.at U src/external/bsd/kyua-cli/dist/cli/cmd_db_migrate.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_about.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_about.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_config.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_config.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_db_exec.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_db_exec.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_db_migrate_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_db_migrate.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_debug.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_debug.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_help.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_help.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_list.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_list.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_report.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_report_html.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_report_html.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_test.hpp U src/external/bsd/kyua-cli/dist/cli/common.cpp U src/external/bsd/kyua-cli/dist/cli/common.hpp U src/external/bsd/kyua-cli/dist/cli/common.ipp U src/external/bsd/kyua-cli/dist/cli/config.cpp U src/external/bsd/kyua-cli/dist/cli/config.hpp U src/external/bsd/kyua-cli/dist/cli/main.cpp U src/external/bsd/kyua-cli/dist/cli/main.hpp U src/external/bsd/kyua-cli/dist/cli/cmd_about_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_config_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_db_exec_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_report_html_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_debug_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_help_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_list_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_report_test.cpp U src/external/bsd/kyua-cli/dist/cli/common_test.cpp U src/external/bsd/kyua-cli/dist/cli/cmd_test_test.cpp U src/external/bsd/kyua-cli/dist/cli/config_test.cpp U src/external/bsd/kyua-cli/dist/cli/main_test.cpp U src/external/bsd/kyua-cli/dist/cli/Kyuafile U src/external/bsd/kyua-cli/dist/doc/kyua-build-root.7.in U src/external/bsd/kyua-cli/dist/doc/kyua-about.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-db-exec.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-config.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-report-html.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-db-migrate.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-debug.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-help.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-list.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-test-filters.7.in U src/external/bsd/kyua-cli/dist/doc/kyua-report.1.in U src/external/bsd/kyua-cli/dist/doc/kyua-test.1.in U src/external/bsd/kyua-cli/dist/doc/kyua.conf.5.in U src/external/bsd/kyua-cli/dist/doc/kyua.1.in U src/external/bsd/kyua-cli/dist/doc/kyuafile.5.in U src/external/bsd/kyua-cli/dist/engine/exceptions_test.cpp U src/external/bsd/kyua-cli/dist/engine/action.cpp U src/external/bsd/kyua-cli/dist/engine/action.hpp U src/external/bsd/kyua-cli/dist/engine/config.cpp U src/external/bsd/kyua-cli/dist/engine/config.hpp U
CVS commit: src/external/bsd/kyua-cli
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:41:40 UTC 2013 Modified Files: src/external/bsd/kyua-cli: Makefile.inc config.h src/external/bsd/kyua-cli/share/man/man5: Makefile src/external/bsd/kyua-cli/share/man/man7: Makefile src/external/bsd/kyua-cli/usr.bin/kyua: Makefile Log Message: Update reachover build files for kyua-cli-0.7. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/kyua-cli/Makefile.inc \ src/external/bsd/kyua-cli/config.h cvs rdiff -u -r1.1 -r1.2 src/external/bsd/kyua-cli/share/man/man5/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/kyua-cli/share/man/man7/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/kyua-cli/usr.bin/kyua/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/kyua-cli/Makefile.inc diff -u src/external/bsd/kyua-cli/Makefile.inc:1.1 src/external/bsd/kyua-cli/Makefile.inc:1.2 --- src/external/bsd/kyua-cli/Makefile.inc:1.1 Sat Feb 23 14:16:49 2013 +++ src/external/bsd/kyua-cli/Makefile.inc Fri Oct 18 23:41:40 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:49 jmmv Exp $ +# $NetBSD: Makefile.inc,v 1.2 2013/10/18 23:41:40 jmmv Exp $ .include bsd.own.mk @@ -20,7 +20,20 @@ KYUA_TESTSDIR= ${TESTSBASE} KYUA_TARNAME!= grep 'define PACKAGE_TARNAME' ${TOPDIR}/config.h \ | cut -d '' -f 2 +cookie-tarname: cookie-tarname-2 + @cmp -s cookie-tarname cookie-tarname-2 \ + || cp cookie-tarname-2 cookie-tarname +cookie-tarname-2: .PHONY + @echo ${KYUA_TARNAME} cookie-tarname-2 +CLEANFILES+= cookie-tarname cookie-tarname-2 + KYUA_VERSION!= grep 'define VERSION' ${TOPDIR}/config.h | cut -d '' -f 2 +cookie-version: cookie-version-2 + @cmp -s cookie-version cookie-version-2 \ + || cp cookie-version-2 cookie-version +cookie-version-2: .PHONY + @echo ${KYUA_VERSION} cookie-version-2 +CLEANFILES+= cookie-version cookie-version-2 CPPFLAGS+= -DHAVE_CONFIG_H @@ -49,6 +62,7 @@ LDADD+= -llutok -lsqlite3 DPADD+= ${LIBLUTOK} ${LIBSQLITE} .endif +MANPAGE_DEPS = cookie-tarname cookie-version BUILD_MANPAGE = \ sed -e 's,__CONFDIR__,${KYUA_CONFDIR},g' \ -e 's,__DOCDIR__,${KYUA_DOCDIR},g' \ Index: src/external/bsd/kyua-cli/config.h diff -u src/external/bsd/kyua-cli/config.h:1.1 src/external/bsd/kyua-cli/config.h:1.2 --- src/external/bsd/kyua-cli/config.h:1.1 Sat Feb 23 14:16:49 2013 +++ src/external/bsd/kyua-cli/config.h Fri Oct 18 23:41:40 2013 @@ -80,7 +80,7 @@ #define PACKAGE_NAME Kyua - Command line interface /* Define to the full name and version of this package. */ -#define PACKAGE_STRING Kyua - Command line interface 0.6 +#define PACKAGE_STRING Kyua - Command line interface 0.7 /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME kyua-cli @@ -89,10 +89,10 @@ #define PACKAGE_URL http://code.google.com/p/kyua/; /* Define to the version of this package. */ -#define PACKAGE_VERSION 0.6 +#define PACKAGE_VERSION 0.7 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION 0.6 +#define VERSION 0.7 Index: src/external/bsd/kyua-cli/share/man/man5/Makefile diff -u src/external/bsd/kyua-cli/share/man/man5/Makefile:1.1 src/external/bsd/kyua-cli/share/man/man5/Makefile:1.2 --- src/external/bsd/kyua-cli/share/man/man5/Makefile:1.1 Sat Feb 23 14:16:54 2013 +++ src/external/bsd/kyua-cli/share/man/man5/Makefile Fri Oct 18 23:41:40 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2013/10/18 23:41:40 jmmv Exp $ .include bsd.init.mk @@ -6,7 +6,7 @@ .for name in kyua.conf.5 kyuafile.5 MAN+= ${name} -${name}: ${name}.in +${name}: ${name}.in ${MANPAGE_DEPS} name=${name}; ${BUILD_MANPAGE} .endfor Index: src/external/bsd/kyua-cli/share/man/man7/Makefile diff -u src/external/bsd/kyua-cli/share/man/man7/Makefile:1.1 src/external/bsd/kyua-cli/share/man/man7/Makefile:1.2 --- src/external/bsd/kyua-cli/share/man/man7/Makefile:1.1 Sat Feb 23 14:16:54 2013 +++ src/external/bsd/kyua-cli/share/man/man7/Makefile Fri Oct 18 23:41:40 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2013/10/18 23:41:40 jmmv Exp $ .include bsd.init.mk @@ -6,7 +6,7 @@ .for name in kyua-build-root.7 kyua-test-filters.7 MAN+= ${name} -${name}: ${name}.in +${name}: ${name}.in ${MANPAGE_DEPS} name=${name}; ${BUILD_MANPAGE} .endfor Index: src/external/bsd/kyua-cli/usr.bin/kyua/Makefile diff -u src/external/bsd/kyua-cli/usr.bin/kyua/Makefile:1.1 src/external/bsd/kyua-cli/usr.bin/kyua/Makefile:1.2 --- src/external/bsd/kyua-cli/usr.bin/kyua/Makefile:1.1 Sat Feb 23 14:16:58 2013 +++ src/external/bsd/kyua-cli/usr.bin/kyua/Makefile Fri Oct 18 23:41:40 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:58 jmmv Exp $ +# $NetBSD:
CVS commit: src/doc
Module Name:src Committed By: jmmv Date: Fri Oct 18 23:43:35 UTC 2013 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note updates of lutok to 0.3 and kyua-cli to 0.7. To generate a diff of this commit: cvs rdiff -u -r1.1059 -r1.1060 src/doc/3RDPARTY cvs rdiff -u -r1.1854 -r1.1855 src/doc/CHANGES 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.1059 src/doc/3RDPARTY:1.1060 --- src/doc/3RDPARTY:1.1059 Sun Oct 6 00:48:03 2013 +++ src/doc/3RDPARTY Fri Oct 18 23:43:35 2013 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1059 2013/10/06 00:48:03 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1060 2013/10/18 23:43:35 jmmv Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -578,8 +578,8 @@ Use external/bsd/kyua-atf-compat/prepare directory. Package: kyua-cli -Version: 0.6 -Current Vers: 0.6 +Version: 0.7 +Current Vers: 0.7 Maintainer: Julio Merino j...@netbsd.org Archive site: http://code.google.com/p/kyua/downloads/list?can=1 Home page: http://code.google.com/p/kyua/ @@ -720,8 +720,8 @@ The default module paths have been chang working directory '.' to avoid potential security problems. Package: Lutok -Version: 0.2 -Current Vers: 0.2 +Version: 0.3 +Current Vers: 0.3 Maintainer: Julio Merino j...@netbsd.org Archive site: http://code.google.com/p/lutok/downloads/list?can=1 Home page: http://code.google.com/p/lutok/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1854 src/doc/CHANGES:1.1855 --- src/doc/CHANGES:1.1854 Fri Oct 18 22:49:40 2013 +++ src/doc/CHANGES Fri Oct 18 23:43:35 2013 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1854 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1855 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -288,5 +288,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0: binutils: updated to FSF binutils 2.23.2. [christos 20130929] gdb(1): Updated to 7.6.1. [christos 20131003] httpd(8): Added Lua scripting for content creation. [mbalmer 20131012] + lutok: Update to 0.3. [jmmv 20131018] + kyua-cli: Update to 0.7. [jmmv 20131018] netstat(1): Accept -faddress_family[,family ...]. [bad 20131019] systat(1): Accept shell patterns to select drives. [bad 20131019]
CVS commit: src/lib/libc/net
Module Name:src Committed By: christos Date: Sat Oct 19 00:08:34 UTC 2013 Modified Files: src/lib/libc/net: Makefile.inc Added Files: src/lib/libc/net: inet6_scopeid.c Log Message: add inet6_scopeid To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/lib/libc/net/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/net/inet6_scopeid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/Makefile.inc diff -u src/lib/libc/net/Makefile.inc:1.83 src/lib/libc/net/Makefile.inc:1.84 --- src/lib/libc/net/Makefile.inc:1.83 Fri Mar 1 13:25:16 2013 +++ src/lib/libc/net/Makefile.inc Fri Oct 18 20:08:34 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.83 2013/03/01 18:25:16 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.84 2013/10/19 00:08:34 christos Exp $ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # net sources @@ -24,7 +24,7 @@ COPTS.hesiod.c+= ${${ACTIVE_CC} == gcc SRCS+= getaddrinfo.c getnameinfo.c .if (${USE_INET6} != no) -SRCS+= ip6opt.c rthdr.c vars6.c +SRCS+= ip6opt.c rthdr.c vars6.c inet6_scopeid.c .endif SRCS+= if_indextoname.c if_nameindex.c if_nametoindex.c Added files: Index: src/lib/libc/net/inet6_scopeid.c diff -u /dev/null src/lib/libc/net/inet6_scopeid.c:1.1 --- /dev/null Fri Oct 18 20:08:34 2013 +++ src/lib/libc/net/inet6_scopeid.c Fri Oct 18 20:08:34 2013 @@ -0,0 +1,71 @@ +/*- + * Copyright (c) 2003 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + *This product includes software developed by the NetBSD + *Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + *contributors may be used to endorse or promote products derived + *from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include sys/cdefs.h +__RCSID($NetBSD: inet6_scopeid.c,v 1.1 2013/10/19 00:08:34 christos Exp $); + +#include sys/endian.h +#include string.h +#include stdint.h +#include netinet/in.h +#include netinet6/in6.h + +/* KAME idiosyncrasy */ +void +inet6_getscopeid(struct sockaddr_in6 *sin6, int flags) +{ +#if defined(__KAME__) + if ((IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr) (flags 1)) || + (IN6_IS_ADDR_MC_LINKLOCAL(sin6-sin6_addr) (flags 2))) { + uint16_t scope; + memcpy(scope, sin6-sin6_addr.s6_addr[2], sizeof(scope)); + sin6-sin6_scope_id = ntohs(scope); + sin6-sin6_addr.s6_addr[2] = sin6-sin6_addr.s6_addr[3] = 0; + } +#endif +} + +void +inet6_putscopeid(struct sockaddr_in6 *sin6, int flags) +{ +#if defined(__KAME__) + if ((IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr) (flags 1)) || + (IN6_IS_ADDR_MC_LINKLOCAL(sin6-sin6_addr) (flags 2))) { + uint16_t scope = htons(sin6-sin6_scope_id); + memcpy(sin6-sin6_addr.s6_addr[2], scope, sizeof(scope)); + sin6-sin6_scope_id = 0; + } +#endif +}
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Sat Oct 19 00:06:50 UTC 2013 Modified Files: src/lib/libc: shlib_version Log Message: bump for scopeid functions To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.241 src/lib/libc/shlib_version:1.242 --- src/lib/libc/shlib_version:1.241 Wed Aug 28 14:01:22 2013 +++ src/lib/libc/shlib_version Fri Oct 18 20:06:50 2013 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.241 2013/08/28 18:01:22 riastradh Exp $ +# $NetBSD: shlib_version,v 1.242 2013/10/19 00:06:50 christos Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -36,4 +36,4 @@ # - remove ruserok() and friends to libcompat (or entirely) # - remove alloca fallback and expect compiler to provide a builtin version. major=12 -minor=186 +minor=187
CVS commit: src/sys/netinet6
Module Name:src Committed By: christos Date: Sat Oct 19 00:09:03 UTC 2013 Modified Files: src/sys/netinet6: in6.h Log Message: add scopeid functions To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/netinet6/in6.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/netinet6/in6.h diff -u src/sys/netinet6/in6.h:1.73 src/sys/netinet6/in6.h:1.74 --- src/sys/netinet6/in6.h:1.73 Thu Jun 20 09:56:29 2013 +++ src/sys/netinet6/in6.h Fri Oct 18 20:09:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.h,v 1.73 2013/06/20 13:56:29 roy Exp $ */ +/* $NetBSD: in6.h,v 1.74 2013/10/19 00:09:03 christos Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -771,6 +771,9 @@ void in6_sin_2_v4mapsin6(struct sockaddr void in6_sin6_2_sin_in_sock(struct sockaddr *); void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **); +void inet6_getscopeid(struct sockaddr_in6 *, int); +void inet6_putscopeid(struct sockaddr_in6 *, int); + extern int inet6_option_space(int); extern int inet6_option_init(void *, struct cmsghdr **, int); extern int inet6_option_append(struct cmsghdr *, const uint8_t *,
CVS commit: src/usr.bin
Module Name:src Committed By: christos Date: Sat Oct 19 00:28:38 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.c src/usr.bin/netstat: if.c inet6.c show.c Log Message: use new scopeid functions To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/usr.bin/fstat/fstat.c cvs rdiff -u -r1.77 -r1.78 src/usr.bin/netstat/if.c cvs rdiff -u -r1.63 -r1.64 src/usr.bin/netstat/inet6.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/netstat/show.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/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.101 src/usr.bin/fstat/fstat.c:1.102 --- src/usr.bin/fstat/fstat.c:1.101 Fri Oct 18 16:18:42 2013 +++ src/usr.bin/fstat/fstat.c Fri Oct 18 20:28:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.101 2013/10/18 20:18:42 christos Exp $ */ +/* $NetBSD: fstat.c,v 1.102 2013/10/19 00:28:38 christos Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = @(#)fstat.c 8.3 (Berkeley) 5/2/95; #else -__RCSID($NetBSD: fstat.c,v 1.101 2013/10/18 20:18:42 christos Exp $); +__RCSID($NetBSD: fstat.c,v 1.102 2013/10/19 00:28:38 christos Exp $); #endif #endif /* not lint */ @@ -88,6 +88,7 @@ __RCSID($NetBSD: fstat.c,v 1.101 2013/1 #ifdef INET6 #include netinet/ip6.h +#include netinet6/in6.h #include netinet6/ip6_var.h #include netinet6/in6_pcb.h #endif @@ -895,7 +896,6 @@ inet6_addrstr(char *buf, size_t len, con { char addr[256], serv[256]; struct sockaddr_in6 sin6; - uint16_t ad2; const int niflags = nflg ? (NI_NUMERICHOST|NI_NUMERICSERV) : 0; (void)memset(sin6, 0, sizeof(sin6)); @@ -904,13 +904,7 @@ inet6_addrstr(char *buf, size_t len, con sin6.sin6_addr = *a; sin6.sin6_port = htons(p); - memcpy(ad2, sin6.sin6_addr.s6_addr[2], sizeof(ad2)); - if (IN6_IS_ADDR_LINKLOCAL(a) ad2 != 0) { - sin6.sin6_scope_id = ntohs(ad2); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } - + inet6_putscopeid(sin6, 1); serv[0] = '\0'; if (getnameinfo((struct sockaddr *)sin6, sin6.sin6_len, Index: src/usr.bin/netstat/if.c diff -u src/usr.bin/netstat/if.c:1.77 src/usr.bin/netstat/if.c:1.78 --- src/usr.bin/netstat/if.c:1.77 Fri Oct 18 16:26:45 2013 +++ src/usr.bin/netstat/if.c Fri Oct 18 20:28:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.77 2013/10/18 20:26:45 christos Exp $ */ +/* $NetBSD: if.c,v 1.78 2013/10/19 00:28:38 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)if.c 8.2 (Berkeley) 2/21/94; #else -__RCSID($NetBSD: if.c,v 1.77 2013/10/18 20:26:45 christos Exp $); +__RCSID($NetBSD: if.c,v 1.78 2013/10/19 00:28:38 christos Exp $); #endif #endif /* not lint */ @@ -399,18 +399,10 @@ print_addr(struct sockaddr *sa, struct s #ifdef INET6 case AF_INET6: sin6 = (struct sockaddr_in6 *)sa; + inet6_putscopeid(sin6, 1); #ifdef __KAME__ - if (IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr)) { - uint16_t scope; - memcpy(scope, sin6-sin6_addr.s6_addr[2], - sizeof(scope)); - sin6-sin6_scope_id = ntohs(scope); - /* too little width */ - if (!vflag) -sin6-sin6_scope_id = 0; - sin6-sin6_addr.s6_addr[2] = 0; - sin6-sin6_addr.s6_addr[3] = 0; - } + if (!vflag) + sin6-sin6_scope_id = 0; #endif if (use_sysctl) { @@ -454,17 +446,7 @@ print_addr(struct sockaddr *sa, struct s as6.sin6_len = sizeof(struct sockaddr_in6); as6.sin6_family = AF_INET6; as6.sin6_addr = inm.in6m_addr; -#ifdef __KAME__ -if (IN6_IS_ADDR_MC_LINKLOCAL(as6.sin6_addr)) { - uint16_t scope; - memcpy(scope, - sin6-sin6_addr.s6_addr[2], - sizeof(scope)); - as6.sin6_scope_id = ntohs(scope); - as6.sin6_addr.s6_addr[2] = 0; - as6.sin6_addr.s6_addr[3] = 0; -} -#endif +inet6_putscopeid(as6, 2); if (getnameinfo((struct sockaddr *)as6, as6.sin6_len, hbuf, sizeof(hbuf), NULL, 0, Index: src/usr.bin/netstat/inet6.c diff -u src/usr.bin/netstat/inet6.c:1.63 src/usr.bin/netstat/inet6.c:1.64 --- src/usr.bin/netstat/inet6.c:1.63 Fri Oct 18 16:26:45 2013 +++ src/usr.bin/netstat/inet6.c Fri Oct 18 20:28:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.63 2013/10/18 20:26:45 christos Exp $ */ +/* $NetBSD: inet6.c,v 1.64 2013/10/19 00:28:38 christos Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = @(#)inet.c 8.4 (Berkeley) 4/20/94; #else -__RCSID($NetBSD: inet6.c,v 1.63 2013/10/18 20:26:45 christos Exp $); +__RCSID($NetBSD: inet6.c,v 1.64 2013/10/19 00:28:38 christos Exp $); #endif #endif /* not lint */ @@ -1420,17 +1420,7 @@ inet6name(const struct in6_addr *in6p) sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; sin6.sin6_addr = *in6p; -#ifdef __KAME__ - if (IN6_IS_ADDR_LINKLOCAL(in6p) || - IN6_IS_ADDR_MC_LINKLOCAL(in6p)) { -
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: christos Date: Sat Oct 19 00:35:30 UTC 2013 Modified Files: src/sbin/ifconfig: af_atalk.c af_inet6.c ifconfig.c tunnel.c util.c util.h Log Message: use the new scopeid functions To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sbin/ifconfig/af_atalk.c cvs rdiff -u -r1.27 -r1.28 src/sbin/ifconfig/af_inet6.c cvs rdiff -u -r1.230 -r1.231 src/sbin/ifconfig/ifconfig.c cvs rdiff -u -r1.17 -r1.18 src/sbin/ifconfig/tunnel.c cvs rdiff -u -r1.16 -r1.17 src/sbin/ifconfig/util.c cvs rdiff -u -r1.9 -r1.10 src/sbin/ifconfig/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/sbin/ifconfig/af_atalk.c diff -u src/sbin/ifconfig/af_atalk.c:1.18 src/sbin/ifconfig/af_atalk.c:1.19 --- src/sbin/ifconfig/af_atalk.c:1.18 Sun Aug 14 08:15:15 2011 +++ src/sbin/ifconfig/af_atalk.c Fri Oct 18 20:35:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: af_atalk.c,v 1.18 2011/08/14 12:15:15 christos Exp $ */ +/* $NetBSD: af_atalk.c,v 1.19 2013/10/19 00:35:30 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: af_atalk.c,v 1.18 2011/08/14 12:15:15 christos Exp $); +__RCSID($NetBSD: af_atalk.c,v 1.19 2013/10/19 00:35:30 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -183,9 +183,8 @@ static void sat_print1(const char *prefix, const struct sockaddr *sa) { char buf[40]; - int rc; - rc = getnameinfo(sa, sa-sa_len, buf, sizeof(buf), NULL, 0, 0); + (void)getnameinfo(sa, sa-sa_len, buf, sizeof(buf), NULL, 0, 0); printf(%s%s, prefix, buf); } Index: src/sbin/ifconfig/af_inet6.c diff -u src/sbin/ifconfig/af_inet6.c:1.27 src/sbin/ifconfig/af_inet6.c:1.28 --- src/sbin/ifconfig/af_inet6.c:1.27 Mon Dec 13 12:35:08 2010 +++ src/sbin/ifconfig/af_inet6.c Fri Oct 18 20:35:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: af_inet6.c,v 1.27 2010/12/13 17:35:08 pooka Exp $ */ +/* $NetBSD: af_inet6.c,v 1.28 2013/10/19 00:35:30 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: af_inet6.c,v 1.27 2010/12/13 17:35:08 pooka Exp $); +__RCSID($NetBSD: af_inet6.c,v 1.28 2013/10/19 00:35:30 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -71,7 +71,6 @@ static int setia6vltime_impl(prop_dictio static int setia6lifetime(prop_dictionary_t, int64_t, time_t *, uint32_t *); -static void in6_delscopeid(struct sockaddr_in6 *sin6); static void in6_status(prop_dictionary_t, prop_dictionary_t, bool); static struct usage_func usage; @@ -257,18 +256,6 @@ setia6eui64_impl(prop_dictionary_t env, return 0; } -/* KAME idiosyncrasy */ -static void -in6_delscopeid(struct sockaddr_in6 *sin6) -{ - if (!IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr) || - sin6-sin6_scope_id == 0) - return; - - *(u_int16_t *)sin6-sin6_addr.s6_addr[2] = htons(sin6-sin6_scope_id); - sin6-sin6_scope_id = 0; -} - /* XXX not really an alias */ void in6_alias(const char *ifname, prop_dictionary_t env, prop_dictionary_t oenv, @@ -291,7 +278,7 @@ in6_alias(const char *ifname, prop_dicti sin6 = creq-ifr_addr; - in6_fillscopeid(sin6); + inet6_getscopeid(sin6, 1); scopeid = sin6-sin6_scope_id; if (getnameinfo((const struct sockaddr *)sin6, sin6-sin6_len, hbuf, sizeof(hbuf), NULL, 0, niflag)) @@ -311,7 +298,7 @@ in6_alias(const char *ifname, prop_dicti ifr6.ifr_addr.sin6_len = sizeof(struct sockaddr_in6); } sin6 = ifr6.ifr_addr; - in6_fillscopeid(sin6); + inet6_getscopeid(sin6, 1); hbuf[0] = '\0'; if (getnameinfo((struct sockaddr *)sin6, sin6-sin6_len, hbuf, sizeof(hbuf), NULL, 0, niflag)) @@ -419,8 +406,8 @@ in6_pre_aifaddr(prop_dictionary_t env, c setia6vltime_impl(env, ifra); setia6pltime_impl(env, ifra); setia6flags_impl(env, ifra); - in6_delscopeid(ifra-ifra_addr); - in6_delscopeid(ifra-ifra_dstaddr); + inet6_putscopeid(ifra-ifra_addr, 1); + inet6_putscopeid(ifra-ifra_dstaddr, 1); return 0; } Index: src/sbin/ifconfig/ifconfig.c diff -u src/sbin/ifconfig/ifconfig.c:1.230 src/sbin/ifconfig/ifconfig.c:1.231 --- src/sbin/ifconfig/ifconfig.c:1.230 Wed Jul 17 11:40:42 2013 +++ src/sbin/ifconfig/ifconfig.c Fri Oct 18 20:35:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ifconfig.c,v 1.230 2013/07/17 15:40:42 christos Exp $ */ +/* $NetBSD: ifconfig.c,v 1.231 2013/10/19 00:35:30 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1983, 1993\ The Regents of the University of California. All rights reserved.); -__RCSID($NetBSD: ifconfig.c,v 1.230 2013/07/17 15:40:42 christos Exp $); +__RCSID($NetBSD: ifconfig.c,v 1.231 2013/10/19 00:35:30 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -901,12 +901,10 @@ setifaddr(prop_dictionary_t env, prop_di static int setifnetmask(prop_dictionary_t env,
CVS commit: src/sbin/route
Module Name:src Committed By: christos Date: Sat Oct 19 00:39:39 UTC 2013 Modified Files: src/sbin/route: route.c Log Message: use scopeid functions To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/sbin/route/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.141 src/sbin/route/route.c:1.142 --- src/sbin/route/route.c:1.141 Fri Oct 18 17:01:00 2013 +++ src/sbin/route/route.c Fri Oct 18 20:39:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.141 2013/10/18 21:01:00 christos Exp $ */ +/* $NetBSD: route.c,v 1.142 2013/10/19 00:39:39 christos Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = @(#)route.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: route.c,v 1.141 2013/10/18 21:01:00 christos Exp $); +__RCSID($NetBSD: route.c,v 1.142 2013/10/19 00:39:39 christos Exp $); #endif #endif /* not lint */ @@ -538,19 +538,7 @@ routename(const struct sockaddr *sa, str memcpy(sin6, sa, sa-sa_len); sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_family = AF_INET6; -#ifdef __KAME__ - if (sa-sa_len == sizeof(struct sockaddr_in6) - (IN6_IS_ADDR_LINKLOCAL(sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(sin6.sin6_addr)) - sin6.sin6_scope_id == 0) { - uint16_t scope; - memcpy(scope, sin6.sin6_addr.s6_addr[2], - sizeof(scope)); - sin6.sin6_scope_id = ntohs(scope); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } -#endif + inet6_getscopeid(sin6, 3); nml = netmask_length(nm, AF_INET6); if (IN6_IS_ADDR_UNSPECIFIED(sin6.sin6_addr)) { if (nml == 0) @@ -707,19 +695,7 @@ netname(const struct sockaddr *sa, struc memcpy(sin6, sa, sa-sa_len); sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_family = AF_INET6; -#ifdef __KAME__ - if (sa-sa_len == sizeof(struct sockaddr_in6) - (IN6_IS_ADDR_LINKLOCAL(sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(sin6.sin6_addr)) - sin6.sin6_scope_id == 0) { - uint16_t scope; - memcpy(scope, sin6.sin6_addr.s6_addr[2], - sizeof(scope)); - sin6.sin6_scope_id = ntohs(scope); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } -#endif + inet6_putscopeid(sin6, 3); nml = netmask_length(nm, AF_INET6); if (IN6_IS_ADDR_UNSPECIFIED(sin6.sin6_addr)) { if (nml == 0) @@ -1259,17 +1235,7 @@ getaddr(int which, const char *s, struct } memcpy(su-sin6, res-ai_addr, sizeof(su-sin6)); freeaddrinfo(res); -#ifdef __KAME__ - if ((IN6_IS_ADDR_LINKLOCAL(su-sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(su-sin6.sin6_addr)) - su-sin6.sin6_scope_id) { - uint16_t scope; - scope = htons(su-sin6.sin6_scope_id); - memcpy(su-sin6.sin6_addr.s6_addr[2], scope, - sizeof(scope)); - su-sin6.sin6_scope_id = 0; - } -#endif + inet6_getscopeid(su-sin6, 3); if (hints.ai_flags == AI_NUMERICHOST) { if (slash) return prefixlen(slash + 1, soup);
CVS commit: src/sbin/routed/rtquery
Module Name:src Committed By: christos Date: Sat Oct 19 00:57:41 UTC 2013 Modified Files: src/sbin/routed/rtquery: rtquery.c Log Message: gcc warns about array bounds limits, but unfortunately the API here requires flex arrays in a union which is not allowed. So do a trivial pointer assignment to baffle gcc again. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sbin/routed/rtquery/rtquery.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/routed/rtquery/rtquery.c diff -u src/sbin/routed/rtquery/rtquery.c:1.23 src/sbin/routed/rtquery/rtquery.c:1.24 --- src/sbin/routed/rtquery/rtquery.c:1.23 Mon Aug 29 10:35:04 2011 +++ src/sbin/routed/rtquery/rtquery.c Fri Oct 18 20:57:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtquery.c,v 1.23 2011/08/29 14:35:04 joerg Exp $ */ +/* $NetBSD: rtquery.c,v 1.24 2013/10/19 00:57:41 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -63,7 +63,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 1988, 1993\ The Regents of the University of California. All rights reserved.); #ifdef __NetBSD__ -__RCSID($NetBSD: rtquery.c,v 1.23 2011/08/29 14:35:04 joerg Exp $); +__RCSID($NetBSD: rtquery.c,v 1.24 2013/10/19 00:57:41 christos Exp $); #elif defined(__FreeBSD__) __RCSID($FreeBSD$); #else @@ -372,8 +372,9 @@ trace_loop(char *argv[]) static void query_loop(char *argv[], int argc) { -# define NA0 (OMSG.rip_auths[0]) -# define NA2 (OMSG.rip_auths[2]) + struct netauth *na = OMSG.rip_auths; +# define NA0 (na[0]) +# define NA2 (na[2]) struct seen { struct seen *next; struct in_addr addr; @@ -391,14 +392,14 @@ query_loop(char *argv[], int argc) if (ripv2) { OMSG.rip_vers = RIPv2; if (auth_type == RIP_AUTH_PW) { - OMSG.rip_nets[1] = OMSG.rip_nets[0]; + na[1] = na[0]; NA0.a_family = RIP_AF_AUTH; NA0.a_type = RIP_AUTH_PW; memcpy(NA0.au.au_pw, passwd, RIP_AUTH_PW_LEN); omsg_len += sizeof(OMSG.rip_nets[0]); } else if (auth_type == RIP_AUTH_MD5) { - OMSG.rip_nets[1] = OMSG.rip_nets[0]; + na[1] = na[0]; NA0.a_family = RIP_AF_AUTH; NA0.a_type = RIP_AUTH_MD5; NA0.au.a_md5.md5_keyid = (int8_t)keyid;
CVS commit: src/sbin/ping6
Module Name:src Committed By: christos Date: Sat Oct 19 01:09:16 UTC 2013 Modified Files: src/sbin/ping6: ping6.c Log Message: avoit type punning To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/ping6/ping6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ping6/ping6.c diff -u src/sbin/ping6/ping6.c:1.81 src/sbin/ping6/ping6.c:1.82 --- src/sbin/ping6/ping6.c:1.81 Mon Sep 10 00:32:24 2012 +++ src/sbin/ping6/ping6.c Fri Oct 18 21:09:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ping6.c,v 1.81 2012/09/10 04:32:24 msaitoh Exp $ */ +/* $NetBSD: ping6.c,v 1.82 2013/10/19 01:09:16 christos Exp $ */ /* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */ /* @@ -77,7 +77,7 @@ static char sccsid[] = @(#)ping.c 8.1 ( #else #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ping6.c,v 1.81 2012/09/10 04:32:24 msaitoh Exp $); +__RCSID($NetBSD: ping6.c,v 1.82 2013/10/19 01:09:16 christos Exp $); #endif #endif @@ -703,8 +703,10 @@ main(int argc, char *argv[]) ident = arc4random() 0x; memset(nonce, 0, sizeof(nonce)); - for (i = 0; i sizeof(nonce); i += sizeof(u_int32_t)) - *((u_int32_t *)nonce[i]) = arc4random(); + for (i = 0; i sizeof(nonce); i += sizeof(u_int32_t)) { + uint32_t r = arc4random(); + memcpy(nonce[i], r, sizeof(r)); + } hold = 1; @@ -1019,7 +1021,6 @@ main(int argc, char *argv[]) for (;;) { struct msghdr m; - struct cmsghdr *cm; u_char buf[1024]; struct iovec iov[2]; @@ -1067,7 +1068,6 @@ main(int argc, char *argv[]) iov[0].iov_len = packlen; m.msg_iov = iov; m.msg_iovlen = 1; - cm = (struct cmsghdr *)buf; m.msg_control = (caddr_t)buf; m.msg_controllen = sizeof(buf);
CVS commit: src/sbin/ping
Module Name:src Committed By: christos Date: Sat Oct 19 01:08:25 UTC 2013 Modified Files: src/sbin/ping: ping.c Log Message: avoid bogus uninitialized gcc warning To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sbin/ping/ping.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ping/ping.c diff -u src/sbin/ping/ping.c:1.106 src/sbin/ping/ping.c:1.107 --- src/sbin/ping/ping.c:1.106 Wed Mar 6 06:33:08 2013 +++ src/sbin/ping/ping.c Fri Oct 18 21:08:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ping.c,v 1.106 2013/03/06 11:33:08 yamt Exp $ */ +/* $NetBSD: ping.c,v 1.107 2013/10/19 01:08:25 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -58,7 +58,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ping.c,v 1.106 2013/03/06 11:33:08 yamt Exp $); +__RCSID($NetBSD: ping.c,v 1.107 2013/10/19 01:08:25 christos Exp $); #endif #include stdio.h @@ -1011,7 +1011,6 @@ pr_pack(u_char *buf, icp = (struct icmp *)(buf + hlen); if (icp-icmp_type == ICMP_ECHOREPLY icp-icmp_id == ident) { - struct timespec tv; if (icp-icmp_seq == htons((u_int16_t)(ntransmitted-1))) lastrcvd = 1; @@ -1019,16 +1018,20 @@ pr_pack(u_char *buf, if (first_rx.tv_sec == 0) first_rx = last_rx; nreceived++; - if (pingflags F_TIMING) { - struct tv32 tv32; + if (pingflags (F_TIMING|F_TIMING64)) { + struct timespec tv; - (void) memcpy(tv32, icp-icmp_data, sizeof(tv32)); - tv.tv_sec = (uint32_t)ntohl(tv32.tv32_sec); - tv.tv_nsec = ntohl(tv32.tv32_usec) * 1000; - } else if (pingflags F_TIMING64) - (void) memcpy(tv, icp-icmp_data, sizeof(tv)); + if (pingflags F_TIMING) { +struct tv32 tv32; + +(void)memcpy(tv32, icp-icmp_data, sizeof(tv32)); +tv.tv_sec = (uint32_t)ntohl(tv32.tv32_sec); +tv.tv_nsec = ntohl(tv32.tv32_usec) * 1000; + } else if (pingflags F_TIMING64) +(void)memcpy(tv, icp-icmp_data, sizeof(tv)); + else +memset(tv, 0, sizeof(tv)); /* XXX: gcc */ - if (pingflags (F_TIMING|F_TIMING64)) { triptime = diffsec(last_rx, tv); tsum += triptime; tsumsq += triptime * triptime;
CVS commit: src/sbin
Module Name:src Committed By: christos Date: Sat Oct 19 01:09:59 UTC 2013 Modified Files: src/sbin/apmlabel: apmlabel.c src/sbin/dmctl: dmctl.c src/sbin/fsck_ffs: pass1.c utilities.c src/sbin/fsck_lfs: bufcache.c lfs.c pass6.c segwrite.c src/sbin/fsirand: fsirand.c src/sbin/mount_lfs: mount_lfs.c src/sbin/mount_nilfs: mount_nilfs.c src/sbin/mount_portal: pt_file.c src/sbin/newfs_ext2fs: newfs_ext2fs.c src/sbin/newfs_lfs: make_lfs.c src/sbin/newfs_msdos: mkfs_msdos.c src/sbin/newfs_udf: udf_create.c src/sbin/raidctl: raidctl.c src/sbin/rcorder: rcorder.c Log Message: fix unused variable warnings. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sbin/apmlabel/apmlabel.c cvs rdiff -u -r1.3 -r1.4 src/sbin/dmctl/dmctl.c cvs rdiff -u -r1.55 -r1.56 src/sbin/fsck_ffs/pass1.c cvs rdiff -u -r1.63 -r1.64 src/sbin/fsck_ffs/utilities.c cvs rdiff -u -r1.13 -r1.14 src/sbin/fsck_lfs/bufcache.c cvs rdiff -u -r1.40 -r1.41 src/sbin/fsck_lfs/lfs.c cvs rdiff -u -r1.31 -r1.32 src/sbin/fsck_lfs/pass6.c cvs rdiff -u -r1.26 -r1.27 src/sbin/fsck_lfs/segwrite.c cvs rdiff -u -r1.31 -r1.32 src/sbin/fsirand/fsirand.c cvs rdiff -u -r1.34 -r1.35 src/sbin/mount_lfs/mount_lfs.c cvs rdiff -u -r1.1 -r1.2 src/sbin/mount_nilfs/mount_nilfs.c cvs rdiff -u -r1.17 -r1.18 src/sbin/mount_portal/pt_file.c cvs rdiff -u -r1.8 -r1.9 src/sbin/newfs_ext2fs/newfs_ext2fs.c cvs rdiff -u -r1.28 -r1.29 src/sbin/newfs_lfs/make_lfs.c cvs rdiff -u -r1.7 -r1.8 src/sbin/newfs_msdos/mkfs_msdos.c cvs rdiff -u -r1.23 -r1.24 src/sbin/newfs_udf/udf_create.c cvs rdiff -u -r1.55 -r1.56 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.16 -r1.17 src/sbin/rcorder/rcorder.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/apmlabel/apmlabel.c diff -u src/sbin/apmlabel/apmlabel.c:1.2 src/sbin/apmlabel/apmlabel.c:1.3 --- src/sbin/apmlabel/apmlabel.c:1.2 Sat Aug 27 12:10:51 2011 +++ src/sbin/apmlabel/apmlabel.c Fri Oct 18 21:09:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: apmlabel.c,v 1.2 2011/08/27 16:10:51 joerg Exp $ */ +/* $NetBSD: apmlabel.c,v 1.3 2013/10/19 01:09:58 christos Exp $ */ /* * Copyright (C) 1998 Wolfgang Solfrank. @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: apmlabel.c,v 1.2 2011/08/27 16:10:51 joerg Exp $); +__RCSID($NetBSD: apmlabel.c,v 1.3 2013/10/19 01:09:58 christos Exp $); #endif /* not lint */ #include stdio.h @@ -104,7 +104,7 @@ getparts(int sd, int verbose) struct apple_drvr_map *drvr; struct apple_part_map_entry *part; struct partition npe; - uint16_t blksize, blkcnt, partcnt; + uint16_t blksize, partcnt; int i, j, unused, changed; uint64_t temp; @@ -123,7 +123,6 @@ getparts(int sd, int verbose) if (drvr-sbSig != APPLE_DRVR_MAP_MAGIC) return (changed); blksize = drvr-sbBlockSize; - blkcnt = drvr-sbBlkCount; partcnt = 1; Index: src/sbin/dmctl/dmctl.c diff -u src/sbin/dmctl/dmctl.c:1.3 src/sbin/dmctl/dmctl.c:1.4 --- src/sbin/dmctl/dmctl.c:1.3 Sat Aug 27 13:07:28 2011 +++ src/sbin/dmctl/dmctl.c Fri Oct 18 21:09:58 2013 @@ -213,16 +213,16 @@ main(int argc, char *argv[]) static int dmctl_get_version(int argc __unused, char *argv[] __unused, libdm_task_t task) { - uint32_t ver[3], size; + uint32_t ver[3]; - size = libdm_task_get_cmd_version(task, ver, sizeof(ver)); + (void)libdm_task_get_cmd_version(task, ver, sizeof(ver)); printf(Library protocol version %d:%d:%d\n, ver[0], ver[1], ver[2]); if (libdm_task_run(task) != 0) err(EXIT_FAILURE, dmctl_get_version: libdm_task_run failed.); - size = libdm_task_get_cmd_version(task, ver, 3); + (void)libdm_task_get_cmd_version(task, ver, 3); printf(Kernel protocol version %d:%d:%d\n,ver[0], ver[1], ver[2]); libdm_task_destroy(task); Index: src/sbin/fsck_ffs/pass1.c diff -u src/sbin/fsck_ffs/pass1.c:1.55 src/sbin/fsck_ffs/pass1.c:1.56 --- src/sbin/fsck_ffs/pass1.c:1.55 Sun Jun 23 03:28:36 2013 +++ src/sbin/fsck_ffs/pass1.c Fri Oct 18 21:09:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pass1.c,v 1.55 2013/06/23 07:28:36 dholland Exp $ */ +/* $NetBSD: pass1.c,v 1.56 2013/10/19 01:09:58 christos Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)pass1.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: pass1.c,v 1.55 2013/06/23 07:28:36 dholland Exp $); +__RCSID($NetBSD: pass1.c,v 1.56 2013/10/19 01:09:58 christos Exp $); #endif #endif /* not lint */ @@ -235,15 +235,11 @@ checkinode(ino_t inumber, struct inodesc int64_t blocks; char symbuf[MAXBSIZE]; struct inostat *info; - uid_t uid; - gid_t gid; dp = getnextinode(inumber); info = inoinfo(inumber); mode = iswap16(DIP(dp, mode)) IFMT; size = iswap64(DIP(dp, size)); - uid = iswap32(DIP(dp, uid)); - gid = iswap32(DIP(dp, gid)); if (mode == 0) { if ((is_ufs2
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sat Oct 19 01:12:46 UTC 2013 Modified Files: src/distrib/sets/lists/base: ad.arm ad.mips md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/debug: ad.arm ad.mips md.amd64 md.sparc64 shl.mi Log Message: bump libc To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.212 -r1.213 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.199 -r1.200 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.674 -r1.675 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/debug/ad.arm cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.31 -r1.32 src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/debug/shl.mi 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/base/ad.arm diff -u src/distrib/sets/lists/base/ad.arm:1.22 src/distrib/sets/lists/base/ad.arm:1.23 --- src/distrib/sets/lists/base/ad.arm:1.22 Fri Oct 18 19:37:37 2013 +++ src/distrib/sets/lists/base/ad.arm Fri Oct 18 21:12:46 2013 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.22 2013/10/18 23:37:37 jmmv Exp $ +# $NetBSD: ad.arm,v 1.23 2013/10/19 01:12:46 christos Exp $ ./lib/oabi base-compat-shlib compat ./lib/oabi/npf base-npf-shlib compat ./lib/oabi/npf/ext_log.so base-npf-shlib compat,pic @@ -92,7 +92,7 @@ ./usr/lib/oabi/libc++.so.1 base-compat-shlib compat,pic,libcxx ./usr/lib/oabi/libc++.so.1.0 base-compat-shlib compat,pic,libcxx ./usr/lib/oabi/libc.so.12 base-compat-shlib compat,pic -./usr/lib/oabi/libc.so.12.186 base-compat-shlib compat,pic +./usr/lib/oabi/libc.so.12.187 base-compat-shlib compat,pic ./usr/lib/oabi/libc_vfp.so.0 base-compat-shlib compat,pic ./usr/lib/oabi/libc_vfp.so.0.0 base-compat-shlib compat,pic ./usr/lib/oabi/libcom_err.so.7 base-compat-shlib compat,pic,kerberos Index: src/distrib/sets/lists/base/ad.mips diff -u src/distrib/sets/lists/base/ad.mips:1.17 src/distrib/sets/lists/base/ad.mips:1.18 --- src/distrib/sets/lists/base/ad.mips:1.17 Fri Oct 18 19:37:37 2013 +++ src/distrib/sets/lists/base/ad.mips Fri Oct 18 21:12:46 2013 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.17 2013/10/18 23:37:37 jmmv Exp $ +# $NetBSD: ad.mips,v 1.18 2013/10/19 01:12:46 christos Exp $ ./lib/64 base-compat-shlib compat,arch64 ./lib/64/npf base-npf-shlib compat,arch64 ./lib/64/npf/ext_log.sobase-npf-shlib compat,pic,arch64 @@ -94,7 +94,7 @@ ./usr/lib/64/libc++.so.1 base-compat-shlib compat,pic,libcxx,arch64 ./usr/lib/64/libc++.so.1.0 base-compat-shlib compat,pic,libcxx,arch64 ./usr/lib/64/libc.so.12base-compat-shlib compat,pic,arch64 -./usr/lib/64/libc.so.12.186 base-compat-shlib compat,pic,arch64 +./usr/lib/64/libc.so.12.187 base-compat-shlib compat,pic,arch64 ./usr/lib/64/libcom_err.so.7 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/64/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/64/libcrypt.so.1 base-compat-shlib compat,pic,arch64 @@ -426,7 +426,7 @@ ./usr/lib/o32/libc++.so.1 base-compat-shlib compat,pic,libcxx,arch64 ./usr/lib/o32/libc++.so.1.0 base-compat-shlib compat,pic,libcxx,arch64 ./usr/lib/o32/libc.so.12 base-compat-shlib compat,pic,arch64 -./usr/lib/o32/libc.so.12.186 base-compat-shlib compat,pic,arch64 +./usr/lib/o32/libc.so.12.187 base-compat-shlib compat,pic,arch64 ./usr/lib/o32/libcom_err.so.7 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/o32/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/o32/libcrypt.so.1 base-compat-shlib compat,pic,arch64 Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.212 src/distrib/sets/lists/base/md.amd64:1.213 --- src/distrib/sets/lists/base/md.amd64:1.212 Fri Oct 18 19:37:37 2013 +++ src/distrib/sets/lists/base/md.amd64 Fri Oct 18 21:12:46 2013 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.212 2013/10/18 23:37:37 jmmv Exp $ +# $NetBSD: md.amd64,v 1.213 2013/10/19 01:12:46 christos Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./lib/i386 base-compat-shlib compat @@ -86,7 +86,7 @@ ./usr/lib/i386/libc++.so.1 base-compat-shlib compat,pic,libcxx ./usr/lib/i386/libc++.so.1.0 base-compat-shlib compat,pic,libcxx ./usr/lib/i386/libc.so.12 base-compat-shlib compat,pic -./usr/lib/i386/libc.so.12.186 base-compat-shlib compat,pic +./usr/lib/i386/libc.so.12.187 base-compat-shlib compat,pic ./usr/lib/i386/libcom_err.so.7 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libcrypt.so.1 base-compat-shlib compat,pic Index:
CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Sat Oct 19 01:19:03 UTC 2013 Modified Files: src/sbin/gpt: gpt.8 Log Message: type fix: accommodate. - accomodate. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sbin/gpt/gpt.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.11 src/sbin/gpt/gpt.8:1.12 --- src/sbin/gpt/gpt.8:1.11 Wed May 2 15:42:58 2012 +++ src/sbin/gpt/gpt.8 Sat Oct 19 01:19:03 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: gpt.8,v 1.11 2012/05/02 15:42:58 jakllsch Exp $ +.\ $NetBSD: gpt.8,v 1.12 2013/10/19 01:19:03 jnemeth Exp $ .\ .\ Copyright (c) 2002 Marcel Moolenaar .\ All rights reserved. @@ -68,7 +68,7 @@ have an effect on all commands. The .Fl p Ar count option allows the user to change the number of partitions the GPT can -accommodate. +accomodate. This is used whenever a new GPT is created. By default, the .Nm
CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Sat Oct 19 01:58:34 UTC 2013 Modified Files: src/sbin/gpt: migrate.c Log Message: Add code for detecting FreeBSD ZFS partitions. XXX Need to add code for migrating NetBSD disklabel'ed disks. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sbin/gpt/migrate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/migrate.c diff -u src/sbin/gpt/migrate.c:1.7 src/sbin/gpt/migrate.c:1.8 --- src/sbin/gpt/migrate.c:1.7 Sat Apr 13 18:32:01 2013 +++ src/sbin/gpt/migrate.c Sat Oct 19 01:58:33 2013 @@ -29,7 +29,7 @@ __FBSDID($FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $); #endif #ifdef __RCSID -__RCSID($NetBSD: migrate.c,v 1.7 2013/04/13 18:32:01 jakllsch Exp $); +__RCSID($NetBSD: migrate.c,v 1.8 2013/10/19 01:58:33 jnemeth Exp $); #endif #include sys/types.h @@ -126,6 +126,13 @@ migrate_disklabel(int fd, off_t start, s ent-ent_name, 36); break; } + case FS_ZFS: { + static const uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS; + le_uuid_enc(ent-ent_type, zfs); + utf8_to_utf16((const uint8_t *)FreeBSD ZFS partition, + ent-ent_name, 36); + break; + } default: warnx(%s: warning: unknown FreeBSD partition (%d), device_name, dl-d_partitions[i].p_fstype);
CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Sat Oct 19 02:07:08 UTC 2013 Modified Files: src/sbin/gpt: show.c Log Message: recognize FreeBSD ZFS partition To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sbin/gpt/show.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/show.c diff -u src/sbin/gpt/show.c:1.10 src/sbin/gpt/show.c:1.11 --- src/sbin/gpt/show.c:1.10 Sat Apr 13 18:32:01 2013 +++ src/sbin/gpt/show.c Sat Oct 19 02:07:08 2013 @@ -29,7 +29,7 @@ __FBSDID($FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $); #endif #ifdef __RCSID -__RCSID($NetBSD: show.c,v 1.10 2013/04/13 18:32:01 jakllsch Exp $); +__RCSID($NetBSD: show.c,v 1.11 2013/10/19 02:07:08 jnemeth Exp $); #endif #include sys/types.h @@ -72,6 +72,7 @@ friendly(uuid_t *t) static const uuid_t swap = GPT_ENT_TYPE_FREEBSD_SWAP; static const uuid_t ufs = GPT_ENT_TYPE_FREEBSD_UFS; static const uuid_t vinum = GPT_ENT_TYPE_FREEBSD_VINUM; + static const uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static const uuid_t nb_swap = GPT_ENT_TYPE_NETBSD_SWAP; static const uuid_t nb_ffs = GPT_ENT_TYPE_NETBSD_FFS; static const uuid_t nb_lfs = GPT_ENT_TYPE_NETBSD_LFS; @@ -106,7 +107,8 @@ friendly(uuid_t *t) return (FreeBSD UFS/UFS2); if (uuid_equal(t, vinum, NULL)) return (FreeBSD vinum); - + if (uuid_equal(t, zfs, NULL)) + return (FreeBSD ZFS); if (uuid_equal(t, freebsd, NULL)) return (FreeBSD legacy); if (uuid_equal(t, msdata, NULL))
CVS commit: src/sys/modules/luacore
Module Name:src Committed By: mbalmer Date: Fri Oct 18 07:46:55 UTC 2013 Modified Files: src/sys/modules/luacore: luacore.c Log Message: check lua_tostring()'s return value To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/modules/luacore/luacore.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules/lua
Module Name:src Committed By: mbalmer Date: Fri Oct 18 07:49:06 UTC 2013 Modified Files: src/sys/modules/lua: lua.c Log Message: fix CVS marker and copyright year To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/lua/lua.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/conf
Module Name:src Committed By: mbalmer Date: Fri Oct 18 08:03:48 UTC 2013 Modified Files: src/sys/conf: Makefile.kern.inc majors Log Message: add a device-major for lua(4) To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.66 -r1.67 src/sys/conf/majors Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/libelf/dist
Module Name:src Committed By: mrg Date: Fri Oct 18 08:04:47 UTC 2013 Modified Files: src/external/bsd/libelf/dist: elf_update.c libelf_phdr.c Log Message: remove some set-but unused variables. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libelf/dist/elf_update.c \ src/external/bsd/libelf/dist/libelf_phdr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/conf
Module Name:src Committed By: mbalmer Date: Fri Oct 18 08:06:06 UTC 2013 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: revert previous To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: apb Date: Fri Oct 18 08:09:37 UTC 2013 Modified Files: src/sys/dev/isa: if_eg.c Log Message: Delete unused function static inline void egprintstat(u_char); To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/isa/if_eg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: apb Date: Fri Oct 18 08:25:49 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Don't refer to uninitialised variable 'v' in case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE) in xhci_root_ctrl_start(). This code was apparently pasted from the ehci driver. OK nick. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Oct 18 08:35:24 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Wrap some long lines. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: apb Date: Fri Oct 18 08:39:22 UTC 2013 Modified Files: src/sys/dev/usb: xhci.c Log Message: Wrap several unused static inline functions with #if 0. I didn't delete them because I suspect that they might be needed later. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: kefren Date: Fri Oct 18 10:49:19 UTC 2013 Modified Files: src/distrib/sets/lists/man: mi src/usr.sbin/ldpd: Makefile Added Files: src/usr.sbin/ldpd: ldpd.conf.5 Log Message: Attempt to write a manpage for ldpd.conf To generate a diff of this commit: cvs rdiff -u -r1.1438 -r1.1439 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/ldpd/ldpd.conf.5 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: njoly Date: Fri Oct 18 11:42:59 UTC 2013 Modified Files: src/etc: Makefile.params Log Message: Add HAVE_LLVM/HAVE_PCC, MKLLVM/MKPCC to RELEASEVARS. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/etc/Makefile.params Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: wiz Date: Fri Oct 18 12:29:52 UTC 2013 Modified Files: src/usr.sbin/ldpd: ldpd.conf.5 Log Message: Sort SEE ALSO. Grammar consistency. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/ldpd/ldpd.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: apb Date: Fri Oct 18 13:24:40 UTC 2013 Modified Files: src/external/gpl3/gcc/dist/gcc: output.h Log Message: When building gcc using clang, avoid trying to use __attribute__((__format__(__asm_fprintf__, ...))) because clang doesn't support that. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/output.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Fri Oct 18 14:14:14 UTC 2013 Modified Files: src/usr.sbin/ldpd: conffile.c Log Message: sync behaviour with man page: accept spaces, empty lines and comments To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ldpd/conffile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: christos Date: Fri Oct 18 15:15:22 UTC 2013 Modified Files: src/sys/ufs/lfs: lfs_vnops.c ulfs_bswap.h ulfs_quota2.c Log Message: use __USE() in the right place, instead of (void)var. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/lfs/ulfs_bswap.h cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/lfs/ulfs_quota2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jdc Date: Fri Oct 18 15:16:08 UTC 2013 Modified Files: src/sys/dev/i2c: lm87.c Log Message: Remove extraneous printf(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/lm87.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xdm/dist/xdm
Module Name:xsrc Committed By: apb Date: Fri Oct 18 15:59:38 UTC 2013 Modified Files: xsrc/external/mit/xdm/dist/xdm: dm.c Log Message: Print time_t values by casting to intmax_t and using %ji format. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/xdm/dm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Fri Oct 18 16:06:52 UTC 2013 Modified Files: src/share/mk: bsd.lib.mk Log Message: change if HAVE_GCC is defined To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.