CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Wed Jul 15 09:20:18 UTC 2015 Modified Files: src/sys/netinet: tcp_input.c src/sys/netinet6: nd6.c nd6.h Log Message: Remove unused arguments and the associated code from nd6_nud_hint() from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.163 -r1.164 src/sys/netinet6/nd6.c cvs rdiff -u -r1.64 -r1.65 src/sys/netinet6/nd6.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/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.341 src/sys/netinet/tcp_input.c:1.342 --- src/sys/netinet/tcp_input.c:1.341 Sun May 24 15:43:45 2015 +++ src/sys/netinet/tcp_input.c Wed Jul 15 09:20:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.341 2015/05/24 15:43:45 rtr Exp $ */ +/* $NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +148,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.341 2015/05/24 15:43:45 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $); #include opt_inet.h #include opt_ipsec.h @@ -264,7 +264,7 @@ nd6_hint(struct tcpcb *tp) if (tp != NULL tp-t_in6pcb != NULL tp-t_family == AF_INET6 (rt = rtcache_validate(tp-t_in6pcb-in6p_route)) != NULL) - nd6_nud_hint(rt, NULL, 0); + nd6_nud_hint(rt); } #else static inline void Index: src/sys/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.163 src/sys/netinet6/nd6.c:1.164 --- src/sys/netinet6/nd6.c:1.163 Tue Jun 30 08:31:42 2015 +++ src/sys/netinet6/nd6.c Wed Jul 15 09:20:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.163 2015/06/30 08:31:42 ozaki-r Exp $ */ +/* $NetBSD: nd6.c,v 1.164 2015/07/15 09:20:18 ozaki-r 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.163 2015/06/30 08:31:42 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.164 2015/07/15 09:20:18 ozaki-r Exp $); #include opt_net_mpsafe.h @@ -1165,20 +1165,12 @@ nd6_free(struct rtentry *rt, int gc) * XXX cost-effective methods? */ void -nd6_nud_hint(struct rtentry *rt, struct in6_addr *dst6, int force) +nd6_nud_hint(struct rtentry *rt) { struct llinfo_nd6 *ln; - /* - * If the caller specified rt, use that. Otherwise, resolve the - * routing table by supplied dst6. - */ - if (rt == NULL) { - if (dst6 == NULL) - return; - if ((rt = nd6_lookup(dst6, 0, NULL)) == NULL) - return; - } + if (rt == NULL) + return; if ((rt-rt_flags RTF_GATEWAY) != 0 || (rt-rt_flags RTF_LLINFO) == 0 || @@ -1196,11 +1188,9 @@ nd6_nud_hint(struct rtentry *rt, struct * if we get upper-layer reachability confirmation many times, * it is possible we have false information. */ - if (!force) { - ln-ln_byhint++; - if (ln-ln_byhint nd6_maxnudhint) - return; - } + ln-ln_byhint++; + if (ln-ln_byhint nd6_maxnudhint) + return; ln-ln_state = ND6_LLINFO_REACHABLE; if (!ND6_LLINFO_PERMANENT(ln)) { Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.64 src/sys/netinet6/nd6.h:1.65 --- src/sys/netinet6/nd6.h:1.64 Wed Feb 25 12:45:34 2015 +++ src/sys/netinet6/nd6.h Wed Jul 15 09:20:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.64 2015/02/25 12:45:34 roy Exp $ */ +/* $NetBSD: nd6.h,v 1.65 2015/07/15 09:20:18 ozaki-r Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -417,7 +417,7 @@ void nd6_setmtu(struct ifnet *); void nd6_llinfo_settimer(struct llinfo_nd6 *, long); void nd6_timer(void *); void nd6_purge(struct ifnet *, struct in6_ifextra *); -void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); +void nd6_nud_hint(struct rtentry *); int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); void nd6_rtrequest(int, struct rtentry *, const struct rt_addrinfo *);
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Wed Jul 15 08:49:16 UTC 2015 Modified Files: src/sys/netinet: if_arp.c Log Message: Make global variables static To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/netinet/if_arp.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/if_arp.c diff -u src/sys/netinet/if_arp.c:1.169 src/sys/netinet/if_arp.c:1.170 --- src/sys/netinet/if_arp.c:1.169 Fri May 22 07:44:46 2015 +++ src/sys/netinet/if_arp.c Wed Jul 15 08:49:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.169 2015/05/22 07:44:46 ozaki-r Exp $ */ +/* $NetBSD: if_arp.c,v 1.170 2015/07/15 08:49:15 ozaki-r Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.169 2015/05/22 07:44:46 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.170 2015/07/15 08:49:15 ozaki-r Exp $); #include opt_ddb.h #include opt_inet.h @@ -137,10 +137,10 @@ __KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1 #define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL /* timer values */ -int arpt_prune = (5*60*1); /* walk list every 5 minutes */ -int arpt_keep = (20*60); /* once resolved, good for 20 more minutes */ -int arpt_down = 20; /* once declared down, don't send for 20 secs */ -int arpt_refresh = (5*60); /* time left before refreshing */ +static int arpt_prune = (5*60*1); /* walk list every 5 minutes */ +static int arpt_keep = (20*60); /* once resolved, good for 20 more minutes */ +static int arpt_down = 20; /* once declared down, don't send for 20 secs */ +static int arpt_refresh = (5*60); /* time left before refreshing */ #define rt_expire rt_rmx.rmx_expire #define rt_pksent rt_rmx.rmx_pksent @@ -181,10 +181,10 @@ struct ifqueue arpintrq = { .ifq_maxlen = 50, .ifq_drops = 0, }; -int arp_inuse, arp_allocated; -int arp_maxtries = 5; -int useloopback = 1; /* use loopback interface for local traffic */ -int arpinit_done = 0; +static int arp_inuse, arp_allocated; +static int arp_maxtries = 5; +static int useloopback = 1; /* use loopback interface for local traffic */ +static int arpinit_done = 0; static percpu_t *arpstat_percpu; @@ -197,10 +197,10 @@ static percpu_t *arpstat_percpu; struct callout arptimer_ch; /* revarp state */ -struct in_addr myip, srv_ip; -int myip_initialized = 0; -int revarp_in_progress = 0; -struct ifnet *myip_ifp = NULL; +static struct in_addr myip, srv_ip; +static int myip_initialized = 0; +static int revarp_in_progress = 0; +static struct ifnet *myip_ifp = NULL; #ifdef DDB static void db_print_sa(const struct sockaddr *);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 15 07:40:54 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Cleanup. To generate a diff of this commit: cvs rdiff -u -r1.338 -r1.339 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.338 src/sys/dev/pci/if_wm.c:1.339 --- src/sys/dev/pci/if_wm.c:1.338 Wed Jul 15 07:36:01 2015 +++ src/sys/dev/pci/if_wm.c Wed Jul 15 07:40:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.338 2015/07/15 07:36:01 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.339 2015/07/15 07:40:54 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.338 2015/07/15 07:36:01 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.339 2015/07/15 07:40:54 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_net_mpsafe.h @@ -155,9 +155,7 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX #endif #ifdef __HAVE_PCI_MSI_MSIX -#if 1 /* Enable by default */ -#define WM_MSI_MSIX 1 -#endif +#define WM_MSI_MSIX 1 /* Enable by default */ #endif /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 15 07:36:01 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Enable MSI/MSI-X feature by default. To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.337 src/sys/dev/pci/if_wm.c:1.338 --- src/sys/dev/pci/if_wm.c:1.337 Wed Jul 15 04:03:16 2015 +++ src/sys/dev/pci/if_wm.c Wed Jul 15 07:36:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.337 2015/07/15 04:03:16 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.338 2015/07/15 07:36:01 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.337 2015/07/15 04:03:16 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.338 2015/07/15 07:36:01 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_net_mpsafe.h @@ -155,7 +155,7 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX #endif #ifdef __HAVE_PCI_MSI_MSIX -#if 0 /* off by default */ +#if 1 /* Enable by default */ #define WM_MSI_MSIX 1 #endif #endif
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Wed Jul 15 07:29:13 UTC 2015 Modified Files: src/sys/arch/x86/x86: mpacpi.c Log Message: Configure ioapic before lapic because lapic(lapic_set_lvt()) checks the existence of ioapic. This change fixes a problem that some machines hang after attaching ehci (little after writing EHCI_USBINTR to enable interrupt). Even though cold == 1, LAPIC_LVINT0 was not set as masked. Perhaps it's the reason of the problem. This problem was observed on SuperMicro X10SLX-F, X10SDV-TLN4F and Shuttle DS57U without wm(4) driver. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x86/x86/mpacpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/mpacpi.c diff -u src/sys/arch/x86/x86/mpacpi.c:1.99 src/sys/arch/x86/x86/mpacpi.c:1.100 --- src/sys/arch/x86/x86/mpacpi.c:1.99 Wed Jul 15 04:49:02 2015 +++ src/sys/arch/x86/x86/mpacpi.c Wed Jul 15 07:29:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $ */ +/* $NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $); #include acpica.h #include opt_acpi.h @@ -452,6 +452,8 @@ mpacpi_scan_apics(device_t self, int *nc mpacpi_ncpu = mpacpi_nintsrc = mpacpi_nioapic = 0; acpi_madt_walk(mpacpi_count, self); + acpi_madt_walk(mpacpi_config_ioapic, self); + #if NLAPIC 0 lapic_boot_init(mpacpi_lapic_base); #endif @@ -461,8 +463,6 @@ mpacpi_scan_apics(device_t self, int *nc if (mpacpi_ncpu == 0) goto done; - acpi_madt_walk(mpacpi_config_ioapic, self); - #if NPCI 0 /* * If PCI routing tables can't be built we report failure
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: martin Date: Wed Jul 15 11:29:16 UTC 2015 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Log Message: Properly escape the $ when trying to pass the u-boot env var $kernel. From Rin Okuyama. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/conf/armv7.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/armv7.conf diff -u src/distrib/utils/embedded/conf/armv7.conf:1.5 src/distrib/utils/embedded/conf/armv7.conf:1.6 --- src/distrib/utils/embedded/conf/armv7.conf:1.5 Wed Jul 8 10:57:46 2015 +++ src/distrib/utils/embedded/conf/armv7.conf Wed Jul 15 11:29:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.5 2015/07/08 10:57:46 skrll Exp $ +# $NetBSD: armv7.conf,v 1.6 2015/07/15 11:29:16 martin Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -45,7 +45,7 @@ EOF populate_awin() { cat ${mnt}/boot/uEnv.txt EOF bootargs=root=ld0a console=${console} -uenvcmd=mmc dev 0; mmc rescan; if test \$fdtfile = sun7i-a20-cubieboard2.dtb; then setenv kernel netbsd-CUBIEBOARD2.ub; elif test \$fdtfile = sun7i-a20-cubietruck.dtb; then setenv kernel netbsd-CUBIETRUCK.ub; elif test \$fdtfile = sun6i-a31-hummingbird.dtb; then setenv kernel netbsd-HUMMINGBIRD_A31.ub; elif test \$fdtfile = sun7i-a20-bananapi.dtb; then setenv kernel netbsd-BPI.ub; fi; fatload mmc 0:1 8200 ${kernel}; bootm 8200 +uenvcmd=mmc dev 0; mmc rescan; if test \$fdtfile = sun7i-a20-cubieboard2.dtb; then setenv kernel netbsd-CUBIEBOARD2.ub; elif test \$fdtfile = sun7i-a20-cubietruck.dtb; then setenv kernel netbsd-CUBIETRUCK.ub; elif test \$fdtfile = sun6i-a31-hummingbird.dtb; then setenv kernel netbsd-HUMMINGBIRD_A31.ub; elif test \$fdtfile = sun7i-a20-bananapi.dtb; then setenv kernel netbsd-BPI.ub; fi; fatload mmc 0:1 8200 \$kernel; bootm 8200 EOF }
CVS commit: src
Module Name:src Committed By: martin Date: Wed Jul 15 11:27:13 UTC 2015 Modified Files: src/distrib/utils/embedded: mkimage src/etc/etc.evbarm: Makefile.inc Log Message: Add a new endianes flag to mkimage and pass it on big endian arm builds. From Rin Okuyama. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/distrib/utils/embedded/mkimage cvs rdiff -u -r1.76 -r1.77 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/mkimage diff -u src/distrib/utils/embedded/mkimage:1.59 src/distrib/utils/embedded/mkimage:1.60 --- src/distrib/utils/embedded/mkimage:1.59 Sun May 24 17:08:21 2015 +++ src/distrib/utils/embedded/mkimage Wed Jul 15 11:27:13 2015 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mkimage,v 1.59 2015/05/24 17:08:21 christos Exp $ +# $NetBSD: mkimage,v 1.60 2015/07/15 11:27:13 martin Exp $ # # Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. # All rights reserved. @@ -84,7 +84,7 @@ getsize() { usage() { cat EOF 12 -Usage: $PROG -h host-arch [-bdmx] [-K kerneldir] [-S srcdir] [-D destdir] [-c custom-files-dir] [-s Mb size] [image] +Usage: $PROG -h host-arch [-bdmx] [-B byte-order] [-K kerneldir] [-S srcdir] [-D destdir] [-c custom-files-dir] [-s Mb size] [image] -b Boot only, no sets loaded -r root device kind (sd, wd, ld) @@ -96,7 +96,7 @@ EOF } # First pass for options to get the host and src directories -OPTS=K:D:S:bc:dh:mr:s:x +OPTS=B:D:K:S:bc:dh:mr:s:x while getopts $OPTS f do case $f in @@ -127,11 +127,13 @@ dsets_p=false xsets_p=false minwrites=false rootdev=ld +endian= OPTIND=1 while getopts $OPTS f do case $f in + B) endian=-B $OPTARG;; D) release=$OPTARG;; K) kernel=$OPTARG;; S) ;; @@ -193,7 +195,7 @@ fi if [ -z ${bootonly} ]; then echo ${bar} Populating ffs filesystem ${bar} - ${MAKEFS} -r -N ${release}/etc -t ffs -rx \ + ${MAKEFS} -rx ${endian} -N ${release}/etc -t ffs \ -O ${ffsoffset} \ -o d=4096,f=2048,b=16384 -b $((${extra}))m \ -F $tmp/selected_sets ${image} ${release} ${mnt} Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.76 src/etc/etc.evbarm/Makefile.inc:1.77 --- src/etc/etc.evbarm/Makefile.inc:1.76 Fri May 22 01:18:05 2015 +++ src/etc/etc.evbarm/Makefile.inc Wed Jul 15 11:27:13 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.76 2015/05/22 01:18:05 jmcneill Exp $ +# $NetBSD: Makefile.inc,v 1.77 2015/07/15 11:27:13 martin Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -13,6 +13,7 @@ EVBARM_BOARDS.${i}= .endfor .if !empty(MACHINE_ARCH:M*eb) +IMAGEENDIAN= be # big endian boards KERNEL_SETS.armv4+= IXM1200 EVBARM_BOARDS.xscale+= ADI_BRH @@ -32,6 +33,7 @@ EVBARM_BOARDS.armv7hf+= CUBIETRUCK EVBARM_BOARDS.armv7+= HUMMINGBIRD_A31 EVBARM_BOARDS.armv7hf+= HUMMINGBIRD_A31 .else +IMAGEENDIAN= le # little endian boards #EVBARM_BOARDS.armv4+= ARMADILLO210 #EVBARM_BOARDS.armv4+= ARMADILLO9 @@ -136,7 +138,7 @@ __mkimage: .USE TOOL_MTREE=${TOOL_MTREE} \ HOST_SH=${HOST_SH} \ ${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \ - -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \ + -S ${NETBSDSRCDIR} -B ${IMAGEENDIAN} ${MKI_OPTS.${.TARGET}} \ ${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz ARCHES.arm= armv4 xscale armv5t armv6 armv7
CVS commit: src/sys/arch/evbarm/stand/gzboot
Module Name:src Committed By: martin Date: Wed Jul 15 11:21:49 UTC 2015 Modified Files: src/sys/arch/evbarm/stand/gzboot: Makefile.gzboot Log Message: Clear STRIPFLAGS (stripping in general is dangerous with the -BE8 object format, and should never be done before the final linking has happened). From Rin Okuyama. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot 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/evbarm/stand/gzboot/Makefile.gzboot diff -u src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.30 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.31 --- src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.30 Sun Jan 12 15:26:29 2014 +++ src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot Wed Jul 15 11:21:49 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gzboot,v 1.30 2014/01/12 15:26:29 tsutsui Exp $ +# $NetBSD: Makefile.gzboot,v 1.31 2015/07/15 11:21:49 martin Exp $ NOMAN= # defined @@ -26,6 +26,7 @@ LIBCRTI= LIBC= LIBCRTBEGIN= LIBCRTEND= +STRIPFLAG= .PATH: ${EVBARM_STAND}/gzboot .PATH: ${EVBARM_STAND}/board
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Wed Jul 15 19:08:43 UTC 2015 Modified Files: src/lib/libc/stdio: fopen.3 makebuf.c setbuf.3 Log Message: Allow changing the default buffering policy for a stdio stream during construction by setting environment variables. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/lib/libc/stdio/fopen.3 cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/makebuf.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/setbuf.3 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/stdio/fopen.3 diff -u src/lib/libc/stdio/fopen.3:1.30 src/lib/libc/stdio/fopen.3:1.31 --- src/lib/libc/stdio/fopen.3:1.30 Wed Feb 11 10:19:05 2015 +++ src/lib/libc/stdio/fopen.3 Wed Jul 15 15:08:43 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: fopen.3,v 1.30 2015/02/11 15:19:05 riastradh Exp $ +.\ $NetBSD: fopen.3,v 1.31 2015/07/15 19:08:43 christos Exp $ .\ .\ Copyright (c) 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -196,6 +196,13 @@ standard text stream .Em stdin , or .Em stdout ) . +.Pp +Input and output against the opened stream will be fully buffered, unless +it refers to an interactive terminal device, or a different kind of buffering +is specified in the environment. +See +.Xr setvbuf 3 +for additional details. .Sh RETURN VALUES Upon successful completion .Fn fopen , Index: src/lib/libc/stdio/makebuf.c diff -u src/lib/libc/stdio/makebuf.c:1.17 src/lib/libc/stdio/makebuf.c:1.18 --- src/lib/libc/stdio/makebuf.c:1.17 Thu Mar 15 14:22:30 2012 +++ src/lib/libc/stdio/makebuf.c Wed Jul 15 15:08:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: makebuf.c,v 1.17 2012/03/15 18:22:30 christos Exp $ */ +/* $NetBSD: makebuf.c,v 1.18 2015/07/15 19:08:43 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)makebuf.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: makebuf.c,v 1.17 2012/03/15 18:22:30 christos Exp $); +__RCSID($NetBSD: makebuf.c,v 1.18 2015/07/15 19:08:43 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -49,10 +49,64 @@ __RCSID($NetBSD: makebuf.c,v 1.17 2012/ #include stdio.h #include stdlib.h #include unistd.h +#include inttypes.h +#include ctype.h #include reentrant.h #include local.h /* + * Override the file buffering based on the environment setting STDBUF%d + * (for the specific file descriptor) and STDBUF (for all descriptors). + * the setting is ULBnum standing for Unbuffered, Linebuffered, + * and Fullybuffered, and num is a value from 0 to 1M. + */ +static int +__senvbuf(FILE *fp, size_t *size, int *couldbetty) +{ + char evb[64], *evp; + int flags, e; + intmax_t s; + + flags = 0; + if (snprintf(evb, sizeof(evb), STDBUF%d, fp-_file) 0) + return flags; + + if ((evp = getenv(evb)) == NULL (evp = getenv(STDBUF)) == NULL) + return flags; + + switch (*evp) { + case 'u': + case 'U': + evp++; + flags |= __SNBF; + break; + case 'l': + case 'L': + evp++; + flags |= __SLBF; + break; + case 'f': + case 'F': + evp++; + *couldbetty = 0; + break; + } + + if (!isdigit((unsigned char)*evp)) + return flags; + + s = strtoi(evp, NULL, 0, 0, 1024 * 1024, e); + if (e != 0) + return flags; + + *size = (size_t)s; + if (*size == 0) + return __SNBF; + + return flags; +} + +/* * Allocate a file buffer, or switch to unbuffered I/O. * Per the ANSI C standard, ALL tty devices default to line buffered. * @@ -69,18 +123,21 @@ __smakebuf(FILE *fp) _DIAGASSERT(fp != NULL); - if (fp-_flags __SNBF) { - fp-_bf._base = fp-_p = fp-_nbuf; - fp-_bf._size = 1; - return; - } + if (fp-_flags __SNBF) + goto unbuf; + flags = __swhatbuf(fp, size, couldbetty); - if ((p = malloc(size)) == NULL) { - fp-_flags |= __SNBF; - fp-_bf._base = fp-_p = fp-_nbuf; - fp-_bf._size = 1; - return; + + if ((fp-_flags (__SLBF|__SNBF|__SMBF)) == 0 + fp-_cookie == fp fp-_file = 0) { + flags |= __senvbuf(fp, size, couldbetty); + if (flags __SNBF) + goto unbuf; } + + if ((p = malloc(size)) == NULL) + goto unbuf; + __cleanup = _cleanup; flags |= __SMBF; fp-_bf._base = fp-_p = p; @@ -89,6 +146,11 @@ __smakebuf(FILE *fp) if (couldbetty isatty(__sfileno(fp))) flags |= __SLBF; fp-_flags |= flags; + return; +unbuf: + fp-_flags |= __SNBF; + fp-_bf._base = fp-_p = fp-_nbuf; + fp-_bf._size = 1; } /* Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.13 src/lib/libc/stdio/setbuf.3:1.14 --- src/lib/libc/stdio/setbuf.3:1.13 Thu Aug 7 12:43:31 2003 +++ src/lib/libc/stdio/setbuf.3 Wed Jul 15 15:08:43 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: setbuf.3,v 1.13 2003/08/07 16:43:31 agc Exp $ +.\ $NetBSD: setbuf.3,v 1.14 2015/07/15 19:08:43 christos Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -63,6 +63,27 @@ when it is block buffered many character when it is line buffered
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: kamil Date: Thu Jul 16 00:04:00 UTC 2015 Modified Files: src/lib/libc/stdlib: reallocarr.c Log Message: Reorder memcpy(3) and save errno This chang is for safety as memcpy(3) might change it. Approved by riastradh To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdlib/reallocarr.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/stdlib/reallocarr.c diff -u src/lib/libc/stdlib/reallocarr.c:1.1 src/lib/libc/stdlib/reallocarr.c:1.2 --- src/lib/libc/stdlib/reallocarr.c:1.1 Tue Feb 17 20:29:21 2015 +++ src/lib/libc/stdlib/reallocarr.c Thu Jul 16 00:03:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: reallocarr.c,v 1.1 2015/02/17 20:29:21 joerg Exp $ */ +/* $NetBSD: reallocarr.c,v 1.2 2015/07/16 00:03:59 kamil Exp $ */ /*- * Copyright (c) 2015 Joerg Sonnenberger jo...@netbsd.org. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: reallocarr.c,v 1.1 2015/02/17 20:29:21 joerg Exp $); +__RCSID($NetBSD: reallocarr.c,v 1.2 2015/07/16 00:03:59 kamil Exp $); #include namespace.h #include errno.h @@ -55,8 +55,8 @@ reallocarr(void *ptr, size_t num, size_t void *optr; void *nptr; - memcpy(optr, ptr, sizeof(ptr)); saved_errno = errno; + memcpy(optr, ptr, sizeof(ptr)); if (num == 0 || size == 0) { free(optr); nptr = NULL;
CVS commit: src/distrib/evbarm/instkernel/sshramdisk
Module Name:src Committed By: martin Date: Wed Jul 15 11:24:03 UTC 2015 Modified Files: src/distrib/evbarm/instkernel/sshramdisk: Makefile Log Message: Set IMAGEENDIAN properly for big endian builds. From Rin Okuyama. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/evbarm/instkernel/sshramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.8 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.9 --- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.8 Mon Feb 23 23:21:47 2015 +++ src/distrib/evbarm/instkernel/sshramdisk/Makefile Wed Jul 15 11:24:03 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2015/02/23 23:21:47 joerg Exp $ +# $NetBSD: Makefile,v 1.9 2015/07/15 11:24:03 martin Exp $ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib @@ -13,7 +13,11 @@ DBG= -Os CRUNCHBIN= ramdiskbin LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst MTREECONF= ${.CURDIR}/mtree.conf +.if empty(MACHINE_ARCH:M*eb) IMAGEENDIAN= le +.else +IMAGEENDIAN= be +.endif MAKEDEVTARGETS= ramdisk IMAGEDEPENDS= ${CRUNCHBIN} \ dot.profile master.passwd sshd_config ssh_host_dsa_key \
CVS commit: src/lib/libc/arch
Module Name:src Committed By: pooka Date: Wed Jul 15 14:27:49 UTC 2015 Modified Files: src/lib/libc/arch/i386: Makefile.inc src/lib/libc/arch/i386/gen: Makefile.inc src/lib/libc/arch/x86_64: Makefile.inc src/lib/libc/arch/x86_64/gen: Makefile.inc Log Message: Don't include sigtramp or foocontext routines in rumprun mode. They won't work (since a rump kernel does not provide NetBSD _lwp syscalls nor signals), but they cause unwanted symbols to be pulled in when the resulting libc is linked. problem reported by Robert Gifford on rumpkernel-users To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/i386/Makefile.inc cvs rdiff -u -r1.28 -r1.29 src/lib/libc/arch/i386/gen/Makefile.inc cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/x86_64/Makefile.inc cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/x86_64/gen/Makefile.inc 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/arch/i386/Makefile.inc diff -u src/lib/libc/arch/i386/Makefile.inc:1.20 src/lib/libc/arch/i386/Makefile.inc:1.21 --- src/lib/libc/arch/i386/Makefile.inc:1.20 Sat Jun 17 18:04:23 2006 +++ src/lib/libc/arch/i386/Makefile.inc Wed Jul 15 14:27:49 2015 @@ -1,3 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.20 2006/06/17 18:04:23 uwe Exp $ +# $NetBSD: Makefile.inc,v 1.21 2015/07/15 14:27:49 pooka Exp $ +.if ${RUMPRUN} != yes SRCS+= __sigaction14_sigtramp.c __sigtramp2.S +.endif Index: src/lib/libc/arch/i386/gen/Makefile.inc diff -u src/lib/libc/arch/i386/gen/Makefile.inc:1.28 src/lib/libc/arch/i386/gen/Makefile.inc:1.29 --- src/lib/libc/arch/i386/gen/Makefile.inc:1.28 Wed Jul 15 14:23:40 2015 +++ src/lib/libc/arch/i386/gen/Makefile.inc Wed Jul 15 14:27:49 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.28 2015/07/15 14:23:40 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.29 2015/07/15 14:27:49 pooka Exp $ # objects built from assembler sources (need lint stubs) SRCS+= alloca.S byte_swap_2.S byte_swap_4.S fabs.S \ @@ -8,8 +8,12 @@ SRCS+= alloca.S byte_swap_2.S byte_swap_ SRCS+= setjmp.S _setjmp.S sigsetjmp.S +.if ${RUMPRUN} != yes SRCS+= resumecontext.S swapcontext.S -SRCS+= bswap64.c _lwp.c makecontext.c +SRCS+= _lwp.c makecontext.c +.endif + +SRCS+= bswap64.c # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c Index: src/lib/libc/arch/x86_64/Makefile.inc diff -u src/lib/libc/arch/x86_64/Makefile.inc:1.5 src/lib/libc/arch/x86_64/Makefile.inc:1.6 --- src/lib/libc/arch/x86_64/Makefile.inc:1.5 Sat Jun 17 18:04:24 2006 +++ src/lib/libc/arch/x86_64/Makefile.inc Wed Jul 15 14:27:49 2015 @@ -1,3 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.5 2006/06/17 18:04:24 uwe Exp $ +# $NetBSD: Makefile.inc,v 1.6 2015/07/15 14:27:49 pooka Exp $ +.if ${RUMPRUN} != yes SRCS+= __sigaction14_sigtramp.c __sigtramp2.S +.endif Index: src/lib/libc/arch/x86_64/gen/Makefile.inc diff -u src/lib/libc/arch/x86_64/gen/Makefile.inc:1.17 src/lib/libc/arch/x86_64/gen/Makefile.inc:1.18 --- src/lib/libc/arch/x86_64/gen/Makefile.inc:1.17 Wed Jul 15 14:23:40 2015 +++ src/lib/libc/arch/x86_64/gen/Makefile.inc Wed Jul 15 14:27:49 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.17 2015/07/15 14:23:40 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.18 2015/07/15 14:27:49 pooka Exp $ # objects built from assembler sources (need lint stubs) SRCS+= alloca.S byte_swap_2.S byte_swap_4.S byte_swap_8.S fabs.S \ @@ -10,8 +10,10 @@ SRCS+= __setjmp14.S SRCS+= _setjmp.S SRCS+= __sigsetjmp14.S +.if ${RUMPRUN} != yes SRCS+= resumecontext.S swapcontext.S SRCS+= _lwp.c makecontext.c +.endif # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c
CVS commit: src/lib/libc/arch
Module Name:src Committed By: pooka Date: Wed Jul 15 14:23:40 UTC 2015 Modified Files: src/lib/libc/arch/i386/gen: Makefile.inc src/lib/libc/arch/x86_64/gen: Makefile.inc Log Message: Remove objects built from C sources comments. Everyone can see they're built from C sources because the source files end in .c (???) To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/arch/i386/gen/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/lib/libc/arch/x86_64/gen/Makefile.inc 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/arch/i386/gen/Makefile.inc diff -u src/lib/libc/arch/i386/gen/Makefile.inc:1.27 src/lib/libc/arch/i386/gen/Makefile.inc:1.28 --- src/lib/libc/arch/i386/gen/Makefile.inc:1.27 Sat Mar 26 19:51:41 2011 +++ src/lib/libc/arch/i386/gen/Makefile.inc Wed Jul 15 14:23:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.27 2011/03/26 19:51:41 christos Exp $ +# $NetBSD: Makefile.inc,v 1.28 2015/07/15 14:23:40 pooka Exp $ # objects built from assembler sources (need lint stubs) SRCS+= alloca.S byte_swap_2.S byte_swap_4.S fabs.S \ @@ -9,8 +9,6 @@ SRCS+= alloca.S byte_swap_2.S byte_swap_ SRCS+= setjmp.S _setjmp.S sigsetjmp.S SRCS+= resumecontext.S swapcontext.S - -# objects built from C sources SRCS+= bswap64.c _lwp.c makecontext.c # Common ieee754 constants and functions Index: src/lib/libc/arch/x86_64/gen/Makefile.inc diff -u src/lib/libc/arch/x86_64/gen/Makefile.inc:1.16 src/lib/libc/arch/x86_64/gen/Makefile.inc:1.17 --- src/lib/libc/arch/x86_64/gen/Makefile.inc:1.16 Sat Mar 26 19:51:42 2011 +++ src/lib/libc/arch/x86_64/gen/Makefile.inc Wed Jul 15 14:23:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.16 2011/03/26 19:51:42 christos Exp $ +# $NetBSD: Makefile.inc,v 1.17 2015/07/15 14:23:40 pooka Exp $ # objects built from assembler sources (need lint stubs) SRCS+= alloca.S byte_swap_2.S byte_swap_4.S byte_swap_8.S fabs.S \ @@ -11,8 +11,6 @@ SRCS+= _setjmp.S SRCS+= __sigsetjmp14.S SRCS+= resumecontext.S swapcontext.S - -# objects built from C sources SRCS+= _lwp.c makecontext.c # Common ieee754 constants and functions
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 15 13:54:38 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Don't set state when parsing any timezone (%z) information. The '+' in this case isn't the same as the FreeBSD '%+' str[fp]time() (GNU) extension. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/strptime.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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.44 src/lib/libc/time/strptime.c:1.45 --- src/lib/libc/time/strptime.c:1.44 Tue Jul 14 18:07:17 2015 +++ src/lib/libc/time/strptime.c Wed Jul 15 13:54:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $); +__RCSID($NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $); #endif #include namespace.h @@ -480,7 +480,6 @@ literal: continue; case '+': neg = 0; -state |= S_WDAY | S_MON | S_MDAY | S_YEAR; break; case '-': neg = 1;
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Wed Jul 15 14:43:01 UTC 2015 Modified Files: src/doc: CHANGES Log Message: note that nfssvc(2) supports compat_netbsd32 now. To generate a diff of this commit: cvs rdiff -u -r1.2085 -r1.2086 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2085 src/doc/CHANGES:1.2086 --- src/doc/CHANGES:1.2085 Fri Jul 10 15:28:02 2015 +++ src/doc/CHANGES Wed Jul 15 14:43:01 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2085 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2086 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -163,6 +163,8 @@ Changes from NetBSD 7.0 to NetBSD 8.0: openssl: Import openssl 1.0.1n [christos 20150612] openssl: Import openssl 1.0.1o [christos 20150616] zoneinfo: Import tzdata2015e. [apb 20150621] + nfssvc(2): Support 32-bit system calls for the NFS server. + [mrg 20150622] gcc: Import GCC 4.8.5. [mrg 20150624] OpenSSH: Imported 6.9. [christos 20150630] bind: Import version 9.10.2-P2. [christos 20150708]