CVS commit: src/doc
Module Name:src Committed By: dennis Date: Tue Dec 2 08:31:18 UTC 2014 Modified Files: src/doc: HACKS Log Message: Note riscv compiler workarounds for libasan To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.152 src/doc/HACKS:1.153 --- src/doc/HACKS:1.152 Fri Jun 13 01:17:46 2014 +++ src/doc/HACKS Tue Dec 2 08:31:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.152 2014/06/13 01:17:46 mrg Exp $ +# $NetBSD: HACKS,v 1.153 2014/12/02 08:31:18 dennis Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -982,3 +982,15 @@ file src/sys/arch/vax/boot/boot/Makefile descr /boot does not work when compiled with -O2 and gcc 4.8 kcah +port riscv64 +hack compile a couple of libasan files at -O0 for riscv64 +cdate Tue Dec 2 16:17:48 HKT 2014 +who dennis +file src/external/gpl3/gcc/lib/libasan/Makefile: 1.8 +descr Attempting to compile the libasan files asan_allocator2.cc and + sanitizer_netbsd.cc with gcc 4.8.3 at any optimization level + other than -O0 results in an internal compiler error. The + compiler seems to have trouble around C11 atomics in particular. +pr 49425 +kcah +
CVS commit: [nick-nhusb] src/sys
Module Name:src Committed By: skrll Date: Tue Dec 2 09:00:34 UTC 2014 Modified Files: src/sys/arch/mips/adm5120/dev [nick-nhusb]: ahci.c src/sys/conf [nick-nhusb]: files src/sys/dev/ic [nick-nhusb]: sl811hs.c src/sys/dev/usb [nick-nhusb]: aubtfwl.c auvitek_dtv.c auvitek_video.c ehci.c ehcivar.h emdtv_dtv.c files.usb if_athn_usb.c if_atu.c if_aue.c if_axe.c if_axen.c if_cdce.c if_cue.c if_kue.c if_otus.c if_rum.c if_run.c if_smsc.c if_udav.c if_upgt.c if_upl.c if_ural.c if_url.c if_urndis.c if_urtw.c if_urtwn.c if_zyd.c irmce.c motg.c motgvar.h ohci.c ohcivar.h pseye.c stuirda.c uaudio.c ubt.c ucom.c udl.c udsir.c ugen.c uhci.c uhcivar.h uhso.c uirda.c ulpt.c umass.c umidi.c urio.c usb_mem.c usb_mem.h usbdi.c usbdi.h usbdivar.h usscanner.c ustir.c utoppy.c uvideo.c xhci.c src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c dwc2var.h src/sys/rump/dev/lib/libugenhc [nick-nhusb]: Makefile ugenhc.c Removed Files: src/sys/rump/dev/lib/libugenhc [nick-nhusb]: ugenhc_dma.c Log Message: Step #1 of memory allocation re-organisation. Centralised the buffer allocation routine which now supports DMA and non-DMA capable host controllers. Remove the ubm_{alloc,free}m methods from usbd_bus_methods. The buffer allocation is only allowed in thread context and, therefore, negates the usefulness of the reserve dma code which is removed in this change. USBD_NO_COPY is also no longer required as usbd_transfer and usbd_transfer_complete now track buffer usage and handle any copying. To generate a diff of this commit: cvs rdiff -u -r1.12.6.3 -r1.12.6.4 src/sys/arch/mips/adm5120/dev/ahci.c cvs rdiff -u -r1.1121 -r1.1121.2.1 src/sys/conf/files cvs rdiff -u -r1.47.6.2 -r1.47.6.3 src/sys/dev/ic/sl811hs.c cvs rdiff -u -r1.5.10.1 -r1.5.10.2 src/sys/dev/usb/aubtfwl.c cvs rdiff -u -r1.6 -r1.6.14.1 src/sys/dev/usb/auvitek_dtv.c cvs rdiff -u -r1.6 -r1.6.32.1 src/sys/dev/usb/auvitek_video.c cvs rdiff -u -r1.234.2.6 -r1.234.2.7 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.42.14.2 -r1.42.14.3 src/sys/dev/usb/ehcivar.h cvs rdiff -u -r1.10 -r1.10.14.1 src/sys/dev/usb/emdtv_dtv.c cvs rdiff -u -r1.135 -r1.135.2.1 src/sys/dev/usb/files.usb cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/dev/usb/if_athn_usb.c cvs rdiff -u -r1.50.2.1 -r1.50.2.2 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.132.4.1 -r1.132.4.2 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.67 -r1.67.4.1 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.3 -r1.3.6.1 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.38 -r1.38.14.1 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.68.4.1 -r1.68.4.2 src/sys/dev/usb/if_cue.c cvs rdiff -u -r1.81 -r1.81.4.1 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.25 -r1.25.6.1 src/sys/dev/usb/if_otus.c cvs rdiff -u -r1.48 -r1.48.6.1 src/sys/dev/usb/if_rum.c cvs rdiff -u -r1.10 -r1.10.6.1 src/sys/dev/usb/if_run.c cvs rdiff -u -r1.22 -r1.22.2.1 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.43.4.1 -r1.43.4.2 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/sys/dev/usb/if_upgt.c cvs rdiff -u -r1.47.4.1 -r1.47.4.2 src/sys/dev/usb/if_upl.c cvs rdiff -u -r1.44 -r1.44.14.1 src/sys/dev/usb/if_ural.c cvs rdiff -u -r1.48.4.1 -r1.48.4.2 src/sys/dev/usb/if_url.c cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/dev/usb/if_urndis.c cvs rdiff -u -r1.6 -r1.6.6.1 src/sys/dev/usb/if_urtw.c cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.36 -r1.36.14.1 src/sys/dev/usb/if_zyd.c cvs rdiff -u -r1.1.32.1 -r1.1.32.2 src/sys/dev/usb/irmce.c cvs rdiff -u -r1.12.2.4 -r1.12.2.5 src/sys/dev/usb/motg.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/dev/usb/motgvar.h cvs rdiff -u -r1.254.2.5 -r1.254.2.6 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.55.6.1 -r1.55.6.2 src/sys/dev/usb/ohcivar.h cvs rdiff -u -r1.21.34.1 -r1.21.34.2 src/sys/dev/usb/pseye.c cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/dev/usb/stuirda.c cvs rdiff -u -r1.140.2.1 -r1.140.2.2 src/sys/dev/usb/uaudio.c cvs rdiff -u -r1.51 -r1.51.4.1 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.108.2.1 -r1.108.2.2 src/sys/dev/usb/ucom.c cvs rdiff -u -r1.11.6.1 -r1.11.6.2 src/sys/dev/usb/udl.c cvs rdiff -u -r1.1.14.1 -r1.1.14.2 src/sys/dev/usb/udsir.c cvs rdiff -u -r1.126.2.2 -r1.126.2.3 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.264.4.5 -r1.264.4.6 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.52.14.1 -r1.52.14.2 src/sys/dev/usb/uhcivar.h cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/dev/usb/uhso.c cvs rdiff -u -r1.38.6.2 -r1.38.6.3 src/sys/dev/usb/uirda.c \ src/sys/dev/usb/usscanner.c cvs rdiff -u -r1.95.4.2 -r1.95.4.3 src/sys/dev/usb/ulpt.c cvs rdiff -u -r1.149.2.1 -r1.149.2.2 src/sys/dev/usb/umass.c cvs rdiff -u -r1.65.14.2 -r1.65.14.3 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.42.4.2 -r1.42.4.3 src/sys/dev/usb/urio.c cvs rdiff -u -r1.65.2.1 -r1.65.2.2 src/sys/dev/usb/usb_mem.c cvs rdiff -u -r1.30.14.2 -r1.30.14.3 src/sys/dev/usb/usb_mem.h cvs rdiff -u -r1.162.2.4 -r1.162.2.5 src/sys/dev/usb/usbdi.c cvs rdiff -u
CVS commit: src/sys/rump/share/man/man7
Module Name:src Committed By: wiz Date: Tue Dec 2 09:05:15 UTC 2014 Modified Files: src/sys/rump/share/man/man7: rumpkernel.7 Log Message: Use Nx. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/share/man/man7/rumpkernel.7 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/share/man/man7/rumpkernel.7 diff -u src/sys/rump/share/man/man7/rumpkernel.7:1.1 src/sys/rump/share/man/man7/rumpkernel.7:1.2 --- src/sys/rump/share/man/man7/rumpkernel.7:1.1 Tue Dec 2 01:51:45 2014 +++ src/sys/rump/share/man/man7/rumpkernel.7 Tue Dec 2 09:05:15 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: rumpkernel.7,v 1.1 2014/12/02 01:51:45 pooka Exp $ +.\ $NetBSD: rumpkernel.7,v 1.2 2014/12/02 09:05:15 wiz Exp $ .\ .\ Copyright (c) 2008-2014 Antti Kantee. All rights reserved. .\ @@ -42,8 +42,9 @@ The minimalistic .Xr rumpuser 3 interface integrates a rump kernel to the host platform. Suitable and readily supported platforms include for example POSIX -userspace (such as NetBSD), hypervisors (such as Xen and KVM), and bare -metal hardware. +userspace (such as +.Nx ) , +hypervisors (such as Xen and KVM), and bare metal hardware. .Pp Rump kernels are component-oriented, which means that they consist of libraries which are linked together to form runtime images.
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: aymeric Date: Tue Dec 2 10:34:27 UTC 2014 Modified Files: src/external/gpl3/gdb/dist/gdb: amd64nbsd-tdep.c Log Message: . do not abort() if we read a zero cs or rip, or if we can't read them . end the backtrace when encountering a soft interrupt, since they live in their own lwp To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.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/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.10 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.11 --- src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.10 Sun Jun 22 23:52:57 2014 +++ src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c Tue Dec 2 10:34:27 2014 @@ -164,8 +164,6 @@ amd64nbsd_trapframe_cache(struct frame_i + amd64nbsd_tf_reg_offset[AMD64_CS_REGNUM], 8, byte_order); rip = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[AMD64_RIP_REGNUM], 8, byte_order); - if (cs == 0 || rip == 0) - abort(); /* The trap frame layout was changed lf the %rip value is less than 2^16 it * is almost certainly the %ss of the old format. */ @@ -187,9 +185,10 @@ amd64nbsd_trapframe_cache(struct frame_i } } - if ((cs I386_SEL_RPL) == I386_SEL_UPL) + if ((cs I386_SEL_RPL) == I386_SEL_UPL || + (name strncmp(name, Xsoft, 5) == 0)) { - /* Trap from user space; terminate backtrace. */ + /* Trap from user space or soft interrupt; terminate backtrace. */ trad_frame_set_id (cache, outer_frame_id); } else
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Tue Dec 2 13:00:38 UTC 2014 Modified Files: src/sys/kern: kern_module.c kern_module_vfs.c Log Message: print kernel module path only in kernels which support paths To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/kern/kern_module.c cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_module_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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.101 src/sys/kern/kern_module.c:1.102 --- src/sys/kern/kern_module.c:1.101 Fri Sep 5 06:50:58 2014 +++ src/sys/kern/kern_module.c Tue Dec 2 13:00:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.101 2014/09/05 06:50:58 matt Exp $ */ +/* $NetBSD: kern_module.c,v 1.102 2014/12/02 13:00:38 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.101 2014/09/05 06:50:58 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.102 2014/12/02 13:00:38 pooka Exp $); #define _MODULE_INTERNAL @@ -373,7 +373,6 @@ module_init(void) } sysctl_module_setup(); - aprint_normal(kern.module.path=%s\n, module_base); } /* Index: src/sys/kern/kern_module_vfs.c diff -u src/sys/kern/kern_module_vfs.c:1.12 src/sys/kern/kern_module_vfs.c:1.13 --- src/sys/kern/kern_module_vfs.c:1.12 Wed Sep 14 12:30:20 2011 +++ src/sys/kern/kern_module_vfs.c Tue Dec 2 13:00:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module_vfs.c,v 1.12 2011/09/14 12:30:20 christos Exp $ */ +/* $NetBSD: kern_module_vfs.c,v 1.13 2014/12/02 13:00:38 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module_vfs.c,v 1.12 2011/09/14 12:30:20 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module_vfs.c,v 1.13 2014/12/02 13:00:38 pooka Exp $); #define _MODULE_INTERNAL #include sys/param.h @@ -56,6 +56,7 @@ void module_load_vfs_init(void) { module_load_vfs_vec = module_load_vfs; + aprint_normal(kern.module.path=%s\n, module_base); } int
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: ozaki-r Date: Tue Dec 2 14:34:19 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: net_stub.c Log Message: Get rid of weak_alias for bridge_input bridge_input is now not directly called from ether_input, so we can remove weak_alias for it. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/rump/librump/rumpnet/net_stub.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/rumpnet/net_stub.c diff -u src/sys/rump/librump/rumpnet/net_stub.c:1.20 src/sys/rump/librump/rumpnet/net_stub.c:1.21 --- src/sys/rump/librump/rumpnet/net_stub.c:1.20 Tue Dec 2 04:43:35 2014 +++ src/sys/rump/librump/rumpnet/net_stub.c Tue Dec 2 14:34:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $ */ +/* $NetBSD: net_stub.c,v 1.21 2014/12/02 14:34:19 ozaki-r Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: net_stub.c,v 1.21 2014/12/02 14:34:19 ozaki-r Exp $); #include sys/param.h #include sys/protosw.h @@ -54,7 +54,6 @@ rumpnet_stub(void) /* bridge */ __weak_alias(bridge_ifdetach,rumpnet_stub); __weak_alias(bridge_output,rumpnet_stub); -__weak_alias(bridge_input,rumpnet_stub); /* agr */ __weak_alias(agr_input,rumpnet_stub);
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Tue Dec 2 19:32:09 UTC 2014 Modified Files: src/sys/net: files.net if_dl.h Added Files: src/sys/net: dl_print.c Log Message: - split struct dladdr out of struct sockaddr_dl - add routines to print struct sockaddr_dl and struct dladdr - make if_dl.h idempotent To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/net/dl_print.c cvs rdiff -u -r1.1 -r1.2 src/sys/net/files.net cvs rdiff -u -r1.23 -r1.24 src/sys/net/if_dl.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/net/files.net diff -u src/sys/net/files.net:1.1 src/sys/net/files.net:1.2 --- src/sys/net/files.net:1.1 Sat Oct 11 23:56:18 2014 +++ src/sys/net/files.net Tue Dec 2 14:32:09 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.net,v 1.1 2014/10/12 03:56:18 uebayasi Exp $ +# $NetBSD: files.net,v 1.2 2014/12/02 19:32:09 christos Exp $ # XXX CLEANUP define net @@ -6,6 +6,7 @@ file net/bpf.c bpfilter file net/bpf_filter.c bpf_filter file net/bpf_stub.c net file net/bsd-comp.c ppp ppp_bsdcomp +file net/dl_print.c file net/if.c net file net/if_arcsubr.c arcnet needs-flag file net/if_atmsubr.c atm Index: src/sys/net/if_dl.h diff -u src/sys/net/if_dl.h:1.23 src/sys/net/if_dl.h:1.24 --- src/sys/net/if_dl.h:1.23 Wed Feb 20 12:18:11 2008 +++ src/sys/net/if_dl.h Tue Dec 2 14:32:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_dl.h,v 1.23 2008/02/20 17:18:11 matt Exp $ */ +/* $NetBSD: if_dl.h,v 1.24 2014/12/02 19:32:09 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -58,6 +58,22 @@ typedef __sa_family_t sa_family_t; #define sa_family_t __sa_family_t #endif +#ifndef socklen_t +typedef __socklen_t socklen_t; +#define socklen_t __socklen_t +#endif + +struct dladdr { + uint8_t dl_type; /* interface type */ + uint8_t dl_nlen; /* interface name length, no trailing 0 reqd. */ + uint8_t dl_alen; /* link level address length */ + uint8_t dl_slen; /* link layer selector length */ + /* + * minimum work area, can be larger; contains both if name + * and ll address + */ + char dl_data[12]; +}; /* * Structure of a Link-Level sockaddr: @@ -65,15 +81,13 @@ typedef __sa_family_t sa_family_t; struct sockaddr_dl { uint8_t sdl_len; /* Total length of sockaddr */ sa_family_t sdl_family; /* AF_LINK */ - uint16_t sdl_index; /* if != 0, system given index for interface */ - uint8_t sdl_type; /* interface type */ - uint8_t sdl_nlen; /* interface name length, no trailing 0 reqd. */ - uint8_t sdl_alen; /* link level address length */ - uint8_t sdl_slen; /* link layer selector length */ - /* minimum work area, can be larger; contains both if name - * and ll address - */ - char sdl_data[12]; + uint16_tsdl_index; /* if != 0, system given index for interface */ + struct dladdr sdl_addr; +#define sdl_type sdl_addr.dl_type +#define sdl_nlen sdl_addr.dl_nlen +#define sdl_alen sdl_addr.dl_alen +#define sdl_slen sdl_addr.dl_slen +#define sdl_data sdl_addr.dl_data }; #define satosdl(__sa) ((struct sockaddr_dl *)(__sa)) @@ -102,4 +116,12 @@ __END_DECLS #endif /* !_KERNEL */ +#if defined(_KERNEL) || defined(_TEST) +// 255 xx: + 255 'a' + / + # + 3 digits + NUL +#define LINK_ADDRSTRLEN ((255 * 4) + 5) + +int dl_print(char *, size_t, const struct dladdr *); +int sdl_print(char *, size_t, const void *); +#endif + #endif /* !_NET_IF_DL_H_ */ Added files: Index: src/sys/net/dl_print.c diff -u /dev/null src/sys/net/dl_print.c:1.1 --- /dev/null Tue Dec 2 14:32:09 2014 +++ src/sys/net/dl_print.c Tue Dec 2 14:32:09 2014 @@ -0,0 +1,88 @@ +/* $NetBSD: dl_print.c,v 1.1 2014/12/02 19:32:09 christos Exp $ */ + +/*- + * Copyright (c) 2014 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,
CVS commit: src/sys/netatalk
Module Name:src Committed By: christos Date: Tue Dec 2 19:33:44 UTC 2014 Modified Files: src/sys/netatalk: at.h files.netatalk Added Files: src/sys/netatalk: at_print.c Log Message: - s/u_intX/uintX/ - add routines to print sockaddr_at and ataddr. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/netatalk/at.h cvs rdiff -u -r0 -r1.1 src/sys/netatalk/at_print.c cvs rdiff -u -r1.1 -r1.2 src/sys/netatalk/files.netatalk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netatalk/at.h diff -u src/sys/netatalk/at.h:1.7 src/sys/netatalk/at.h:1.8 --- src/sys/netatalk/at.h:1.7 Sat Dec 10 18:29:05 2005 +++ src/sys/netatalk/at.h Tue Dec 2 14:33:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: at.h,v 1.7 2005/12/10 23:29:05 elad Exp $ */ +/* $NetBSD: at.h,v 1.8 2014/12/02 19:33:44 christos Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -59,19 +59,19 @@ typedef __sa_family_t sa_family_t; * AppleTalk address. */ struct at_addr { - u_int16_t s_net; - u_int8_t s_node; + uint16_t s_net; + uint8_t s_node; }; -#define ATADDR_ANYNET (u_int16_t)0x -#define ATADDR_ANYNODE (u_int8_t)0x00 -#define ATADDR_ANYPORT (u_int8_t)0x00 -#define ATADDR_BCAST (u_int8_t)0xff /* There is no BCAST for NET */ +#define ATADDR_ANYNET (uint16_t)0x +#define ATADDR_ANYNODE (uint8_t)0x00 +#define ATADDR_ANYPORT (uint8_t)0x00 +#define ATADDR_BCAST (uint8_t)0xff /* There is no BCAST for NET */ struct netrange { - u_int8_t nr_phase; - u_int16_t nr_firstnet; - u_int16_t nr_lastnet; + uint8_t nr_phase; + uint16_t nr_firstnet; + uint16_t nr_lastnet; }; /* @@ -82,9 +82,9 @@ struct netrange { * by the kernel. */ struct sockaddr_at { - u_int8_t sat_len; + uint8_t sat_len; sa_family_t sat_family; - u_int8_tsat_port; + uint8_t sat_port; struct at_addr sat_addr; union { struct netrange r_netrange; @@ -102,4 +102,12 @@ extern struct domain atalkdomain; extern const struct protosw atalksw[]; #endif +#if defined(_KERNEL) || defined(_TEST) +#define ATALK_ADDRSTRLEN 10 + +extern struct domain atalkdomain; +int at_print(char *, size_t, const struct at_addr *); +int sat_print(char *, size_t, const void *); +#endif + #endif /* !_NETATALK_AT_H_ */ Index: src/sys/netatalk/files.netatalk diff -u src/sys/netatalk/files.netatalk:1.1 src/sys/netatalk/files.netatalk:1.2 --- src/sys/netatalk/files.netatalk:1.1 Thu Oct 10 18:10:53 2002 +++ src/sys/netatalk/files.netatalk Tue Dec 2 14:33:44 2014 @@ -1,9 +1,10 @@ -# $NetBSD: files.netatalk,v 1.1 2002/10/10 22:10:53 thorpej Exp $ +# $NetBSD: files.netatalk,v 1.2 2014/12/02 19:33:44 christos Exp $ defflag opt_atalk.h NETATALK file netatalk/aarp.c netatalk file netatalk/at_control.c netatalk +file netatalk/at_print.c file netatalk/at_proto.c netatalk file netatalk/at_rmx.c netatalkdebug file netatalk/ddp_input.c netatalk Added files: Index: src/sys/netatalk/at_print.c diff -u /dev/null src/sys/netatalk/at_print.c:1.1 --- /dev/null Tue Dec 2 14:33:44 2014 +++ src/sys/netatalk/at_print.c Tue Dec 2 14:33:44 2014 @@ -0,0 +1,59 @@ +/* $NetBSD: at_print.c,v 1.1 2014/12/02 19:33:44 christos Exp $ */ + +/*- + * Copyright (c) 2014 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. + */ +#include sys/cdefs.h + +#include sys/types.h +#ifdef _KERNEL +__KERNEL_RCSID(0, $NetBSD: at_print.c,v 1.1 2014/12/02 19:33:44 christos Exp $); +#include sys/systm.h +#else +__RCSID($NetBSD: at_print.c,v 1.1 2014/12/02 19:33:44 christos Exp $); +#include stdio.h +#endif
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Tue Dec 2 19:34:33 UTC 2014 Modified Files: src/sys/net: dl_print.c if_dl.h Log Message: missed _ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/net/dl_print.c cvs rdiff -u -r1.24 -r1.25 src/sys/net/if_dl.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/net/dl_print.c diff -u src/sys/net/dl_print.c:1.1 src/sys/net/dl_print.c:1.2 --- src/sys/net/dl_print.c:1.1 Tue Dec 2 14:32:09 2014 +++ src/sys/net/dl_print.c Tue Dec 2 14:34:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dl_print.c,v 1.1 2014/12/02 19:32:09 christos Exp $ */ +/* $NetBSD: dl_print.c,v 1.2 2014/12/02 19:34:33 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,17 +29,17 @@ #include sys/types.h #ifdef _KERNEL -__KERNEL_RCSID(0, $NetBSD: dl_print.c,v 1.1 2014/12/02 19:32:09 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: dl_print.c,v 1.2 2014/12/02 19:34:33 christos Exp $); #include sys/systm.h #else -__RCSID($NetBSD: dl_print.c,v 1.1 2014/12/02 19:32:09 christos Exp $); +__RCSID($NetBSD: dl_print.c,v 1.2 2014/12/02 19:34:33 christos Exp $); #include stdio.h static const uint8_t hexdigits[] = 0123456789abcdef; #endif #include net/if_dl.h int -dl_print(char *buf, size_t len, const struct dladdr *dl) +dl_print(char *buf, size_t len, const struct dl_addr *dl) { const uint8_t *ap = (const uint8_t *)dl-dl_data; char abuf[256 * 3], *cp, *ecp; Index: src/sys/net/if_dl.h diff -u src/sys/net/if_dl.h:1.24 src/sys/net/if_dl.h:1.25 --- src/sys/net/if_dl.h:1.24 Tue Dec 2 14:32:09 2014 +++ src/sys/net/if_dl.h Tue Dec 2 14:34:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_dl.h,v 1.24 2014/12/02 19:32:09 christos Exp $ */ +/* $NetBSD: if_dl.h,v 1.25 2014/12/02 19:34:33 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -63,7 +63,7 @@ typedef __socklen_t socklen_t; #define socklen_t __socklen_t #endif -struct dladdr { +struct dl_addr { uint8_t dl_type; /* interface type */ uint8_t dl_nlen; /* interface name length, no trailing 0 reqd. */ uint8_t dl_alen; /* link level address length */ @@ -82,7 +82,7 @@ struct sockaddr_dl { uint8_t sdl_len; /* Total length of sockaddr */ sa_family_t sdl_family; /* AF_LINK */ uint16_tsdl_index; /* if != 0, system given index for interface */ - struct dladdr sdl_addr; + struct dl_addr sdl_addr; #define sdl_type sdl_addr.dl_type #define sdl_nlen sdl_addr.dl_nlen #define sdl_alen sdl_addr.dl_alen @@ -120,7 +120,7 @@ __END_DECLS // 255 xx: + 255 'a' + / + # + 3 digits + NUL #define LINK_ADDRSTRLEN ((255 * 4) + 5) -int dl_print(char *, size_t, const struct dladdr *); +int dl_print(char *, size_t, const struct dl_addr *); int sdl_print(char *, size_t, const void *); #endif
CVS commit: src/sys/netinet
Module Name:src Committed By: christos Date: Tue Dec 2 19:35:27 UTC 2014 Modified Files: src/sys/netinet: files.netinet in.h Added Files: src/sys/netinet: in_print.c Log Message: add routines to print in_addr and sockaddr_in (in_print and sin_print) To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/netinet/files.netinet cvs rdiff -u -r1.93 -r1.94 src/sys/netinet/in.h cvs rdiff -u -r0 -r1.1 src/sys/netinet/in_print.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/files.netinet diff -u src/sys/netinet/files.netinet:1.24 src/sys/netinet/files.netinet:1.25 --- src/sys/netinet/files.netinet:1.24 Mon Jun 25 11:28:39 2012 +++ src/sys/netinet/files.netinet Tue Dec 2 14:35:27 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.netinet,v 1.24 2012/06/25 15:28:39 christos Exp $ +# $NetBSD: files.netinet,v 1.25 2014/12/02 19:35:27 christos Exp $ defflag opt_tcp_debug.h TCP_DEBUG defparam opt_tcp_debug.h TCP_NDEBUG @@ -21,6 +21,7 @@ file netinet/igmp.c inet file netinet/in.c inet file netinet/in_offload.c inet file netinet/in_pcb.c inet +file netinet/in_print.c file netinet/in_proto.c inet file netinet/in_selsrc.c inet ipselsrc file netinet/ip_flow.c inet gateway Index: src/sys/netinet/in.h diff -u src/sys/netinet/in.h:1.93 src/sys/netinet/in.h:1.94 --- src/sys/netinet/in.h:1.93 Sun Oct 12 15:02:18 2014 +++ src/sys/netinet/in.h Tue Dec 2 14:35:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in.h,v 1.93 2014/10/12 19:02:18 christos Exp $ */ +/* $NetBSD: in.h,v 1.94 2014/12/02 19:35:27 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -616,4 +616,9 @@ sockaddr_in_alloc(const struct in_addr * } #endif /* _KERNEL */ +#if defined(_KERNEL) || defined(_TEST) +int in_print(char *, size_t, const struct in_addr *); +int sin_print(char *, size_t, const void *); +#endif + #endif /* !_NETINET_IN_H_ */ Added files: Index: src/sys/netinet/in_print.c diff -u /dev/null src/sys/netinet/in_print.c:1.1 --- /dev/null Tue Dec 2 14:35:27 2014 +++ src/sys/netinet/in_print.c Tue Dec 2 14:35:27 2014 @@ -0,0 +1,61 @@ +/* $NetBSD: in_print.c,v 1.1 2014/12/02 19:35:27 christos Exp $ */ + +/*- + * Copyright (c) 2014 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. + */ +#include sys/cdefs.h + +#include sys/types.h +#ifdef _KERNEL +__KERNEL_RCSID(0, $NetBSD: in_print.c,v 1.1 2014/12/02 19:35:27 christos Exp $); +#include sys/systm.h +#else +__RCSID($NetBSD: in_print.c,v 1.1 2014/12/02 19:35:27 christos Exp $); +#include stdio.h +#endif +#include netinet/in.h + +int +in_print(char *buf, size_t len, const struct in_addr *ia) +{ + const in_addr_t a = ntohl(ia-s_addr); + return snprintf(buf, len, %d.%d.%d.%d, + (a 24) 0xff, (a 16) 0xff, + (a 8) 0xff, (a 0) 0xff); +} + +int +sin_print(char *buf, size_t len, const void *v) +{ + const struct sockaddr_in *sin = v; + const struct in_addr *ia = sin-sin_addr; + char abuf[INET_ADDRSTRLEN]; + + if (!sin-sin_port) + return in_print(buf, len, ia); + + in_print(abuf, sizeof(abuf), ia); + return snprintf(buf, len, %s:%hu, abuf, ntohs(sin-sin_port)); +}
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Tue Dec 2 19:38:16 UTC 2014 Modified Files: src/sys/sys: socket.h Log Message: sockaddr_format now returns the number of chars written. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/sys/socket.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/sys/socket.h diff -u src/sys/sys/socket.h:1.110 src/sys/sys/socket.h:1.111 --- src/sys/sys/socket.h:1.110 Wed May 28 10:55:16 2014 +++ src/sys/sys/socket.h Tue Dec 2 14:38:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.110 2014/05/28 14:55:16 christos Exp $ */ +/* $NetBSD: socket.h,v 1.111 2014/12/02 19:38:16 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -605,7 +605,7 @@ const struct sockaddr *sockaddr_any_by_f const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *); int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *); struct sockaddr *sockaddr_dup(const struct sockaddr *, int); -void sockaddr_format(const struct sockaddr *, char *, size_t); +int sockaddr_format(const struct sockaddr *, char *, size_t); void sockaddr_free(struct sockaddr *); __END_DECLS #endif /* _KERNEL */
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue Dec 2 19:45:58 UTC 2014 Modified Files: src/sys/kern: uipc_domain.c Log Message: - add diagnostic check for sa_len - use new socket pretty printers to format sockaddr's To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/kern/uipc_domain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_domain.c diff -u src/sys/kern/uipc_domain.c:1.95 src/sys/kern/uipc_domain.c:1.96 --- src/sys/kern/uipc_domain.c:1.95 Fri Sep 5 05:20:59 2014 +++ src/sys/kern/uipc_domain.c Tue Dec 2 14:45:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_domain.c,v 1.95 2014/09/05 09:20:59 matt Exp $ */ +/* $NetBSD: uipc_domain.c,v 1.96 2014/12/02 19:45:58 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.95 2014/09/05 09:20:59 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.96 2014/12/02 19:45:58 christos Exp $); #include sys/param.h #include sys/socket.h @@ -52,6 +52,9 @@ __KERNEL_RCSID(0, $NetBSD: uipc_domain. #include sys/file.h #include sys/filedesc.h #include sys/kauth.h + +#include netatalk/at.h +#include net/if_dl.h #include netinet/in.h MALLOC_DECLARE(M_SOCKADDR); @@ -252,6 +255,47 @@ sockaddr_anyaddr(const struct sockaddr * return sockaddr_const_addr(any, slenp); } +#ifdef DIAGNOSTIC +static void +sockaddr_checklen(const struct sockaddr *sa) +{ + socklen_t len = 0; + switch (sa-sa_family) { + case AF_INET: + len = sizeof(struct sockaddr_in); + break; + case AF_INET6: + len = sizeof(struct sockaddr_in6); + break; + case AF_UNIX: + len = sizeof(struct sockaddr_un); + break; + case AF_LINK: + len = sizeof(struct sockaddr_dl); + // As long as it is not 0... + if (sa-sa_len != 0) + return; + break; + case AF_APPLETALK: + len = sizeof(struct sockaddr_at); + break; + default: + printf(%s: Unhandled af=%hhu socklen=%hhu\n, __func__, + sa-sa_family, sa-sa_len); + return; + } + if (len != sa-sa_len) { + char buf[512]; + sockaddr_format(sa, buf, sizeof(buf)); + printf(%s: %p bad len af=%hhu socklen=%hhu len=%u [%s]\n, + __func__, sa, sa-sa_family, sa-sa_len, + (unsigned)len, buf); + } +} +#else +#define sockaddr_checklen(sa) ((void)0) +#endif + struct sockaddr * sockaddr_alloc(sa_family_t af, socklen_t socklen, int flags) { @@ -263,6 +307,7 @@ sockaddr_alloc(sa_family_t af, socklen_t sa-sa_family = af; sa-sa_len = reallen; + sockaddr_checklen(sa); return sa; } @@ -274,6 +319,7 @@ sockaddr_copy(struct sockaddr *dst, sock panic(%s: source too long, %d %d bytes, __func__, socklen, src-sa_len); } + sockaddr_checklen(src); return memcpy(dst, src, src-sa_len); } @@ -340,64 +386,62 @@ sockaddr_free(struct sockaddr *sa) free(sa, M_SOCKADDR); } -void +static int +sun_print(char *buf, size_t len, const void *v) +{ + const struct sockaddr_un *sun = v; + return snprintf(buf, len, %s, sun-sun_path); +} + +int sockaddr_format(const struct sockaddr *sa, char *buf, size_t len) { - const struct sockaddr_un *sun = (const struct sockaddr_un *)sa; - const struct sockaddr_in *sin = (const struct sockaddr_in *)sa; - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - const uint8_t *data; - size_t data_len; + size_t plen = 0; - if (sa == NULL) { - strlcpy(buf, (null), len); - return; - } + if (sa == NULL) + return strlcpy(buf, (null), len); switch (sa-sa_family) { - default: - snprintf(buf, len, (unknown socket family %d), - (int)sa-sa_family); - return; case AF_LOCAL: - strlcpy(buf, unix:, len); - strlcat(buf, sun-sun_path, len); - return; + plen = strlcpy(buf, unix: , len); + break; case AF_INET: - strlcpy(buf, inet:, len); - if (len 6) - return; - buf += 5; - len -= 5; - data = (const uint8_t *)sin-sin_addr; - data_len = sizeof(sin-sin_addr); + plen = strlcpy(buf, inet: , len); break; case AF_INET6: - strlcpy(buf, inet6:, len); - if (len 7) - return; - buf += 6; - len -= 6; - data = (const uint8_t *)sin6-sin6_addr; - data_len = sizeof(sin6-sin6_addr); + plen = strlcpy(buf, inet6: , len); + break; + case AF_LINK: + plen = strlcpy(buf, link: , len); break; + case AF_APPLETALK: + plen = strlcpy(buf, atalk: , len); + break; + default: + return snprintf(buf, len, (unknown socket family %d), + (int)sa-sa_family); } - for (;;) { - if (--len == 0) - break; - - uint8_t hi = *data 4; - uint8_t lo = *data 15; - --data_len; - ++data; - *buf++ = hi + (hi = 10 ? 'a' - 10 : '0'); - if (--len == 0) - break; - *buf++ = lo + (lo = 10 ? 'a' - 10 : '0'); - if (data_len == 0) - break; + + buf += plen; + if (plen len) + len = 0; + else + len -= plen; + + switch (sa-sa_family) { + case AF_LOCAL: + return sun_print(buf, len, sa); + case AF_INET: + return sin_print(buf, len, sa); + case
CVS commit: src/tests/sys
Module Name:src Committed By: christos Date: Tue Dec 2 19:48:21 UTC 2014 Modified Files: src/tests/sys: Makefile Added Files: src/tests/sys/net: Makefile t_print.c src/tests/sys/netatalk: Makefile t_print.c src/tests/sys/netinet: Makefile t_print.c src/tests/sys/netinet6: Makefile t_print.c Log Message: tests for network address printers. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/sys/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sys/net/Makefile src/tests/sys/net/t_print.c cvs rdiff -u -r0 -r1.1 src/tests/sys/netatalk/Makefile \ src/tests/sys/netatalk/t_print.c cvs rdiff -u -r0 -r1.1 src/tests/sys/netinet/Makefile \ src/tests/sys/netinet/t_print.c cvs rdiff -u -r0 -r1.1 src/tests/sys/netinet6/Makefile \ src/tests/sys/netinet6/t_print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/Makefile diff -u src/tests/sys/Makefile:1.2 src/tests/sys/Makefile:1.3 --- src/tests/sys/Makefile:1.2 Tue Jul 13 17:13:30 2010 +++ src/tests/sys/Makefile Tue Dec 2 14:48:21 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2010/07/13 21:13:30 jmmv Exp $ +# $NetBSD: Makefile,v 1.3 2014/12/02 19:48:21 christos Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/sys -TESTS_SUBDIRS+= rc +TESTS_SUBDIRS+= net netatalk netinet netinet6 rc .include bsd.test.mk Added files: Index: src/tests/sys/net/Makefile diff -u /dev/null src/tests/sys/net/Makefile:1.1 --- /dev/null Tue Dec 2 14:48:21 2014 +++ src/tests/sys/net/Makefile Tue Dec 2 14:48:21 2014 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2014/12/02 19:48:21 christos Exp $ +# +WARNS?=6 + +.include bsd.own.mk + +TESTSDIR= ${TESTSBASE}/sys/netatalk +CPPFLAGS+= -I${NETBSDSRCDIR}/sys -D_TEST + +TESTS_C= t_print + +.include bsd.test.mk Index: src/tests/sys/net/t_print.c diff -u /dev/null src/tests/sys/net/t_print.c:1.1 --- /dev/null Tue Dec 2 14:48:21 2014 +++ src/tests/sys/net/t_print.c Tue Dec 2 14:48:21 2014 @@ -0,0 +1,172 @@ +/* $NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $ */ + +/*- + * Copyright (c) 2014 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. + * + * 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: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $); + +#include net/dl_print.c + +#include atf-c.h + +static const struct { + struct dl_addr ia; + const char *str; + int len; +} tst[] = { + { + { + .dl_type = 6, + .dl_nlen = 0, + .dl_alen = 6, + .dl_slen = 0, + .dl_data = { + (char)0x01, (char)0xa2, (char)0x03, + (char)0xc4, (char)0x05, (char)0xf6, + }, + }, + /6#01:a2:03:c4:05:f6, + 20, + }, + { + { + .dl_type = 24, + .dl_nlen = 3, + .dl_alen = 6, + .dl_slen = 0, + .dl_data = { + 'l', 'o', '0', + (char)0x11, (char)0x22, (char)0x33, + (char)0x44, (char)0x55, (char)0x66, + }, + }, + lo0/24#11:22:33:44:55:66, + 24, + }, + { + { + .dl_type = 24, + .dl_nlen = 7, + .dl_alen = 1, + .dl_slen = 0, + .dl_data = { + 'n', 'p', 'f', 'l', 'o', 'g', '0', (char)0xa5, + }, + }, + npflog0/24#a5, + 13, + }, + { + { + .dl_type = 0, + .dl_nlen = 0, + .dl_alen = 0, + .dl_slen = 0, + .dl_data = { + '\0' + }, + }, + /0#, + 3, + }, +}; + + +ATF_TC(dl_print); +ATF_TC_HEAD(dl_print, tc) +{ + + atf_tc_set_md_var(tc, descr, printing of link address); +} + +ATF_TC_BODY(dl_print, tc) +{ + char buf[LINK_ADDRSTRLEN]; + int r; + size_t l = sizeof(buf); + + for (size_t i = 0; i
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Tue Dec 2 19:56:17 UTC 2014 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: add new address printing tests. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.601 -r1.602 src/distrib/sets/lists/tests/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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.93 src/distrib/sets/lists/debug/mi:1.94 --- src/distrib/sets/lists/debug/mi:1.93 Tue Nov 18 20:08:42 2014 +++ src/distrib/sets/lists/debug/mi Tue Dec 2 14:56:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.93 2014/11/19 01:08:42 pooka Exp $ +# $NetBSD: mi,v 1.94 2014/12/02 19:56:17 christos Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -2186,6 +2186,15 @@ ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_basic.debug tests-syscall-debug debug,atf,rump ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug tests-syscall-debug debug,atf,rump ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug tests-syscall-debug debug,atf,rump +./usr/libdata/debug/usr/tests/sys tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/net tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/net/t_printf.debug tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netatalktests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netatalk/t_printf.debug tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netinettests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netinet/t_printf.debug tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netinet6tests-syys-debug debug,atf +./usr/libdata/debug/usr/tests/sys/netinet6/t_printf.debug tests-syys-debug debug,atf ./usr/libdata/debug/usr/tests/syscall/t_access.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/syscall/t_chroot.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/syscall/t_cmsg.debug tests-obsolete obsolete Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.601 src/distrib/sets/lists/tests/mi:1.602 --- src/distrib/sets/lists/tests/mi:1.601 Thu Nov 20 20:39:09 2014 +++ src/distrib/sets/lists/tests/mi Tue Dec 2 14:56:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.601 2014/11/21 01:39:09 ozaki-r Exp $ +# $NetBSD: mi,v 1.602 2014/12/02 19:56:17 christos Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -159,6 +159,11 @@ ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug,rump ./usr/libdata/debug/usr/tests/sbin tests-sbin-tests ./usr/libdata/debug/usr/tests/sbin/resize_ffstests-sbin-tests +./usr/libdata/debug/usr/tests/sys tests-sys-debug +./usr/libdata/debug/usr/tests/sys/net tests-sys-debug +./usr/libdata/debug/usr/tests/sys/netatalktests-sys-debug +./usr/libdata/debug/usr/tests/sys/netinettests-sys-debug +./usr/libdata/debug/usr/tests/sys/netinet6tests-sys-debug ./usr/libdata/debug/usr/tests/syscall tests-obsolete obsolete ./usr/libdata/debug/usr/tests/usr.bin tests-usr.bin-debug ./usr/libdata/debug/usr/tests/usr.bin/idtests-usr.bin-debug @@ -3264,6 +3269,23 @@ ./usr/tests/sys tests-sys-tests ./usr/tests/sys/Atffiletests-sys-tests atf ./usr/tests/sys/Kyuafile tests-sys-tests atf,kyua +./usr/tests/sys/nettests-sys-tests +./usr/tests/sys/net/Atffile tests-sys-tests atf +./usr/tests/sys/net/Kyuafile tests-sys-tests atf,kyua +./usr/tests/sys/net/t_print tests-sys-tests atf +./usr/tests/sys/netatalk tests-sys-tests +./usr/tests/sys/netatalk/Atffile tests-sys-tests atf +./usr/tests/sys/netatalk/Kyuafile tests-sys-tests atf,kyua +./usr/tests/sys/netatalk/t_print tests-sys-tests atf +./usr/tests/sys/netinettests-sys-tests +./usr/tests/sys/netinet/Atffile tests-sys-tests atf +./usr/tests/sys/netinet/Kyuafile tests-sys-tests atf,kyua +./usr/tests/sys/netinet/t_print tests-sys-tests atf +./usr/tests/sys/netinet6 tests-sys-tests +./usr/tests/sys/netinet6/Atffile tests-sys-tests atf +./usr/tests/sys/netinet6/Kyuafile tests-sys-tests atf,kyua +./usr/tests/sys/netinet6/t_print tests-sys-tests atf +./usr/tests/sys/rctests-sys-tests ./usr/tests/sys/rctests-sys-tests ./usr/tests/sys/rc/Atffile tests-sys-tests atf ./usr/tests/sys/rc/Kyuafile tests-sys-tests atf,kyua
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Tue Dec 2 19:57:11 UTC 2014 Modified Files: src/sys/net: route.c Log Message: zero out the sockaddrs when dup'ing. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/net/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/sys/net/route.c diff -u src/sys/net/route.c:1.133 src/sys/net/route.c:1.134 --- src/sys/net/route.c:1.133 Tue Sep 9 16:16:12 2014 +++ src/sys/net/route.c Tue Dec 2 14:57:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.133 2014/09/09 20:16:12 rmind Exp $ */ +/* $NetBSD: route.c,v 1.134 2014/12/02 19:57:11 christos Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ #include opt_route.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: route.c,v 1.133 2014/09/09 20:16:12 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: route.c,v 1.134 2014/12/02 19:57:11 christos Exp $); #include sys/param.h #include sys/kmem.h @@ -841,7 +841,7 @@ rt_setgate(struct rtentry *rt, const str sockaddr_free(rt-rt_gateway); KASSERT(rt-_rt_key != NULL); RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); - if ((rt-rt_gateway = sockaddr_dup(gate, M_NOWAIT)) == NULL) + if ((rt-rt_gateway = sockaddr_dup(gate, M_ZERO | M_NOWAIT)) == NULL) return ENOMEM; KASSERT(rt-_rt_key != NULL); RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); @@ -1330,7 +1330,7 @@ rtcache_setdst(struct route *ro, const s KASSERT(ro-_ro_rt == NULL); - if ((ro-ro_sa = sockaddr_dup(sa, M_NOWAIT)) == NULL) { + if ((ro-ro_sa = sockaddr_dup(sa, M_ZERO | M_NOWAIT)) == NULL) { rtcache_invariants(ro); return ENOMEM; } @@ -1344,7 +1344,7 @@ rt_settag(struct rtentry *rt, const stru if (rt-rt_tag != tag) { if (rt-rt_tag != NULL) sockaddr_free(rt-rt_tag); - rt-rt_tag = sockaddr_dup(tag, M_NOWAIT); + rt-rt_tag = sockaddr_dup(tag, M_ZERO | M_NOWAIT); } return rt-rt_tag; }
CVS commit: src/sys
Module Name:src Committed By: christos Date: Tue Dec 2 20:25:48 UTC 2014 Modified Files: src/sys/net: rtsock.c src/sys/netinet: in.h ip_icmp.c portalgo.c tcp_input.c src/sys/netinet6: in6.h Log Message: use the new printing code. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/net/rtsock.c cvs rdiff -u -r1.94 -r1.95 src/sys/netinet/in.h cvs rdiff -u -r1.134 -r1.135 src/sys/netinet/ip_icmp.c cvs rdiff -u -r1.6 -r1.7 src/sys/netinet/portalgo.c cvs rdiff -u -r1.334 -r1.335 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.80 -r1.81 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/net/rtsock.c diff -u src/sys/net/rtsock.c:1.164 src/sys/net/rtsock.c:1.165 --- src/sys/net/rtsock.c:1.164 Fri Sep 5 02:00:05 2014 +++ src/sys/net/rtsock.c Tue Dec 2 15:25:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.164 2014/09/05 06:00:05 matt Exp $ */ +/* $NetBSD: rtsock.c,v 1.165 2014/12/02 20:25:48 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.164 2014/09/05 06:00:05 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.165 2014/12/02 20:25:48 christos Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -131,6 +131,11 @@ DOMAIN_DEFINE(routedomain); /* forward d #define COMPATCALL(name, args) do { } while (/*CONSTCOND*/ 0) #endif +#ifdef RTSOCK_DEBUG +#define RT_IN_PRINT(b, a) (in_print((b), sizeof(b), \ +((const struct sockaddr_in *)info.rti_info(a))-sin_addr), (b)) +#endif /* RTSOCK_DEBUG */ + struct route_info COMPATNAME(route_info) = { .ri_dst = { .sa_len = 2, .sa_family = PF_XROUTE, }, .ri_src = { .sa_len = 2, .sa_family = PF_XROUTE, }, @@ -493,9 +498,9 @@ COMPATNAME(route_output)(struct mbuf *m, info.rti_flags = rtm-rtm_flags; #ifdef RTSOCK_DEBUG if (info.rti_info[RTAX_DST]-sa_family == AF_INET) { + char abuf[INET_ADDRSTRLEN]; printf(%s: extracted info.rti_info[RTAX_DST] %s\n, __func__, - inet_ntoa(((const struct sockaddr_in *) - info.rti_info[RTAX_DST])-sin_addr)); + RT_IN_PRINT(abuf, RTAX_DST)); } #endif /* RTSOCK_DEBUG */ if (info.rti_info[RTAX_DST] == NULL || @@ -577,16 +582,14 @@ COMPATNAME(route_output)(struct mbuf *m, #ifdef RTSOCK_DEBUG if (info.rti_info[RTAX_IFA]-sa_family == AF_INET) { + char ibuf[INET_ADDRSTRLEN]; + char abuf[INET_ADDRSTRLEN]; printf(%s: copying out RTAX_IFA %s , - __func__, inet_ntoa( - ((const struct sockaddr_in *) - info.rti_info[RTAX_IFA])-sin_addr) - ); - printf(for info.rti_info[RTAX_DST] %s + for info.rti_info[RTAX_DST] %s ifa_getifa %p ifa_seqno %p\n, - inet_ntoa( - ((const struct sockaddr_in *) - info.rti_info[RTAX_DST])-sin_addr), + __func__, + RT_IN_PRINT(ibuf, RTAX_IFA), + RT_IN_PRINT(abuf, RTAX_DST), (void *)rtifa-ifa_getifa, rtifa-ifa_seqno); } Index: src/sys/netinet/in.h diff -u src/sys/netinet/in.h:1.94 src/sys/netinet/in.h:1.95 --- src/sys/netinet/in.h:1.94 Tue Dec 2 14:35:27 2014 +++ src/sys/netinet/in.h Tue Dec 2 15:25:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in.h,v 1.94 2014/12/02 19:35:27 christos Exp $ */ +/* $NetBSD: in.h,v 1.95 2014/12/02 20:25:47 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -618,6 +618,7 @@ sockaddr_in_alloc(const struct in_addr * #if defined(_KERNEL) || defined(_TEST) int in_print(char *, size_t, const struct in_addr *); +#define IN_PRINT(b, a) (in_print((b), sizeof(b), a), (b)) int sin_print(char *, size_t, const void *); #endif Index: src/sys/netinet/ip_icmp.c diff -u src/sys/netinet/ip_icmp.c:1.134 src/sys/netinet/ip_icmp.c:1.135 --- src/sys/netinet/ip_icmp.c:1.134 Thu May 29 21:39:03 2014 +++ src/sys/netinet/ip_icmp.c Tue Dec 2 15:25:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_icmp.c,v 1.134 2014/05/30 01:39:03 christos Exp $ */ +/* $NetBSD: ip_icmp.c,v 1.135 2014/12/02 20:25:47 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -94,7 +94,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.134 2014/05/30 01:39:03 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.135 2014/12/02 20:25:47 christos Exp $); #include opt_ipsec.h @@ -408,8 +408,10 @@ icmp_input(struct mbuf *m, ...) icmplen = ntohs(ip-ip_len) - hlen; #ifdef ICMPPRINTFS if (icmpprintfs) { - printf(icmp_input from `%s' to , inet_ntoa(ip-ip_src)); - printf(`%s', len %d\n, inet_ntoa(ip-ip_dst), icmplen); + char sbuf[INET_ADDRSTRLEN], dbuf[INET_ADDRSTRLEN]; + printf(icmp_input from `%s' to `%s', len %d\n, + IN_PRINT(sbuf, ip-ip_src), IN_PRINT(dbuf, ip-ip_dst), + icmplen); } #endif if (icmplen ICMP_MINLEN) { @@ -615,9 +617,10 @@ reflect: icmpdst.sin_addr =
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Tue Dec 2 21:28:31 UTC 2014 Modified Files: src/sys/net: rtsock.c Log Message: fix debugging printf. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/net/rtsock.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/net/rtsock.c diff -u src/sys/net/rtsock.c:1.165 src/sys/net/rtsock.c:1.166 --- src/sys/net/rtsock.c:1.165 Tue Dec 2 15:25:48 2014 +++ src/sys/net/rtsock.c Tue Dec 2 16:28:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.165 2014/12/02 20:25:48 christos Exp $ */ +/* $NetBSD: rtsock.c,v 1.166 2014/12/02 21:28:31 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.165 2014/12/02 20:25:48 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.166 2014/12/02 21:28:31 christos Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -133,7 +133,7 @@ DOMAIN_DEFINE(routedomain); /* forward d #ifdef RTSOCK_DEBUG #define RT_IN_PRINT(b, a) (in_print((b), sizeof(b), \ -((const struct sockaddr_in *)info.rti_info(a))-sin_addr), (b)) +((const struct sockaddr_in *)info.rti_info[(a)])-sin_addr), (b)) #endif /* RTSOCK_DEBUG */ struct route_info COMPATNAME(route_info) = { @@ -584,7 +584,7 @@ COMPATNAME(route_output)(struct mbuf *m, AF_INET) { char ibuf[INET_ADDRSTRLEN]; char abuf[INET_ADDRSTRLEN]; - printf(%s: copying out RTAX_IFA %s , + printf(%s: copying out RTAX_IFA %s for info.rti_info[RTAX_DST] %s ifa_getifa %p ifa_seqno %p\n, __func__,
CVS commit: src/sys/external/bsd/drm2/dist
Module Name:src Committed By: christos Date: Tue Dec 2 21:49:36 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_stub.c src/sys/external/bsd/drm2/dist/include/drm: drmP.h Log Message: fix debugging compilation (ALL kernel) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/drm_stub.c cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/external/bsd/drm2/dist/drm/drm_stub.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.7 src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.8 --- src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.7 Sat Nov 22 14:18:07 2014 +++ src/sys/external/bsd/drm2/dist/drm/drm_stub.c Tue Dec 2 16:49:36 2014 @@ -341,7 +341,9 @@ static int drm_minor_register(struct drm { struct drm_minor *new_minor; unsigned long flags; +#ifndef __NetBSD__ int ret; +#endif int minor_id; DRM_DEBUG(\n); @@ -365,6 +367,7 @@ static int drm_minor_register(struct drm new_minor-index = minor_id; +#ifndef __NetBSD__ ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root); if (ret) { DRM_ERROR(DRM: Failed to initialize /sys/kernel/debug/dri.\n); @@ -376,7 +379,7 @@ static int drm_minor_register(struct drm DRM_ERROR(DRM: Error sysfs_device_add.\n); goto err_debugfs; } - +#endif /* replace NULL with @minor so lookups will succeed from now on */ spin_lock_irqsave(drm_minor_lock, flags); idr_replace(drm_minors_idr, new_minor, new_minor-index); @@ -385,6 +388,7 @@ static int drm_minor_register(struct drm DRM_DEBUG(new minor assigned %d\n, minor_id); return 0; +#ifndef __NetBSD__ err_debugfs: drm_debugfs_cleanup(new_minor); err_id: @@ -393,6 +397,7 @@ err_id: spin_unlock_irqrestore(drm_minor_lock, flags); new_minor-index = 0; return ret; +#endif } static void drm_minor_unregister(struct drm_device *dev, unsigned int type) Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.8 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.9 --- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.8 Sat Nov 22 14:18:07 2014 +++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h Tue Dec 2 16:49:36 2014 @@ -1637,9 +1637,10 @@ extern unsigned int drm_timestamp_precis extern unsigned int drm_timestamp_monotonic; extern struct class *drm_class; +#ifndef __NetBSD__ extern struct dentry *drm_debugfs_root; -#ifdef __NetBSD__ +#else extern spinlock_t drm_minor_lock; #endif extern struct idr drm_minors_idr;
CVS commit: [netbsd-6] src/lib/libc/resolv
Module Name:src Committed By: snj Date: Tue Dec 2 21:56:37 UTC 2014 Modified Files: src/lib/libc/resolv [netbsd-6]: res_mkquery.c Log Message: Pull up following revision(s) (requested by pettai in ticket #1191): lib/libc/resolv/res_mkquery.c: revision 1.14 PR/48475: YAMAGUCHI Takanori: EDNS option broken with unbound. struct querybuf in net/gethnamaddr.c defines MAXPACKET to 64K. This in turn gets passed down until it reached res_nopt(..., answer, anslen), where the size of the buffer must fit in 16 bits. Unfortunately we end up being one more than the max so we end up sending a 0 as the size and unbound does not like that. Instead we clip now to 64K - 1, and everyone is happy. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.8.1 src/lib/libc/resolv/res_mkquery.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/resolv/res_mkquery.c diff -u src/lib/libc/resolv/res_mkquery.c:1.12 src/lib/libc/resolv/res_mkquery.c:1.12.8.1 --- src/lib/libc/resolv/res_mkquery.c:1.12 Sun Apr 12 19:43:37 2009 +++ src/lib/libc/resolv/res_mkquery.c Tue Dec 2 21:56:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: res_mkquery.c,v 1.12 2009/04/12 19:43:37 christos Exp $ */ +/* $NetBSD: res_mkquery.c,v 1.12.8.1 2014/12/02 21:56:37 snj Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. (ISC) @@ -76,7 +76,7 @@ static const char sccsid[] = @(#)res_mkquery.c 8.1 (Berkeley) 6/4/93; static const char rcsid[] = Id: res_mkquery.c,v 1.10 2008/12/11 09:59:00 marka Exp; #else -__RCSID($NetBSD: res_mkquery.c,v 1.12 2009/04/12 19:43:37 christos Exp $); +__RCSID($NetBSD: res_mkquery.c,v 1.12.8.1 2014/12/02 21:56:37 snj Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -249,7 +249,9 @@ res_nopt(res_state statp, *cp++ = 0;/*% . */ ns_put16(ns_t_opt, cp); /*% TYPE */ cp += INT16SZ; - ns_put16(anslen 0x, cp); /*% CLASS = UDP payload size */ + if (anslen 0x) + anslen = 0x; + ns_put16(anslen, cp); /*% CLASS = UDP payload size */ cp += INT16SZ; *cp++ = NOERROR; /*% extended RCODE */ *cp++ = 0;/*% EDNS version */
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: snj Date: Tue Dec 2 22:01:37 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1193): lib/libperfuse/ops.c: revision 1.81 Allow setxattr to be called with a NULL value, instead of crashing. To generate a diff of this commit: cvs rdiff -u -r1.50.2.18 -r1.50.2.19 src/lib/libperfuse/ops.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/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.18 src/lib/libperfuse/ops.c:1.50.2.19 --- src/lib/libperfuse/ops.c:1.50.2.18 Sun Nov 9 11:03:41 2014 +++ src/lib/libperfuse/ops.c Tue Dec 2 22:01:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.18 2014/11/09 11:03:41 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.19 2014/12/02 22:01:37 snj Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -3450,6 +3450,7 @@ perfuse_node_setextattr(struct puffs_use perfuse_msg_t *pm; struct fuse_setxattr_in *fsi; size_t attrnamelen; + size_t datalen; size_t len; char *np; int error; @@ -3462,23 +3463,27 @@ perfuse_node_setextattr(struct puffs_use ps = puffs_getspecific(pu); attrname = perfuse_native_ns(attrns, attrname, fuse_attrname); attrnamelen = strlen(attrname) + 1; - len = sizeof(*fsi) + attrnamelen + *resid; + + datalen = (resid != NULL) ? *resid : 0; + len = sizeof(*fsi) + attrnamelen + datalen; pm = ps-ps_new_msg(pu, opc, FUSE_SETXATTR, len, pcr); fsi = GET_INPAYLOAD(ps, pm, fuse_setxattr_in); - fsi-size = (unsigned int)*resid; + fsi-size = (unsigned int)datalen; fsi-flags = 0; np = (char *)(void *)(fsi + 1); (void)strlcpy(np, attrname, attrnamelen); np += attrnamelen; - (void)memcpy(np, (char *)attr, *resid); + if (datalen) + (void)memcpy(np, (char *)attr, datalen); if ((error = xchg_msg(pu, opc, pm, NO_PAYLOAD_REPLY_LEN, wait_reply)) != 0) goto out; ps-ps_destroy_msg(pm); - *resid = 0; + if (resid) + *resid = 0; error = 0; out:
CVS commit: [netbsd-6] src/sys/dev/raidframe
Module Name:src Committed By: snj Date: Tue Dec 2 22:05:14 UTC 2014 Modified Files: src/sys/dev/raidframe [netbsd-6]: raidframevar.h rf_netbsdkintf.c rf_reconstruct.c Log Message: Pull up following revision(s) (requested by oster in ticket #1194): sys/dev/raidframe/raidframevar.h: revision 1.17 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.316 sys/dev/raidframe/rf_reconstruct.c: revision 1.121 Fix a long-standing bug related to rebooting while a reconstruct-to-spare is underway but not yet complete. The issue was that a component was being marked as a used_spare when the rebuild started, not when the rebuild was actually finished. Marking it as a used_spare meant that the component label on the spare was being updated such that after a reboot the component would be considered up-to-date, regardless of whether the rebuild actually completed! This fix includes: 1) Add an additional state rf_ds_rebuilding_spare which is used to denote that a spare is currently being rebuilt from the live components. 2) Update the comments on the disk states, which were out-of-sync with reality. 3) When rebuilding to a spare component, that spare now enters the state rf_ds_rebuilding_spare instead of the state rf_ds_used_spare. 4) When the rebuild is actually complete then the spare component enters the rf_ds_used_spare state. rf_ds_used_spare is now used exclusively for the case where the rebuilding to the spare has completed successfully. XXX: Someday we need to teach raidctl(8) about this new state, and take out the backwards compatibility code in rf_netbsdkintf.c (see RAIDFRAME_GET_INFO in raidioctl()). For today, this fix needs to be generic enough that it can get backported without major grief. XXX: Needs pullup to netbsd-5*, netbsd-6*, and netbsd-7 Fixes PR#49244. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.10.1 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.295.6.2 -r1.295.6.3 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.117.8.1 -r1.117.8.2 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/raidframevar.h diff -u src/sys/dev/raidframe/raidframevar.h:1.15 src/sys/dev/raidframe/raidframevar.h:1.15.10.1 --- src/sys/dev/raidframe/raidframevar.h:1.15 Sat Feb 19 07:11:09 2011 +++ src/sys/dev/raidframe/raidframevar.h Tue Dec 2 22:05:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframevar.h,v 1.15 2011/02/19 07:11:09 enami Exp $ */ +/* $NetBSD: raidframevar.h,v 1.15.10.1 2014/12/02 22:05:14 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -384,17 +384,17 @@ struct RF_SparetWait_s { * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK(). */ enum RF_DiskStatus_e { -rf_ds_optimal, /* no problems */ -rf_ds_failed, /* reconstruction ongoing */ -rf_ds_reconstructing, /* reconstruction complete to spare, dead disk - * not yet replaced */ -rf_ds_dist_spared, /* reconstruction complete to distributed + rf_ds_optimal, /* no problems */ + rf_ds_failed, /* disk has failed */ + rf_ds_reconstructing, /* reconstruction ongoing */ + rf_ds_dist_spared, /* reconstruction complete to distributed * spare space, dead disk not yet replaced */ -rf_ds_spared, /* reconstruction complete to distributed - * spare space, dead disk not yet replaced */ -rf_ds_spare,/* an available spare disk */ -rf_ds_used_spare/* a spare which has been used, and hence is + rf_ds_spared, /* reconstruction complete, dead disk not + yet replaced */ + rf_ds_spare,/* an available spare disk */ + rf_ds_used_spare, /* a spare which has been used, and hence is * not available */ + rf_ds_rebuilding_spare /* a spare which is being rebuilt to */ }; typedef enum RF_DiskStatus_e RF_DiskStatus_t; Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.3 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 Mon Aug 13 19:41:29 2012 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Dec 2 22:05:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.2 2012/08/13 19:41:29 riz Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.3 2014/12/02 22:05:14 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.2 2012/08/13 19:41:29 riz Exp $);
CVS commit: [netbsd-6-0] src/sys/dev/raidframe
Module Name:src Committed By: snj Date: Tue Dec 2 22:06:58 UTC 2014 Modified Files: src/sys/dev/raidframe [netbsd-6-0]: raidframevar.h rf_netbsdkintf.c rf_reconstruct.c Log Message: Pull up following revision(s) (requested by oster in ticket #1194): sys/dev/raidframe/raidframevar.h: revision 1.17 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.316 sys/dev/raidframe/rf_reconstruct.c: revision 1.121 Fix a long-standing bug related to rebooting while a reconstruct-to-spare is underway but not yet complete. The issue was that a component was being marked as a used_spare when the rebuild started, not when the rebuild was actually finished. Marking it as a used_spare meant that the component label on the spare was being updated such that after a reboot the component would be considered up-to-date, regardless of whether the rebuild actually completed! This fix includes: 1) Add an additional state rf_ds_rebuilding_spare which is used to denote that a spare is currently being rebuilt from the live components. 2) Update the comments on the disk states, which were out-of-sync with reality. 3) When rebuilding to a spare component, that spare now enters the state rf_ds_rebuilding_spare instead of the state rf_ds_used_spare. 4) When the rebuild is actually complete then the spare component enters the rf_ds_used_spare state. rf_ds_used_spare is now used exclusively for the case where the rebuilding to the spare has completed successfully. XXX: Someday we need to teach raidctl(8) about this new state, and take out the backwards compatibility code in rf_netbsdkintf.c (see RAIDFRAME_GET_INFO in raidioctl()). For today, this fix needs to be generic enough that it can get backported without major grief. XXX: Needs pullup to netbsd-5*, netbsd-6*, and netbsd-7 Fixes PR#49244. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.16.1 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.295.6.2 -r1.295.6.2.4.1 \ src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.117.8.1 -r1.117.8.1.4.1 \ src/sys/dev/raidframe/rf_reconstruct.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/raidframe/raidframevar.h diff -u src/sys/dev/raidframe/raidframevar.h:1.15 src/sys/dev/raidframe/raidframevar.h:1.15.16.1 --- src/sys/dev/raidframe/raidframevar.h:1.15 Sat Feb 19 07:11:09 2011 +++ src/sys/dev/raidframe/raidframevar.h Tue Dec 2 22:06:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframevar.h,v 1.15 2011/02/19 07:11:09 enami Exp $ */ +/* $NetBSD: raidframevar.h,v 1.15.16.1 2014/12/02 22:06:58 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -384,17 +384,17 @@ struct RF_SparetWait_s { * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK(). */ enum RF_DiskStatus_e { -rf_ds_optimal, /* no problems */ -rf_ds_failed, /* reconstruction ongoing */ -rf_ds_reconstructing, /* reconstruction complete to spare, dead disk - * not yet replaced */ -rf_ds_dist_spared, /* reconstruction complete to distributed + rf_ds_optimal, /* no problems */ + rf_ds_failed, /* disk has failed */ + rf_ds_reconstructing, /* reconstruction ongoing */ + rf_ds_dist_spared, /* reconstruction complete to distributed * spare space, dead disk not yet replaced */ -rf_ds_spared, /* reconstruction complete to distributed - * spare space, dead disk not yet replaced */ -rf_ds_spare,/* an available spare disk */ -rf_ds_used_spare/* a spare which has been used, and hence is + rf_ds_spared, /* reconstruction complete, dead disk not + yet replaced */ + rf_ds_spare,/* an available spare disk */ + rf_ds_used_spare, /* a spare which has been used, and hence is * not available */ + rf_ds_rebuilding_spare /* a spare which is being rebuilt to */ }; typedef enum RF_DiskStatus_e RF_DiskStatus_t; Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2.4.1 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 Mon Aug 13 19:41:29 2012 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Dec 2 22:06:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.2 2012/08/13 19:41:29 riz Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.2.4.1 2014/12/02 22:06:58 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.2
CVS commit: [netbsd-6-1] src/sys/dev/raidframe
Module Name:src Committed By: snj Date: Tue Dec 2 22:08:01 UTC 2014 Modified Files: src/sys/dev/raidframe [netbsd-6-1]: raidframevar.h rf_netbsdkintf.c rf_reconstruct.c Log Message: Pull up following revision(s) (requested by oster in ticket #1194): sys/dev/raidframe/raidframevar.h: revision 1.17 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.316 sys/dev/raidframe/rf_reconstruct.c: revision 1.121 Fix a long-standing bug related to rebooting while a reconstruct-to-spare is underway but not yet complete. The issue was that a component was being marked as a used_spare when the rebuild started, not when the rebuild was actually finished. Marking it as a used_spare meant that the component label on the spare was being updated such that after a reboot the component would be considered up-to-date, regardless of whether the rebuild actually completed! This fix includes: 1) Add an additional state rf_ds_rebuilding_spare which is used to denote that a spare is currently being rebuilt from the live components. 2) Update the comments on the disk states, which were out-of-sync with reality. 3) When rebuilding to a spare component, that spare now enters the state rf_ds_rebuilding_spare instead of the state rf_ds_used_spare. 4) When the rebuild is actually complete then the spare component enters the rf_ds_used_spare state. rf_ds_used_spare is now used exclusively for the case where the rebuilding to the spare has completed successfully. XXX: Someday we need to teach raidctl(8) about this new state, and take out the backwards compatibility code in rf_netbsdkintf.c (see RAIDFRAME_GET_INFO in raidioctl()). For today, this fix needs to be generic enough that it can get backported without major grief. XXX: Needs pullup to netbsd-5*, netbsd-6*, and netbsd-7 Fixes PR#49244. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.24.1 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.295.6.2 -r1.295.6.2.6.1 \ src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.117.8.1 -r1.117.8.1.6.1 \ src/sys/dev/raidframe/rf_reconstruct.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/raidframe/raidframevar.h diff -u src/sys/dev/raidframe/raidframevar.h:1.15 src/sys/dev/raidframe/raidframevar.h:1.15.24.1 --- src/sys/dev/raidframe/raidframevar.h:1.15 Sat Feb 19 07:11:09 2011 +++ src/sys/dev/raidframe/raidframevar.h Tue Dec 2 22:08:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframevar.h,v 1.15 2011/02/19 07:11:09 enami Exp $ */ +/* $NetBSD: raidframevar.h,v 1.15.24.1 2014/12/02 22:08:01 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -384,17 +384,17 @@ struct RF_SparetWait_s { * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK(). */ enum RF_DiskStatus_e { -rf_ds_optimal, /* no problems */ -rf_ds_failed, /* reconstruction ongoing */ -rf_ds_reconstructing, /* reconstruction complete to spare, dead disk - * not yet replaced */ -rf_ds_dist_spared, /* reconstruction complete to distributed + rf_ds_optimal, /* no problems */ + rf_ds_failed, /* disk has failed */ + rf_ds_reconstructing, /* reconstruction ongoing */ + rf_ds_dist_spared, /* reconstruction complete to distributed * spare space, dead disk not yet replaced */ -rf_ds_spared, /* reconstruction complete to distributed - * spare space, dead disk not yet replaced */ -rf_ds_spare,/* an available spare disk */ -rf_ds_used_spare/* a spare which has been used, and hence is + rf_ds_spared, /* reconstruction complete, dead disk not + yet replaced */ + rf_ds_spare,/* an available spare disk */ + rf_ds_used_spare, /* a spare which has been used, and hence is * not available */ + rf_ds_rebuilding_spare /* a spare which is being rebuilt to */ }; typedef enum RF_DiskStatus_e RF_DiskStatus_t; Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2.6.1 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.2 Mon Aug 13 19:41:29 2012 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Dec 2 22:08:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.2 2012/08/13 19:41:29 riz Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.295.6.2.6.1 2014/12/02 22:08:01 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.2
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: christos Date: Tue Dec 2 22:13:13 UTC 2014 Modified Files: src/external/bsd/dhcpcd/dist: if.c Log Message: avoid macro clash. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/dhcpcd/dist/if.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/dhcpcd/dist/if.c diff -u src/external/bsd/dhcpcd/dist/if.c:1.7 src/external/bsd/dhcpcd/dist/if.c:1.8 --- src/external/bsd/dhcpcd/dist/if.c:1.7 Wed Nov 26 08:43:06 2014 +++ src/external/bsd/dhcpcd/dist/if.c Tue Dec 2 17:13:13 2014 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: if.c,v 1.7 2014/11/26 13:43:06 roy Exp $); + __RCSID($NetBSD: if.c,v 1.8 2014/12/02 22:13:13 christos Exp $); /* * dhcpcd - DHCP client daemon @@ -187,7 +187,7 @@ if_discover(struct dhcpcd_ctx *ctx, int struct ifaddrs *ifaddrs, *ifa; char *p; int i; - sa_family_t sdl_type; + sa_family_t sdltype; struct if_head *ifs; struct interface *ifp; #ifdef __linux__ @@ -321,7 +321,7 @@ if_discover(struct dhcpcd_ctx *ctx, int ifp-flags = ifa-ifa_flags; ifp-carrier = if_carrier(ifp); - sdl_type = 0; + sdltype = 0; if (ifa-ifa_addr != NULL) { #ifdef AF_LINK sdl = (const struct sockaddr_dl *)(void *)ifa-ifa_addr; @@ -346,7 +346,7 @@ if_discover(struct dhcpcd_ctx *ctx, int memcpy(ifp-linkaddr, sdl, sdl-sdl_len); #endif ifp-index = sdl-sdl_index; - sdl_type = sdl-sdl_type; + sdltype = sdl-sdl_type; switch(sdl-sdl_type) { #ifdef IFT_BRIDGE case IFT_BRIDGE: @@ -388,7 +388,7 @@ if_discover(struct dhcpcd_ctx *ctx, int #elif AF_PACKET sll = (const struct sockaddr_ll *)(void *)ifa-ifa_addr; ifp-index = (unsigned int)sll-sll_ifindex; - ifp-family = sdl_type = sll-sll_hatype; + ifp-family = sdltype = sll-sll_hatype; ifp-hwlen = sll-sll_halen; if (ifp-hwlen != 0) memcpy(ifp-hwaddr, sll-sll_addr, ifp-hwlen); @@ -423,7 +423,7 @@ if_discover(struct dhcpcd_ctx *ctx, int syslog(LOG_WARNING, %s: unsupported interface type %.2x, family %.2x, -ifp-name, sdl_type, ifp-family); +ifp-name, sdltype, ifp-family); break; } }
CVS commit: [netbsd-6] src
Module Name:src Committed By: snj Date: Tue Dec 2 22:18:09 UTC 2014 Modified Files: src/distrib/sets/lists/base [netbsd-6]: mi src/doc [netbsd-6]: 3RDPARTY src/share/zoneinfo [netbsd-6]: NEWS africa asia australasia backzone europe leapseconds leapseconds.awk northamerica southamerica zone.tab zone1970.tab Log Message: Apply patch (requested by apb in ticket 1195): Update tzdata from 2014g to 2014j. Some of the changes are: * A new Zone Pacific/Bougainville, for the part of Papua New Guinea that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. * Changes for Fiji, Belarus, and Turks Caicos that take effect at various times in 2014. * Changes to historical data. To generate a diff of this commit: cvs rdiff -u -r1.984.2.19 -r1.984.2.20 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.909.2.25 -r1.909.2.26 src/doc/3RDPARTY cvs rdiff -u -r1.1.6.2 -r1.1.6.3 src/share/zoneinfo/NEWS \ src/share/zoneinfo/backzone cvs rdiff -u -r1.1.1.30.4.8 -r1.1.1.30.4.9 src/share/zoneinfo/africa cvs rdiff -u -r1.1.1.50.4.12 -r1.1.1.50.4.13 src/share/zoneinfo/asia cvs rdiff -u -r1.23.4.13 -r1.23.4.14 src/share/zoneinfo/australasia cvs rdiff -u -r1.1.1.44.4.9 -r1.1.1.44.4.10 src/share/zoneinfo/europe cvs rdiff -u -r1.1.1.18.4.5 -r1.1.1.18.4.6 src/share/zoneinfo/leapseconds cvs rdiff -u -r1.1.1.1.8.3 -r1.1.1.1.8.4 src/share/zoneinfo/leapseconds.awk cvs rdiff -u -r1.1.1.49.4.10 -r1.1.1.49.4.11 src/share/zoneinfo/northamerica cvs rdiff -u -r1.1.1.46.4.12 -r1.1.1.46.4.13 src/share/zoneinfo/southamerica cvs rdiff -u -r1.1.1.39.4.9 -r1.1.1.39.4.10 src/share/zoneinfo/zone.tab cvs rdiff -u -r1.2.10.3 -r1.2.10.4 src/share/zoneinfo/zone1970.tab 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/mi diff -u src/distrib/sets/lists/base/mi:1.984.2.19 src/distrib/sets/lists/base/mi:1.984.2.20 --- src/distrib/sets/lists/base/mi:1.984.2.19 Fri Aug 15 23:34:17 2014 +++ src/distrib/sets/lists/base/mi Tue Dec 2 22:18:08 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984.2.19 2014/08/15 23:34:17 riz Exp $ +# $NetBSD: mi,v 1.984.2.20 2014/12/02 22:18:08 snj Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -4855,6 +4855,7 @@ ./usr/share/zoneinfo/Pacific base-sys-share ./usr/share/zoneinfo/Pacific/Apia base-sys-share share ./usr/share/zoneinfo/Pacific/Auckland base-sys-share share +./usr/share/zoneinfo/Pacific/Bougainville base-sys-share share ./usr/share/zoneinfo/Pacific/Chatham base-sys-share share ./usr/share/zoneinfo/Pacific/Chuuk base-sys-share share ./usr/share/zoneinfo/Pacific/Easter base-sys-share share Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.25 src/doc/3RDPARTY:1.909.2.26 --- src/doc/3RDPARTY:1.909.2.25 Sun Sep 21 21:29:35 2014 +++ src/doc/3RDPARTY Tue Dec 2 22:18:08 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.25 2014/09/21 21:29:35 snj Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.26 2014/12/02 22:18:08 snj Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1143,8 +1143,8 @@ Notes: Added changes from a5 - a12 manually. Package: tz -Version: tzcode2011i / tzdata2014g -Current Vers: tzcode2014g / tzdata2014g +Version: tzcode2011i / tzdata2014j +Current Vers: tzcode2014j / tzdata2014j Maintainer: Paul Eggert egg...@cs.ucla.edu Archive Site: ftp://ftp.iana.org/tz/releases/ Archive Site: ftp://munnari.oz.au/pub/oldtz/ Index: src/share/zoneinfo/NEWS diff -u src/share/zoneinfo/NEWS:1.1.6.2 src/share/zoneinfo/NEWS:1.1.6.3 --- src/share/zoneinfo/NEWS:1.1.6.2 Sun Sep 21 21:29:35 2014 +++ src/share/zoneinfo/NEWS Tue Dec 2 22:18:08 2014 @@ -1,11 +1,170 @@ News for the tz database +Release 2014j - 2014-11-10 17:37:11 -0800 + + Changes affecting current and future time stamps + +Turks Caicos' switch from US eastern time to UTC-4 year-round +did not occur on 2014-11-02 at 02:00. It's currently scheduled +for 2015-11-01 at 02:00. (Thanks to Chris Walton.) + + Changes affecting past time stamps + +Many pre-1989 time stamps have been corrected for Asia/Seoul and +Asia/Pyongyang, based on sources for the Korean-language Wikipedia +entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no +longer guess that Pyongyang mimicked Seoul time after World War II, +as this is politically implausible. + +Some more zones have been turned into links, when they differed +from existing zones only for older time stamps. As usual, +these changes affect UTC offsets in pre-1970 time stamps only. +Their old contents have been moved to the 'backzone' file. +The affected zones are: Africa/Addis_Ababa, Africa/Asmara, +Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, +Africa/Mogadishu,
CVS commit: [netbsd-6-0] src
Module Name:src Committed By: snj Date: Tue Dec 2 22:19:18 UTC 2014 Modified Files: src/distrib/sets/lists/base [netbsd-6-0]: mi src/doc [netbsd-6-0]: 3RDPARTY src/share/zoneinfo [netbsd-6-0]: NEWS africa asia australasia backzone europe leapseconds leapseconds.awk northamerica southamerica zone.tab zone1970.tab Log Message: Apply patch (requested by apb in ticket 1195): Update tzdata from 2014g to 2014j. Some of the changes are: * A new Zone Pacific/Bougainville, for the part of Papua New Guinea that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. * Changes for Fiji, Belarus, and Turks Caicos that take effect at various times in 2014. * Changes to historical data. To generate a diff of this commit: cvs rdiff -u -r1.984.2.10.2.3 -r1.984.2.10.2.4 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.909.2.14.2.10 -r1.909.2.14.2.11 src/doc/3RDPARTY cvs rdiff -u -r1.1.4.2 -r1.1.4.3 src/share/zoneinfo/NEWS \ src/share/zoneinfo/backzone cvs rdiff -u -r1.1.1.30.4.1.4.7 -r1.1.1.30.4.1.4.8 src/share/zoneinfo/africa cvs rdiff -u -r1.1.1.50.4.3.4.9 -r1.1.1.50.4.3.4.10 src/share/zoneinfo/asia cvs rdiff -u -r1.23.4.4.2.9 -r1.23.4.4.2.10 src/share/zoneinfo/australasia cvs rdiff -u -r1.1.1.44.4.3.4.6 -r1.1.1.44.4.3.4.7 src/share/zoneinfo/europe cvs rdiff -u -r1.1.1.18.4.3.4.2 -r1.1.1.18.4.3.4.3 \ src/share/zoneinfo/leapseconds cvs rdiff -u -r1.1.1.1.4.3 -r1.1.1.1.4.4 src/share/zoneinfo/leapseconds.awk cvs rdiff -u -r1.1.1.49.4.4.4.6 -r1.1.1.49.4.4.4.7 \ src/share/zoneinfo/northamerica cvs rdiff -u -r1.1.1.46.4.3.4.9 -r1.1.1.46.4.3.4.10 \ src/share/zoneinfo/southamerica cvs rdiff -u -r1.1.1.39.4.3.4.6 -r1.1.1.39.4.3.4.7 \ src/share/zoneinfo/zone.tab cvs rdiff -u -r1.2.12.3 -r1.2.12.4 src/share/zoneinfo/zone1970.tab 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/mi diff -u src/distrib/sets/lists/base/mi:1.984.2.10.2.3 src/distrib/sets/lists/base/mi:1.984.2.10.2.4 --- src/distrib/sets/lists/base/mi:1.984.2.10.2.3 Fri Aug 15 23:37:04 2014 +++ src/distrib/sets/lists/base/mi Tue Dec 2 22:19:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984.2.10.2.3 2014/08/15 23:37:04 riz Exp $ +# $NetBSD: mi,v 1.984.2.10.2.4 2014/12/02 22:19:17 snj Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -4849,6 +4849,7 @@ ./usr/share/zoneinfo/Pacific base-sys-share ./usr/share/zoneinfo/Pacific/Apia base-sys-share share ./usr/share/zoneinfo/Pacific/Auckland base-sys-share share +./usr/share/zoneinfo/Pacific/Bougainville base-sys-share share ./usr/share/zoneinfo/Pacific/Chatham base-sys-share share ./usr/share/zoneinfo/Pacific/Chuuk base-sys-share share ./usr/share/zoneinfo/Pacific/Easter base-sys-share share Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.14.2.10 src/doc/3RDPARTY:1.909.2.14.2.11 --- src/doc/3RDPARTY:1.909.2.14.2.10 Sun Sep 21 21:27:19 2014 +++ src/doc/3RDPARTY Tue Dec 2 22:19:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.14.2.10 2014/09/21 21:27:19 snj Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.14.2.11 2014/12/02 22:19:17 snj Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1143,8 +1143,8 @@ Notes: Added changes from a5 - a12 manually. Package: tz -Version: tzcode2011i / tzdata2014g -Current Vers: tzcode2014g / tzdata2014g +Version: tzcode2011i / tzdata2014j +Current Vers: tzcode2014j / tzdata2014j Maintainer: Paul Eggert egg...@cs.ucla.edu Archive Site: ftp://ftp.iana.org/tz/releases/ Archive Site: ftp://munnari.oz.au/pub/oldtz/ Index: src/share/zoneinfo/NEWS diff -u src/share/zoneinfo/NEWS:1.1.4.2 src/share/zoneinfo/NEWS:1.1.4.3 --- src/share/zoneinfo/NEWS:1.1.4.2 Sun Sep 21 21:27:19 2014 +++ src/share/zoneinfo/NEWS Tue Dec 2 22:19:18 2014 @@ -1,11 +1,170 @@ News for the tz database +Release 2014j - 2014-11-10 17:37:11 -0800 + + Changes affecting current and future time stamps + +Turks Caicos' switch from US eastern time to UTC-4 year-round +did not occur on 2014-11-02 at 02:00. It's currently scheduled +for 2015-11-01 at 02:00. (Thanks to Chris Walton.) + + Changes affecting past time stamps + +Many pre-1989 time stamps have been corrected for Asia/Seoul and +Asia/Pyongyang, based on sources for the Korean-language Wikipedia +entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no +longer guess that Pyongyang mimicked Seoul time after World War II, +as this is politically implausible. + +Some more zones have been turned into links, when they differed +from existing zones only for older time stamps. As usual, +these changes affect UTC offsets in pre-1970 time stamps only. +Their old contents have been moved to the 'backzone' file. +
CVS commit: src/usr.bin/w
Module Name:src Committed By: christos Date: Tue Dec 2 22:19:19 UTC 2014 Modified Files: src/usr.bin/w: w.c Log Message: if doing uptime, don't bother resolving names. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/usr.bin/w/w.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/w/w.c diff -u src/usr.bin/w/w.c:1.79 src/usr.bin/w/w.c:1.80 --- src/usr.bin/w/w.c:1.79 Wed Feb 26 19:49:46 2014 +++ src/usr.bin/w/w.c Tue Dec 2 17:19:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: w.c,v 1.79 2014/02/27 00:49:46 joerg Exp $ */ +/* $NetBSD: w.c,v 1.80 2014/12/02 22:19:19 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)w.c 8.6 (Berkeley) 6/30/94; #else -__RCSID($NetBSD: w.c,v 1.79 2014/02/27 00:49:46 joerg Exp $); +__RCSID($NetBSD: w.c,v 1.80 2014/12/02 22:19:19 christos Exp $); #endif #endif /* not lint */ @@ -156,6 +156,7 @@ main(int argc, char **argv) if (*progname == 'u') { wcmd = 0; options = ; + nflag = 1; } else { wcmd = 1; options = hiM:N:nw;
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Tue Dec 2 22:23:44 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1194 1195 To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.10 src/doc/CHANGES-6.1.6:1.1.2.11 --- src/doc/CHANGES-6.1.6:1.1.2.10 Sat Nov 29 11:55:39 2014 +++ src/doc/CHANGES-6.1.6 Tue Dec 2 22:23:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.10 2014/11/29 11:55:39 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.11 2014/12/02 22:23:44 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -200,3 +200,36 @@ sys/dev/pci/if_bge.c1.260 (via patch For PCI-X BCM5704, set maximum outstanding split transactions to 0. This change fixes a serious stability problem on those chips. [msaitoh, #1200] + +sys/dev/raidframe/raidframevar.h 1.17 +sys/dev/raidframe/rf_netbsdkintf.c 1.316 +sys/dev/raidframe/rf_reconstruct.c 1.121 + + Fix a long-standing bug related to rebooting while a + reconstruct-to-spare is underway but not yet complete. + Fixes PR kern/49244. + [oster, ticket #1194] + +doc/3RDPARTYpatch +distrib/sets/lists/base/mi patch +share/zoneinfo/NEWS patch +share/zoneinfo/africa patch +share/zoneinfo/asia patch +share/zoneinfo/australasia patch +share/zoneinfo/backzone patch +share/zoneinfo/europe patch +share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk patch +share/zoneinfo/northamerica patch +share/zoneinfo/southamerica patch +share/zoneinfo/zone.tab patch +share/zoneinfo/zone1970.tab patch + +Update tzdata from 2014g to 2014j. Some of the changes are: +* A new Zone Pacific/Bougainville, for the part of Papua New Guinea + that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. +* Changes for Fiji, Belarus, and Turks Caicos that take effect + at various times in 2014. +* Changes to historical data. +[apb, ticket #1195] +
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Tue Dec 2 22:23:14 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1194 and 1195 To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.10 src/doc/CHANGES-6.0.7:1.1.2.11 --- src/doc/CHANGES-6.0.7:1.1.2.10 Sat Nov 29 11:51:44 2014 +++ src/doc/CHANGES-6.0.7 Tue Dec 2 22:23:14 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.10 2014/11/29 11:51:44 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.11 2014/12/02 22:23:14 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -201,3 +201,35 @@ sys/dev/pci/if_bge.c1.260 (via patch This change fixes a serious stability problem on those chips. [msaitoh, #1200] +sys/dev/raidframe/raidframevar.h 1.17 +sys/dev/raidframe/rf_netbsdkintf.c 1.316 +sys/dev/raidframe/rf_reconstruct.c 1.121 + + Fix a long-standing bug related to rebooting while a + reconstruct-to-spare is underway but not yet complete. + Fixes PR kern/49244. + [oster, ticket #1194] + +doc/3RDPARTY patch +distrib/sets/lists/base/mi patch +share/zoneinfo/NEWSpatch +share/zoneinfo/africapatch +share/zoneinfo/asiapatch +share/zoneinfo/australasia patch +share/zoneinfo/backzonepatch +share/zoneinfo/europepatch +share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk patch +share/zoneinfo/northamerica patch +share/zoneinfo/southamerica patch +share/zoneinfo/zone.tabpatch +share/zoneinfo/zone1970.tab patch + + Update tzdata from 2014g to 2014j. Some of the changes are: +* A new Zone Pacific/Bougainville, for the part of Papua New Guinea + that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. +* Changes for Fiji, Belarus, and Turks Caicos that take effect + at various times in 2014. +* Changes to historical data. + [apb, ticket #1195] +
CVS commit: [netbsd-6-1] src
Module Name:src Committed By: snj Date: Tue Dec 2 22:18:45 UTC 2014 Modified Files: src/distrib/sets/lists/base [netbsd-6-1]: mi src/doc [netbsd-6-1]: 3RDPARTY src/share/zoneinfo [netbsd-6-1]: NEWS africa asia australasia backzone europe leapseconds leapseconds.awk northamerica southamerica zone.tab zone1970.tab Log Message: Apply patch (requested by apb in ticket 1195): Update tzdata from 2014g to 2014j. Some of the changes are: * A new Zone Pacific/Bougainville, for the part of Papua New Guinea that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. * Changes for Fiji, Belarus, and Turks Caicos that take effect at various times in 2014. * Changes to historical data. To generate a diff of this commit: cvs rdiff -u -r1.984.2.15.2.2 -r1.984.2.15.2.3 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.909.2.19.2.6 -r1.909.2.19.2.7 src/doc/3RDPARTY cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/share/zoneinfo/NEWS \ src/share/zoneinfo/backzone cvs rdiff -u -r1.1.1.30.4.4.2.4 -r1.1.1.30.4.4.2.5 src/share/zoneinfo/africa cvs rdiff -u -r1.1.1.50.4.8.2.4 -r1.1.1.50.4.8.2.5 src/share/zoneinfo/asia cvs rdiff -u -r1.23.4.8.2.5 -r1.23.4.8.2.6 src/share/zoneinfo/australasia cvs rdiff -u -r1.1.1.44.4.5.2.4 -r1.1.1.44.4.5.2.5 src/share/zoneinfo/europe cvs rdiff -u -r1.1.1.18.4.3.6.2 -r1.1.1.18.4.3.6.3 \ src/share/zoneinfo/leapseconds cvs rdiff -u -r1.1.1.1.6.3 -r1.1.1.1.6.4 src/share/zoneinfo/leapseconds.awk cvs rdiff -u -r1.1.1.49.4.7.2.3 -r1.1.1.49.4.7.2.4 \ src/share/zoneinfo/northamerica cvs rdiff -u -r1.1.1.46.4.8.2.4 -r1.1.1.46.4.8.2.5 \ src/share/zoneinfo/southamerica cvs rdiff -u -r1.1.1.39.4.5.2.4 -r1.1.1.39.4.5.2.5 \ src/share/zoneinfo/zone.tab cvs rdiff -u -r1.2.14.3 -r1.2.14.4 src/share/zoneinfo/zone1970.tab 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/mi diff -u src/distrib/sets/lists/base/mi:1.984.2.15.2.2 src/distrib/sets/lists/base/mi:1.984.2.15.2.3 --- src/distrib/sets/lists/base/mi:1.984.2.15.2.2 Fri Aug 15 23:39:22 2014 +++ src/distrib/sets/lists/base/mi Tue Dec 2 22:18:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984.2.15.2.2 2014/08/15 23:39:22 riz Exp $ +# $NetBSD: mi,v 1.984.2.15.2.3 2014/12/02 22:18:44 snj Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -4854,6 +4854,7 @@ ./usr/share/zoneinfo/Pacific base-sys-share ./usr/share/zoneinfo/Pacific/Apia base-sys-share share ./usr/share/zoneinfo/Pacific/Auckland base-sys-share share +./usr/share/zoneinfo/Pacific/Bougainville base-sys-share share ./usr/share/zoneinfo/Pacific/Chatham base-sys-share share ./usr/share/zoneinfo/Pacific/Chuuk base-sys-share share ./usr/share/zoneinfo/Pacific/Easter base-sys-share share Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.19.2.6 src/doc/3RDPARTY:1.909.2.19.2.7 --- src/doc/3RDPARTY:1.909.2.19.2.6 Sun Sep 21 21:20:11 2014 +++ src/doc/3RDPARTY Tue Dec 2 22:18:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.19.2.6 2014/09/21 21:20:11 snj Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.19.2.7 2014/12/02 22:18:44 snj Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1143,8 +1143,8 @@ Notes: Added changes from a5 - a12 manually. Package: tz -Version: tzcode2011i / tzdata2014g -Current Vers: tzcode2014g / tzdata2014g +Version: tzcode2011i / tzdata2014j +Current Vers: tzcode2014j / tzdata2014j Maintainer: Paul Eggert egg...@cs.ucla.edu Archive Site: ftp://ftp.iana.org/tz/releases/ Archive Site: ftp://munnari.oz.au/pub/oldtz/ Index: src/share/zoneinfo/NEWS diff -u src/share/zoneinfo/NEWS:1.1.2.1 src/share/zoneinfo/NEWS:1.1.2.2 --- src/share/zoneinfo/NEWS:1.1.2.1 Sun Sep 21 21:20:58 2014 +++ src/share/zoneinfo/NEWS Tue Dec 2 22:18:44 2014 @@ -1,11 +1,170 @@ News for the tz database +Release 2014j - 2014-11-10 17:37:11 -0800 + + Changes affecting current and future time stamps + +Turks Caicos' switch from US eastern time to UTC-4 year-round +did not occur on 2014-11-02 at 02:00. It's currently scheduled +for 2015-11-01 at 02:00. (Thanks to Chris Walton.) + + Changes affecting past time stamps + +Many pre-1989 time stamps have been corrected for Asia/Seoul and +Asia/Pyongyang, based on sources for the Korean-language Wikipedia +entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no +longer guess that Pyongyang mimicked Seoul time after World War II, +as this is politically implausible. + +Some more zones have been turned into links, when they differed +from existing zones only for older time stamps. As usual, +these changes affect UTC offsets in pre-1970 time stamps only. +Their old contents have been moved to the 'backzone' file. +The
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Tue Dec 2 22:24:36 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: tickets 1191, 1193, 1194, and 1195 To generate a diff of this commit: cvs rdiff -u -r1.1.2.157 -r1.1.2.158 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.157 src/doc/CHANGES-6.2:1.1.2.158 --- src/doc/CHANGES-6.2:1.1.2.157 Mon Nov 10 02:38:12 2014 +++ src/doc/CHANGES-6.2 Tue Dec 2 22:24:36 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.157 2014/11/10 02:38:12 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.158 2014/12/02 22:24:36 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4386,3 +4386,47 @@ sys/arch/i386/include/Makefile.inc 1.3 Disable SSE and AVX for kernel modules too. [joerg, ticket #1172] + +lib/libc/resolv/res_mkquery.c 1.14 + + Fix EDNS option being broken with unbound by clipping MAXPACKET + to 64K - 1. Addresses PR/48475 + [pettai, ticket #1191] + +lib/libperfuse/ops.c1.81 + + Allow setxattr to be called with a NULL value, instead of crashing. + [manu, ticket #1193] + +sys/dev/raidframe/raidframevar.h 1.17 +sys/dev/raidframe/rf_netbsdkintf.c 1.316 +sys/dev/raidframe/rf_reconstruct.c 1.121 + + Fix a long-standing bug related to rebooting while a + reconstruct-to-spare is underway but not yet complete. + Fixes PR kern/49244. + [oster, ticket #1194] + +doc/3RDPARTYpatch +distrib/sets/lists/base/mi patch +share/zoneinfo/NEWS patch +share/zoneinfo/africa patch +share/zoneinfo/asia patch +share/zoneinfo/australasia patch +share/zoneinfo/backzone patch +share/zoneinfo/europe patch +share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk patch +share/zoneinfo/northamerica patch +share/zoneinfo/southamerica patch +share/zoneinfo/zone.tab patch +share/zoneinfo/zone1970.tab patch + +Update tzdata from 2014g to 2014j. Some of the changes are: +* A new Zone Pacific/Bougainville, for the part of Papua New Guinea + that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. +* Changes for Fiji, Belarus, and Turks Caicos that take effect + at various times in 2014. +* Changes to historical data. +[apb, ticket #1195] +
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Tue Dec 2 22:42:04 UTC 2014 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: Add Cortex-A17 support To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/cortex/a9_mpsubr.S 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/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.24 src/sys/arch/arm/cortex/a9_mpsubr.S:1.25 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.24 Thu Sep 25 04:59:15 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Tue Dec 2 22:42:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.24 2014/09/25 04:59:15 ryo Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.25 2014/12/02 22:42:04 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -334,7 +334,7 @@ cortex_init: msr spsr_sxc, r0 // set SPSR[23:8] to known value XPUTC(#64) -#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA15) +#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA15) || defined(CPU_CORTEXA17) // // If SMP is already enabled, don't do anything. // @@ -344,7 +344,7 @@ cortex_init: #endif mrc p15, 0, r4, c1, c0, 0 // SCTLR read -#if defined(CPU_CORTEXA7) +#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA17) // // Before turning on SMP, turn off the caches and the MMU. // @@ -404,7 +404,7 @@ cortex_init: cmp r1, #2// is it MP? bxne r10//no, return -#ifndef CPU_CORTEXA7 +#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA17) // // Step 2, disable the data cache // @@ -434,7 +434,7 @@ cortex_init: XPUTC(#50) #endif /* CORTEXA5 || CORTEXA9 */ -#ifdef CPU_CORTEXA7 +#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA17) // // The MMU is off. Make sure the TLB is invalidated before // turning on SMP. @@ -445,8 +445,8 @@ cortex_init: // For the A7, SMP must be on ldrex/strex to work. // -#if defined(MULTIPROCESSOR) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) -#if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) +#if defined(MULTIPROCESSOR) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA17) +#if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA17) // // Step 4a, set ACTLR.SMP=1 // @@ -469,7 +469,7 @@ cortex_init: mcr p15, 0, r0, c1, c0, 1 // ACTLR write isb dsb -#endif /* A5 || A7 || A9 */ +#endif /* A5 || A7 || A9 || A17 */ #endif /* MULTIPROCESSOR */ //
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Tue Dec 2 22:57:08 UTC 2014 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: Fix CORTEXA17 support To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/cortex/a9_mpsubr.S 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/arm/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.25 src/sys/arch/arm/cortex/a9_mpsubr.S:1.26 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.25 Tue Dec 2 22:42:04 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Tue Dec 2 22:57:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.25 2014/12/02 22:42:04 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.26 2014/12/02 22:57:08 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -404,7 +404,7 @@ cortex_init: cmp r1, #2// is it MP? bxne r10//no, return -#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA17) +#if !defined(CPU_CORTEXA7) !defined(CPU_CORTEXA17) // // Step 2, disable the data cache //
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: christos Date: Wed Dec 3 00:19:04 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: Makefile.rumpnet Log Message: add printers. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpnet/Makefile.rumpnet 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/rumpnet/Makefile.rumpnet diff -u src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.16 src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.17 --- src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.16 Mon Dec 1 20:59:16 2014 +++ src/sys/rump/librump/rumpnet/Makefile.rumpnet Tue Dec 2 19:19:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpnet,v 1.16 2014/12/02 01:59:16 pooka Exp $ +# $NetBSD: Makefile.rumpnet,v 1.17 2014/12/03 00:19:04 christos Exp $ # LIB= rumpnet @@ -6,6 +6,9 @@ LIB= rumpnet .PATH: ${RUMPTOP}/librump/rumpnet\ ${RUMPTOP}/../kern \ ${RUMPTOP}/../net \ + ${RUMPTOP}/../netatalk \ + ${RUMPTOP}/../netinet \ + ${RUMPTOP}/../netinet6 \ ${RUMPTOP}/../compat/common SRCS= net_stub.c netisr.c rump_net.c @@ -21,6 +24,9 @@ SRCS+= sys_socket.c uipc_accf.c uipc_dom # sys/net SRCS+= pktqueue.c +# formatters +SRCS+= at_print.c dl_print.c in_print.c in6_print.c + # radix trie support SRCS+= radix.c SRCS+= rtbl.c
CVS commit: src/etc/mtree
Module Name:src Committed By: christos Date: Wed Dec 3 00:52:52 UTC 2014 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: add new test directories To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.112 src/etc/mtree/NetBSD.dist.tests:1.113 --- src/etc/mtree/NetBSD.dist.tests:1.112 Fri Nov 14 04:03:39 2014 +++ src/etc/mtree/NetBSD.dist.tests Tue Dec 2 19:52:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.112 2014/11/14 09:03:39 uebayasi Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.113 2014/12/03 00:52:52 christos Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -336,6 +336,10 @@ ./usr/tests/share/examples/lutok ./usr/tests/share/mk ./usr/tests/sys +./usr/tests/sys/net +./usr/tests/sys/netatalk +./usr/tests/sys/netinet +./usr/tests/sys/netinet6 ./usr/tests/sys/rc ./usr/tests/usr.bin ./usr/tests/usr.bin/awk
CVS commit: src/etc/mtree
Module Name:src Committed By: christos Date: Wed Dec 3 01:29:33 UTC 2014 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: more test directories. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.113 src/etc/mtree/NetBSD.dist.tests:1.114 --- src/etc/mtree/NetBSD.dist.tests:1.113 Tue Dec 2 19:52:52 2014 +++ src/etc/mtree/NetBSD.dist.tests Tue Dec 2 20:29:33 2014 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.113 2014/12/03 00:52:52 christos Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.114 2014/12/03 01:29:33 christos Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -145,6 +145,11 @@ ./usr/libdata/debug/usr/tests/rump/rumpvfs ./usr/libdata/debug/usr/tests/sbin ./usr/libdata/debug/usr/tests/sbin/resize_ffs +./usr/libdata/debug/usr/tests/sys +./usr/libdata/debug/usr/tests/sys/net +./usr/libdata/debug/usr/tests/sys/netatalk +./usr/libdata/debug/usr/tests/sys/netinet +./usr/libdata/debug/usr/tests/sys/netinet6 ./usr/libdata/debug/usr/tests/usr.bin ./usr/libdata/debug/usr/tests/usr.bin/id ./usr/libdata/debug/usr/tests/usr.bin/netpgpverify
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Wed Dec 3 01:30:32 UTC 2014 Modified Files: src/sys/kern: vfs_cache.c Log Message: Reverts previous: Causes all processes to hang in tstile in rw_lock from genfs_lock during a make -j 20 build To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/kern/vfs_cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_cache.c diff -u src/sys/kern/vfs_cache.c:1.100 src/sys/kern/vfs_cache.c:1.101 --- src/sys/kern/vfs_cache.c:1.100 Sat Nov 29 23:11:03 2014 +++ src/sys/kern/vfs_cache.c Tue Dec 2 20:30:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_cache.c,v 1.100 2014/11/30 04:11:03 dennis Exp $ */ +/* $NetBSD: vfs_cache.c,v 1.101 2014/12/03 01:30:32 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_cache.c,v 1.100 2014/11/30 04:11:03 dennis Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_cache.c,v 1.101 2014/12/03 01:30:32 christos Exp $); #include opt_ddb.h #include opt_revcache.h @@ -102,39 +102,7 @@ __KERNEL_RCSID(0, $NetBSD: vfs_cache.c, */ /* - * The locking in this subsystem works as follows: - * - * When an entry is added to the cache, via cache_enter(), - * namecache_lock is taken to exclude other writers. The new - * entry is added to the hash list in a way which permits - * concurrent lookups and invalidations in the cache done on - * other CPUs to continue in parallel. - * - * When a lookup is done in the cache, via cache_lookup() or - * cache_lookup_raw(), the per-cpu lock below is taken. This - * protects calls to cache_lookup_entry() and cache_invalidate() - * against cache_reclaim(), and protects the per-cpu stats against - * modification in both cache_reclaim() and cache_stat_sysctl(), - * but allows lookups to continue in parallel with cache_enter(). - * - * cache_revlookup() takes namecache_lock to exclude cache_enter() - * and cache_reclaim() since the list it operates on is not - * maintained to allow concurrent reads. - * - * When cache_reclaim() is called namecache_lock is held to hold - * off calls to cache_enter() and each of the per-cpu locks is - * taken to hold off lookups. Holding all these locks essentially - * idles the subsystem, ensuring there are no concurrent references - * to the cache entries being freed. As a side effect, once the - * per-cpu locks are held, the per-cpu stats are added to the - * subsystem totals and then zeroed. cache_stat_sysctl() similarly - * takes all locks to collect the per-cpu stats (though it perhaps - * could avoid this by living with stats that were a second out - * of date?). - * - * The per-cpu namecache data is defined below. cpu_lock is used - * to protect cpu_stats updates and to exclude cache_reclaim() - * during lookups. + * Per-cpu namecache data. */ struct nchcpu { kmutex_t cpu_lock; @@ -219,8 +187,6 @@ cache_hash(const char *name, size_t name /* * Invalidate a cache entry and enqueue it for garbage collection. - * The caller needs to hold namecache_lock or a per-cpu lock to hold - * off cache_reclaim(). */ static void cache_invalidate(struct namecache *ncp) @@ -321,8 +287,6 @@ cache_unlock_cpus(void) /* * Find a single cache entry and return it locked. - * The caller needs to hold namecache_lock or a per-cpu lock to hold - * off cache_reclaim(). */ static struct namecache * cache_lookup_entry(const struct vnode *dvp, const char *name, size_t namelen) @@ -332,11 +296,11 @@ cache_lookup_entry(const struct vnode *d nchash_t hash; KASSERT(dvp != NULL); + KASSERT(mutex_owned(namecache_lock)); hash = cache_hash(name, namelen); ncpp = nchashtbl[NCHASH2(hash, dvp)]; LIST_FOREACH(ncp, ncpp, nc_hash) { - /* XXX Needs barrier for Alpha here */ if (ncp-nc_dvp != dvp || ncp-nc_nlen != namelen || memcmp(ncp-nc_name, name, (u_int)ncp-nc_nlen)) @@ -411,8 +375,7 @@ cache_lookup(struct vnode *dvp, const ch struct namecache *ncp; struct vnode *vp; struct nchcpu *cpup; - int error, ret_value; - + int error; /* Establish default result values */ if (iswht_ret != NULL) { @@ -425,23 +388,27 @@ cache_lookup(struct vnode *dvp, const ch } cpup = curcpu()-ci_data.cpu_nch; - mutex_enter(cpup-cpu_lock); if (__predict_false(namelen NCHNAMLEN)) { + mutex_enter(cpup-cpu_lock); COUNT(cpup-cpu_stats, ncs_long); mutex_exit(cpup-cpu_lock); /* found nothing */ return 0; } - + mutex_enter(namecache_lock); ncp = cache_lookup_entry(dvp, name, namelen); + mutex_exit(namecache_lock); if (__predict_false(ncp == NULL)) { + mutex_enter(cpup-cpu_lock); COUNT(cpup-cpu_stats, ncs_miss); mutex_exit(cpup-cpu_lock); /* found nothing */ return 0; } if ((cnflags MAKEENTRY) == 0) { + mutex_enter(cpup-cpu_lock); COUNT(cpup-cpu_stats, ncs_badhits); + mutex_exit(cpup-cpu_lock); /*
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Wed Dec 3 01:31:37 UTC 2014 Modified Files: src/sys/net: if_dl.h Log Message: add DL_PRINT macro To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/net/if_dl.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/net/if_dl.h diff -u src/sys/net/if_dl.h:1.25 src/sys/net/if_dl.h:1.26 --- src/sys/net/if_dl.h:1.25 Tue Dec 2 14:34:33 2014 +++ src/sys/net/if_dl.h Tue Dec 2 20:31:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_dl.h,v 1.25 2014/12/02 19:34:33 christos Exp $ */ +/* $NetBSD: if_dl.h,v 1.26 2014/12/03 01:31:37 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -121,6 +121,7 @@ __END_DECLS #define LINK_ADDRSTRLEN ((255 * 4) + 5) int dl_print(char *, size_t, const struct dl_addr *); +#define DL_PRINT(b, a) (dl_print((b), sizeof(b), (a)), (b)) int sdl_print(char *, size_t, const void *); #endif
CVS commit: src/sys/netinet6
Module Name:src Committed By: christos Date: Wed Dec 3 01:32:11 UTC 2014 Modified Files: src/sys/netinet6: nd6.c Log Message: more debugging info... To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/netinet6/nd6.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/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.154 src/sys/netinet6/nd6.c:1.155 --- src/sys/netinet6/nd6.c:1.154 Sat Oct 18 04:33:29 2014 +++ src/sys/netinet6/nd6.c Tue Dec 2 20:32:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.154 2014/10/18 08:33:29 snj Exp $ */ +/* $NetBSD: nd6.c,v 1.155 2014/12/03 01:32:11 christos Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.154 2014/10/18 08:33:29 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.155 2014/12/03 01:32:11 christos Exp $); #include bridge.h #include carp.h @@ -2380,10 +2380,13 @@ nd6_storelladdr(const struct ifnet *ifp, } sdl = satocsdl(rt-rt_gateway); if (sdl-sdl_alen == 0 || sdl-sdl_alen dstsize) { + char sbuf[INET6_ADDRSTRLEN]; + char dbuf[LINK_ADDRSTRLEN]; /* this should be impossible, but we bark here for debugging */ - printf(%s: sdl_alen == % PRIu8 , dst=%s, if=%s\n, __func__, - sdl-sdl_alen, ip6_sprintf(satocsin6(dst)-sin6_addr), - if_name(ifp)); + printf(%s: sdl_alen == % PRIu8 , if=%s, dst=%s, sdl=%s\n, + __func__, sdl-sdl_alen, if_name(ifp), + IN6_PRINT(sbuf, satocsin6(dst)-sin6_addr), + DL_PRINT(dbuf, sdl-sdl_addr)); m_freem(m); return 0; }
CVS commit: src/usr.sbin/rarpd
Module Name:src Committed By: christos Date: Wed Dec 3 03:44:45 UTC 2014 Modified Files: src/usr.sbin/rarpd: mkarp.c Log Message: c99 initializers To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/rarpd/mkarp.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/rarpd/mkarp.c diff -u src/usr.sbin/rarpd/mkarp.c:1.9 src/usr.sbin/rarpd/mkarp.c:1.10 --- src/usr.sbin/rarpd/mkarp.c:1.9 Tue Aug 30 16:25:18 2011 +++ src/usr.sbin/rarpd/mkarp.c Tue Dec 2 22:44:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mkarp.c,v 1.9 2011/08/30 20:25:18 joerg Exp $ */ +/* $NetBSD: mkarp.c,v 1.10 2014/12/03 03:44:45 christos Exp $ */ /* * Copyright (c) 1984, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1984, 19 #if 0 static char sccsid[] = @(#)arp.c 8.3 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: mkarp.c,v 1.9 2011/08/30 20:25:18 joerg Exp $); +__RCSID($NetBSD: mkarp.c,v 1.10 2014/12/03 03:44:45 christos Exp $); #endif #endif /* not lint */ @@ -94,9 +94,13 @@ int mkarp(u_char *haddr, u_int32_t ipaddr) { static struct sockaddr_inarp blank_sin = { - sizeof(blank_sin), AF_INET, 0, { 0 }, { 0 }, 0, 0 }; + .sin_len = sizeof(blank_sin), + .sin_family = AF_INET, + }; static struct sockaddr_dl blank_sdl = { - sizeof(blank_sdl), AF_LINK, 0, 0, 0, 0, 0, { 0 } }; + .sdl_len = sizeof(blank_sdl), + .sdl_family = AF_LINK, + }; struct sockaddr_inarp *sin; struct sockaddr_dl *sdl;
CVS commit: src/usr.bin/w
Module Name:src Committed By: mrg Date: Wed Dec 3 06:12:19 UTC 2014 Modified Files: src/usr.bin/w: w.c Log Message: redo the previous; avoid a bunch of processing when running as uptime, and as a side effect, avoid any name lookups. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/usr.bin/w/w.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/w/w.c diff -u src/usr.bin/w/w.c:1.80 src/usr.bin/w/w.c:1.81 --- src/usr.bin/w/w.c:1.80 Tue Dec 2 22:19:19 2014 +++ src/usr.bin/w/w.c Wed Dec 3 06:12:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: w.c,v 1.80 2014/12/02 22:19:19 christos Exp $ */ +/* $NetBSD: w.c,v 1.81 2014/12/03 06:12:19 mrg Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)w.c 8.6 (Berkeley) 6/30/94; #else -__RCSID($NetBSD: w.c,v 1.80 2014/12/02 22:19:19 christos Exp $); +__RCSID($NetBSD: w.c,v 1.81 2014/12/03 06:12:19 mrg Exp $); #endif #endif /* not lint */ @@ -156,7 +156,6 @@ main(int argc, char **argv) if (*progname == 'u') { wcmd = 0; options = ; - nflag = 1; } else { wcmd = 1; options = hiM:N:nw; @@ -222,6 +221,10 @@ main(int argc, char **argv) if (utx-ut_type != USER_PROCESS) continue; ++nusers; + + if (wcmd == 0) + continue; + if (sel_user strncmp(utx-ut_name, sel_user, sizeof(utx-ut_name)) != 0) continue; @@ -268,6 +271,10 @@ main(int argc, char **argv) continue; ++nusers; + + if (wcmd == 0) + continue; + if ((ep = calloc(1, sizeof(struct entry))) == NULL) err(1, NULL); (void)memcpy(ep-name, ut-ut_name, sizeof(ut-ut_name)); @@ -280,8 +287,7 @@ main(int argc, char **argv) ep-tv.tv_sec = ut-ut_time; *nextp = ep; nextp = (ep-next); - if (wcmd != 0) - process(ep); + process(ep); } #endif