CVS commit: src/lib/libc/sys
Module Name:src Committed By: kamil Date: Wed Jan 11 07:32:36 UTC 2017 Modified Files: src/lib/libc/sys: ptrace.2 Log Message: Correct man-page category of posix_spawn: is (3) not (2) To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/lib/libc/sys/ptrace.2 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/sys/ptrace.2 diff -u src/lib/libc/sys/ptrace.2:1.51 src/lib/libc/sys/ptrace.2:1.52 --- src/lib/libc/sys/ptrace.2:1.51 Wed Jan 11 07:31:14 2017 +++ src/lib/libc/sys/ptrace.2 Wed Jan 11 07:32:36 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: ptrace.2,v 1.51 2017/01/11 07:31:14 kamil Exp $ +.\" $NetBSD: ptrace.2,v 1.52 2017/01/11 07:32:36 kamil Exp $ .\" .\" This file is in the public domain. .Dd January 11, 2016 @@ -387,7 +387,7 @@ event can occur with similar operations, like .Xr clone 2 or -.Xr posix_spawn 2 . +.Xr posix_spawn 3 . The .Dv PTRACE_FORK value means that process gives birth to its child
CVS commit: src/lib/libc/sys
Module Name:src Committed By: kamil Date: Wed Jan 11 07:31:14 UTC 2017 Modified Files: src/lib/libc/sys: ptrace.2 Log Message: Document SIGTRAP with si_code TRAP_CHLD in ptrace(2) Document the current behavior of TRAP_CHILD in NetBSD. Add more notes on PTRACE_FORK events. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/lib/libc/sys/ptrace.2 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/sys/ptrace.2 diff -u src/lib/libc/sys/ptrace.2:1.50 src/lib/libc/sys/ptrace.2:1.51 --- src/lib/libc/sys/ptrace.2:1.50 Sat Jan 7 05:51:14 2017 +++ src/lib/libc/sys/ptrace.2 Wed Jan 11 07:31:14 2017 @@ -1,7 +1,7 @@ -.\" $NetBSD: ptrace.2,v 1.50 2017/01/07 05:51:14 kamil Exp $ +.\" $NetBSD: ptrace.2,v 1.51 2017/01/11 07:31:14 kamil Exp $ .\" .\" This file is in the public domain. -.Dd January 7, 2016 +.Dd January 11, 2016 .Dt PTRACE 2 .Os .Sh NAME @@ -43,7 +43,7 @@ terminate or continue as appropriate. .Fn ptrace is the mechanism by which all this happens. .Pp -When a process that is traced by a debugger request and calls +When a process that is traced by a debugger requests and calls .Xr execve 2 or any of the routines built on it .Po @@ -90,6 +90,20 @@ with .Dv si_code set to .Dv TRAP_TRACE . +This event is always enabled and cannot be disabled. +.Pp +Child program traps are reported with +.Dv SIGTRAP +and the +.Dv si_code +value set to +.Dv TRAP_CHLD . +These events are by default disabled and can be configured with +.Dv PT_SET_EVENT_MASK . +If this event occurs, +check with +.Dv PT_GET_PROCESS_STATE +the details of the process state associated with this event. .Pp A debugger might reuse a port specific symbols, to help writing portable code as described in the port specific part of the @@ -367,6 +381,23 @@ Report .Xr fork 2 . .El .Pp +The +.Xr fork 2 +event can occur with similar operations, +like +.Xr clone 2 +or +.Xr posix_spawn 2 . +The +.Dv PTRACE_FORK +value means that process gives birth to its child +without pending on its termination. +If enabled, +the child is also traced by the debugger and +.Dv SIGRAP +is generated twice, +first for the parent and second for the child. +.Pp A pointer to this structure is passed in .Fa addr . The
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Wed Jan 11 07:26:17 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_dir.c Log Message: wrap the macro in do/while. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/t_dir.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/lib/libc/gen/t_dir.c diff -u src/tests/lib/libc/gen/t_dir.c:1.7 src/tests/lib/libc/gen/t_dir.c:1.8 --- src/tests/lib/libc/gen/t_dir.c:1.7 Tue Jan 10 10:19:00 2017 +++ src/tests/lib/libc/gen/t_dir.c Wed Jan 11 02:26:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.7 2017/01/10 15:19:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -55,12 +55,12 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; -#define CREAT(x, m) do { \ - int _creat_fd; \ - ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))), \ - "creat(%s, %x) failed: %s", (x), (m), \ - strerror(errno));\ - (void)close(_creat_fd); \ +#define CREAT(x, m) do { \ + int _creat_fd; \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m)) != -1), \ + "creat(%s, %x) failed: %s", (x), (m), \ + strerror(errno)); \ + (void)close(_creat_fd); \ } while(0); ATF_REQUIRE_MSG(mkdir("t", 0755) == 0,
CVS commit: src/tests/net/ndp
Module Name:src Committed By: ozaki-r Date: Wed Jan 11 07:22:43 UTC 2017 Modified Files: src/tests/net/ndp: t_ra.sh Log Message: Cope with tentative state To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/net/ndp/t_ra.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ndp/t_ra.sh diff -u src/tests/net/ndp/t_ra.sh:1.20 src/tests/net/ndp/t_ra.sh:1.21 --- src/tests/net/ndp/t_ra.sh:1.20 Wed Jan 11 03:15:44 2017 +++ src/tests/net/ndp/t_ra.sh Wed Jan 11 07:22:43 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ra.sh,v 1.20 2017/01/11 03:15:44 ozaki-r Exp $ +# $NetBSD: t_ra.sh,v 1.21 2017/01/11 07:22:43 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -127,7 +127,8 @@ check_entries() -o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +(23h59m|1d0h0m)..s S R" \ rump.ndp -n -a atf_check -s exit:0 -o match:$addr_prefix rump.ndp -n -a - atf_check -s exit:0 -o match:"$addr_prefix.+" \ + atf_check -s exit:0 \ + -o match:"$addr_prefix.+<(TENTATIVE,)?AUTOCONF>" \ rump.ifconfig shmif0 inet6 unset RUMP_SERVER } @@ -651,7 +652,8 @@ ra_temporary_address_body() # Check temporary address export RUMP_SERVER=${RUMPCLI} - atf_check -s exit:0 -o match:"$IP6SRV_PREFIX.+" \ + atf_check -s exit:0 \ + -o match:"$IP6SRV_PREFIX.+<(TENTATIVE,)?AUTOCONF,TEMPORARY>" \ rump.ifconfig shmif0 inet6 unset RUMP_SERVER
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Wed Jan 11 07:16:48 UTC 2017 Modified Files: src/sys/dev/ic: aic6360.c mb89352.c ncr5380sbc.c ncr53c9x.c sunscpal.c wd33c93.c Log Message: adatper -> adapter To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/ic/aic6360.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ic/mb89352.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/ic/ncr5380sbc.c cvs rdiff -u -r1.146 -r1.147 src/sys/dev/ic/ncr53c9x.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/sunscpal.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/wd33c93.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/ic/aic6360.c diff -u src/sys/dev/ic/aic6360.c:1.99 src/sys/dev/ic/aic6360.c:1.100 --- src/sys/dev/ic/aic6360.c:1.99 Mon Nov 23 02:13:46 2009 +++ src/sys/dev/ic/aic6360.c Wed Jan 11 07:16:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: aic6360.c,v 1.99 2009/11/23 02:13:46 rmind Exp $ */ +/* $NetBSD: aic6360.c,v 1.100 2017/01/11 07:16:48 skrll Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Charles M. Hannum. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.99 2009/11/23 02:13:46 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.100 2017/01/11 07:16:48 skrll Exp $"); #include "opt_ddb.h" @@ -279,7 +279,7 @@ aicattach(struct aic_softc *sc) /* * Add reference to adapter so that we drop the reference after - * config_found() to make sure the adatper is disabled. + * config_found() to make sure the adapter is disabled. */ if (scsipi_adapter_addref(adapt) != 0) { aprint_error_dev(sc->sc_dev, "unable to enable controller\n"); Index: src/sys/dev/ic/mb89352.c diff -u src/sys/dev/ic/mb89352.c:1.54 src/sys/dev/ic/mb89352.c:1.55 --- src/sys/dev/ic/mb89352.c:1.54 Mon Nov 4 16:54:56 2013 +++ src/sys/dev/ic/mb89352.c Wed Jan 11 07:16:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mb89352.c,v 1.54 2013/11/04 16:54:56 christos Exp $ */ +/* $NetBSD: mb89352.c,v 1.55 2017/01/11 07:16:48 skrll Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ /*- @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.54 2013/11/04 16:54:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.55 2017/01/11 07:16:48 skrll Exp $"); #ifdef DDB #define integrate @@ -293,7 +293,7 @@ spc_attach(struct spc_softc *sc) /* * Add reference to adapter so that we drop the reference after - * config_found() to make sure the adatper is disabled. + * config_found() to make sure the adapter is disabled. */ if (scsipi_adapter_addref(adapt) != 0) { aprint_error_dev(sc->sc_dev, "unable to enable controller\n"); Index: src/sys/dev/ic/ncr5380sbc.c diff -u src/sys/dev/ic/ncr5380sbc.c:1.66 src/sys/dev/ic/ncr5380sbc.c:1.67 --- src/sys/dev/ic/ncr5380sbc.c:1.66 Sat Jul 28 00:43:23 2012 +++ src/sys/dev/ic/ncr5380sbc.c Wed Jan 11 07:16:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $ */ +/* $NetBSD: ncr5380sbc.c,v 1.67 2017/01/11 07:16:48 skrll Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.67 2017/01/11 07:16:48 skrll Exp $"); #include "opt_ddb.h" @@ -2575,7 +2575,7 @@ ncr5380_attach(struct ncr5380_softc *sc) /* * Add reference to adapter so that we drop the reference after - * config_found() to make sure the adatper is disabled. + * config_found() to make sure the adapter is disabled. */ if (scsipi_adapter_addref(adapt) != 0) { aprint_error_dev(sc->sc_dev, "unable to enable controller\n"); Index: src/sys/dev/ic/ncr53c9x.c diff -u src/sys/dev/ic/ncr53c9x.c:1.146 src/sys/dev/ic/ncr53c9x.c:1.147 --- src/sys/dev/ic/ncr53c9x.c:1.146 Sat Dec 24 06:04:50 2016 +++ src/sys/dev/ic/ncr53c9x.c Wed Jan 11 07:16:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9x.c,v 1.146 2016/12/24 06:04:50 macallan Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.147 2017/01/11 07:16:48 skrll Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.146 2016/12/24 06:04:50 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.147 2017/01/11 07:16:48 skrll Exp $"); #include #include @@ -286,7 +286,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s /* * Add reference to adapter so that we drop the reference after - * config_found() to make sure the adatper is disabled. + * config_found() to make sure the adapter is disabled. */ if (scsipi_adapter_addref(adapt) != 0) { aprint_error_dev(sc->sc_dev, "unable to enable controller\n"); Index: src/sys/dev/ic/sunscpal.c diff -u src/sys/dev/ic/sunscpal.c:1.26 src/sys/dev/ic/sunscpal.c:1.27 --- src/sys/dev/ic/sunscpal.c:1.26 Tue Mar 25 16:19:13
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Wed Jan 11 07:03:59 UTC 2017 Modified Files: src/sys/net: link_proto.c Log Message: Don't call ifa_remove with holding psref To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/net/link_proto.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/link_proto.c diff -u src/sys/net/link_proto.c:1.33 src/sys/net/link_proto.c:1.34 --- src/sys/net/link_proto.c:1.33 Mon Dec 26 07:25:00 2016 +++ src/sys/net/link_proto.c Wed Jan 11 07:03:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: link_proto.c,v 1.33 2016/12/26 07:25:00 ozaki-r Exp $ */ +/* $NetBSD: link_proto.c,v 1.34 2017/01/11 07:03:59 ozaki-r Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.33 2016/12/26 07:25:00 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.34 2017/01/11 07:03:59 ozaki-r Exp $"); #include #include @@ -216,7 +216,13 @@ link_control(struct socket *so, unsigned else { /* TBD routing socket */ rt_newaddrmsg(RTM_DELETE, ifa, 0, NULL); +/* We need to release psref for ifa_remove */ +ifaref(ifa); +ifa_release(ifa, &psref); ifa_remove(ifp, ifa); +KASSERT(ifa->ifa_refcnt == 1); +ifafree(ifa); +ifa = NULL; } break; case SIOCALIFADDR:
CVS commit: src/distrib/utils/zcat
Module Name:src Committed By: christos Date: Wed Jan 11 04:04:12 UTC 2017 Modified Files: src/distrib/utils/zcat: Makefile Log Message: adjust to new zlib To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/distrib/utils/zcat/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/utils/zcat/Makefile diff -u src/distrib/utils/zcat/Makefile:1.15 src/distrib/utils/zcat/Makefile:1.16 --- src/distrib/utils/zcat/Makefile:1.15 Thu May 19 18:23:12 2011 +++ src/distrib/utils/zcat/Makefile Tue Jan 10 23:04:12 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2011/05/19 22:23:12 tsutsui Exp $ +# $NetBSD: Makefile,v 1.16 2017/01/11 04:04:12 christos Exp $ # Small zcat (i.e. for install media) # # Note: gzio.c is compiled here so that crunchgen will assume @@ -12,7 +12,7 @@ WARNS?= 4 PROG= zcat NOMAN= # defined -SRCS= zcat.c gzio.c +SRCS= zcat.c gzread.c gzclose.c gzlib.c CPPFLAGS+= -I${SRCDIR} -DNO_GZCOMPRESS DPADD+= ${LIBZ}
CVS commit: src/tests/net/ndp
Module Name:src Committed By: ozaki-r Date: Wed Jan 11 03:15:11 UTC 2017 Modified Files: src/tests/net/ndp: t_ra.sh Log Message: Check autoconf flag To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/net/ndp/t_ra.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ndp/t_ra.sh diff -u src/tests/net/ndp/t_ra.sh:1.18 src/tests/net/ndp/t_ra.sh:1.19 --- src/tests/net/ndp/t_ra.sh:1.18 Mon Dec 26 01:26:25 2016 +++ src/tests/net/ndp/t_ra.sh Wed Jan 11 03:15:11 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ra.sh,v 1.18 2016/12/26 01:26:25 ozaki-r Exp $ +# $NetBSD: t_ra.sh,v 1.19 2017/01/11 03:15:11 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -127,7 +127,8 @@ check_entries() -o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +(23h59m|1d0h0m)..s S R" \ rump.ndp -n -a atf_check -s exit:0 -o match:$addr_prefix rump.ndp -n -a - atf_check -s exit:0 -o match:$addr_prefix rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o match:"$addr_prefix.+" \ + rump.ifconfig shmif0 inet6 unset RUMP_SERVER }
CVS commit: src/tests/net/ndp
Module Name:src Committed By: ozaki-r Date: Wed Jan 11 03:15:44 UTC 2017 Modified Files: src/tests/net/ndp: t_ra.sh Log Message: Add a test case for IPv6 temporary address To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/tests/net/ndp/t_ra.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/ndp/t_ra.sh diff -u src/tests/net/ndp/t_ra.sh:1.19 src/tests/net/ndp/t_ra.sh:1.20 --- src/tests/net/ndp/t_ra.sh:1.19 Wed Jan 11 03:15:11 2017 +++ src/tests/net/ndp/t_ra.sh Wed Jan 11 03:15:44 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ra.sh,v 1.19 2017/01/11 03:15:11 ozaki-r Exp $ +# $NetBSD: t_ra.sh,v 1.20 2017/01/11 03:15:44 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -595,6 +595,84 @@ ra_multiple_routers_maxifprefixes_cleanu cleanup } +atf_test_case ra_temporary_address cleanup +ra_temporary_address_head() +{ + + atf_set "descr" "Tests for IPv6 temporary address" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_temporary_address_body() +{ + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + init_server $RUMPSRV + + setup_shmif0 ${RUMPCLI} ${IP6CLI} + export RUMP_SERVER=${RUMPCLI} + $DEBUG && rump.ndp -n -a + atf_check -s exit:0 -o match:'= 0' \ + rump.sysctl net.inet6.ip6.accept_rtadv + atf_check -s exit:0 -o match:'= 0' \ + rump.sysctl net.inet6.ip6.use_tempaddr + unset RUMP_SERVER + + create_rtadvdconfig + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o empty rump.ndp -r + atf_check -s exit:0 -o not-match:'advertised' rump.ndp -p + atf_check -s exit:0 -o match:'linkmtu=0' rump.ndp -n -i shmif0 + atf_check -s exit:0 -o not-match:'S R' rump.ndp -n -a + atf_check -s exit:0 -o not-match:'fc00:1:' rump.ndp -n -a + atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet6.ip6.use_tempaddr=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + + # Check temporary address + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:"$IP6SRV_PREFIX.+" \ + rump.ifconfig shmif0 inet6 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + + rump_server_destroy_ifaces +} + +ra_temporary_address_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + + $DEBUG && dump + cleanup +} + atf_init_test_cases() { @@ -605,4 +683,5 @@ atf_init_test_cases() atf_add_test_case ra_multiple_routers atf_add_test_case ra_multiple_routers_single_prefix atf_add_test_case ra_multiple_routers_maxifprefixes + atf_add_test_case ra_temporary_address }
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: christos Date: Wed Jan 11 02:13:54 UTC 2017 Modified Files: src/usr.sbin/npf/npfctl: todo Log Message: more todo To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/npf/npfctl/todo 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/npf/npfctl/todo diff -u src/usr.sbin/npf/npfctl/todo:1.11 src/usr.sbin/npf/npfctl/todo:1.12 --- src/usr.sbin/npf/npfctl/todo:1.11 Thu Feb 13 21:01:12 2014 +++ src/usr.sbin/npf/npfctl/todo Tue Jan 10 21:13:54 2017 @@ -16,3 +16,4 @@ -- add algo for "with short" -- implement "port-unr" -- implement block return-icmp in log final all with ipopts +-- handle array variables in more places
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: christos Date: Wed Jan 11 02:11:21 UTC 2017 Modified Files: src/usr.sbin/npf/npfctl: npf_parse.y npf_var.c Log Message: Don't silently take the first element of multiple element variables. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/npf/npfctl/npf_parse.y cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/npf/npfctl/npf_var.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/npf/npfctl/npf_parse.y diff -u src/usr.sbin/npf/npfctl/npf_parse.y:1.40 src/usr.sbin/npf/npfctl/npf_parse.y:1.41 --- src/usr.sbin/npf/npfctl/npf_parse.y:1.40 Mon Jan 2 20:29:49 2017 +++ src/usr.sbin/npf/npfctl/npf_parse.y Tue Jan 10 21:11:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_parse.y,v 1.40 2017/01/03 01:29:49 rmind Exp $ */ +/* $NetBSD: npf_parse.y,v 1.41 2017/01/11 02:11:21 christos Exp $ */ /*- * Copyright (c) 2011-2017 The NetBSD Foundation, Inc. @@ -665,6 +665,8 @@ addr_or_ifaddr } | static_ifaddrs { + if (npfvar_get_count($1) != 1) + yyerror("multiple interfaces are not supported"); ifnet_addr_t *ifna = npfvar_get_data($1, NPFVAR_INTERFACE, 0); $$ = ifna->ifna_addrs; } @@ -765,6 +767,8 @@ tcp_flags_and_mask } | FLAGS tcp_flags { + if (npfvar_get_count($2) != 1) + yyerror("multiple tcpflags are not supported"); char *s = npfvar_get_data($2, NPFVAR_TCPFLAG, 0); npfvar_add_elements($2, npfctl_parse_tcpflag(s)); $$ = $2; @@ -804,6 +808,9 @@ ifname $$ = npfvar_expand_string(vp); break; case NPFVAR_INTERFACE: + if (npfvar_get_count(vp) != 1) +yyerror( +"multiple interfaces are not supported"); ifna = npfvar_get_data(vp, type, 0); $$ = ifna->ifna_name; break; @@ -838,6 +845,8 @@ ifref | dynamic_ifaddrs | static_ifaddrs { + if (npfvar_get_count($1) != 1) + yyerror("multiple interfaces are not supported"); ifnet_addr_t *ifna = npfvar_get_data($1, NPFVAR_INTERFACE, 0); npfctl_note_interface(ifna->ifna_name); $$ = ifna->ifna_name; Index: src/usr.sbin/npf/npfctl/npf_var.c diff -u src/usr.sbin/npf/npfctl/npf_var.c:1.9 src/usr.sbin/npf/npfctl/npf_var.c:1.10 --- src/usr.sbin/npf/npfctl/npf_var.c:1.9 Sun Jul 12 19:54:44 2015 +++ src/usr.sbin/npf/npfctl/npf_var.c Tue Jan 10 21:11:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_var.c,v 1.9 2015/07/12 23:54:44 rmind Exp $ */ +/* $NetBSD: npf_var.c,v 1.10 2017/01/11 02:11:21 christos Exp $ */ /*- * Copyright (c) 2011-2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: npf_var.c,v 1.9 2015/07/12 23:54:44 rmind Exp $"); +__RCSID("$NetBSD: npf_var.c,v 1.10 2017/01/11 02:11:21 christos Exp $"); #include #include @@ -188,6 +188,10 @@ npfvar_destroy(npfvar_t *vp) char * npfvar_expand_string(const npfvar_t *vp) { + if (npfvar_get_count(vp) != 1) + yyerror("variable '%s' type '%s' has %zu elements", vp->v_key, + npfvar_type(vp->v_type), npfvar_get_count(vp)); + return npfvar_get_data(vp, NPFVAR_STRING, 0); }
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: christos Date: Wed Jan 11 02:10:44 UTC 2017 Modified Files: src/usr.sbin/npf/npfctl: npfctl.c Log Message: fix hint. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/npf/npfctl/npfctl.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/npf/npfctl/npfctl.c diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.52 src/usr.sbin/npf/npfctl/npfctl.c:1.53 --- src/usr.sbin/npf/npfctl/npfctl.c:1.52 Thu Dec 29 15:48:50 2016 +++ src/usr.sbin/npf/npfctl/npfctl.c Tue Jan 10 21:10:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: npfctl.c,v 1.52 2016/12/29 20:48:50 rmind Exp $ */ +/* $NetBSD: npfctl.c,v 1.53 2017/01/11 02:10:44 christos Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: npfctl.c,v 1.52 2016/12/29 20:48:50 rmind Exp $"); +__RCSID("$NetBSD: npfctl.c,v 1.53 2017/01/11 02:10:44 christos Exp $"); #include #include @@ -695,7 +695,8 @@ npfctl_open_dev(const char *path) if (ver != NPF_VERSION) { errx(EXIT_FAILURE, "incompatible NPF interface version (%d, kernel %d)\n" - "Hint: update userland?", NPF_VERSION, ver); + "Hint: update %s?", NPF_VERSION, ver, + NPF_VERSION > ver ? "userland" : "kernel"); } return fd; }
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: ozaki-r Date: Wed Jan 11 01:25:05 UTC 2017 Modified Files: src/usr.bin/netstat: if.c Log Message: Fix showing multicast addresses of !IFF_UP interfaces netstat appends '*' to the name of an interface without IFF_UP, so if_nametoindex which is used in mc_print fails. mc_print needs just an interface index so pass it instead of a tweaked interface name. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/usr.bin/netstat/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/usr.bin/netstat/if.c diff -u src/usr.bin/netstat/if.c:1.90 src/usr.bin/netstat/if.c:1.91 --- src/usr.bin/netstat/if.c:1.90 Thu Nov 24 00:05:13 2016 +++ src/usr.bin/netstat/if.c Wed Jan 11 01:25:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.90 2016/11/24 00:05:13 dholland Exp $ */ +/* $NetBSD: if.c,v 1.91 2017/01/11 01:25:05 ozaki-r Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -__RCSID("$NetBSD: if.c,v 1.90 2016/11/24 00:05:13 dholland Exp $"); +__RCSID("$NetBSD: if.c,v 1.91 2017/01/11 01:25:05 ozaki-r Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ struct iftot { }; static void set_lines(void); -static void print_addr(const char *, struct sockaddr *, struct sockaddr **, +static void print_addr(const int, struct sockaddr *, struct sockaddr **, struct if_data *, struct ifnet *); static void sidewaysintpr(u_int, u_long); @@ -179,6 +179,7 @@ intpr_sysctl(void) size_t len; int did = 1, rtax = 0, n; char name[IFNAMSIZ + 1]; /* + 1 for `*' */ + int ifindex = 0; if (prog_sysctl(mib, 6, NULL, &len, NULL, 0) == -1) err(1, "sysctl"); @@ -216,6 +217,8 @@ intpr_sysctl(void) if (interface != 0 && strcmp(name, interface) != 0) continue; + ifindex = sdl->sdl_index; + /* mark inactive interfaces with a '*' */ cp = strchr(name, '\0'); if ((ifm->ifm_flags & IFF_UP) == 0) @@ -264,7 +267,7 @@ intpr_sysctl(void) n = 5; printf("%-*.*s %-5" PRIu64 " ", n, n, name, ifd->ifi_mtu); - print_addr(name, rti_info[rtax], rti_info, ifd, NULL); + print_addr(ifindex, rti_info[rtax], rti_info, ifd, NULL); } } @@ -346,8 +349,8 @@ intpr_kvm(u_long ifnetaddr, void (*pfunc cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) + CP(&ifaddr); sa = (struct sockaddr *)cp; - print_addr(name, sa, (void *)&ifaddr, &ifnet.if_data, - &ifnet); + print_addr(ifnet.if_index, sa, (void *)&ifaddr, + &ifnet.if_data, &ifnet); } ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next; } @@ -355,16 +358,12 @@ intpr_kvm(u_long ifnetaddr, void (*pfunc } static void -mc_print(const char *ifname, const size_t ias, const char *oid, int *mcast_oids, +mc_print(const int ifindex, const size_t ias, const char *oid, int *mcast_oids, void (*pr)(const void *)) { uint8_t *mcast_addrs, *p; const size_t incr = 2 * ias + sizeof(uint32_t); size_t len; - int ifindex; - - if ((ifindex = if_nametoindex(ifname)) == 0) - warn("Interface %s not found", ifname); if (mcast_oids[0] == 0) { size_t oidlen = 4; @@ -423,11 +422,11 @@ ia6_print(const struct in6_addr *ia) } static void -mc6_print(const char *ifname) +mc6_print(const int ifindex) { static int mcast_oids[4]; - mc_print(ifname, sizeof(struct in6_addr), "net.inet6.multicast", + mc_print(ifindex, sizeof(struct in6_addr), "net.inet6.multicast", mcast_oids, (void (*)(const void *))ia6_print); } #endif @@ -439,17 +438,17 @@ ia4_print(const struct in_addr *ia) } static void -mc4_print(const char *ifname) +mc4_print(const int ifindex) { static int mcast_oids[4]; - mc_print(ifname, sizeof(struct in_addr), "net.inet.multicast", + mc_print(ifindex, sizeof(struct in_addr), "net.inet.multicast", mcast_oids, (void (*)(const void *))ia4_print); } static void -print_addr(const char *name, struct sockaddr *sa, struct sockaddr **rtinfo, -struct if_data *ifd, struct ifnet *ifnet) +print_addr(const int ifindex, struct sockaddr *sa, +struct sockaddr **rtinfo, struct if_data *ifd, struct ifnet *ifnet) { char hexsep = '.'; /* for hexprint */ static const char hexfmt[] = "%02x%c"; /* for hexprint */ @@ -503,7 +502,7 @@ print_addr(const char *name, struct sock multiaddr = (u_long)inm.inm_list.le_next; } } else { - mc4_print(name); + mc4_print(ifindex); } break; #ifdef INET6 @@ -555,7 +554,7 @@ print_addr(const char *name, struct sock multiaddr = (u_long)inm.in6m_entry.le_next; } } else { - mc6_print(name); + mc6_print(ifindex); } break; #endif /*INET6*/
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: maya Date: Wed Jan 11 00:55:57 UTC 2017 Modified Files: src/sys/arch/x86/pci: if_vmx.c Log Message: we cannot guarantee that m_pulldown doesn't fail, as it may fail even if temporarily out of memory, and it will free the mbuf in this scenario. test for failure and return error if it happens. CID 1396651 ok riastradh To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/pci/if_vmx.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/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.17 src/sys/arch/x86/pci/if_vmx.c:1.18 --- src/sys/arch/x86/pci/if_vmx.c:1.17 Wed Jan 11 00:51:22 2017 +++ src/sys/arch/x86/pci/if_vmx.c Wed Jan 11 00:55:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.17 2017/01/11 00:51:22 maya Exp $ */ +/* $NetBSD: if_vmx.c,v 1.18 2017/01/11 00:55:57 maya Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.17 2017/01/11 00:51:22 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.18 2017/01/11 00:55:57 maya Exp $"); #include #include @@ -2554,6 +2554,10 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t *csum_start = *start + csum_off; mp = m_pulldown(m, 0, *csum_start + 2, &offp); + if (!mp) { + /* m is already freed */ + return ENOBUFS; + } if (m->m_pkthdr.csum_flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) { struct tcphdr *tcp;
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: maya Date: Wed Jan 11 00:51:22 UTC 2017 Modified Files: src/sys/arch/x86/pci: if_vmx.c Log Message: on error, free the mbuf in vmxnet3_txq_offload_ctx, not in callers. ok riastradh To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/pci/if_vmx.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/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.16 src/sys/arch/x86/pci/if_vmx.c:1.17 --- src/sys/arch/x86/pci/if_vmx.c:1.16 Wed Jan 11 00:41:38 2017 +++ src/sys/arch/x86/pci/if_vmx.c Wed Jan 11 00:51:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.16 2017/01/11 00:41:38 maya Exp $ */ +/* $NetBSD: if_vmx.c,v 1.17 2017/01/11 00:51:22 maya Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.16 2017/01/11 00:41:38 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.17 2017/01/11 00:51:22 maya Exp $"); #include #include @@ -2531,6 +2531,7 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t offset = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; break; default: + m_free(m); return (EINVAL); } @@ -2660,9 +2661,9 @@ vmxnet3_txq_encap(struct vmxnet3_txqueue } else if (m->m_pkthdr.csum_flags & VMXNET3_CSUM_ALL_OFFLOAD) { error = vmxnet3_txq_offload_ctx(txq, m, &start, &csum_start); if (error) { + /* m is already freed */ txq->vxtxq_stats.vmtxs_offload_failed++; vmxnet3_txq_unload_mbuf(txq, dmap); - m_freem(m); *m0 = NULL; return (error); }
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: maya Date: Wed Jan 11 00:41:38 UTC 2017 Modified Files: src/sys/arch/x86/pci: if_vmx.c Log Message: GC unused macros. Even if they were used (and actually asserted), asserting on !mutex_owned is generally a bad idea, as it may be true in unexpected contexts. suggested by riastradh, thanks. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/if_vmx.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/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.15 src/sys/arch/x86/pci/if_vmx.c:1.16 --- src/sys/arch/x86/pci/if_vmx.c:1.15 Wed Dec 28 07:32:16 2016 +++ src/sys/arch/x86/pci/if_vmx.c Wed Jan 11 00:41:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.15 2016/12/28 07:32:16 ozaki-r Exp $ */ +/* $NetBSD: if_vmx.c,v 1.16 2017/01/11 00:41:38 maya Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.15 2016/12/28 07:32:16 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.16 2017/01/11 00:41:38 maya Exp $"); #include #include @@ -97,22 +97,16 @@ __KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1 #define VMXNET3_CORE_LOCK(_sc) mutex_enter((_sc)->vmx_mtx) #define VMXNET3_CORE_UNLOCK(_sc) mutex_exit((_sc)->vmx_mtx) #define VMXNET3_CORE_LOCK_ASSERT(_sc) mutex_owned((_sc)->vmx_mtx) -#define VMXNET3_CORE_LOCK_ASSERT_NOTOWNED(_sc) \ -(!mutex_owned((_sc)->vmx_mtx)) #define VMXNET3_RXQ_LOCK(_rxq) mutex_enter((_rxq)->vxrxq_mtx) #define VMXNET3_RXQ_UNLOCK(_rxq) mutex_exit((_rxq)->vxrxq_mtx) #define VMXNET3_RXQ_LOCK_ASSERT(_rxq) \ mutex_owned((_rxq)->vxrxq_mtx) -#define VMXNET3_RXQ_LOCK_ASSERT_NOTOWNED(_rxq) \ -(!mutex_owned((_rxq)->vxrxq_mtx)) #define VMXNET3_TXQ_LOCK(_txq) mutex_enter((_txq)->vxtxq_mtx) #define VMXNET3_TXQ_UNLOCK(_txq) mutex_exit((_txq)->vxtxq_mtx) #define VMXNET3_TXQ_LOCK_ASSERT(_txq) \ mutex_owned((_txq)->vxtxq_mtx) -#define VMXNET3_TXQ_LOCK_ASSERT_NOTOWNED(_txq) \ -(!mutex_owned((_txq)->vxtxq_mtx)) struct vmxnet3_dma_alloc { bus_addr_t dma_paddr;
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Tue Jan 10 23:49:20 UTC 2017 Modified Files: src/lib/libcurses: standout.c Log Message: Use the window's screen's terminal. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/standout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/standout.c diff -u src/lib/libcurses/standout.c:1.18 src/lib/libcurses/standout.c:1.19 --- src/lib/libcurses/standout.c:1.18 Fri Jan 6 13:53:18 2017 +++ src/lib/libcurses/standout.c Tue Jan 10 23:49:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: standout.c,v 1.18 2017/01/06 13:53:18 roy Exp $ */ +/* $NetBSD: standout.c,v 1.19 2017/01/10 23:49:20 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)standout.c 8.3 (Berkeley) 8/10/94"; #else -__RCSID("$NetBSD: standout.c,v 1.18 2017/01/06 13:53:18 roy Exp $"); +__RCSID("$NetBSD: standout.c,v 1.19 2017/01/10 23:49:20 roy Exp $"); #endif #endif/* not lint */ @@ -74,13 +74,15 @@ standend(void) int wstandout(WINDOW *win) { + const TERMINAL *t = win->screen->term; /* * If standout/standend strings, or can underline, set the * screen standout bit. */ - if ((enter_standout_mode != NULL && exit_standout_mode != NULL) || - underline_char != NULL) + if ((t_enter_standout_mode(t) != NULL && + t_exit_standout_mode(t) != NULL) || + t_underline_char(t) != NULL) win->wattr |= __STANDOUT; return 1; }
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Tue Jan 10 23:28:45 UTC 2017 Modified Files: src/lib/libcurses: resize.c Log Message: Fix resizing terms. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/resize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/resize.c diff -u src/lib/libcurses/resize.c:1.23 src/lib/libcurses/resize.c:1.24 --- src/lib/libcurses/resize.c:1.23 Tue Jan 10 10:13:24 2017 +++ src/lib/libcurses/resize.c Tue Jan 10 23:28:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: resize.c,v 1.23 2017/01/10 10:13:24 roy Exp $ */ +/* $NetBSD: resize.c,v 1.24 2017/01/10 23:28:45 roy Exp $ */ /* * Copyright (c) 2001 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)resize.c blymn 2001/08/26"; #else -__RCSID("$NetBSD: resize.c,v 1.23 2017/01/10 10:13:24 roy Exp $"); +__RCSID("$NetBSD: resize.c,v 1.24 2017/01/10 23:28:45 roy Exp $"); #endif #endif/* not lint */ @@ -145,8 +145,7 @@ is_term_resized(int nlines, int ncols) { return (nlines > 0 && ncols > 0 && - (nlines != _cursesi_screen->LINES - + _cursesi_screen->ripped_top + _cursesi_screen->ripped_bottom || + (nlines != _cursesi_screen->LINES || ncols != _cursesi_screen->COLS)); } @@ -167,7 +166,7 @@ resizeterm(int nlines, int ncols) if (!is_term_resized(nlines, ncols)) return OK; - result = resizeterm(nlines, ncols); + result = resize_term(nlines, ncols); clearok(curscr, TRUE); return result; }
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Tue Jan 10 23:08:13 UTC 2017 Modified Files: src/sys/sys: fcntl.h Log Message: Don't include ; it is optional even in X/Open. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/sys/fcntl.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/fcntl.h diff -u src/sys/sys/fcntl.h:1.47 src/sys/sys/fcntl.h:1.48 --- src/sys/sys/fcntl.h:1.47 Thu Jun 30 11:29:20 2016 +++ src/sys/sys/fcntl.h Tue Jan 10 18:08:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fcntl.h,v 1.47 2016/06/30 15:29:20 dholland Exp $ */ +/* $NetBSD: fcntl.h,v 1.48 2017/01/10 23:08:13 christos Exp $ */ /*- * Copyright (c) 1983, 1990, 1993 @@ -48,9 +48,9 @@ #ifndef _KERNEL #include #include -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) +#if defined(_XOPEN_SOURCE) #include -#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ +#endif /* _XOPEN_SOURCE */ #endif /* !_KERNEL */ /*
CVS commit: src/common/lib/libc/cdb
Module Name:src Committed By: christos Date: Tue Jan 10 23:06:06 UTC 2017 Modified Files: src/common/lib/libc/cdb: cdbr.c Log Message: mark parameter as unused. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/cdb/cdbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/cdb/cdbr.c diff -u src/common/lib/libc/cdb/cdbr.c:1.1 src/common/lib/libc/cdb/cdbr.c:1.2 --- src/common/lib/libc/cdb/cdbr.c:1.1 Tue Dec 10 20:24:08 2013 +++ src/common/lib/libc/cdb/cdbr.c Tue Jan 10 18:06:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cdbr.c,v 1.1 2013/12/11 01:24:08 joerg Exp $ */ +/* $NetBSD: cdbr.c,v 1.2 2017/01/10 23:06:06 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: cdbr.c,v 1.1 2013/12/11 01:24:08 joerg Exp $"); +__RCSID("$NetBSD: cdbr.c,v 1.2 2017/01/10 23:06:06 christos Exp $"); #if !defined(_KERNEL) && !defined(_STANDALONE) #include "namespace.h" @@ -156,7 +156,7 @@ cdbr_open(const char *path, int flags) #endif struct cdbr * -cdbr_open_mem(void *base, size_t size, int flags, +cdbr_open_mem(void *base, size_t size, int flags __unused, void (*unmap)(void *, void *, size_t), void *cookie) { struct cdbr *cdbr;
CVS commit: src/regress/sys/kern/unfdpass
Module Name:src Committed By: christos Date: Tue Jan 10 22:37:44 UTC 2017 Modified Files: src/regress/sys/kern/unfdpass: unfdpass.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/regress/sys/kern/unfdpass/unfdpass.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/kern/unfdpass/unfdpass.c diff -u src/regress/sys/kern/unfdpass/unfdpass.c:1.10 src/regress/sys/kern/unfdpass/unfdpass.c:1.11 --- src/regress/sys/kern/unfdpass/unfdpass.c:1.10 Mon Apr 28 16:23:07 2008 +++ src/regress/sys/kern/unfdpass/unfdpass.c Tue Jan 10 17:37:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: unfdpass.c,v 1.10 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: unfdpass.c,v 1.11 2017/01/10 22:37:44 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -40,6 +40,7 @@ #include #include #include +#include #include #include
CVS commit: src/tests
Module Name:src Committed By: christos Date: Tue Jan 10 22:36:29 UTC 2017 Modified Files: src/tests/fs/fifofs: t_fifo.c src/tests/lib/libc/gen/posix_spawn: t_fileactions.c src/tests/lib/libc/sys: t_access.c t_chroot.c t_mincore.c t_mmap.c src/tests/rump/rumpkern: t_lwproc.c Log Message: more tests needing To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/fifofs/t_fifo.c cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/posix_spawn/t_fileactions.c cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_access.c \ src/tests/lib/libc/sys/t_chroot.c cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_mincore.c cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/sys/t_mmap.c cvs rdiff -u -r1.7 -r1.8 src/tests/rump/rumpkern/t_lwproc.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/fs/fifofs/t_fifo.c diff -u src/tests/fs/fifofs/t_fifo.c:1.1 src/tests/fs/fifofs/t_fifo.c:1.2 --- src/tests/fs/fifofs/t_fifo.c:1.1 Tue Dec 20 19:17:07 2011 +++ src/tests/fs/fifofs/t_fifo.c Tue Jan 10 17:36:29 2017 @@ -1,9 +1,10 @@ /* Test case written by Bharat Joshi */ #include -__RCSID("$NetBSD: t_fifo.c,v 1.1 2011/12/21 00:17:07 christos Exp $"); +__RCSID("$NetBSD: t_fifo.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include Index: src/tests/lib/libc/gen/posix_spawn/t_fileactions.c diff -u src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.5 src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.6 --- src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.5 Mon Apr 9 15:42:07 2012 +++ src/tests/lib/libc/gen/posix_spawn/t_fileactions.c Tue Jan 10 17:36:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -32,6 +32,10 @@ #include + +#include +#include + #include #include #include @@ -39,7 +43,6 @@ #include #include #include -#include ATF_TC(t_spawn_openmode); Index: src/tests/lib/libc/sys/t_access.c diff -u src/tests/lib/libc/sys/t_access.c:1.1 src/tests/lib/libc/sys/t_access.c:1.2 --- src/tests/lib/libc/sys/t_access.c:1.1 Thu Jul 7 02:57:53 2011 +++ src/tests/lib/libc/sys/t_access.c Tue Jan 10 17:36:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); + +#include + +#include #include #include @@ -38,8 +42,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/ #include #include -#include - static const char path[] = "access"; static const int mode[4] = { R_OK, W_OK, X_OK, F_OK }; Index: src/tests/lib/libc/sys/t_chroot.c diff -u src/tests/lib/libc/sys/t_chroot.c:1.1 src/tests/lib/libc/sys/t_chroot.c:1.2 --- src/tests/lib/libc/sys/t_chroot.c:1.1 Thu Jul 7 02:57:53 2011 +++ src/tests/lib/libc/sys/t_chroot.c Tue Jan 10 17:36:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include Index: src/tests/lib/libc/sys/t_mincore.c diff -u src/tests/lib/libc/sys/t_mincore.c:1.8 src/tests/lib/libc/sys/t_mincore.c:1.9 --- src/tests/lib/libc/sys/t_mincore.c:1.8 Fri Jun 8 03:18:58 2012 +++ src/tests/lib/libc/sys/t_mincore.c Tue Jan 10 17:36:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */ +/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,9 +59,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); +__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include Index: src/tests/lib/libc/sys/t_mmap.c diff -u src/tests/lib/libc/sys/t_mmap.c:1.9 src/tests/lib/libc/sys/t_mmap.c:1.10 --- src/tests/lib/libc/sys/t_mmap.c:1.9 Sat Feb 28 08:57:08 2015 +++ src/tests/lib/libc/sys/t_mmap.c Tue Jan 10 17:36:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ +/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundati
CVS commit: src/tests/lib/libc
Module Name:src Committed By: christos Date: Tue Jan 10 22:24:29 UTC 2017 Modified Files: src/tests/lib/libc: t_cdb.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/t_cdb.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/lib/libc/t_cdb.c diff -u src/tests/lib/libc/t_cdb.c:1.1 src/tests/lib/libc/t_cdb.c:1.2 --- src/tests/lib/libc/t_cdb.c:1.1 Wed Sep 26 20:38:57 2012 +++ src/tests/lib/libc/t_cdb.c Tue Jan 10 17:24:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $ */ +/* $NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -32,9 +32,12 @@ */ #include -__RCSID("$NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $"); +__RCSID("$NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $"); #include + +#include + #include #include #include
CVS commit: src/tests/lib/libc/c063
Module Name:src Committed By: christos Date: Tue Jan 10 22:25:01 UTC 2017 Modified Files: src/tests/lib/libc/c063: t_o_search.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_o_search.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/lib/libc/c063/t_o_search.c diff -u src/tests/lib/libc/c063/t_o_search.c:1.4 src/tests/lib/libc/c063/t_o_search.c:1.5 --- src/tests/lib/libc/c063/t_o_search.c:1.4 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_o_search.c Tue Jan 10 17:25:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,9 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); #include + +#include +#include + #include #include #include @@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 201 #include #include #include -#include /* * dholland 20130112: disable tests that require O_SEARCH semantics
CVS commit: src/tests/kernel
Module Name:src Committed By: christos Date: Tue Jan 10 22:10:22 UTC 2017 Modified Files: src/tests/kernel: t_mqueue.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/t_mqueue.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/kernel/t_mqueue.c diff -u src/tests/kernel/t_mqueue.c:1.4 src/tests/kernel/t_mqueue.c:1.5 --- src/tests/kernel/t_mqueue.c:1.4 Sun Mar 2 14:56:48 2014 +++ src/tests/kernel/t_mqueue.c Tue Jan 10 17:10:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mqueue.c,v 1.4 2014/03/02 19:56:48 jmmv Exp $ */ +/* $NetBSD: t_mqueue.c,v 1.5 2017/01/10 22:10:22 christos Exp $ */ /* * Test for POSIX message queue priority handling. @@ -7,6 +7,7 @@ */ #include +#include #include #include
CVS commit: src/sys/kern
Module Name:src Committed By: pgoyette Date: Tue Jan 10 22:08:14 UTC 2017 Modified Files: src/sys/kern: kern_history.c Log Message: Use membar_{producer,consumer}() to ensure proper access to the "ready" flag. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/kern_history.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_history.c diff -u src/sys/kern/kern_history.c:1.13 src/sys/kern/kern_history.c:1.14 --- src/sys/kern/kern_history.c:1.13 Tue Jan 10 00:50:57 2017 +++ src/sys/kern/kern_history.c Tue Jan 10 22:08:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_history.c,v 1.13 2017/01/10 00:50:57 pgoyette Exp $ */ +/* $NetBSD: kern_history.c,v 1.14 2017/01/10 22:08:14 pgoyette Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.13 2017/01/10 00:50:57 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.14 2017/01/10 22:08:14 pgoyette Exp $"); #include "opt_ddb.h" #include "opt_kernhist.h" @@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_history #include "opt_biohist.h" #include "opt_sysctl.h" +#include #include #include #include @@ -289,6 +290,7 @@ sysctl_kernhist_new(struct kern_history struct kern_history *h; const struct sysctlnode *rnode = NULL; + membar_consumer(); if (kernhist_sysctl_ready == 0) return; @@ -329,6 +331,7 @@ sysctl_kernhist_init(void) sysctl_hist_node = rnode->sysctl_num; kernhist_sysctl_ready = 1; + membar_producer(); sysctl_kernhist_new(NULL); }
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Tue Jan 10 21:56:50 UTC 2017 Modified Files: src/lib/libcurses: attributes.c Log Message: Use the terminal of the SCREEN of the WINDOW rather than cur_term for window attribute functions. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libcurses/attributes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/attributes.c diff -u src/lib/libcurses/attributes.c:1.22 src/lib/libcurses/attributes.c:1.23 --- src/lib/libcurses/attributes.c:1.22 Fri Jan 6 13:53:18 2017 +++ src/lib/libcurses/attributes.c Tue Jan 10 21:56:50 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: attributes.c,v 1.22 2017/01/06 13:53:18 roy Exp $ */ +/* $NetBSD: attributes.c,v 1.23 2017/01/10 21:56:50 roy Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: attributes.c,v 1.22 2017/01/06 13:53:18 roy Exp $"); +__RCSID("$NetBSD: attributes.c,v 1.23 2017/01/10 21:56:50 roy Exp $"); #endif/* not lint */ #include "curses.h" @@ -159,41 +159,45 @@ wattr_get(WINDOW *win, attr_t *attr, sho int wattr_on(WINDOW *win, attr_t attr, void *opt) { + const TERMINAL *t = win->screen->term; + #ifdef DEBUG __CTRACE(__CTRACE_ATTR, "wattr_on: win %p, attr %08x\n", win, attr); #endif /* If can enter modes, set the relevent attribute bits. */ - if (exit_attribute_mode != NULL) { - if (attr & __BLINK && enter_blink_mode != NULL) + if (t_exit_attribute_mode(t) != NULL) { + if (attr & __BLINK && t_enter_blink_mode(t) != NULL) win->wattr |= __BLINK; - if (attr & __BOLD && enter_bold_mode != NULL) + if (attr & __BOLD && t_enter_bold_mode(t) != NULL) win->wattr |= __BOLD; - if (attr & __DIM && enter_dim_mode != NULL) + if (attr & __DIM && t_enter_dim_mode(t) != NULL) win->wattr |= __DIM; - if (attr & __BLANK && enter_secure_mode != NULL) + if (attr & __BLANK && t_enter_secure_mode(t) != NULL) win->wattr |= __BLANK; - if (attr & __PROTECT && enter_protected_mode != NULL) + if (attr & __PROTECT && t_enter_protected_mode(t) != NULL) win->wattr |= __PROTECT; - if (attr & __REVERSE && enter_reverse_mode != NULL) + if (attr & __REVERSE && t_enter_reverse_mode(t) != NULL) win->wattr |= __REVERSE; #ifdef HAVE_WCHAR - if (attr & WA_LOW && enter_low_hl_mode != NULL) + if (attr & WA_LOW && t_enter_low_hl_mode(t) != NULL) win->wattr |= WA_LOW; - if (attr & WA_TOP && enter_top_hl_mode != NULL) + if (attr & WA_TOP && t_enter_top_hl_mode(t) != NULL) win->wattr |= WA_TOP; - if (attr & WA_LEFT && enter_left_hl_mode != NULL) + if (attr & WA_LEFT && t_enter_left_hl_mode(t) != NULL) win->wattr |= WA_LEFT; - if (attr & WA_RIGHT && enter_right_hl_mode != NULL) + if (attr & WA_RIGHT && t_enter_right_hl_mode(t) != NULL) win->wattr |= WA_RIGHT; - if (attr & WA_HORIZONTAL && enter_horizontal_hl_mode != NULL) + if (attr & WA_HORIZONTAL && t_enter_horizontal_hl_mode(t) != NULL) win->wattr |= WA_HORIZONTAL; - if (attr & WA_VERTICAL && enter_vertical_hl_mode != NULL) + if (attr & WA_VERTICAL && t_enter_vertical_hl_mode(t) != NULL) win->wattr |= WA_VERTICAL; #endif /* HAVE_WCHAR */ } - if (attr & __STANDOUT && enter_standout_mode != NULL && exit_standout_mode != NULL) + if (attr & __STANDOUT && t_enter_standout_mode(t) != NULL && + t_exit_standout_mode(t) != NULL) wstandout(win); - if (attr & __UNDERSCORE && enter_underline_mode != NULL && exit_underline_mode != NULL) + if (attr & __UNDERSCORE && t_enter_underline_mode(t) != NULL && + t_exit_underline_mode(t) != NULL) wunderscore(win); if ((attr_t) attr & __COLOR) __wcolor_set(win, (attr_t) attr); @@ -211,11 +215,13 @@ wattr_on(WINDOW *win, attr_t attr, void int wattr_off(WINDOW *win, attr_t attr, void *opt) { + const TERMINAL *t = win->screen->term; + #ifdef DEBUG __CTRACE(__CTRACE_ATTR, "wattr_off: win %p, attr %08x\n", win, attr); #endif /* If can do exit modes, unset the relevent attribute bits. */ - if (exit_attribute_mode != NULL) { + if (t_exit_attribute_mode(t) != NULL) { if (attr & __BLINK) win->wattr &= ~__BLINK; if (attr & __BOLD) @@ -441,9 +447,11 @@ term_attrs(void) void __wcolor_set(WINDOW *win, attr_t attr) { + const TERMINAL *t = win->screen->term; + /* If another color pair is set, turn that off first. */ win->wattr &= ~__COLOR; /* If can do color video, set the color pair bits. */ - if (max_colors != 0 && attr & __COLOR) + if (t_max_colors(t) != 0 && attr & __COLOR) win->wattr |= attr & __COLOR; }
CVS commit: xsrc/external/mit/ctwm/dist
Module Name:xsrc Committed By: christos Date: Tue Jan 10 21:53:06 UTC 2017 Modified Files: xsrc/external/mit/ctwm/dist: session.c Log Message: need for umask To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/ctwm/dist/session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/ctwm/dist/session.c diff -u xsrc/external/mit/ctwm/dist/session.c:1.3 xsrc/external/mit/ctwm/dist/session.c:1.4 --- xsrc/external/mit/ctwm/dist/session.c:1.3 Sun Apr 24 14:27:03 2016 +++ xsrc/external/mit/ctwm/dist/session.c Tue Jan 10 16:53:06 2017 @@ -120,6 +120,7 @@ #endif #endif #endif /* PATH_MAX */ +#include #include #include
CVS commit: xsrc/external/mit/xman/dist
Module Name:xsrc Committed By: christos Date: Tue Jan 10 21:50:59 UTC 2017 Modified Files: xsrc/external/mit/xman/dist: search.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xman/dist/search.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xman/dist/search.c diff -u xsrc/external/mit/xman/dist/search.c:1.2 xsrc/external/mit/xman/dist/search.c:1.3 --- xsrc/external/mit/xman/dist/search.c:1.2 Sun Apr 24 13:37:02 2016 +++ xsrc/external/mit/xman/dist/search.c Tue Jan 10 16:50:59 2017 @@ -28,9 +28,14 @@ from the X Consortium. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "globals.h" #include "vendor.h" +#include /* sys/types.h and unistd.h included in here */ +#include /* Map and control-M to goto beginning of file. */
CVS commit: src/usr.bin/vndcompress
Module Name:src Committed By: christos Date: Tue Jan 10 21:15:54 UTC 2017 Modified Files: src/usr.bin/vndcompress: vndcompress.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/vndcompress/vndcompress.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/vndcompress/vndcompress.c diff -u src/usr.bin/vndcompress/vndcompress.c:1.25 src/usr.bin/vndcompress/vndcompress.c:1.26 --- src/usr.bin/vndcompress/vndcompress.c:1.25 Mon Nov 17 22:48:17 2014 +++ src/usr.bin/vndcompress/vndcompress.c Tue Jan 10 16:15:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vndcompress.c,v 1.25 2014/11/18 03:48:17 riastradh Exp $ */ +/* $NetBSD: vndcompress.c,v 1.26 2017/01/10 21:15:54 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,9 +30,10 @@ */ #include -__RCSID("$NetBSD: vndcompress.c,v 1.25 2014/11/18 03:48:17 riastradh Exp $"); +__RCSID("$NetBSD: vndcompress.c,v 1.26 2017/01/10 21:15:54 christos Exp $"); #include +#include #include #include
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: christos Date: Tue Jan 10 21:12:03 UTC 2017 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/rfcomm_sppd/rfcomm_sppd.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/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.16 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.17 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.16 Mon Dec 9 04:35:17 2013 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Tue Jan 10 16:12:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.16 2013/12/09 09:35:17 wiz Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.17 2017/01/10 21:12:03 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,9 +62,10 @@ __COPYRIGHT("@(#) Copyright (c) 2009 The Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved."); -__RCSID("$NetBSD: rfcomm_sppd.c,v 1.16 2013/12/09 09:35:17 wiz Exp $"); +__RCSID("$NetBSD: rfcomm_sppd.c,v 1.17 2017/01/10 21:12:03 christos Exp $"); #include +#include #include #include
CVS commit: src/usr.bin/systat
Module Name:src Committed By: christos Date: Tue Jan 10 21:14:51 UTC 2017 Modified Files: src/usr.bin/systat: ps.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.bin/systat/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/systat/ps.c diff -u src/usr.bin/systat/ps.c:1.36 src/usr.bin/systat/ps.c:1.37 --- src/usr.bin/systat/ps.c:1.36 Wed Feb 19 15:42:14 2014 +++ src/usr.bin/systat/ps.c Tue Jan 10 16:14:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ps.c,v 1.36 2014/02/19 20:42:14 dsl Exp $ */ +/* $NetBSD: ps.c,v 1.37 2017/01/10 21:14:51 christos Exp $ */ /*- * Copyright (c) 1999 @@ -45,12 +45,13 @@ #include #ifndef lint -__RCSID("$NetBSD: ps.c,v 1.36 2014/02/19 20:42:14 dsl Exp $"); +__RCSID("$NetBSD: ps.c,v 1.37 2017/01/10 21:14:51 christos Exp $"); #endif /* not lint */ #include #include #include +#include #include #include
CVS commit: src/usr.bin/sort
Module Name:src Committed By: christos Date: Tue Jan 10 21:13:45 UTC 2017 Modified Files: src/usr.bin/sort: sort.c Log Message: refactor includes, add To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/usr.bin/sort/sort.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/sort/sort.c diff -u src/usr.bin/sort/sort.c:1.63 src/usr.bin/sort/sort.c:1.64 --- src/usr.bin/sort/sort.c:1.63 Wed Jun 1 04:24:03 2016 +++ src/usr.bin/sort/sort.c Tue Jan 10 16:13:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sort.c,v 1.63 2016/06/01 08:24:03 wiz Exp $ */ +/* $NetBSD: sort.c,v 1.64 2017/01/10 21:13:45 christos Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -60,34 +60,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -/* Sort sorts a file using an optional user-defined key. - * Sort uses radix sort for internal sorting, and allows - * a choice of merge sort and radix sort for external sorting. - */ - -#include -#include "sort.h" -#include "fsort.h" -#include "pathnames.h" - +#include #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1993\ The Regents of the University of California. All rights reserved."); #endif /* not lint */ +__RCSID("$NetBSD: sort.c,v 1.64 2017/01/10 21:13:45 christos Exp $"); -__RCSID("$NetBSD: sort.c,v 1.63 2016/06/01 08:24:03 wiz Exp $"); +/* Sort sorts a file using an optional user-defined key. + * Sort uses radix sort for internal sorting, and allows + * a choice of merge sort and radix sort for external sorting. + */ #include #include +#include #include +#include #include #include #include #include #include -#include +#include + +#include "sort.h" +#include "fsort.h" +#include "pathnames.h" int REC_D = '\n'; u_char d_mask[NBINS]; /* flags for rec_d, field_d, */
CVS commit: src/usr.bin/split
Module Name:src Committed By: christos Date: Tue Jan 10 21:14:13 UTC 2017 Modified Files: src/usr.bin/split: split.c Log Message: needs To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/split/split.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/split/split.c diff -u src/usr.bin/split/split.c:1.26 src/usr.bin/split/split.c:1.27 --- src/usr.bin/split/split.c:1.26 Fri Sep 16 11:39:29 2011 +++ src/usr.bin/split/split.c Tue Jan 10 16:14:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: split.c,v 1.26 2011/09/16 15:39:29 joerg Exp $ */ +/* $NetBSD: split.c,v 1.27 2017/01/10 21:14:13 christos Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -39,10 +39,11 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 #if 0 static char sccsid[] = "@(#)split.c 8.3 (Berkeley) 4/25/94"; #endif -__RCSID("$NetBSD: split.c,v 1.26 2011/09/16 15:39:29 joerg Exp $"); +__RCSID("$NetBSD: split.c,v 1.27 2017/01/10 21:14:13 christos Exp $"); #endif /* not lint */ #include +#include #include #include
CVS commit: src/usr.bin/tic
Module Name:src Committed By: christos Date: Tue Jan 10 21:15:23 UTC 2017 Modified Files: src/usr.bin/tic: tic.c Log Message: need for DEFFILEMODE etc. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/tic/tic.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/tic/tic.c diff -u src/usr.bin/tic/tic.c:1.26 src/usr.bin/tic/tic.c:1.27 --- src/usr.bin/tic/tic.c:1.26 Thu Nov 24 12:12:23 2016 +++ src/usr.bin/tic/tic.c Tue Jan 10 16:15:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tic.c,v 1.26 2016/11/24 17:12:23 christos Exp $ */ +/* $NetBSD: tic.c,v 1.27 2017/01/10 21:15:23 christos Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -32,10 +32,11 @@ #endif #include -__RCSID("$NetBSD: tic.c,v 1.26 2016/11/24 17:12:23 christos Exp $"); +__RCSID("$NetBSD: tic.c,v 1.27 2017/01/10 21:15:23 christos Exp $"); #include #include +#include #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H #include
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: christos Date: Tue Jan 10 21:05:42 UTC 2017 Modified Files: src/usr.sbin/syslogd: tls.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/syslogd/tls.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/syslogd/tls.c diff -u src/usr.sbin/syslogd/tls.c:1.12 src/usr.sbin/syslogd/tls.c:1.13 --- src/usr.sbin/syslogd/tls.c:1.12 Wed Feb 3 00:34:21 2016 +++ src/usr.sbin/syslogd/tls.c Tue Jan 10 16:05:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tls.c,v 1.12 2016/02/03 05:34:21 christos Exp $ */ +/* $NetBSD: tls.c,v 1.13 2017/01/10 21:05:42 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -45,9 +45,10 @@ */ #include -__RCSID("$NetBSD: tls.c,v 1.12 2016/02/03 05:34:21 christos Exp $"); +__RCSID("$NetBSD: tls.c,v 1.13 2017/01/10 21:05:42 christos Exp $"); #ifndef DISABLE_TLS +#include #include "syslogd.h" #include "tls.h" #include
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Tue Jan 10 21:08:48 UTC 2017 Modified Files: src/libexec/ld.elf_so: load.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/libexec/ld.elf_so/load.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/load.c diff -u src/libexec/ld.elf_so/load.c:1.47 src/libexec/ld.elf_so/load.c:1.48 --- src/libexec/ld.elf_so/load.c:1.47 Wed Nov 27 13:01:33 2013 +++ src/libexec/ld.elf_so/load.c Tue Jan 10 16:08:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: load.c,v 1.47 2013/11/27 18:01:33 christos Exp $ */ +/* $NetBSD: load.c,v 1.48 2017/01/10 21:08:48 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,9 +40,15 @@ #include #ifndef lint -__RCSID("$NetBSD: load.c,v 1.47 2013/11/27 18:01:33 christos Exp $"); +__RCSID("$NetBSD: load.c,v 1.48 2017/01/10 21:08:48 christos Exp $"); #endif /* not lint */ +#include +#include +#include +#include +#include + #include #include #include @@ -51,10 +57,6 @@ __RCSID("$NetBSD: load.c,v 1.47 2013/11/ #include #include #include -#include -#include -#include -#include #include #include "debug.h"
CVS commit: src/usr.sbin/ypserv/common
Module Name:src Committed By: christos Date: Tue Jan 10 21:06:17 UTC 2017 Modified Files: src/usr.sbin/ypserv/common: ypdb.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/ypserv/common/ypdb.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/ypserv/common/ypdb.c diff -u src/usr.sbin/ypserv/common/ypdb.c:1.11 src/usr.sbin/ypserv/common/ypdb.c:1.12 --- src/usr.sbin/ypserv/common/ypdb.c:1.11 Thu Feb 28 22:00:47 2008 +++ src/usr.sbin/ypserv/common/ypdb.c Tue Jan 10 16:06:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ypdb.c,v 1.11 2008/02/29 03:00:47 lukem Exp $ */ +/* $NetBSD: ypdb.c,v 1.12 2017/01/10 21:06:17 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -38,11 +38,12 @@ #include #ifndef lint -__RCSID("$NetBSD: ypdb.c,v 1.11 2008/02/29 03:00:47 lukem Exp $"); +__RCSID("$NetBSD: ypdb.c,v 1.12 2017/01/10 21:06:17 christos Exp $"); #endif #include #include +#include #include #include
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: christos Date: Tue Jan 10 21:07:18 UTC 2017 Modified Files: src/usr.sbin/rtadvd: rtadvd_hostops.c Log Message: need for clock_gettime To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/rtadvd/rtadvd_hostops.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/rtadvd/rtadvd_hostops.c diff -u src/usr.sbin/rtadvd/rtadvd_hostops.c:1.1 src/usr.sbin/rtadvd/rtadvd_hostops.c:1.2 --- src/usr.sbin/rtadvd/rtadvd_hostops.c:1.1 Wed Nov 11 02:49:59 2015 +++ src/usr.sbin/rtadvd/rtadvd_hostops.c Tue Jan 10 16:07:17 2017 @@ -8,6 +8,7 @@ #include #include #include +#include #include "prog_ops.h"
CVS commit: src/usr.bin/ldd
Module Name:src Committed By: christos Date: Tue Jan 10 21:11:25 UTC 2017 Modified Files: src/usr.bin/ldd: ldd_elfxx.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/ldd/ldd_elfxx.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/ldd/ldd_elfxx.c diff -u src/usr.bin/ldd/ldd_elfxx.c:1.6 src/usr.bin/ldd/ldd_elfxx.c:1.7 --- src/usr.bin/ldd/ldd_elfxx.c:1.6 Sat Jul 7 20:53:44 2012 +++ src/usr.bin/ldd/ldd_elfxx.c Tue Jan 10 16:11:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ldd_elfxx.c,v 1.6 2012/07/08 00:53:44 matt Exp $ */ +/* $NetBSD: ldd_elfxx.c,v 1.7 2017/01/10 21:11:25 christos Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -62,12 +62,13 @@ #include #ifndef lint -__RCSID("$NetBSD: ldd_elfxx.c,v 1.6 2012/07/08 00:53:44 matt Exp $"); +__RCSID("$NetBSD: ldd_elfxx.c,v 1.7 2017/01/10 21:11:25 christos Exp $"); #endif /* not lint */ #include #include #include +#include #include #include
CVS commit: src/libexec/getty
Module Name:src Committed By: christos Date: Tue Jan 10 21:08:16 UTC 2017 Modified Files: src/libexec/getty: main.c Log Message: need for chmod To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/libexec/getty/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/getty/main.c diff -u src/libexec/getty/main.c:1.65 src/libexec/getty/main.c:1.66 --- src/libexec/getty/main.c:1.65 Wed Mar 16 20:21:04 2016 +++ src/libexec/getty/main.c Tue Jan 10 16:08:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.65 2016/03/17 00:21:04 christos Exp $ */ +/* $NetBSD: main.c,v 1.66 2017/01/10 21:08:15 christos Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -40,13 +40,14 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93"; #else -__RCSID("$NetBSD: main.c,v 1.65 2016/03/17 00:21:04 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.66 2017/01/10 21:08:15 christos Exp $"); #endif #endif /* not lint */ #include #include #include +#include #include #include
CVS commit: src/usr.sbin/services_mkdb
Module Name:src Committed By: christos Date: Tue Jan 10 21:04:58 UTC 2017 Modified Files: src/usr.sbin/services_mkdb: output_db.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/services_mkdb/output_db.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/services_mkdb/output_db.c diff -u src/usr.sbin/services_mkdb/output_db.c:1.1 src/usr.sbin/services_mkdb/output_db.c:1.2 --- src/usr.sbin/services_mkdb/output_db.c:1.1 Sat Apr 24 20:54:46 2010 +++ src/usr.sbin/services_mkdb/output_db.c Tue Jan 10 16:04:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: output_db.c,v 1.1 2010/04/25 00:54:46 joerg Exp $ */ +/* $NetBSD: output_db.c,v 1.2 2017/01/10 21:04:58 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,10 +31,11 @@ #include #ifndef lint -__RCSID("$NetBSD: output_db.c,v 1.1 2010/04/25 00:54:46 joerg Exp $"); +__RCSID("$NetBSD: output_db.c,v 1.2 2017/01/10 21:04:58 christos Exp $"); #endif /* not lint */ #include +#include #include #include
CVS commit: src/usr.sbin/mscdlabel
Module Name:src Committed By: christos Date: Tue Jan 10 21:03:36 UTC 2017 Modified Files: src/usr.sbin/mscdlabel: main.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/mscdlabel/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mscdlabel/main.c diff -u src/usr.sbin/mscdlabel/main.c:1.4 src/usr.sbin/mscdlabel/main.c:1.5 --- src/usr.sbin/mscdlabel/main.c:1.4 Wed May 24 20:42:23 2006 +++ src/usr.sbin/mscdlabel/main.c Tue Jan 10 16:03:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.4 2006/05/25 00:42:23 christos Exp $ */ +/* $NetBSD: main.c,v 1.5 2017/01/10 21:03:36 christos Exp $ */ /* * Copyright (c) 2002, 2005 @@ -33,14 +33,17 @@ * - support simulation of multisession CDs in a vnd(4) disk */ +#include +#include +#include +#include +#include +#include + #include #include #include #include -#include -#include -#include -#include #include #include #include
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: christos Date: Tue Jan 10 21:02:38 UTC 2017 Modified Files: src/usr.sbin/ldpd: conffile.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/ldpd/conffile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/conffile.c diff -u src/usr.sbin/ldpd/conffile.c:1.11 src/usr.sbin/ldpd/conffile.c:1.12 --- src/usr.sbin/ldpd/conffile.c:1.11 Tue Nov 19 11:42:16 2013 +++ src/usr.sbin/ldpd/conffile.c Tue Jan 10 16:02:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: conffile.c,v 1.11 2013/11/19 16:42:16 christos Exp $ */ +/* $NetBSD: conffile.c,v 1.12 2017/01/10 21:02:38 christos Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -29,9 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include + #include #include -#include + #include #include #include
CVS commit: src/usr.sbin/services_mkdb
Module Name:src Committed By: christos Date: Tue Jan 10 21:04:06 UTC 2017 Modified Files: src/usr.sbin/services_mkdb: services_mkdb.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/services_mkdb/services_mkdb.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/services_mkdb/services_mkdb.c diff -u src/usr.sbin/services_mkdb/services_mkdb.c:1.18 src/usr.sbin/services_mkdb/services_mkdb.c:1.19 --- src/usr.sbin/services_mkdb/services_mkdb.c:1.18 Wed Oct 6 21:28:50 2010 +++ src/usr.sbin/services_mkdb/services_mkdb.c Tue Jan 10 16:04:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: services_mkdb.c,v 1.18 2010/10/07 01:28:50 christos Exp $ */ +/* $NetBSD: services_mkdb.c,v 1.19 2017/01/10 21:04:06 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,10 +31,11 @@ #include #ifndef lint -__RCSID("$NetBSD: services_mkdb.c,v 1.18 2010/10/07 01:28:50 christos Exp $"); +__RCSID("$NetBSD: services_mkdb.c,v 1.19 2017/01/10 21:04:06 christos Exp $"); #endif /* not lint */ #include +#include #include #include
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: christos Date: Tue Jan 10 20:57:26 UTC 2017 Modified Files: src/usr.sbin/crash: crash.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/crash/crash.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/crash/crash.c diff -u src/usr.sbin/crash/crash.c:1.10 src/usr.sbin/crash/crash.c:1.11 --- src/usr.sbin/crash/crash.c:1.10 Tue Jun 16 19:48:20 2015 +++ src/usr.sbin/crash/crash.c Tue Jan 10 15:57:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: crash.c,v 1.10 2015/06/16 23:48:20 christos Exp $ */ +/* $NetBSD: crash.c,v 1.11 2017/01/10 20:57:26 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,13 +31,14 @@ #include #ifndef lint -__RCSID("$NetBSD: crash.c,v 1.10 2015/06/16 23:48:20 christos Exp $"); +__RCSID("$NetBSD: crash.c,v 1.11 2017/01/10 20:57:26 christos Exp $"); #endif /* not lint */ #include #include #include +#include #include #include
CVS commit: src/sbin/fsck_v7fs
Module Name:src Committed By: christos Date: Tue Jan 10 20:54:10 UTC 2017 Modified Files: src/sbin/fsck_v7fs: fsck_v7fs.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sbin/fsck_v7fs/fsck_v7fs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_v7fs/fsck_v7fs.c diff -u src/sbin/fsck_v7fs/fsck_v7fs.c:1.1 src/sbin/fsck_v7fs/fsck_v7fs.c:1.2 --- src/sbin/fsck_v7fs/fsck_v7fs.c:1.1 Mon Jun 27 07:52:58 2011 +++ src/sbin/fsck_v7fs/fsck_v7fs.c Tue Jan 10 15:54:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fsck_v7fs.c,v 1.1 2011/06/27 11:52:58 uch Exp $ */ +/* $NetBSD: fsck_v7fs.c,v 1.2 2017/01/10 20:54:10 christos Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -31,17 +31,20 @@ #include #ifndef lint -__RCSID("$NetBSD: fsck_v7fs.c,v 1.1 2011/06/27 11:52:58 uch Exp $"); +__RCSID("$NetBSD: fsck_v7fs.c,v 1.2 2017/01/10 20:54:10 christos Exp $"); #endif /* not lint */ +#include +#include +#include +#include + #include #include #include #include #include #include -#include -#include #include #include "v7fs_impl.h"
CVS commit: src/usr.sbin/bthcid
Module Name:src Committed By: christos Date: Tue Jan 10 20:56:41 UTC 2017 Modified Files: src/usr.sbin/bthcid: client.c Log Message: need for chmod(2) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/bthcid/client.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/bthcid/client.c diff -u src/usr.sbin/bthcid/client.c:1.4 src/usr.sbin/bthcid/client.c:1.5 --- src/usr.sbin/bthcid/client.c:1.4 Fri Sep 29 16:06:11 2006 +++ src/usr.sbin/bthcid/client.c Tue Jan 10 15:56:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: client.c,v 1.4 2006/09/29 20:06:11 plunky Exp $ */ +/* $NetBSD: client.c,v 1.5 2017/01/10 20:56:41 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -30,11 +30,12 @@ */ #include -__RCSID("$NetBSD: client.c,v 1.4 2006/09/29 20:06:11 plunky Exp $"); +__RCSID("$NetBSD: client.c,v 1.5 2017/01/10 20:56:41 christos Exp $"); #include #include #include +#include #include #include #include
CVS commit: src/sbin/newfs_v7fs
Module Name:src Committed By: christos Date: Tue Jan 10 20:53:09 UTC 2017 Modified Files: src/sbin/newfs_v7fs: newfs_v7fs.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_v7fs/newfs_v7fs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs_v7fs/newfs_v7fs.c diff -u src/sbin/newfs_v7fs/newfs_v7fs.c:1.4 src/sbin/newfs_v7fs/newfs_v7fs.c:1.5 --- src/sbin/newfs_v7fs/newfs_v7fs.c:1.4 Tue Jun 16 19:18:55 2015 +++ src/sbin/newfs_v7fs/newfs_v7fs.c Tue Jan 10 15:53:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: newfs_v7fs.c,v 1.4 2015/06/16 23:18:55 christos Exp $ */ +/* $NetBSD: newfs_v7fs.c,v 1.5 2017/01/10 20:53:09 christos Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -31,19 +31,21 @@ #include #ifndef lint -__RCSID("$NetBSD: newfs_v7fs.c,v 1.4 2015/06/16 23:18:55 christos Exp $"); +__RCSID("$NetBSD: newfs_v7fs.c,v 1.5 2017/01/10 20:53:09 christos Exp $"); #endif /* not lint */ #include #include +#include +#include +#include + #include #include #include #include #include #include -#include -#include #include #include "v7fs_impl.h"
CVS commit: src/sbin/newfs_sysvbfs
Module Name:src Committed By: christos Date: Tue Jan 10 20:49:20 UTC 2017 Modified Files: src/sbin/newfs_sysvbfs: newfs_sysvbfs.c Log Message: fix includes, addr __RCSID To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sbin/newfs_sysvbfs/newfs_sysvbfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs_sysvbfs/newfs_sysvbfs.c diff -u src/sbin/newfs_sysvbfs/newfs_sysvbfs.c:1.9 src/sbin/newfs_sysvbfs/newfs_sysvbfs.c:1.10 --- src/sbin/newfs_sysvbfs/newfs_sysvbfs.c:1.9 Sun Mar 23 01:10:56 2014 +++ src/sbin/newfs_sysvbfs/newfs_sysvbfs.c Tue Jan 10 15:49:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: newfs_sysvbfs.c,v 1.9 2014/03/23 05:10:56 dholland Exp $ */ +/* $NetBSD: newfs_sysvbfs.c,v 1.10 2017/01/10 20:49:20 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -28,20 +28,24 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include +__RCSID("$NetBSD: newfs_sysvbfs.c,v 1.10 2017/01/10 20:49:20 christos Exp $"); -#include #include +#include +#include +#include +#include +#include + +#include #include +#include #include #include #include -#include -#include #include -#include -#include -#include -#include +#include #include
CVS commit: src/sbin/veriexecctl
Module Name:src Committed By: christos Date: Tue Jan 10 20:48:12 UTC 2017 Modified Files: src/sbin/veriexecctl: veriexecctl.c Log Message: need ... for stat() To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sbin/veriexecctl/veriexecctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/veriexecctl/veriexecctl.c diff -u src/sbin/veriexecctl/veriexecctl.c:1.39 src/sbin/veriexecctl/veriexecctl.c:1.40 --- src/sbin/veriexecctl/veriexecctl.c:1.39 Tue Jun 16 19:18:55 2015 +++ src/sbin/veriexecctl/veriexecctl.c Tue Jan 10 15:48:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: veriexecctl.c,v 1.39 2015/06/16 23:18:55 christos Exp $ */ +/* $NetBSD: veriexecctl.c,v 1.40 2017/01/10 20:48:12 christos Exp $ */ /*- * Copyright 2005 Elad Efrat @@ -43,6 +43,7 @@ #include #include #include +#include #include
CVS commit: src/sbin/raidctl
Module Name:src Committed By: christos Date: Tue Jan 10 20:47:05 UTC 2017 Modified Files: src/sbin/raidctl: raidctl_hostops.c Log Message: need for fstat() To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sbin/raidctl/raidctl_hostops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl_hostops.c diff -u src/sbin/raidctl/raidctl_hostops.c:1.2 src/sbin/raidctl/raidctl_hostops.c:1.3 --- src/sbin/raidctl/raidctl_hostops.c:1.2 Wed Feb 9 06:22:49 2011 +++ src/sbin/raidctl/raidctl_hostops.c Tue Jan 10 15:47:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl_hostops.c,v 1.2 2011/02/09 11:22:49 pooka Exp $ */ +/* $NetBSD: raidctl_hostops.c,v 1.3 2017/01/10 20:47:05 christos Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -28,11 +28,12 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl_hostops.c,v 1.2 2011/02/09 11:22:49 pooka Exp $"); +__RCSID("$NetBSD: raidctl_hostops.c,v 1.3 2017/01/10 20:47:05 christos Exp $"); #endif /* !lint */ #include #include +#include #include #include
CVS commit: src/sbin/dkctl
Module Name:src Committed By: christos Date: Tue Jan 10 20:45:54 UTC 2017 Modified Files: src/sbin/dkctl: dkctl.c Log Message: missing To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sbin/dkctl/dkctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/dkctl/dkctl.c diff -u src/sbin/dkctl/dkctl.c:1.23 src/sbin/dkctl/dkctl.c:1.24 --- src/sbin/dkctl/dkctl.c:1.23 Wed Jan 6 18:03:13 2016 +++ src/sbin/dkctl/dkctl.c Tue Jan 10 15:45:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dkctl.c,v 1.23 2016/01/06 23:03:13 wiz Exp $ */ +/* $NetBSD: dkctl.c,v 1.24 2017/01/10 20:45:53 christos Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -41,11 +41,12 @@ #include #ifndef lint -__RCSID("$NetBSD: dkctl.c,v 1.23 2016/01/06 23:03:13 wiz Exp $"); +__RCSID("$NetBSD: dkctl.c,v 1.24 2017/01/10 20:45:53 christos Exp $"); #endif #include #include +#include #include #include #include
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: christos Date: Tue Jan 10 20:45:19 UTC 2017 Modified Files: src/sbin/cgdconfig: cgdconfig.c Log Message: Need for S_IFBLK. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sbin/cgdconfig/cgdconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/cgdconfig/cgdconfig.c diff -u src/sbin/cgdconfig/cgdconfig.c:1.40 src/sbin/cgdconfig/cgdconfig.c:1.41 --- src/sbin/cgdconfig/cgdconfig.c:1.40 Sun Nov 22 15:24:19 2015 +++ src/sbin/cgdconfig/cgdconfig.c Tue Jan 10 15:45:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cgdconfig.c,v 1.40 2015/11/22 20:24:19 christos Exp $ */ +/* $NetBSD: cgdconfig.c,v 1.41 2017/01/10 20:45:19 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 2002, 2003\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: cgdconfig.c,v 1.40 2015/11/22 20:24:19 christos Exp $"); +__RCSID("$NetBSD: cgdconfig.c,v 1.41 2017/01/10 20:45:19 christos Exp $"); #endif #include @@ -49,6 +49,7 @@ __RCSID("$NetBSD: cgdconfig.c,v 1.40 201 #include #include +#include #include #include #include
CVS commit: src/bin/stty
Module Name:src Committed By: christos Date: Tue Jan 10 20:44:05 UTC 2017 Modified Files: src/bin/stty: key.c Log Message: need for time(3) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/bin/stty/key.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/stty/key.c diff -u src/bin/stty/key.c:1.21 src/bin/stty/key.c:1.22 --- src/bin/stty/key.c:1.21 Thu Sep 12 15:47:23 2013 +++ src/bin/stty/key.c Tue Jan 10 15:44:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $ */ +/* $NetBSD: key.c,v 1.22 2017/01/10 20:44:05 christos Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)key.c 8.4 (Berkeley) 2/20/95"; #else -__RCSID("$NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $"); +__RCSID("$NetBSD: key.c,v 1.22 2017/01/10 20:44:05 christos Exp $"); #endif #endif /* not lint */ @@ -43,6 +43,7 @@ __RCSID("$NetBSD: key.c,v 1.21 2013/09/1 #include #include #include +#include #include #include #include
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Tue Jan 10 20:43:08 UTC 2017 Modified Files: src/bin/sh: eval.c redir.c Log Message: add missing To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.129 src/bin/sh/eval.c cvs rdiff -u -r1.47 -r1.48 src/bin/sh/redir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/eval.c diff -u src/bin/sh/eval.c:1.128 src/bin/sh/eval.c:1.129 --- src/bin/sh/eval.c:1.128 Wed Jun 1 01:10:41 2016 +++ src/bin/sh/eval.c Tue Jan 10 15:43:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.128 2016/06/01 05:10:41 kre Exp $ */ +/* $NetBSD: eval.c,v 1.129 2017/01/10 20:43:08 christos Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.128 2016/06/01 05:10:41 kre Exp $"); +__RCSID("$NetBSD: eval.c,v 1.129 2017/01/10 20:43:08 christos Exp $"); #endif #endif /* not lint */ @@ -50,6 +50,7 @@ __RCSID("$NetBSD: eval.c,v 1.128 2016/06 #include #include #include +#include #include #include #include Index: src/bin/sh/redir.c diff -u src/bin/sh/redir.c:1.47 src/bin/sh/redir.c:1.48 --- src/bin/sh/redir.c:1.47 Thu May 12 09:31:37 2016 +++ src/bin/sh/redir.c Tue Jan 10 15:43:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: redir.c,v 1.47 2016/05/12 13:31:37 kre Exp $ */ +/* $NetBSD: redir.c,v 1.48 2017/01/10 20:43:08 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,12 +37,13 @@ #if 0 static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: redir.c,v 1.47 2016/05/12 13:31:37 kre Exp $"); +__RCSID("$NetBSD: redir.c,v 1.48 2017/01/10 20:43:08 christos Exp $"); #endif #endif /* not lint */ #include #include /* PIPE_BUF */ +#include #include #include #include
CVS commit: src/games/larn
Module Name:src Committed By: christos Date: Tue Jan 10 20:41:40 UTC 2017 Modified Files: src/games/larn: io.c Log Message: need time.h for time(), got side-loaded before from via To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/games/larn/io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/larn/io.c diff -u src/games/larn/io.c:1.27 src/games/larn/io.c:1.28 --- src/games/larn/io.c:1.27 Tue Jun 19 01:30:43 2012 +++ src/games/larn/io.c Tue Jan 10 15:41:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.27 2012/06/19 05:30:43 dholland Exp $ */ +/* $NetBSD: io.c,v 1.28 2017/01/10 20:41:40 christos Exp $ */ /* * io.c Larn is copyrighted 1986 by Noah Morgan. @@ -62,7 +62,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: io.c,v 1.27 2012/06/19 05:30:43 dholland Exp $"); +__RCSID("$NetBSD: io.c,v 1.28 2017/01/10 20:41:40 christos Exp $"); #endif /* not lint */ #include "header.h" @@ -71,6 +71,7 @@ __RCSID("$NetBSD: io.c,v 1.27 2012/06/19 #include #include #include +#include #include #include #include
CVS commit: src/games/atc
Module Name:src Committed By: christos Date: Tue Jan 10 20:40:53 UTC 2017 Modified Files: src/games/atc: log.c Log Message: ned stat.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/games/atc/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/atc/log.c diff -u src/games/atc/log.c:1.22 src/games/atc/log.c:1.23 --- src/games/atc/log.c:1.22 Fri Jun 19 02:02:31 2015 +++ src/games/atc/log.c Tue Jan 10 15:40:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: log.c,v 1.22 2015/06/19 06:02:31 dholland Exp $ */ +/* $NetBSD: log.c,v 1.23 2017/01/10 20:40:53 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,12 +46,13 @@ #if 0 static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: log.c,v 1.22 2015/06/19 06:02:31 dholland Exp $"); +__RCSID("$NetBSD: log.c,v 1.23 2017/01/10 20:40:53 christos Exp $"); #endif #endif /* not lint */ #include #include +#include /* for umask(2) */ #include #include #include
CVS commit: src/tests/lib/libc/string
Module Name:src Committed By: christos Date: Tue Jan 10 20:35:49 UTC 2017 Modified Files: src/tests/lib/libc/string: t_strerror.c Log Message: add To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/string/t_strerror.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/lib/libc/string/t_strerror.c diff -u src/tests/lib/libc/string/t_strerror.c:1.3 src/tests/lib/libc/string/t_strerror.c:1.4 --- src/tests/lib/libc/string/t_strerror.c:1.3 Tue May 10 02:55:27 2011 +++ src/tests/lib/libc/string/t_strerror.c Tue Jan 10 15:35:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */ +/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,10 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $"); +__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $"); #include #include +#include /* Needed for sys_nerr on FreeBSD */ #include #include #include
CVS commit: src/sys/netinet
Module Name:src Committed By: christos Date: Tue Jan 10 20:32:27 UTC 2017 Modified Files: src/sys/netinet: tcp.h Log Message: add a couple of lint comments. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/netinet/tcp.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.h diff -u src/sys/netinet/tcp.h:1.32 src/sys/netinet/tcp.h:1.33 --- src/sys/netinet/tcp.h:1.32 Sun Jan 1 20:18:42 2017 +++ src/sys/netinet/tcp.h Tue Jan 10 15:32:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp.h,v 1.32 2017/01/02 01:18:42 christos Exp $ */ +/* $NetBSD: tcp.h,v 1.33 2017/01/10 20:32:27 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -160,7 +160,9 @@ struct tcp_info { uint8_t __tcpi_probes; uint8_t __tcpi_backoff; uint8_t tcpi_options; /* Options enabled on conn. */ + /*LINTED: non-portable bitfield*/ uint8_t tcpi_snd_wscale:4, /* RFC1323 send shift value. */ + /*LINTED: non-portable bitfield*/ tcpi_rcv_wscale:4; /* RFC1323 recv shift value. */ uint32_t tcpi_rto; /* Retransmission timeout (usec). */
CVS commit: src/libexec/atrun
Module Name:src Committed By: christos Date: Tue Jan 10 20:29:48 UTC 2017 Modified Files: src/libexec/atrun: atrun.c Log Message: missing include. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/libexec/atrun/atrun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/atrun/atrun.c diff -u src/libexec/atrun/atrun.c:1.22 src/libexec/atrun/atrun.c:1.23 --- src/libexec/atrun/atrun.c:1.22 Sat Mar 12 19:32:09 2016 +++ src/libexec/atrun/atrun.c Tue Jan 10 15:29:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: atrun.c,v 1.22 2016/03/13 00:32:09 dholland Exp $ */ +/* $NetBSD: atrun.c,v 1.23 2017/01/10 20:29:48 christos Exp $ */ /* * atrun.c - run jobs queued by at; run with root privileges. @@ -28,6 +28,7 @@ /* System Headers */ #include #include +#include #include #include @@ -58,7 +59,7 @@ #if 0 static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $"; #else -__RCSID("$NetBSD: atrun.c,v 1.22 2016/03/13 00:32:09 dholland Exp $"); +__RCSID("$NetBSD: atrun.c,v 1.23 2017/01/10 20:29:48 christos Exp $"); #endif static int debug = 0;
CVS commit: src/lib/libc/string
Module Name:src Committed By: christos Date: Tue Jan 10 20:25:48 UTC 2017 Modified Files: src/lib/libc/string: strerror_r.c Log Message: PR/51814: Ngie Cooper: add since sys_nerr is declared there on FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/string/strerror_r.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/string/strerror_r.c diff -u src/lib/libc/string/strerror_r.c:1.3 src/lib/libc/string/strerror_r.c:1.4 --- src/lib/libc/string/strerror_r.c:1.3 Mon Aug 19 09:03:12 2013 +++ src/lib/libc/string/strerror_r.c Tue Jan 10 15:25:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: strerror_r.c,v 1.3 2013/08/19 13:03:12 joerg Exp $ */ +/* $NetBSD: strerror_r.c,v 1.4 2017/01/10 20:25:48 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -30,13 +30,14 @@ */ #include -__RCSID("$NetBSD: strerror_r.c,v 1.3 2013/08/19 13:03:12 joerg Exp $"); +__RCSID("$NetBSD: strerror_r.c,v 1.4 2017/01/10 20:25:48 christos Exp $"); #include "namespace.h" #include #include #include #include +#include /* for sys_nerr on FreeBSD */ #ifdef NLS #include #include
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: christos Date: Tue Jan 10 20:08:52 UTC 2017 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: Needed that it got in the past by side-effect loading of from . Go figure. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/dev/wscons/wsconsio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.115 src/sys/dev/wscons/wsconsio.h:1.116 --- src/sys/dev/wscons/wsconsio.h:1.115 Fri Jun 10 17:26:43 2016 +++ src/sys/dev/wscons/wsconsio.h Tue Jan 10 15:08:52 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.115 2016/06/10 21:26:43 macallan Exp $ */ +/* $NetBSD: wsconsio.h,v 1.116 2017/01/10 20:08:52 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -46,6 +46,7 @@ #include #include +#include #include
CVS commit: src/external/cddl/osnet
Module Name:src Committed By: christos Date: Tue Jan 10 19:20:35 UTC 2017 Modified Files: src/external/cddl/osnet/dist/lib/libzfs/common: libzfs.h libzfs_pool.c src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: dmu.h spa.h src/external/cddl/osnet/include: devid.h src/external/cddl/osnet/lib/libzfs: deviceid.c src/external/cddl/osnet/sys/sys: zfs_context.h Log Message: fix a few warnings. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/dmu.h cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/spa.h cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/include/devid.h cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/lib/libzfs/deviceid.c cvs rdiff -u -r1.17 -r1.18 src/external/cddl/osnet/sys/sys/zfs_context.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h diff -u src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h:1.1.1.2 src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h:1.2 --- src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h:1.1.1.2 Sat Feb 27 17:30:17 2010 +++ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs.h Tue Jan 10 14:20:34 2017 @@ -198,7 +198,7 @@ extern zpool_handle_t *zpool_open_canfai extern void zpool_close(zpool_handle_t *); extern const char *zpool_get_name(zpool_handle_t *); extern int zpool_get_state(zpool_handle_t *); -extern char *zpool_state_to_name(vdev_state_t, vdev_aux_t); +extern const char *zpool_state_to_name(vdev_state_t, vdev_aux_t); extern void zpool_free_handles(libzfs_handle_t *); /* Index: src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c diff -u src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c:1.3 src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c:1.4 --- src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c:1.3 Sat Feb 27 18:43:53 2010 +++ src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_pool.c Tue Jan 10 14:20:34 2017 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "zfs_namecheck.h" @@ -168,14 +169,14 @@ zpool_get_prop_string(zpool_handle_t *zh verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); } else { source = ZPROP_SRC_DEFAULT; - if ((value = (char *)zpool_prop_default_string(prop)) == NULL) - value = "-"; + if ((value = __UNCONST(zpool_prop_default_string(prop))) == NULL) + value = __UNCONST("-"); } if (src) *src = source; - return (value); + return value; } uint64_t @@ -220,7 +221,7 @@ zpool_get_prop_int(zpool_handle_t *zhp, /* * Map VDEV STATE to printed strings. */ -char * +const char * zpool_state_to_name(vdev_state_t state, vdev_aux_t aux) { switch (state) { @@ -242,9 +243,10 @@ zpool_state_to_name(vdev_state_t state, return (gettext("DEGRADED")); case VDEV_STATE_HEALTHY: return (gettext("ONLINE")); + case VDEV_STATE_UNKNOWN: + default: + return (gettext("UNKNOWN")); } - - return (gettext("UNKNOWN")); } /* @@ -274,7 +276,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_GUID: intval = zpool_get_prop_int(zhp, prop, &src); - (void) snprintf(buf, len, "%llu", intval); + (void) snprintf(buf, len, "%" PRIu64, intval); break; case ZPOOL_PROP_ALTROOT: @@ -320,14 +322,14 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo break; case ZPOOL_PROP_CAPACITY: - (void) snprintf(buf, len, "%llu%%", - (u_longlong_t)intval); + (void) snprintf(buf, len, "%ju%%", + (uintmax_t)intval); break; case ZPOOL_PROP_DEDUPRATIO: - (void) snprintf(buf, len, "%llu.%02llux", - (u_longlong_t)(intval / 100), - (u_longlong_t)(intval % 100)); + (void) snprintf(buf, len, "%ju.%02jux", + (uintmax_t)(intval / 100), + (uintmax_t)(intval % 100)); break; case ZPOOL_PROP_HEALTH: @@ -340,7 +342,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo vs->vs_aux), len); break; default: - (void) snprintf(buf, len, "%llu", intval); + (void) snprintf(buf, len, "%ju", (uintmax_t)intval); } break; @@ -585,6 +587,22 @@ zpool_valid_proplist(libzfs_handle_t *hd *slash = '/'; break; + case ZPOOL_PROP_FREE: + case ZPOOL_PROP_ALLOCATED: + case ZPOOL_NUM_PROPS: + case ZPOOL_PROP_AUTOEXPAND: + case ZPOOL_PROP_DEDUPDITTO: + case ZPOOL_PROP_SIZE: + case ZPOOL_PROP_CAPACITY: + case ZPOOL_PROP_HEALTH: + case ZPOOL_PROP_GUID: + case ZPOOL_PROP_DELEGATION: + case ZPOOL_PROP_AUTOREPLACE: + case ZPOOL_PROP_FAILUREMODE: + case ZPOOL_PROP_LISTSNAPS: + case ZPOOL_PROP_DEDUPRATIO: + case ZPOOL_PROP_NAME: + break; } } @@ -764,7 +782,10 @
CVS commit: src/lib/libc/net
Module Name:src Committed By: christos Date: Tue Jan 10 17:51:01 UTC 2017 Modified Files: src/lib/libc/net: getaddrinfo.c Log Message: KNF, simplify expressions for readability. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/lib/libc/net/getaddrinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/getaddrinfo.c diff -u src/lib/libc/net/getaddrinfo.c:1.114 src/lib/libc/net/getaddrinfo.c:1.115 --- src/lib/libc/net/getaddrinfo.c:1.114 Sat Feb 6 14:33:07 2016 +++ src/lib/libc/net/getaddrinfo.c Tue Jan 10 12:51:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.114 2016/02/06 19:33:07 riastradh Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.115 2017/01/10 17:51:01 christos Exp $ */ /* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */ /* @@ -55,7 +55,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getaddrinfo.c,v 1.114 2016/02/06 19:33:07 riastradh Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.115 2017/01/10 17:51:01 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -109,6 +109,9 @@ __weak_alias(gai_strerror,_gai_strerror) #define YES 1 #define NO 0 +#define sa4addr(sa) ((void *)&((struct sockaddr_in *)(void *)sa)->sin_addr) +#define sa6addr(sa) ((void *)&((struct sockaddr_in6 *)(void *)sa)->sin6_addr) + static const char in_addrany[] = { 0, 0, 0, 0 }; static const char in_loopback[] = { 127, 0, 0, 1 }; #ifdef INET6 @@ -711,11 +714,11 @@ reorder(struct addrinfo *sentinel, struc * If the number is small enough, we can skip the reordering process. */ if (n <= 1) - return(n); + return n; /* allocate a temporary array for sort and initialization of it. */ if ((aio = malloc(sizeof(*aio) * n)) == NULL) - return(n); /* give up reordering */ + return n; /* give up reordering */ memset(aio, 0, sizeof(*aio) * n); /* retrieve address selection policy from the kernel */ @@ -723,7 +726,7 @@ reorder(struct addrinfo *sentinel, struc if (!get_addrselectpolicy(&policyhead)) { /* no policy is installed into kernel, we don't sort. */ free(aio); - return (n); + return n; } for (i = 0, ai = sentinel->ai_next; i < n; ai = ai->ai_next, i++) { @@ -747,31 +750,33 @@ reorder(struct addrinfo *sentinel, struc /* cleanup and return */ free(aio); free_addrselectpolicy(&policyhead); - return(n); + return n; } static int get_addrselectpolicy(struct policyhead *head) { #ifdef INET6 - int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; + static const int mib[] = { + CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; + static const u_int miblen = (u_int)__arraycount(mib); size_t l; char *buf; struct in6_addrpolicy *pol, *ep; - if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) - return (0); + if (sysctl(mib, miblen, NULL, &l, NULL, 0) < 0) + return 0; if (l == 0) - return (0); + return 0; if ((buf = malloc(l)) == NULL) - return (0); - if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) { + return 0; + if (sysctl(mib, miblen, buf, &l, NULL, 0) < 0) { free(buf); - return (0); + return 0; } - ep = (struct in6_addrpolicy *)(buf + l); - for (pol = (struct in6_addrpolicy *)buf; pol + 1 <= ep; pol++) { + ep = (void *)(buf + l); + for (pol = (void *)buf; pol + 1 <= ep; pol++) { struct policyqueue *new; if ((new = malloc(sizeof(*new))) == NULL) { @@ -783,9 +788,9 @@ get_addrselectpolicy(struct policyhead * } free(buf); - return (1); + return 1; #else - return (0); + return 0; #endif } @@ -808,12 +813,13 @@ match_addrselectpolicy(struct sockaddr * struct policyqueue *ent, *bestent = NULL; struct in6_addrpolicy *pol; int curmatchlen, bestmatchlen = -1; - u_char *mp, *ep, *k, *p, m; + u_char *mp, *ep, *k, *p; + u_int m; struct sockaddr_in6 key; switch(addr->sa_family) { case AF_INET6: - key = *(struct sockaddr_in6 *)addr; + memcpy(&key, addr, sizeof(key)); break; case AF_INET: /* convert the address into IPv4-mapped IPv6 address. */ @@ -822,21 +828,20 @@ match_addrselectpolicy(struct sockaddr * key.sin6_len = sizeof(key); key.sin6_addr.s6_addr[10] = 0xff; key.sin6_addr.s6_addr[11] = 0xff; - memcpy(&key.sin6_addr.s6_addr[12], - &((struct sockaddr_in *)addr)->sin_addr, 4); + memcpy(&key.sin6_addr.s6_addr[12], sa4addr(addr), 4); break; default: - return(NULL); + return NULL; } for (ent = TAILQ_FIRST(head); ent; ent = TAILQ_NEXT(ent, pc_entry)) { pol = &ent->pc_policy; curmatchlen = 0; - mp = (u_char *)&pol->addrmask.sin6_addr; + mp = (void *)&pol->addrmask.sin6_addr; ep = mp + 16; /* XXX: scope field? */ - k = (u_char *)&key.sin6_addr; - p = (u_char *)&pol->addr.sin6_addr; + k = (void *)&key.sin6_addr; + p = (void *)&pol->addr.sin6_addr; for (; mp < ep && *mp; mp++, k++, p++) { m =
CVS commit: src/lib/libc/locale
Module Name:src Committed By: christos Date: Tue Jan 10 17:50:24 UTC 2017 Modified Files: src/lib/libc/locale: nl_langinfo.c Log Message: pacify lint. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/locale/nl_langinfo.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/locale/nl_langinfo.c diff -u src/lib/libc/locale/nl_langinfo.c:1.17 src/lib/libc/locale/nl_langinfo.c:1.18 --- src/lib/libc/locale/nl_langinfo.c:1.17 Tue Aug 20 15:58:30 2013 +++ src/lib/libc/locale/nl_langinfo.c Tue Jan 10 12:50:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: nl_langinfo.c,v 1.17 2013/08/20 19:58:30 joerg Exp $ */ +/* $NetBSD: nl_langinfo.c,v 1.18 2017/01/10 17:50:24 christos Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: nl_langinfo.c,v 1.17 2013/08/20 19:58:30 joerg Exp $"); +__RCSID("$NetBSD: nl_langinfo.c,v 1.18 2017/01/10 17:50:24 christos Exp $"); #include "namespace.h" #include @@ -102,59 +102,61 @@ static const char langinfo_category[] = [ ALT_DIGITS ] = 0, }; +#define offsetofu16(a, b) ((uint16_t)offsetof(a, b)) + static const uint16_t langinfo_offset[] = { -[ D_T_FMT ] = offsetof(_TimeLocale, d_t_fmt), -[ D_FMT ] = offsetof(_TimeLocale, d_fmt), -[ T_FMT ] = offsetof(_TimeLocale, t_fmt), -[ T_FMT_AMPM ] = offsetof(_TimeLocale, t_fmt_ampm), -[ AM_STR ] = offsetof(_TimeLocale, am_pm[0]), -[ PM_STR ] = offsetof(_TimeLocale, am_pm[1]), -[ DAY_1 ] = offsetof(_TimeLocale, day[0]), -[ DAY_2 ] = offsetof(_TimeLocale, day[1]), -[ DAY_3 ] = offsetof(_TimeLocale, day[2]), -[ DAY_4 ] = offsetof(_TimeLocale, day[3]), -[ DAY_5 ] = offsetof(_TimeLocale, day[4]), -[ DAY_6 ] = offsetof(_TimeLocale, day[5]), -[ DAY_7 ] = offsetof(_TimeLocale, day[6]), -[ ABDAY_1 ] = offsetof(_TimeLocale, abday[0]), -[ ABDAY_2 ] = offsetof(_TimeLocale, abday[1]), -[ ABDAY_3 ] = offsetof(_TimeLocale, abday[2]), -[ ABDAY_4 ] = offsetof(_TimeLocale, abday[3]), -[ ABDAY_5 ] = offsetof(_TimeLocale, abday[4]), -[ ABDAY_6 ] = offsetof(_TimeLocale, abday[5]), -[ ABDAY_7 ] = offsetof(_TimeLocale, abday[6]), -[ MON_1 ] = offsetof(_TimeLocale, mon[0]), -[ MON_2 ] = offsetof(_TimeLocale, mon[1]), -[ MON_3 ] = offsetof(_TimeLocale, mon[2]), -[ MON_4 ] = offsetof(_TimeLocale, mon[3]), -[ MON_5 ] = offsetof(_TimeLocale, mon[4]), -[ MON_6 ] = offsetof(_TimeLocale, mon[5]), -[ MON_7 ] = offsetof(_TimeLocale, mon[6]), -[ MON_8 ] = offsetof(_TimeLocale, mon[7]), -[ MON_9 ] = offsetof(_TimeLocale, mon[8]), -[ MON_10 ] = offsetof(_TimeLocale, mon[9]), -[ MON_11 ] = offsetof(_TimeLocale, mon[10]), -[ MON_12 ] = offsetof(_TimeLocale, mon[11]), -[ ABMON_1 ] = offsetof(_TimeLocale, abmon[0]), -[ ABMON_2 ] = offsetof(_TimeLocale, abmon[1]), -[ ABMON_3 ] = offsetof(_TimeLocale, abmon[2]), -[ ABMON_4 ] = offsetof(_TimeLocale, abmon[3]), -[ ABMON_5 ] = offsetof(_TimeLocale, abmon[4]), -[ ABMON_6 ] = offsetof(_TimeLocale, abmon[5]), -[ ABMON_7 ] = offsetof(_TimeLocale, abmon[6]), -[ ABMON_8 ] = offsetof(_TimeLocale, abmon[7]), -[ ABMON_9 ] = offsetof(_TimeLocale, abmon[8]), -[ ABMON_10 ] = offsetof(_TimeLocale, abmon[9]), -[ ABMON_11 ] = offsetof(_TimeLocale, abmon[10]), -[ ABMON_12 ] = offsetof(_TimeLocale, abmon[11]), -[ RADIXCHAR ] = offsetof(_NumericLocale, decimal_point), -[ THOUSEP ] = offsetof(_NumericLocale, thousands_sep), -[ YESSTR ] = offsetof(_MessagesLocale, yesstr), -[ YESEXPR ] = offsetof(_MessagesLocale, yesexpr), -[ NOSTR ] = offsetof(_MessagesLocale, nostr), -[ NOEXPR ] = offsetof(_MessagesLocale, noexpr), +[ D_T_FMT ] = offsetofu16(_TimeLocale, d_t_fmt), +[ D_FMT ] = offsetofu16(_TimeLocale, d_fmt), +[ T_FMT ] = offsetofu16(_TimeLocale, t_fmt), +[ T_FMT_AMPM ] = offsetofu16(_TimeLocale, t_fmt_ampm), +[ AM_STR ] = offsetofu16(_TimeLocale, am_pm[0]), +[ PM_STR ] = offsetofu16(_TimeLocale, am_pm[1]), +[ DAY_1 ] = offsetofu16(_TimeLocale, day[0]), +[ DAY_2 ] = offsetofu16(_TimeLocale, day[1]), +[ DAY_3 ] = offsetofu16(_TimeLocale, day[2]), +[ DAY_4 ] = offsetofu16(_TimeLocale, day[3]), +[ DAY_5 ] = offsetofu16(_TimeLocale, day[4]), +[ DAY_6 ] = offsetofu16(_TimeLocale, day[5]), +[ DAY_7 ] = offsetofu16(_TimeLocale, day[6]), +[ ABDAY_1 ] = offsetofu16(_TimeLocale, abday[0]), +[ ABDAY_2 ] = offsetofu16(_TimeLocale, abday[1]), +[ ABDAY_3 ] = offsetofu16(_TimeLocale, abday[2]), +[ ABDAY_4 ] = offsetofu16(_TimeLocale, abday[3]), +[ ABDAY_5 ] = offsetofu16(_TimeLocale, abday[4]), +[ ABDAY_6 ] = offsetofu16(_TimeLocale, abday[5]), +[ ABDAY_7 ] = offsetofu16(_TimeLocale, abday[6]), +[ MON_1 ] = offsetofu16(_TimeLocale, mon[0]), +[ MON_2 ] = offsetofu16(_TimeLocale, mon[1]),
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 17:46:47 UTC 2017 Modified Files: src/lib/libc/gen: sysctl.c Log Message: simplify cast. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/lib/libc/gen/sysctl.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/gen/sysctl.c diff -u src/lib/libc/gen/sysctl.c:1.35 src/lib/libc/gen/sysctl.c:1.36 --- src/lib/libc/gen/sysctl.c:1.35 Thu Feb 5 11:05:20 2015 +++ src/lib/libc/gen/sysctl.c Tue Jan 10 12:46:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $ */ +/* $NetBSD: sysctl.c,v 1.36 2017/01/10 17:46:47 christos Exp $ */ /*- * Copyright (c) 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94"; #else -__RCSID("$NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.36 2017/01/10 17:46:47 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -313,7 +313,7 @@ user_sysctl(const int *name, unsigned in if (d2 != NULL) memcpy(d2, d1, d); sz += d; - d2 = (struct sysctldesc *)(void *)((char *)d2 + d); + d2 = (void *)((char *)(void *)d2 + d); if (node != NULL) break; }
CVS commit: src/lib/libc/hash
Module Name:src Committed By: christos Date: Tue Jan 10 17:46:26 UTC 2017 Modified Files: src/lib/libc/hash: hmac.c Log Message: add missing cast. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/hash/hmac.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/hash/hmac.c diff -u src/lib/libc/hash/hmac.c:1.3 src/lib/libc/hash/hmac.c:1.4 --- src/lib/libc/hash/hmac.c:1.3 Fri Jul 1 18:41:39 2016 +++ src/lib/libc/hash/hmac.c Tue Jan 10 12:46:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hmac.c,v 1.3 2016/07/01 22:41:39 christos Exp $ */ +/* $NetBSD: hmac.c,v 1.4 2017/01/10 17:46:26 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: hmac.c,v 1.3 2016/07/01 22:41:39 christos Exp $"); +__RCSID("$NetBSD: hmac.c,v 1.4 2017/01/10 17:46:26 christos Exp $"); #include #include @@ -153,7 +153,7 @@ hmac(const char *name, (*h->final)(p, c); (*h->init)(c); - (*h->update)(c, opad, h->blocksize); + (*h->update)(c, opad, (unsigned int)h->blocksize); (*h->update)(c, digest, (unsigned int)h->digsize); (*h->final)(p, c);
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 17:45:58 UTC 2017 Modified Files: src/lib/libc/gen: asysctl.c Log Message: cast for size_t To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/asysctl.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/gen/asysctl.c diff -u src/lib/libc/gen/asysctl.c:1.1 src/lib/libc/gen/asysctl.c:1.2 --- src/lib/libc/gen/asysctl.c:1.1 Fri Jun 13 11:45:05 2014 +++ src/lib/libc/gen/asysctl.c Tue Jan 10 12:45:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: asysctl.c,v 1.1 2014/06/13 15:45:05 joerg Exp $ */ +/* $NetBSD: asysctl.c,v 1.2 2017/01/10 17:45:58 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: asysctl.c,v 1.1 2014/06/13 15:45:05 joerg Exp $"); +__RCSID("$NetBSD: asysctl.c,v 1.2 2017/01/10 17:45:58 christos Exp $"); #include "namespace.h" #include @@ -50,7 +50,7 @@ asysctl(const int *oids, size_t oidlen, data = NULL; for (;;) { - if (sysctl(oids, oidlen, data, len, NULL, 0) == 0) { + if (sysctl(oids, (u_int)oidlen, data, len, NULL, 0) == 0) { if (*len == 0) { free(data); return NULL;
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Jan 10 17:45:12 UTC 2017 Modified Files: src/lib/libc/stdio: gettemp.c vdprintf.c Log Message: include To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/stdio/gettemp.c cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdio/vdprintf.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/stdio/gettemp.c diff -u src/lib/libc/stdio/gettemp.c:1.20 src/lib/libc/stdio/gettemp.c:1.21 --- src/lib/libc/stdio/gettemp.c:1.20 Thu Feb 5 11:05:20 2015 +++ src/lib/libc/stdio/gettemp.c Tue Jan 10 12:45:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $ */ +/* $NetBSD: gettemp.c,v 1.21 2017/01/10 17:45:12 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -38,11 +38,12 @@ #if 0 static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $"); +__RCSID("$NetBSD: gettemp.c,v 1.21 2017/01/10 17:45:12 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include +#include #include #include Index: src/lib/libc/stdio/vdprintf.c diff -u src/lib/libc/stdio/vdprintf.c:1.4 src/lib/libc/stdio/vdprintf.c:1.5 --- src/lib/libc/stdio/vdprintf.c:1.4 Fri May 17 08:55:57 2013 +++ src/lib/libc/stdio/vdprintf.c Tue Jan 10 12:45:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vdprintf.c,v 1.4 2013/05/17 12:55:57 joerg Exp $ */ +/* $NetBSD: vdprintf.c,v 1.5 2017/01/10 17:45:12 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -34,11 +34,12 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vdprintf.c,v 1.4 2013/05/17 12:55:57 joerg Exp $"); +__RCSID("$NetBSD: vdprintf.c,v 1.5 2017/01/10 17:45:12 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include +#include #include #include
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: christos Date: Tue Jan 10 17:45:27 UTC 2017 Modified Files: src/lib/libc/rpc: svc_run.c Log Message: use correct type for poll To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/rpc/svc_run.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/rpc/svc_run.c diff -u src/lib/libc/rpc/svc_run.c:1.27 src/lib/libc/rpc/svc_run.c:1.28 --- src/lib/libc/rpc/svc_run.c:1.27 Tue Nov 10 15:56:20 2015 +++ src/lib/libc/rpc/svc_run.c Tue Jan 10 12:45:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: svc_run.c,v 1.27 2015/11/10 20:56:20 christos Exp $ */ +/* $NetBSD: svc_run.c,v 1.28 2017/01/10 17:45:27 christos Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -37,7 +37,7 @@ static char *sccsid = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro"; static char *sccsid = "@(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC"; #else -__RCSID("$NetBSD: svc_run.c,v 1.27 2015/11/10 20:56:20 christos Exp $"); +__RCSID("$NetBSD: svc_run.c,v 1.28 2017/01/10 17:45:27 christos Exp $"); #endif #endif @@ -169,7 +169,7 @@ svc_run_poll(void) rwlock_unlock(&svc_fd_lock); - switch ((i = poll(pfd, (size_t)*maxfd, 30 * 1000))) { + switch ((i = poll(pfd, (nfds_t)*maxfd, 30 * 1000))) { case -1: #ifndef RUMP_RPC if ((errno == EINTR || errno == EBADF) && probs < 100) {
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Jan 10 17:44:28 UTC 2017 Modified Files: src/lib/libc/stdio: fseeko.c Log Message: add linted comment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/fseeko.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/stdio/fseeko.c diff -u src/lib/libc/stdio/fseeko.c:1.13 src/lib/libc/stdio/fseeko.c:1.14 --- src/lib/libc/stdio/fseeko.c:1.13 Sun Oct 19 07:17:43 2014 +++ src/lib/libc/stdio/fseeko.c Tue Jan 10 12:44:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fseeko.c,v 1.13 2014/10/19 11:17:43 justin Exp $ */ +/* $NetBSD: fseeko.c,v 1.14 2017/01/10 17:44:28 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -34,7 +34,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fseeko.c,v 1.13 2014/10/19 11:17:43 justin Exp $"); +__RCSID("$NetBSD: fseeko.c,v 1.14 2017/01/10 17:44:28 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -130,6 +130,7 @@ fseeko(FILE *fp, off_t offset, int whenc FUNLOCKFILE(fp); return -1; } + /*FALLTHROUGH*/ case SEEK_END: curoff = 0; /* XXX just to keep gcc quiet */ havepos = 0;
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Tue Jan 10 17:44:51 UTC 2017 Modified Files: src/lib/libc/time: difftime.c Log Message: add constcond To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/time/difftime.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/difftime.c diff -u src/lib/libc/time/difftime.c:1.16 src/lib/libc/time/difftime.c:1.17 --- src/lib/libc/time/difftime.c:1.16 Thu Aug 13 07:21:18 2015 +++ src/lib/libc/time/difftime.c Tue Jan 10 12:44:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: difftime.c,v 1.16 2015/08/13 11:21:18 christos Exp $ */ +/* $NetBSD: difftime.c,v 1.17 2017/01/10 17:44:51 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)difftime.c 8.1"; #else -__RCSID("$NetBSD: difftime.c,v 1.16 2015/08/13 11:21:18 christos Exp $"); +__RCSID("$NetBSD: difftime.c,v 1.17 2017/01/10 17:44:51 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -32,6 +32,7 @@ difftime(time_t time1, time_t time0) ** If double is large enough, simply convert and subtract ** (assuming that the larger type has more precision). */ + /*CONSTCOND*/ if (sizeof (time_t) < sizeof (double)) { double t1 = time1, t0 = time0; return t1 - t0; @@ -45,6 +46,7 @@ difftime(time_t time1, time_t time0) return time0 <= time1 ? time1 - time0 : dminus(time0 - time1); /* Use uintmax_t if wide enough. */ + /*CONSTCOND*/ if (sizeof (time_t) <= sizeof (uintmax_t)) { uintmax_t t1 = time1, t0 = time0; return time0 <= time1 ? t1 - t0 : dminus(t0 - t1);
CVS commit: src/share/mk
Module Name:src Committed By: maya Date: Tue Jan 10 17:16:20 UTC 2017 Modified Files: src/share/mk: bsd.sys.mk Log Message: -Wa,--fatal-warnings is a GCC flag and unknown to clang. make it GCC specific, so we can (try to) build a kernel with higher WARNS using clang. To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.263 src/share/mk/bsd.sys.mk:1.264 --- src/share/mk/bsd.sys.mk:1.263 Sat Dec 24 17:44:22 2016 +++ src/share/mk/bsd.sys.mk Tue Jan 10 17:16:19 2017 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.263 2016/12/24 17:44:22 christos Exp $ +# $NetBSD: bsd.sys.mk,v 1.264 2017/01/10 17:16:19 maya Exp $ # # Build definitions used for NetBSD source tree builds. @@ -56,7 +56,7 @@ CFLAGS+= -Wno-sign-compare CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-traditional :} .if !defined(NOGCCERROR) # Set assembler warnings to be fatal -CFLAGS+= -Wa,--fatal-warnings +CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wa,--fatal-warnings :} .endif .if ${MKRELRO:Uno} != "no"
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Jan 10 17:00:58 UTC 2017 Modified Files: src/lib/libc/stdio: fdopen.c Log Message: Need To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/fdopen.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/stdio/fdopen.c diff -u src/lib/libc/stdio/fdopen.c:1.16 src/lib/libc/stdio/fdopen.c:1.17 --- src/lib/libc/stdio/fdopen.c:1.16 Thu Mar 15 14:22:30 2012 +++ src/lib/libc/stdio/fdopen.c Tue Jan 10 12:00:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdopen.c,v 1.16 2012/03/15 18:22:30 christos Exp $ */ +/* $NetBSD: fdopen.c,v 1.17 2017/01/10 17:00:58 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,12 +37,14 @@ #if 0 static char sccsid[] = "@(#)fdopen.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: fdopen.c,v 1.16 2012/03/15 18:22:30 christos Exp $"); +__RCSID("$NetBSD: fdopen.c,v 1.17 2017/01/10 17:00:58 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include "namespace.h" + #include +#include #include #include
CVS commit: src/lib/libc/citrus
Module Name:src Committed By: christos Date: Tue Jan 10 16:51:30 UTC 2017 Modified Files: src/lib/libc/citrus: citrus_mmap.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/citrus/citrus_mmap.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/citrus/citrus_mmap.c diff -u src/lib/libc/citrus/citrus_mmap.c:1.4 src/lib/libc/citrus/citrus_mmap.c:1.5 --- src/lib/libc/citrus/citrus_mmap.c:1.4 Sat Oct 15 19:00:01 2011 +++ src/lib/libc/citrus/citrus_mmap.c Tue Jan 10 11:51:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_mmap.c,v 1.4 2011/10/15 23:00:01 christos Exp $ */ +/* $NetBSD: citrus_mmap.c,v 1.5 2017/01/10 16:51:30 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -28,10 +28,14 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: citrus_mmap.c,v 1.4 2011/10/15 23:00:01 christos Exp $"); +__RCSID("$NetBSD: citrus_mmap.c,v 1.5 2017/01/10 16:51:30 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" + +#include +#include + #include #include #include @@ -40,7 +44,6 @@ __RCSID("$NetBSD: citrus_mmap.c,v 1.4 20 #include #include #include -#include #include "citrus_namespace.h" #include "citrus_region.h"
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: maya Date: Tue Jan 10 15:43:59 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_sleep.c Log Message: remove duplicate include. (also move so it is alphabetical, hence the weird diff) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/gen/t_sleep.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/lib/libc/gen/t_sleep.c diff -u src/tests/lib/libc/gen/t_sleep.c:1.10 src/tests/lib/libc/gen/t_sleep.c:1.11 --- src/tests/lib/libc/gen/t_sleep.c:1.10 Tue Jan 10 15:31:11 2017 +++ src/tests/lib/libc/gen/t_sleep.c Tue Jan 10 15:43:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.10 2017/01/10 15:31:11 christos Exp $ */ +/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -33,12 +33,11 @@ #include #include +#include #include #include #include -#include #include -#include #include #include
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:32:46 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_time.c Log Message: PR/51812: Ngie Cooper: According to ToG gettimeofday() needs To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_time.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/lib/libc/gen/t_time.c diff -u src/tests/lib/libc/gen/t_time.c:1.3 src/tests/lib/libc/gen/t_time.c:1.4 --- src/tests/lib/libc/gen/t_time.c:1.3 Fri Oct 31 08:22:38 2014 +++ src/tests/lib/libc/gen/t_time.c Tue Jan 10 10:32:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */ +/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); +__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $"); #include #include @@ -38,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10 #include #include #include +#include #include ATF_TC(time_copy);
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:31:11 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_sleep.c Log Message: PR/51811: Ngie Cooper: Fix include file portability. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/gen/t_sleep.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/lib/libc/gen/t_sleep.c diff -u src/tests/lib/libc/gen/t_sleep.c:1.9 src/tests/lib/libc/gen/t_sleep.c:1.10 --- src/tests/lib/libc/gen/t_sleep.c:1.9 Thu Aug 11 17:34:11 2016 +++ src/tests/lib/libc/gen/t_sleep.c Tue Jan 10 10:31:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */ +/* $NetBSD: t_sleep.c,v 1.10 2017/01/10 15:31:11 christos Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -26,19 +26,22 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include +#include +#include /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include #include #include #include #include +#include #include +#include #include #include -#include -#include -#include - #include "isqemu.h" #define BILLION 10LL /* nano-seconds per second */
CVS commit: src/tests/lib/libc/string
Module Name:src Committed By: christos Date: Tue Jan 10 15:34:49 UTC 2017 Modified Files: src/tests/lib/libc/string: t_strchr.c Log Message: PR/51815: Ngie Cooper: don't leak dlopen'ed handle To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_strchr.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/lib/libc/string/t_strchr.c diff -u src/tests/lib/libc/string/t_strchr.c:1.1 src/tests/lib/libc/string/t_strchr.c:1.2 --- src/tests/lib/libc/string/t_strchr.c:1.1 Thu Jul 7 04:59:33 2011 +++ src/tests/lib/libc/string/t_strchr.c Tue Jan 10 10:34:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */ +/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */ /* * Written by J.T. Conklin @@ -58,9 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { - unsigned int t, a; + void *dl_handle; char *off; char buf[32]; + unsigned int t, a; const char *tab[] = { "", @@ -245,8 +246,8 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; - - strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); + dl_handle = dlopen(NULL, RTLD_LAZY); + strchr_fn = dlsym(dl_handle, "test_strlen"); if (!strchr_fn) strchr_fn = strchr; @@ -281,6 +282,7 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } + (void)dlclose(dl_handle); } ATF_TP_ADD_TCS(tp)
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:33:40 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_ttyname.c Log Message: PR/51813: Ngie Cooper: don't leak fd :ttyname_err To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_ttyname.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/lib/libc/gen/t_ttyname.c diff -u src/tests/lib/libc/gen/t_ttyname.c:1.3 src/tests/lib/libc/gen/t_ttyname.c:1.4 --- src/tests/lib/libc/gen/t_ttyname.c:1.3 Sun May 1 14:14:01 2011 +++ src/tests/lib/libc/gen/t_ttyname.c Tue Jan 10 10:33:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */ +/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $"); +__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $"); #include #include @@ -78,6 +78,7 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); + (void)close(fd); } }
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:20:44 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_humanize_number.c Log Message: PR/51810: Ngie Cooper: don't leak buf To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/gen/t_humanize_number.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/lib/libc/gen/t_humanize_number.c diff -u src/tests/lib/libc/gen/t_humanize_number.c:1.8 src/tests/lib/libc/gen/t_humanize_number.c:1.9 --- src/tests/lib/libc/gen/t_humanize_number.c:1.8 Sun Mar 18 03:14:08 2012 +++ src/tests/lib/libc/gen/t_humanize_number.c Tue Jan 10 10:20:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */ +/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -241,6 +241,7 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } + free(buf); } ATF_TC(humanize_number_big);
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:19:52 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_ftok.c Log Message: PR/51809: Ngie Cooper: fix file descriptor leak To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_ftok.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/lib/libc/gen/t_ftok.c diff -u src/tests/lib/libc/gen/t_ftok.c:1.1 src/tests/lib/libc/gen/t_ftok.c:1.2 --- src/tests/lib/libc/gen/t_ftok.c:1.1 Tue Nov 8 00:47:00 2011 +++ src/tests/lib/libc/gen/t_ftok.c Tue Jan 10 10:19:52 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */ +/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); +__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $"); #include #include @@ -68,6 +68,7 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); + (void)close(fd); ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0);
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:19:00 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_dir.c Log Message: PR/51808: Ngie Cooper: fix leaks, sort includes, check returns To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/gen/t_dir.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/lib/libc/gen/t_dir.c diff -u src/tests/lib/libc/gen/t_dir.c:1.6 src/tests/lib/libc/gen/t_dir.c:1.7 --- src/tests/lib/libc/gen/t_dir.c:1.6 Sat Oct 19 13:45:00 2013 +++ src/tests/lib/libc/gen/t_dir.c Tue Jan 10 10:19:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.7 2017/01/10 15:19:00 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,18 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - +#include #include +#include #include #include +#include #include #include #include #include #include -#include + ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) @@ -54,10 +55,19 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; - mkdir("t", 0755); - creat("t/a", 0600); - creat("t/b", 0600); - creat("t/c", 0600); +#define CREAT(x, m) do { \ + int _creat_fd; \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))), \ + "creat(%s, %x) failed: %s", (x), (m), \ + strerror(errno));\ + (void)close(_creat_fd); \ + } while(0); + + ATF_REQUIRE_MSG(mkdir("t", 0755) == 0, + "mkdir failed: %s", strerror(errno)); + CREAT("t/a", 0600); + CREAT("t/b", 0600); + CREAT("t/c", 0600); dp = opendir("t"); if ( dp == NULL) @@ -70,6 +80,8 @@ ATF_TC_BODY(seekdir_basic, tc) /* get first entry */ entry = readdir(dp); here = telldir(dp); + ATF_REQUIRE_MSG(here != -1, + "telldir failed: %s", strerror(errno)); /* get second entry */ entry = readdir(dp); @@ -109,6 +121,7 @@ ATF_TC_BODY(seekdir_basic, tc) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); + free(wasname); } ATF_TC(telldir_leak);
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:17:57 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_assert.c Log Message: PR/51807: Ngie Cooper: disable core file generation in :assert_false, :assert_true To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_assert.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/lib/libc/gen/t_assert.c diff -u src/tests/lib/libc/gen/t_assert.c:1.2 src/tests/lib/libc/gen/t_assert.c:1.3 --- src/tests/lib/libc/gen/t_assert.c:1.2 Tue Jun 14 01:28:00 2011 +++ src/tests/lib/libc/gen/t_assert.c Tue Jan 10 10:17:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */ +/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); +__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); +#include +#include +#include #include #include @@ -40,6 +43,17 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/ #include #include +static void +disable_corefile(void) +{ + struct rlimit limits; + + limits.rlim_cur = 0; + limits.rlim_max = 0; + + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); +} + static void handler(int); static void @@ -65,6 +79,7 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { + disable_corefile(); (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -102,6 +117,7 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { + disable_corefile(); (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction));
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Jan 10 15:16:57 UTC 2017 Modified Files: src/tests/lib/libc/gen: t_vis.c Log Message: PR/51806: Ngie Cooper: Only run the vis locale test if VIS_NOLOCALE is defined To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/gen/t_vis.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/lib/libc/gen/t_vis.c diff -u src/tests/lib/libc/gen/t_vis.c:1.8 src/tests/lib/libc/gen/t_vis.c:1.9 --- src/tests/lib/libc/gen/t_vis.c:1.8 Sat May 23 10:02:11 2015 +++ src/tests/lib/libc/gen/t_vis.c Tue Jan 10 10:16:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -144,6 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc) } } +#ifdef VIS_NOLOCALE ATF_TC(strvis_locale); ATF_TC_HEAD(strvis_locale, tc) { @@ -172,6 +173,7 @@ ATF_TC_BODY(strvis_locale, tc) setlocale(LC_CTYPE, ol); free(ol); } +#endif /* VIS_NOLOCALE */ ATF_TP_ADD_TCS(tp) { @@ -180,7 +182,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strvis_null); ATF_TP_ADD_TC(tp, strvis_empty); ATF_TP_ADD_TC(tp, strunvis_hex); +#ifdef VIS_NOLOCALE ATF_TP_ADD_TC(tp, strvis_locale); +#endif /* VIS_NOLOCALE */ return atf_no_error(); }
CVS commit: src/tests/lib/libc/c063
Module Name:src Committed By: christos Date: Tue Jan 10 15:15:09 UTC 2017 Modified Files: src/tests/lib/libc/c063: t_fexecve.c t_mkfifoat.c t_mknodat.c Log Message: PR/51805: Ngie Cooper: Fix file descriptor leaks To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/c063/t_fexecve.c \ src/tests/lib/libc/c063/t_mkfifoat.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/c063/t_mknodat.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/lib/libc/c063/t_fexecve.c diff -u src/tests/lib/libc/c063/t_fexecve.c:1.2 src/tests/lib/libc/c063/t_fexecve.c:1.3 --- src/tests/lib/libc/c063/t_fexecve.c:1.2 Sun Mar 17 00:35:59 2013 +++ src/tests/lib/libc/c063/t_fexecve.c Tue Jan 10 10:15:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */ +/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $"); +__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include @@ -70,6 +70,7 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; + (void)close(fd); err(error, "fexecve"); } } Index: src/tests/lib/libc/c063/t_mkfifoat.c diff -u src/tests/lib/libc/c063/t_mkfifoat.c:1.2 src/tests/lib/libc/c063/t_mkfifoat.c:1.3 --- src/tests/lib/libc/c063/t_mkfifoat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_mkfifoat.c Tue Jan 10 10:15:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -63,6 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); + (void)close(dfd); } ATF_TC(mkfifoat_fdcwd); Index: src/tests/lib/libc/c063/t_mknodat.c diff -u src/tests/lib/libc/c063/t_mknodat.c:1.3 src/tests/lib/libc/c063/t_mknodat.c:1.4 --- src/tests/lib/libc/c063/t_mknodat.c:1.3 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_mknodat.c Tue Jan 10 10:15:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -80,6 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); + (void)close(dfd); } ATF_TC(mknodat_fdcwd);
CVS commit: src/tests/lib/libc/c063
Module Name:src Committed By: christos Date: Tue Jan 10 15:13:56 UTC 2017 Modified Files: src/tests/lib/libc/c063: t_faccessat.c t_fchmodat.c t_fchownat.c t_fstatat.c t_openat.c t_readlinkat.c t_unlinkat.c t_utimensat.c Log Message: PR/51804: Ngie Cooper: Sort headers; include . On NetBSD, gets side-loaded from . Should be fixed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/c063/t_faccessat.c \ src/tests/lib/libc/c063/t_fchmodat.c src/tests/lib/libc/c063/t_fstatat.c \ src/tests/lib/libc/c063/t_openat.c src/tests/lib/libc/c063/t_unlinkat.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/c063/t_fchownat.c \ src/tests/lib/libc/c063/t_readlinkat.c cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/c063/t_utimensat.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/lib/libc/c063/t_faccessat.c diff -u src/tests/lib/libc/c063/t_faccessat.c:1.2 src/tests/lib/libc/c063/t_faccessat.c:1.3 --- src/tests/lib/libc/c063/t_faccessat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_faccessat.c Tue Jan 10 10:13:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include -#include #define DIR "dir" #define FILE "dir/faccessat" Index: src/tests/lib/libc/c063/t_fchmodat.c diff -u src/tests/lib/libc/c063/t_fchmodat.c:1.2 src/tests/lib/libc/c063/t_fchmodat.c:1.3 --- src/tests/lib/libc/c063/t_fchmodat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_fchmodat.c Tue Jan 10 10:13:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201 #include #include #include -#include #define DIR "dir" #define FILE "dir/fchmodat" Index: src/tests/lib/libc/c063/t_fstatat.c diff -u src/tests/lib/libc/c063/t_fstatat.c:1.2 src/tests/lib/libc/c063/t_fstatat.c:1.3 --- src/tests/lib/libc/c063/t_fstatat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_fstatat.c Tue Jan 10 10:13:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013 #include #include #include -#include #define DIR "dir" #define FILE "dir/fstatat" Index: src/tests/lib/libc/c063/t_openat.c diff -u src/tests/lib/libc/c063/t_openat.c:1.2 src/tests/lib/libc/c063/t_openat.c:1.3 --- src/tests/lib/libc/c063/t_openat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_openat.c Tue Jan 10 10:13:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include -#include #define DIR "dir" #define FILE "dir/openat" Index: src/tests/lib/libc/c063/t_unlinkat.c diff -u src/tests/lib/libc/c063/t_unlinkat.c:1.2 src/tests/lib/libc/c063/t_unlinkat.c:1.3 --- src/tests/lib/libc/c063/t_unlinkat.c:1.2 Sun Mar 17 00:46:06 2013 +++ src/tests/lib/libc/c063/t_unlinkat.c Tue Jan 10 10:13:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundati
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Tue Jan 10 13:53:26 UTC 2017 Modified Files: src/crypto/external/bsd/openssh/dist: monitor.c Log Message: include for close, pipe, dup2 etc. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/monitor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/monitor.c diff -u src/crypto/external/bsd/openssh/dist/monitor.c:1.20 src/crypto/external/bsd/openssh/dist/monitor.c:1.21 --- src/crypto/external/bsd/openssh/dist/monitor.c:1.20 Sat Dec 24 19:07:47 2016 +++ src/crypto/external/bsd/openssh/dist/monitor.c Tue Jan 10 08:53:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: monitor.c,v 1.20 2016/12/25 00:07:47 christos Exp $ */ +/* $NetBSD: monitor.c,v 1.21 2017/01/10 13:53:26 christos Exp $ */ /* $OpenBSD: monitor.c,v 1.166 2016/09/28 16:33:06 djm Exp $ */ /* @@ -28,7 +28,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: monitor.c,v 1.20 2016/12/25 00:07:47 christos Exp $"); +__RCSID("$NetBSD: monitor.c,v 1.21 2017/01/10 13:53:26 christos Exp $"); #include #include #include @@ -47,6 +47,7 @@ __RCSID("$NetBSD: monitor.c,v 1.20 2016/ #include #include #include +#include #include #include #include
CVS commit: src/external/bsd/file/lib
Module Name:src Committed By: christos Date: Tue Jan 10 13:51:36 UTC 2017 Modified Files: src/external/bsd/file/lib: Makefile Log Message: Build magic.h before all objs. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/file/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/file/lib/Makefile diff -u src/external/bsd/file/lib/Makefile:1.6 src/external/bsd/file/lib/Makefile:1.7 --- src/external/bsd/file/lib/Makefile:1.6 Sun Dec 1 15:15:42 2013 +++ src/external/bsd/file/lib/Makefile Tue Jan 10 08:51:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2013/12/01 20:15:42 christos Exp $ +# $NetBSD: Makefile,v 1.7 2017/01/10 13:51:36 christos Exp $ # USE_FORT?= yes # data driven bugs? @@ -41,3 +41,5 @@ magic.h:magic.h.in CLEANFILES+= magic.h .include + +${ALLOBJS}: magic.h
CVS commit: src/share/mk
Module Name:src Committed By: skrll Date: Tue Jan 10 13:47:18 UTC 2017 Modified Files: src/share/mk: bsd.own.mk Log Message: binutils 2.26 is no more. To generate a diff of this commit: cvs rdiff -u -r1.1001 -r1.1002 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1001 src/share/mk/bsd.own.mk:1.1002 --- src/share/mk/bsd.own.mk:1.1001 Sun Jan 8 17:40:44 2017 +++ src/share/mk/bsd.own.mk Tue Jan 10 13:47:18 2017 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1001 2017/01/08 17:40:44 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1002 2017/01/10 13:47:18 skrll Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -148,8 +148,6 @@ HAVE_BINUTILS?= 227 .if ${HAVE_BINUTILS} == 227 EXTERNAL_BINUTILS_SUBDIR= binutils -.elif ${HAVE_BINUTILS} == 226 -EXTERNAL_BINUTILS_SUBDIR= binutils.old .else EXTERNAL_BINUTILS_SUBDIR= /does/not/exist .endif
CVS commit: src/distrib/sparc/miniroot
Module Name:src Committed By: joerg Date: Tue Jan 10 13:35:44 UTC 2017 Modified Files: src/distrib/sparc/miniroot: Makefile.inc Log Message: Bump image size a bit for the clang build. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/distrib/sparc/miniroot/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/sparc/miniroot/Makefile.inc diff -u src/distrib/sparc/miniroot/Makefile.inc:1.24 src/distrib/sparc/miniroot/Makefile.inc:1.25 --- src/distrib/sparc/miniroot/Makefile.inc:1.24 Fri Jun 3 15:44:50 2016 +++ src/distrib/sparc/miniroot/Makefile.inc Tue Jan 10 13:35:44 2017 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.24 2016/06/03 15:44:50 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.25 2017/01/10 13:35:44 joerg Exp $ -IMAGESIZE= 9400k +IMAGESIZE= 9500k DBG= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables MAKEFS_FLAGS= -o density=4k
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Tue Jan 10 10:33:49 UTC 2017 Modified Files: src/lib/libcurses: refresh.c Log Message: When doupdate is called, check for typeahead input after N lines changed instead of aborting really early. This allows some screen update when holding the page down key for example. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/lib/libcurses/refresh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.84 src/lib/libcurses/refresh.c:1.85 --- src/lib/libcurses/refresh.c:1.84 Tue Jan 10 09:32:01 2017 +++ src/lib/libcurses/refresh.c Tue Jan 10 10:33:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.84 2017/01/10 09:32:01 roy Exp $ */ +/* $NetBSD: refresh.c,v 1.85 2017/01/10 10:33:49 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.84 2017/01/10 09:32:01 roy Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.85 2017/01/10 10:33:49 roy Exp $"); #endif #endif/* not lint */ @@ -58,6 +58,8 @@ int cellcmp( __LDATA *, __LDATA * ); int linecmp( __LDATA *, __LDATA *, size_t ); #endif /* HAVE_WCHAR */ +#define CHECK_INTERVAL 5 /* Change N lines before checking typeahead */ + #ifndef _CURSES_USE_MACROS /* @@ -498,7 +500,7 @@ doupdate(void) WINDOW *win; __LINE *wlp, *vlp; short wy; - int dnum, was_cleared; + int dnum, was_cleared, changed; #ifdef HAVE_WCHAR __LDATA *lp; nschar_t *np; @@ -595,16 +597,6 @@ doupdate(void) quickch(); } - if (_cursesi_screen->checkfd != -1) { - struct pollfd fds[1]; - - /* If we have input, abort the update. */ - fds[0].fd = _cursesi_screen->checkfd; - fds[0].events = POLLIN; - if (poll(fds, 1, 0) > 0) - goto cleanup; - } - #ifdef DEBUG { int i, j; @@ -657,6 +649,7 @@ doupdate(void) } #endif /* DEBUG */ + changed = 0; for (wy = 0; wy < win->maxy; wy++) { wlp = win->alines[wy]; vlp = _cursesi_screen->__virtscr->alines[win->begy + wy]; @@ -696,6 +689,21 @@ doupdate(void) #endif /* DEBUG */ wlp->flags &= ~(__ISDIRTY | __ISFORCED); } + +/* Check if we have input after + * changing N lines. */ +if (_cursesi_screen->checkfd != -1 && +++changed == CHECK_INTERVAL) +{ + struct pollfd fds[1]; + + /* If we have input, abort. */ + fds[0].fd = _cursesi_screen->checkfd; + fds[0].events = POLLIN; + if (poll(fds, 1, 0) > 0) + goto cleanup; + changed = 0; +} } }
CVS commit: src
Module Name:src Committed By: roy Date: Tue Jan 10 10:13:24 UTC 2017 Modified Files: src/distrib/sets/lists/comp: mi src/lib/libcurses: Makefile curses.h curses_private.h curses_screen.3 initscr.c resize.c screen.c setterm.c Log Message: Implement POSIX curses function ripoffline(3). To generate a diff of this commit: cvs rdiff -u -r1.2100 -r1.2101 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.81 -r1.82 src/lib/libcurses/Makefile cvs rdiff -u -r1.119 -r1.120 src/lib/libcurses/curses.h cvs rdiff -u -r1.57 -r1.58 src/lib/libcurses/curses_private.h cvs rdiff -u -r1.21 -r1.22 src/lib/libcurses/curses_screen.3 cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/initscr.c cvs rdiff -u -r1.22 -r1.23 src/lib/libcurses/resize.c cvs rdiff -u -r1.27 -r1.28 src/lib/libcurses/screen.c cvs rdiff -u -r1.59 -r1.60 src/lib/libcurses/setterm.c 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2100 src/distrib/sets/lists/comp/mi:1.2101 --- src/distrib/sets/lists/comp/mi:1.2100 Sat Jan 7 04:44:12 2017 +++ src/distrib/sets/lists/comp/mi Tue Jan 10 10:13:24 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2100 2017/01/07 04:44:12 ozaki-r Exp $ +# $NetBSD: mi,v 1.2101 2017/01/10 10:13:24 roy Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -8689,6 +8689,7 @@ ./usr/share/man/cat3/rintf.0 comp-c-catman .cat ./usr/share/man/cat3/rintl.0 comp-c-catman .cat ./usr/share/man/cat3/ripemd.0 comp-obsolete obsolete +./usr/share/man/cat3/ripoffline.0 comp-c-catman .cat ./usr/share/man/cat3/rmd160.0 comp-c-catman .cat ./usr/share/man/cat3/rmtops.0 comp-c-catman .cat ./usr/share/man/cat3/round.0 comp-c-catman .cat @@ -16037,6 +16038,7 @@ ./usr/share/man/html3/rint.html comp-c-htmlman html ./usr/share/man/html3/rintf.html comp-c-htmlman html ./usr/share/man/html3/rintl.html comp-c-htmlman html +./usr/share/man/html3/ripoffline.html comp-c-htmlman html ./usr/share/man/html3/rmd160.html comp-c-htmlman html ./usr/share/man/html3/rmtops.html comp-c-htmlman html ./usr/share/man/html3/round.html comp-c-htmlman html @@ -23384,6 +23386,7 @@ ./usr/share/man/man3/rintf.3 comp-c-man .man ./usr/share/man/man3/rintl.3 comp-c-man .man ./usr/share/man/man3/ripemd.3 comp-obsolete obsolete +./usr/share/man/man3/ripoffline.3 comp-c-man .man ./usr/share/man/man3/rmd160.3 comp-c-man .man ./usr/share/man/man3/rmtops.3 comp-c-man .man ./usr/share/man/man3/round.3 comp-c-man .man Index: src/lib/libcurses/Makefile diff -u src/lib/libcurses/Makefile:1.81 src/lib/libcurses/Makefile:1.82 --- src/lib/libcurses/Makefile:1.81 Thu Jan 5 23:15:43 2017 +++ src/lib/libcurses/Makefile Tue Jan 10 10:13:24 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.81 2017/01/05 23:15:43 roy Exp $ +# $NetBSD: Makefile,v 1.82 2017/01/10 10:13:24 roy Exp $ # @(#)Makefile 8.2 (Berkeley) 1/2/94 .include @@ -143,6 +143,7 @@ MLINKS+= curses_addch.3 addch.3 curses_a curses_tty.3 reset_prog_mode.3 curses_tty.3 reset_shell_mode.3 \ curses_tty.3 resetty.3 \ curses_screen.3 resizeterm.3 curses_screen.3 resize_term.3 \ + curses_screen.3 ripoffline.3 \ curses_tty.3 savetty.3 curses_scanw.3 scanw.3 \ curses_scroll.3 scrl.3 curses_scroll.3 scroll.3 \ curses_scroll.3 scrollok.3 curses_scroll.3 setscrreg.3 \ Index: src/lib/libcurses/curses.h diff -u src/lib/libcurses/curses.h:1.119 src/lib/libcurses/curses.h:1.120 --- src/lib/libcurses/curses.h:1.119 Fri Jan 6 09:14:07 2017 +++ src/lib/libcurses/curses.h Tue Jan 10 10:13:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.119 2017/01/06 09:14:07 roy Exp $ */ +/* $NetBSD: curses.h,v 1.120 2017/01/10 10:13:24 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -746,6 +746,7 @@ int reset_shell_mode(void); int resetty(void); int resizeterm(int, int); int resize_term(int, int); +int ripoffline(int, int (*)(WINDOW *, int)); int savetty(void); int scanw(const char *, ...) __scanflike(1, 2); int scroll(WINDOW *); Index: src/lib/libcurses/curses_private.h diff -u src/lib/libcurses/curses_private.h:1.57 src/lib/libcurses/curses_private.h:1.58 --- src/lib/libcurses/curses_private.h:1.57 Fri Jan 6 09:14:07 2017 +++ src/lib/libcurses/curses_private.h Tue Jan 10 10:13:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_private.h,v 1.57 2017/01/06 09:14:07 roy Exp $ */ +/* $NetBSD: curses_private.h,v 1.58 2017/01/10 10:13:24 roy Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -201,6 +201,8 @@ struct __screen { int lx, ly;/* loop parameters for refresh */ int COLS; /* Columns on the screen. */ int LINES; /* Lines on the screen. */ + int ripped_top; /* Lines ripped from the top of the screen. */ + int ripped_bottom; /* Lines ripped from the bottom. */ int ESCD
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: cherry Date: Tue Jan 10 09:48:23 UTC 2017 Modified Files: src/sys/arch/x86/x86: x86_machdep.c Log Message: While reserving memory at boot time via uvm_physseg_unplug(9), in the case of a disappearing segment (due to a segment sized msgbuf) make sure segment offsets are read off before the segment disappears. This should fix some of the recent boot time hard resets reported on i386 recently. Thanks to kre@ for pointing this out to me. CVS: -- CVS: CVSROOT cvs.NetBSD.org:/cvsroot CVS: please use "PR category/123" to have the commitmsg appended to PR 123 CVS: CVS: Please evaluate your changes and consider the following. CVS: Abort checkin if you answer no. CVS: => For all changes: CVS: Do the changed files compile? CVS: Has the change been tested? CVS: => If you are not completely familiar with the changed components: CVS: Has the change been posted for review? CVS: Have you allowed enough time for feedback? CVS: => If the change is major: CVS: => If the change adds files to, or removes files from $DESTDIR: CVS: => If you are changing a library or kernel interface: CVS: Have you successfully run "./build.sh release"? To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/x86/x86/x86_machdep.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/x86_machdep.c diff -u src/sys/arch/x86/x86/x86_machdep.c:1.80 src/sys/arch/x86/x86/x86_machdep.c:1.81 --- src/sys/arch/x86/x86/x86_machdep.c:1.80 Mon Dec 26 17:54:07 2016 +++ src/sys/arch/x86/x86/x86_machdep.c Tue Jan 10 09:48:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_machdep.c,v 1.80 2016/12/26 17:54:07 cherry Exp $ */ +/* $NetBSD: x86_machdep.c,v 1.81 2017/01/10 09:48:22 cherry Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.80 2016/12/26 17:54:07 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.81 2017/01/10 09:48:22 cherry Exp $"); #include "opt_modular.h" #include "opt_physmem.h" @@ -933,12 +933,12 @@ init_x86_msgbuf(void) if (uvm_physseg_get_avail_end(x) - uvm_physseg_get_avail_start(x) < atop(sz)) sz = ctob(uvm_physseg_get_avail_end(x) - uvm_physseg_get_avail_start(x)); - uvm_physseg_unplug(uvm_physseg_get_end(x) - atop(sz), atop(sz)); msgbuf_p_seg[msgbuf_p_cnt].sz = sz; -msgbuf_p_seg[msgbuf_p_cnt++].paddr = ctob(uvm_physseg_get_avail_end(x)); + msgbuf_p_seg[msgbuf_p_cnt++].paddr = ctob(uvm_physseg_get_avail_end(x)) - sz; + uvm_physseg_unplug(uvm_physseg_get_end(x) - atop(sz), atop(sz)); /* Now find where the new avail_end is. */ - avail_end = ctob(uvm_physseg_get_avail_end(x)); + avail_end = ctob(uvm_physseg_get_highest_frame()); if (sz == reqsz) return;
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Tue Jan 10 09:32:01 UTC 2017 Modified Files: src/lib/libcurses: refresh.c Log Message: Test for __ISPASTEOL when moving the cursor and it hasn't moved. Unset __ISPASTEOL when moving the cursor during refresh. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/lib/libcurses/refresh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.83 src/lib/libcurses/refresh.c:1.84 --- src/lib/libcurses/refresh.c:1.83 Fri Jan 6 13:53:18 2017 +++ src/lib/libcurses/refresh.c Tue Jan 10 09:32:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.83 2017/01/06 13:53:18 roy Exp $ */ +/* $NetBSD: refresh.c,v 1.84 2017/01/10 09:32:01 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.83 2017/01/06 13:53:18 roy Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.84 2017/01/10 09:32:01 roy Exp $"); #endif #endif/* not lint */ @@ -45,7 +45,7 @@ __RCSID("$NetBSD: refresh.c,v 1.83 2017/ #include "curses.h" #include "curses_private.h" -static void domvcur(int, int, int, int); +static void domvcur(const WINDOW *, int, int, int, int); static int makech(int); static void quickch(void); static void scrolln(int, int, int, int, int); @@ -668,9 +668,7 @@ doupdate(void) #endif /* DEBUG */ if (!_cursesi_screen->curwin) curscr->alines[wy]->hash = wlp->hash; - if ((wlp->flags & __ISDIRTY) || - (wlp->flags & __ISFORCED)) - { + if (wlp->flags & __ISDIRTY || wlp->flags & __ISFORCED) { #ifdef DEBUG __CTRACE(__CTRACE_REFRESH, "doupdate: [ISDIRTY]wy:%d\tf:%d\tl:%d\n", wy, @@ -722,14 +720,14 @@ doupdate(void) #endif /* DEBUG */ if (_cursesi_screen->curwin) - domvcur(_cursesi_screen->ly, _cursesi_screen->lx, + domvcur(win, _cursesi_screen->ly, _cursesi_screen->lx, win->cury, win->curx); else { if (win->flags & __LEAVEOK) { curscr->cury = _cursesi_screen->ly; curscr->curx = _cursesi_screen->lx; } else { - domvcur(_cursesi_screen->ly, _cursesi_screen->lx, + domvcur(win, _cursesi_screen->ly, _cursesi_screen->lx, win->cury, win->curx); curscr->cury = win->cury; curscr->curx = win->curx; @@ -823,7 +821,7 @@ makech(int wy) #endif /* DEBUG */ /* Is the cursor still on the end of the last line? */ if (wy > 0 && curscr->alines[wy - 1]->flags & __ISPASTEOL) { - domvcur(_cursesi_screen->ly, _cursesi_screen->lx, + domvcur(win, _cursesi_screen->ly, _cursesi_screen->lx, _cursesi_screen->ly + 1, 0); _cursesi_screen->ly++; _cursesi_screen->lx = 0; @@ -931,7 +929,7 @@ makech(int wy) break; } #endif /* HAVE_WCHAR */ - domvcur(_cursesi_screen->ly, _cursesi_screen->lx, wy, wx); + domvcur(win, _cursesi_screen->ly, _cursesi_screen->lx, wy, wx); #ifdef DEBUG __CTRACE(__CTRACE_REFRESH, "makech: 1: wx = %d, ly= %d, " @@ -1238,9 +1236,10 @@ makech(int wy) #endif /* HAVE_WCHAR */ } if (wx < curscr->maxx) { - domvcur(_cursesi_screen->ly, wx, - (int) (win->maxy - 1), - (int) (win->maxx - 1)); + domvcur(win, + _cursesi_screen->ly, wx, + (int)(win->maxy - 1), + (int)(win->maxx - 1)); } _cursesi_screen->ly = win->maxy - 1; _cursesi_screen->lx = win->maxx - 1; @@ -1297,10 +1296,11 @@ makech(int wy) _cursesi_screen->lx = COLS - 1; else if (wx >= win->maxx) { -domvcur(_cursesi_screen->ly, +domvcur(win, + _cursesi_screen->ly, _cursesi_screen->lx, _cursesi_screen->ly, - (int) (win->maxx - 1)); + (int)(win->maxx - 1)); _cursesi_screen->lx = win->maxx - 1; } #ifdef DEBUG @@ -1340,16 +1340,27 @@ makech(int wy) * Do a mvcur, leaving attributes if necessary. */ static void -domvcur(int oy, int ox, int ny, int nx) +domvcur(const WINDOW *win, int oy, int ox, int ny, int nx) { #ifdef DEBUG __CTRACE(__CTRACE_REFRESH, "domvcur: (%x,%d)=>(%d,%d)\n", oy, ox, ny, nx ); #endif /* DEBUG */ + __unsetattr(1); - if ( oy == ny && ox == nx ) - return; + + /* Don't move the cursor unless we need to. */ + if (oy == ny && ox == nx) { + /* Check EOL. */ + if (!(win->alines[oy]->flags & __ISPASTEOL)) + return; + } + + /* Clear EOL flags. */ + win->alines[oy]->flags &= ~__ISPASTEOL; + win->alines[ny]->flags &= ~__ISPASTEOL; + __mvcur(oy, ox, ny, nx, 1); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Jan 10 08:57:39 UTC 2017 Modified Files: src/sys/dev/pci: if_wm.c Log Message: remove debug printf(). To generate a diff of this commit: cvs rdiff -u -r1.464 -r1.465 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.464 src/sys/dev/pci/if_wm.c:1.465 --- src/sys/dev/pci/if_wm.c:1.464 Tue Jan 10 08:56:02 2017 +++ src/sys/dev/pci/if_wm.c Tue Jan 10 08:57:39 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.464 2017/01/10 08:56:02 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.465 2017/01/10 08:57:39 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.464 2017/01/10 08:56:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.465 2017/01/10 08:57:39 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -3738,7 +3738,6 @@ wm_initialize_hardware_bits(struct wm_so reg = CSR_READ(sc, WMREG_RFCTL); reg |= WMREG_RFCTL_IPV6EXDIS; CSR_WRITE(sc, WMREG_RFCTL, reg); - printf("XXX RFCTL=%08x\n", CSR_READ(sc, WMREG_RFCTL)); } }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Jan 10 08:56:02 UTC 2017 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix previous. The last code wasn't called. To generate a diff of this commit: cvs rdiff -u -r1.463 -r1.464 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.463 src/sys/dev/pci/if_wm.c:1.464 --- src/sys/dev/pci/if_wm.c:1.463 Tue Jan 10 08:22:43 2017 +++ src/sys/dev/pci/if_wm.c Tue Jan 10 08:56:02 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.463 2017/01/10 08:22:43 knakahara Exp $ */ +/* $NetBSD: if_wm.c,v 1.464 2017/01/10 08:56:02 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.463 2017/01/10 08:22:43 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.464 2017/01/10 08:56:02 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -3721,6 +3721,10 @@ wm_initialize_hardware_bits(struct wm_so reg |= WMREG_RFCTL_NEWIPV6EXDIS |WMREG_RFCTL_IPV6EXDIS; CSR_WRITE(sc, WMREG_RFCTL, reg); break; + default: + break; + } + } else if ((sc->sc_type >= WM_T_82575) && (sc->sc_type <= WM_T_I211)) { /* * 82575 Errata XXX, 82576 Errata 46, 82580 Errata 24, * I350 Errata 37, I210 Errata No. 31 and I211 Errata No. 11: @@ -3731,20 +3735,10 @@ wm_initialize_hardware_bits(struct wm_so * "Malformed IPv6 Extension Headers May Result in LAN Device * Hang" */ - case WM_T_82575: - case WM_T_82576: - case WM_T_82580: - case WM_T_I350: - case WM_T_I210: - case WM_T_I211: - case WM_T_I354: - reg = CSR_READ(sc, WMREG_RFCTL); - reg |= WMREG_RFCTL_IPV6EXDIS; - CSR_WRITE(sc, WMREG_RFCTL, reg); - break; - default: - break; - } + reg = CSR_READ(sc, WMREG_RFCTL); + reg |= WMREG_RFCTL_IPV6EXDIS; + CSR_WRITE(sc, WMREG_RFCTL, reg); + printf("XXX RFCTL=%08x\n", CSR_READ(sc, WMREG_RFCTL)); } }
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Tue Jan 10 08:45:45 UTC 2017 Modified Files: src/sys/net: if.c Log Message: Add softnet_lock to if_link_state_change_si Fix panic: lock error: Mutex: mutex_vector_exit: assertion failed: MUTEX_OWNER(mtx->mtx_owner) == curthread at callout_halt <= arp_dad_stop <= in_if_link_down. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/net/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/sys/net/if.c diff -u src/sys/net/if.c:1.370 src/sys/net/if.c:1.371 --- src/sys/net/if.c:1.370 Tue Jan 10 05:42:34 2017 +++ src/sys/net/if.c Tue Jan 10 08:45:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.370 2017/01/10 05:42:34 ozaki-r Exp $ */ +/* $NetBSD: if.c,v 1.371 2017/01/10 08:45:45 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.370 2017/01/10 05:42:34 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.371 2017/01/10 08:45:45 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -2272,6 +2272,10 @@ if_link_state_change_si(void *arg) int s; uint8_t state; +#ifndef NET_MPSAFE + mutex_enter(softnet_lock); + KERNEL_LOCK(1, NULL); +#endif s = splnet(); /* Pop a link state change from the queue and process it. */ @@ -2283,6 +2287,10 @@ if_link_state_change_si(void *arg) softint_schedule(ifp->if_link_si); splx(s); +#ifndef NET_MPSAFE + KERNEL_UNLOCK_ONE(NULL); + mutex_exit(softnet_lock); +#endif } /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nonaka Date: Tue Jan 10 08:40:27 UTC 2017 Modified Files: src/sys/dev/pci: if_iwm.c if_iwmvar.h Log Message: check LAR support in NVM for 8260/4165. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_iwm.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/if_iwmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwm.c diff -u src/sys/dev/pci/if_iwm.c:1.59 src/sys/dev/pci/if_iwm.c:1.60 --- src/sys/dev/pci/if_iwm.c:1.59 Tue Jan 10 07:34:04 2017 +++ src/sys/dev/pci/if_iwm.c Tue Jan 10 08:40:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwm.c,v 1.59 2017/01/10 07:34:04 nonaka Exp $ */ +/* $NetBSD: if_iwm.c,v 1.60 2017/01/10 08:40:27 nonaka Exp $ */ /* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */ #define IEEE80211_NO_HT /* @@ -107,7 +107,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.59 2017/01/10 07:34:04 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.60 2017/01/10 08:40:27 nonaka Exp $"); #include #include @@ -488,6 +488,7 @@ static void iwm_radiotap_attach(struct i static int iwm_sysctl_fw_loaded_handler(SYSCTLFN_PROTO); static int iwm_sysctl_root_num; +static int iwm_lar_disable; static int iwm_firmload(struct iwm_softc *sc) @@ -2858,6 +2859,14 @@ iwm_parse_nvm_data(struct iwm_softc *sc, } else iwm_set_hw_address_8000(sc, data, mac_override, nvm_hw); + if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + uint16_t lar_offset, lar_config; + lar_offset = data->nvm_version < 0xE39 ? + IWM_NVM_LAR_OFFSET_8000_OLD : IWM_NVM_LAR_OFFSET_8000; + lar_config = le16_to_cpup(regulatory + lar_offset); +data->lar_enabled = !!(lar_config & IWM_NVM_LAR_ENABLED_8000); + } + if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) iwm_init_channel_map(sc, &nvm_sw[IWM_NVM_CHANNELS], iwm_nvm_channels, __arraycount(iwm_nvm_channels)); @@ -6101,6 +6110,26 @@ iwm_send_bt_init_conf(struct iwm_softc * return iwm_send_cmd_pdu(sc, IWM_BT_CONFIG, 0, sizeof(bt_cmd), &bt_cmd); } +static bool +iwm_is_lar_supported(struct iwm_softc *sc) +{ + bool nvm_lar = sc->sc_nvm.lar_enabled; + bool tlv_lar = isset(sc->sc_enabled_capa, + IWM_UCODE_TLV_CAPA_LAR_SUPPORT); + + if (iwm_lar_disable) + return false; + + /* + * Enable LAR only if it is supported by the FW (TLV) && + * enabled in the NVM + */ + if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + return nvm_lar && tlv_lar; + else + return tlv_lar; +} + static int iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2) { @@ -6110,9 +6139,14 @@ iwm_send_update_mcc_cmd(struct iwm_softc .flags = IWM_CMD_WANT_SKB, .data = { &mcc_cmd }, }; + int err; int resp_v2 = isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2); - int err; + + if (!iwm_is_lar_supported(sc)) { + DPRINTF(("%s: no LAR support\n", __func__)); + return 0; + } memset(&mcc_cmd, 0, sizeof(mcc_cmd)); mcc_cmd.mcc = htole16(alpha2[0] << 8 | alpha2[1]); @@ -6248,13 +6282,11 @@ iwm_init_hw(struct iwm_softc *sc) goto err; } - if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_LAR_SUPPORT)) { - err = iwm_send_update_mcc_cmd(sc, "ZZ"); - if (err) { - aprint_error_dev(sc->sc_dev, - "could not init LAR (error %d)\n", err); - goto err; - } + err = iwm_send_update_mcc_cmd(sc, "ZZ"); + if (err) { + aprint_error_dev(sc->sc_dev, + "could not init LAR (error %d)\n", err); + goto err; } if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) { Index: src/sys/dev/pci/if_iwmvar.h diff -u src/sys/dev/pci/if_iwmvar.h:1.13 src/sys/dev/pci/if_iwmvar.h:1.14 --- src/sys/dev/pci/if_iwmvar.h:1.13 Tue Jan 10 07:34:04 2017 +++ src/sys/dev/pci/if_iwmvar.h Tue Jan 10 08:40:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwmvar.h,v 1.13 2017/01/10 07:34:04 nonaka Exp $ */ +/* $NetBSD: if_iwmvar.h,v 1.14 2017/01/10 08:40:27 nonaka Exp $ */ /* OpenBSD: if_iwmvar.h,v 1.24 2016/09/21 13:53:18 stsp Exp */ /* @@ -204,6 +204,8 @@ struct iwm_nvm_data { uint16_t nvm_version; uint8_t max_tx_pwr_half_dbm; + + bool lar_enabled; }; /* max bufs per tfd the driver will use */