CVS commit: src/sys

2014-07-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 12 09:57:25 UTC 2014

Modified Files:
src/sys/kern: kern_proc.c
src/sys/sys: sysctl.h

Log Message:
Allow fill_kproc2() to be used by more than sysctl.


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.212 -r1.213 src/sys/sys/sysctl.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/kern/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.192 src/sys/kern/kern_proc.c:1.193
--- src/sys/kern/kern_proc.c:1.192	Tue Feb 25 18:30:11 2014
+++ src/sys/kern/kern_proc.c	Sat Jul 12 09:57:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.192 2014/02/25 18:30:11 pooka Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.193 2014/07/12 09:57:25 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.192 2014/02/25 18:30:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.193 2014/07/12 09:57:25 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_kstack.h
@@ -212,7 +212,6 @@ static const int	maxuprc	= MAXUPRC;
 
 static int sysctl_doeproc(SYSCTLFN_PROTO);
 static int sysctl_kern_proc_args(SYSCTLFN_PROTO);
-static void fill_kproc2(struct proc *, struct kinfo_proc2 *, bool);
 
 /*
  * The process list descriptors, used during pid allocation and
@@ -2200,7 +2199,7 @@ fill_eproc(struct proc *p, struct eproc 
 /*
  * Fill in a kinfo_proc2 structure for the specified process.
  */
-static void
+void
 fill_kproc2(struct proc *p, struct kinfo_proc2 *ki, bool zombie)
 {
 	struct tty *tp;

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.212 src/sys/sys/sysctl.h:1.213
--- src/sys/sys/sysctl.h:1.212	Fri Jun 13 15:45:05 2014
+++ src/sys/sys/sysctl.h	Sat Jul 12 09:57:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.212 2014/06/13 15:45:05 joerg Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.213 2014/07/12 09:57:25 njoly Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -1143,6 +1143,7 @@ typedef int (*sysctlfn)(SYSCTLFN_PROTO);
  * used in more than just sysctl
  */
 void	fill_eproc(struct proc *, struct eproc *, bool);
+void	fill_kproc2(struct proc *, struct kinfo_proc2 *, bool);
 
 /*
  * subsystem setup



CVS commit: src/sys/miscfs/procfs

2014-07-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 12 09:58:39 UTC 2014

Modified Files:
src/sys/miscfs/procfs: procfs_linux.c

Log Message:
Use kproc2 to provide sensible informations for /proc/pid/stat.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/miscfs/procfs/procfs_linux.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/miscfs/procfs/procfs_linux.c
diff -u src/sys/miscfs/procfs/procfs_linux.c:1.68 src/sys/miscfs/procfs/procfs_linux.c:1.69
--- src/sys/miscfs/procfs/procfs_linux.c:1.68	Mon Jun 30 14:58:59 2014
+++ src/sys/miscfs/procfs/procfs_linux.c	Sat Jul 12 09:58:39 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $  */
+/*  $NetBSD: procfs_linux.c,v 1.69 2014/07/12 09:58:39 njoly Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.68 2014/06/30 14:58:59 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_linux.c,v 1.69 2014/07/12 09:58:39 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -400,7 +400,7 @@ out:
 	return error;
 }
 
-#define USEC_2_TICKS(x)		((x) / 1)
+#define UTIME2TICKS(s,u)	(((uint64_t)(s) * 100 + (u)) / 1)
 
 /*
  * Linux compatible /proc/pid/stat. Only active when the -o linux
@@ -413,12 +413,11 @@ procfs_do_pid_stat(struct lwp *curl, str
 	char *bf;
 	struct proc *p = l-l_proc;
 	int len;
-	struct tty *tty = p-p_session-s_ttyp;
-	struct rusage *ru = p-p_stats-p_ru;
 	struct rusage *cru = p-p_stats-p_cru;
 	unsigned long stext = 0, etext = 0, sstack = 0;
 	struct timeval rt;
 	struct vmspace	*vm;
+	struct kinfo_proc2 ki;
 	int error = 0;
 
 	bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
@@ -432,65 +431,67 @@ procfs_do_pid_stat(struct lwp *curl, str
 	mutex_enter(proc_lock);
 	mutex_enter(p-p_lock);
 
+	fill_kproc2(p, ki, false);
 	calcru(p, NULL, NULL, NULL, rt);
 
 	len = snprintf(bf, LBFSZ,
-	%d (%s) %c %d %d %d %lld %d 
+	%d (%s) %c %d %d %d %u %d 
 	%u 
-	%lu %lu %lu %lu %lu %lu %lu %lu 
-	%d %d %d 
-	%lld %lld %lu %lu % PRIu64  
+	%PRIu64 %lu %PRIu64 %lu %PRIu64 %PRIu64 %PRIu64 %PRIu64 
+	%d %d %PRIu64 
+	%lld %PRIu64 %PRId64 %lu %PRIu64 
 	%lu %lu %lu 
 	%u %u 
 	%u %u %u %u 
-	%lu %lu %lu %d %d\n,
+	%PRIu64 %PRIu64 %PRIu64 %d %PRIu64\n,
 
-	p-p_pid,
-	p-p_comm,
-	0IR3SZD[(p-p_stat  6) ? 0 : (int)p-p_stat],
-	(p-p_pptr != NULL) ? p-p_pptr-p_pid : 0,
+	ki.p_pid,		/* 1 pid */
+	ki.p_comm,		/* 2 tcomm */
+	0RRSTZXR8[(ki.p_stat  8) ? 0 : (int)ki.p_stat],	/* 3 state */
+	ki.p_ppid,		/* 4 ppid */
+	ki.p__pgid,		/* 5 pgrp */
+	ki.p_sid,		/* 6 sid */
+	(ki.p_tdev != (uint32_t)NODEV) ? ki.p_tdev : 0,	/* 7 tty_nr */
+	ki.p_tpgid,		/* 8 tty_pgrp */
 
-	p-p_pgid,
-	p-p_session-s_sid,
-	(unsigned long long)(tty ? tty-t_dev : 0),
-	(tty  tty-t_pgrp) ? tty-t_pgrp-pg_id : 0,
+	ki.p_flag,		/* 9 flags */
 
-	p-p_flag,
-
-	ru-ru_minflt,
+	ki.p_uru_minflt,	/* 10 min_flt */
 	cru-ru_minflt,
-	ru-ru_majflt,
+	ki.p_uru_majflt,	/* 12 maj_flt */
 	cru-ru_majflt,
-	(long)USEC_2_TICKS(ru-ru_utime.tv_usec),
-	(long)USEC_2_TICKS(ru-ru_stime.tv_usec),
-	(long)USEC_2_TICKS(cru-ru_utime.tv_usec),
-	(long)USEC_2_TICKS(cru-ru_stime.tv_usec),
-
-	l-l_priority,/* XXX: priority */
-	p-p_nice - NZERO,
-	0,
+	UTIME2TICKS(ki.p_uutime_sec, ki.p_uutime_usec),	/* 14 utime */
+	UTIME2TICKS(ki.p_ustime_sec, ki.p_ustime_usec),	/* 15 stime */
+	UTIME2TICKS(cru-ru_utime.tv_sec, cru-ru_utime.tv_usec), /* 16 cutime */
+	UTIME2TICKS(cru-ru_stime.tv_sec, cru-ru_stime.tv_usec), /* 17 cstime */
+
+	ki.p_priority,/* XXX: 18 priority */
+	ki.p_nice - NZERO,/* 19 nice */
+	ki.p_nlwps,	/* 20 num_threads */
 
 	(long long)rt.tv_sec,
-	(long long)p-p_stats-p_start.tv_sec,
-	(unsigned long)(vm-vm_tsize + vm-vm_dsize + vm-vm_ssize), /* size */
-	(unsigned long)(vm-vm_rssize),	/* resident */
-	p-p_rlimit[RLIMIT_RSS].rlim_cur,
-
-	stext,	/* start code */
-	etext,	/* end code */
-	sstack,	/* mm start stack */
-	0,		/* XXX: pc */
-	0,		/* XXX: sp */
-	p-p_sigpend.sp_set.__bits[0],		/* XXX: pending */
-	0,		/* XXX: held */
-	p-p_sigctx.ps_sigignore.__bits[0],		/* ignored */
-	p-p_sigctx.ps_sigcatch.__bits[0],		/* caught */
-
-	(unsigned long)(intptr_t)l-l_wchan,
-	ru-ru_nvcsw,
-	ru-ru_nivcsw,
-	p-p_exitsig,
-	0);		/* XXX: processor */
+	UTIME2TICKS(ki.p_ustart_sec, ki.p_ustart_usec), /* 22 start_time */
+	ki.p_vm_msize,/* 23 vsize */
+	PGTOKB(ki.p_vm_rssize),			/* 24 rss */
+	p-p_rlimit[RLIMIT_RSS].rlim_cur,		/* 25 rsslim */
+
+	stext,	/* 26 

CVS import: src/external/bsd/dhcp/dist

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 11:58:18 UTC 2014

Update of /cvsroot/src/external/bsd/dhcp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv10346

Log Message:
import of dhcp 4.3.0.

Excerpts of the upstream RELNOTES:

The major theme for ISC DHCP 4.3.x was to update the suport for
DHCPv6 to include several of the features that have been available
for DHCPv4.  These include:

- Support the use of classes

- Support for on_commit, on_expiry and on_release statements

- Better logging of address assignments

- Support for using DHCPv6 relay options in expressions

This release also adds suppport for the standard DDNS as described in the
current RFCs as well as enhancing support for dynamically adding and removing
subclasses via OMAPI.

There are a number of DHCPv6 limitations and features missing in this
release, which will be addressed in the future:

- Only Solaris, Linux, FreeBSD, NetBSD, and OpenBSD are supported.

- DHCPv6 includes human-readable text in status code messages, in
  English.  A method to reconfigure or support other languages would
  be preferable.

- The host-identifier option is limited to a simple token.

- The client and server can only operate DHCPv4 or DHCPv6 at a time,
  not both.  To use both protocols simultaneously, two instances of the
  relevant daemon are required, one with the '-6' command line option.

Changes since 4.3.0b1

- Tidy up receive packet processing.
  Thanks to Brad Plank of GTA for reporting the issue and suggesting
  a possible patch.
  [ISC-Bugs #34447]

Changes since 4.3.0a1

- Modify the message displayed when a process hits a fatal error.
  The new message is much shorter and simply points to the README
  and our website for directions on bug submissions.
  [ISC-Bugs #24789]

- Handle an absent resolv.conf file better.
  [ISC-Bugs #35194]

Changes since 4.2.5

- Address static analysis warnings.
  [ISC-Bugs #33510] [ISC-Bugs #33511]

- Silence benign static analysis warnings.
  [ISC-Bugs #33428]

- Add check for 64-bit package for atf.
  [ISC-Bugs #32206]

- Use newer auto* tool packages and turn on RFC_3542 support on Mac OS.
  [ISC-Bugs #26303]

- Remove a variable when it isn't being used due to #ifdefs to avoid
  a compiler warning on Solaris using GCC.
  [ISC-Bugs #33032]

- Add a check for too much whitespace in a config or lease file.
  Thanks to Paolo Pellegrino for finding the issue and a suggestion
  for the patch.
  [ISC-Bugs #33351]

- Fix several problems with using OMAPI to manipulate class and subclass
  objects.
  [ISC-Bugs #27452]

- Added a sleep call after killing the old client to allow time
  for the sockets to be cleaned.  This should allow the -r option
  to work more consistently.
  [ISC-Bugs #18175]

- Missing files for ISC DHCP Developer's Guide are now included in
  the release tarballs. To generate this documentation, please use
  make devel command in doc directory. [ISC-Bugs #32767]

- Update client script for use with openwrt.
  [ISC-Bugs #29843]

- Fix the socket handling for DHCPv6 clients to allow multiple instances
  of a client on a single machine to work properly.  Previously only
  one client would receive the packets.  Thanks to Jiri Popelka at Red Hat
  for the bug report and a potential patch.
  [ISC-Bugs #34784]

- Added support for gentle shutdown after signal is received.
  [ISC-Bugs #32692] [ISC-Bugs 34945]

- Enhance the DHCPv6 server logging to include the addresses that are assigned
  to the clients.
  [ISC-Bugs #26377]

- Fix an operation in the DDNS code to be a bitwise instead of logical or.
  [ISC-Bugs #35138]


Status:

Vendor Tag: ISC
Release Tags:   DHCP4_3_0

U src/external/bsd/dhcp/dist/aclocal.m4
N src/external/bsd/dhcp/dist/config.guess
N src/external/bsd/dhcp/dist/compile
N src/external/bsd/dhcp/dist/config.sub
U src/external/bsd/dhcp/dist/configure
U src/external/bsd/dhcp/dist/configure.ac
U src/external/bsd/dhcp/dist/depcomp
U src/external/bsd/dhcp/dist/install-sh
U src/external/bsd/dhcp/dist/LICENSE
U src/external/bsd/dhcp/dist/Makefile.am
U src/external/bsd/dhcp/dist/Makefile.in
U src/external/bsd/dhcp/dist/missing
U src/external/bsd/dhcp/dist/README
U src/external/bsd/dhcp/dist/RELNOTES
N src/external/bsd/dhcp/dist/test-driver
U src/external/bsd/dhcp/dist/doc/api+protocol
U src/external/bsd/dhcp/dist/doc/IANA-arp-parameters
U src/external/bsd/dhcp/dist/doc/References.html
U src/external/bsd/dhcp/dist/doc/Makefile
U src/external/bsd/dhcp/dist/doc/References.xml
U src/external/bsd/dhcp/dist/doc/References.txt
N src/external/bsd/dhcp/dist/doc/devel/contrib.dox
N src/external/bsd/dhcp/dist/doc/devel/arch.dox
N src/external/bsd/dhcp/dist/doc/devel/atf.dox
N src/external/bsd/dhcp/dist/doc/devel/debug.dox
U src/external/bsd/dhcp/dist/doc/devel/doxyfile.in
N src/external/bsd/dhcp/dist/doc/devel/isc-logo.jpg
N src/external/bsd/dhcp/dist/doc/devel/mainpage.dox
N 

CVS commit: src/external/bsd/dhcp

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 12:11:22 UTC 2014

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
the new release wants libisc (and thus libisccfg) from bind


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcp/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/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.10 src/external/bsd/dhcp/Makefile.inc:1.11
--- src/external/bsd/dhcp/Makefile.inc:1.10	Thu Jan 16 13:55:46 2014
+++ src/external/bsd/dhcp/Makefile.inc	Sat Jul 12 12:11:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2014/01/16 13:55:46 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11 2014/07/12 12:11:22 spz Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -23,7 +23,7 @@ CPPFLAGS+=	-DDHCPv6
 CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
 CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
 CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
-.for dir in isc dns
+.for dir in isc dns irs
 CPPFLAGS+= -I${BIND}/lib/${dir}/include
 CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
 CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
@@ -34,7 +34,7 @@ LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJD
 .if defined(PROG)  ${PROG} == dhclient
 LDADD+=-Wl,-Bstatic
 .endif
-LDADD+= -ldns -lisc
+LDADD+= -lirs -lisccfg -ldns -lisc
 LDADD+=-lpthread
 .if defined(PROG)  ${PROG} == dhclient
 LDADD+=-Wl,-Bdynamic



CVS commit: src/sys/dev/scsipi

2014-07-12 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Jul 12 12:13:01 UTC 2014

Modified Files:
src/sys/dev/scsipi: cd.c

Log Message:
Prevent detaching an open device unless forced.


To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/sys/dev/scsipi/cd.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/scsipi/cd.c
diff -u src/sys/dev/scsipi/cd.c:1.319 src/sys/dev/scsipi/cd.c:1.320
--- src/sys/dev/scsipi/cd.c:1.319	Fri Apr 18 06:23:32 2014
+++ src/sys/dev/scsipi/cd.c	Sat Jul 12 12:13:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd.c,v 1.319 2014/04/18 06:23:32 martin Exp $	*/
+/*	$NetBSD: cd.c,v 1.320 2014/07/12 12:13:01 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cd.c,v 1.319 2014/04/18 06:23:32 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: cd.c,v 1.320 2014/07/12 12:13:01 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -313,6 +313,9 @@ cddetach(device_t self, int flags)
 	struct cd_softc *cd = device_private(self);
 	int s, bmaj, cmaj, i, mn;
 
+	if (cd-sc_dk.dk_openmask != 0  (flags  DETACH_FORCE) == 0)
+		return EBUSY;
+
 	/* locate the major number */
 	bmaj = bdevsw_lookup_major(cd_bdevsw);
 	cmaj = cdevsw_lookup_major(cd_cdevsw);



CVS commit: src/doc

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 12:53:27 UTC 2014

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
update the records for the dhcp import


To generate a diff of this commit:
cvs rdiff -u -r1.1133 -r1.1134 src/doc/3RDPARTY
cvs rdiff -u -r1.1943 -r1.1944 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1133 src/doc/3RDPARTY:1.1134
--- src/doc/3RDPARTY:1.1133	Fri Jul 11 22:33:03 2014
+++ src/doc/3RDPARTY	Sat Jul 12 12:53:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1133 2014/07/11 22:33:03 alnsn Exp $
+#	$NetBSD: 3RDPARTY,v 1.1134 2014/07/12 12:53:27 spz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -289,8 +289,8 @@ distribution into the netbsd format.  Th
 src/lib/libc/db/db2netbsd.
 
 Package:	dhcp
-Version:	4.2.5-P1
-Current Vers:	4.2.5-P1
+Version:	4.3.0
+Current Vers:	4.3.0
 Maintainer:	mellon
 Archive Site:	ftp://ftp.isc.org/isc/dhcp/
 Home Page:	http://www.isc.org/software/dhcp/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1943 src/doc/CHANGES:1.1944
--- src/doc/CHANGES:1.1943	Wed Jul  9 04:53:35 2014
+++ src/doc/CHANGES	Sat Jul 12 12:53:27 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1943 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1944 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -439,3 +439,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		and reorganize. [dholland 20140705]
 	postfix(1): Import version 2.11.1 [tron 20140706]
 	bind: Import version 9.10.0-P2 [spz 20140708]
+	dhcp: Import version 4.3.0 [spz 20140712]



CVS commit: src/tests/ipf

2014-07-12 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Sat Jul 12 14:37:49 UTC 2014

Modified Files:
src/tests/ipf/input: Makefile
src/tests/ipf/regress: Makefile

Log Message:
Test n17_6 does not yet exist so remove unrequired files and test case


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/ipf/input/Makefile
cvs rdiff -u -r1.7 -r1.8 src/tests/ipf/regress/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/input/Makefile
diff -u src/tests/ipf/input/Makefile:1.6 src/tests/ipf/input/Makefile:1.7
--- src/tests/ipf/input/Makefile:1.6	Sun Jul 22 16:22:41 2012
+++ src/tests/ipf/input/Makefile	Sat Jul 12 14:37:49 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2012/07/22 16:22:41 darrenr Exp $
+# $NetBSD: Makefile,v 1.7 2014/07/12 14:37:49 darrenr Exp $
 
 TESTSDIR=	${TESTSBASE}/ipf
 ATFFILE=	no
@@ -64,7 +64,6 @@ n15 \
 n15_6 \
 n16 \
 n17 \
-n17_6 \
 n18 \
 n1_6 \
 n2 \

Index: src/tests/ipf/regress/Makefile
diff -u src/tests/ipf/regress/Makefile:1.7 src/tests/ipf/regress/Makefile:1.8
--- src/tests/ipf/regress/Makefile:1.7	Mon Jun 30 17:02:55 2014
+++ src/tests/ipf/regress/Makefile	Sat Jul 12 14:37:49 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2014/06/30 17:02:55 darrenr Exp $
+# $NetBSD: Makefile,v 1.8 2014/07/12 14:37:49 darrenr Exp $
 
 TESTSDIR=	${TESTSBASE}/ipf
 ATFFILE=	no
@@ -114,7 +114,6 @@ n15_6 \
 n16 \
 n16_6 \
 n17 \
-n17_6 \
 n18 \
 n1_6 \
 n2 \



CVS commit: src/tests/ipf

2014-07-12 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Sat Jul 12 14:37:12 UTC 2014

Modified Files:
src/tests/ipf: t_nat_exec.sh
Removed Files:
src/tests/ipf/input: n17_6
src/tests/ipf/regress: n17_6

Log Message:
Test n17_6 does not yet exist so remove unrequired files and test case


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/ipf/t_nat_exec.sh
cvs rdiff -u -r1.3 -r0 src/tests/ipf/input/n17_6
cvs rdiff -u -r1.3 -r0 src/tests/ipf/regress/n17_6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.18 src/tests/ipf/t_nat_exec.sh:1.19
--- src/tests/ipf/t_nat_exec.sh:1.18	Thu May 16 07:43:02 2013
+++ src/tests/ipf/t_nat_exec.sh	Sat Jul 12 14:37:12 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.18 2013/05/16 07:43:02 martin Exp $
+# $NetBSD: t_nat_exec.sh,v 1.19 2014/07/12 14:37:12 darrenr Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -97,7 +97,6 @@ failing_test_case_be n9_6 nattest See P
 test_case n11_6 nattest text text -6
 test_case n12_6 nattest hex hex -6
 test_case n15_6 nattest text text -6
-failing_test_case n17_6 nattest Test golden output file missing hex hex -6
 
 atf_init_test_cases()
 {
@@ -138,6 +137,4 @@ atf_init_test_cases()
 	atf_add_test_case n11_6
 	atf_add_test_case n12_6
 	atf_add_test_case n15_6
-	atf_add_test_case n17_6
-
 }



CVS commit: src/distrib/sets/lists/tests

2014-07-12 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Sat Jul 12 14:40:06 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Test n17_6 does not yet exist so remove unrequired files and test case


To generate a diff of this commit:
cvs rdiff -u -r1.579 -r1.580 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.579 src/distrib/sets/lists/tests/mi:1.580
--- src/distrib/sets/lists/tests/mi:1.579	Wed Jul  9 13:50:48 2014
+++ src/distrib/sets/lists/tests/mi	Sat Jul 12 14:40:06 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.579 2014/07/09 13:50:48 alnsn Exp $
+# $NetBSD: mi,v 1.580 2014/07/12 14:40:06 darrenr Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1774,7 +1774,6 @@
 ./usr/tests/ipf/input/n15_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n16			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n17			tests-ipf-tests		ipfilter
-./usr/tests/ipf/input/n17_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n18			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n1_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n2			tests-ipf-tests		ipfilter
@@ -1939,7 +1938,6 @@
 ./usr/tests/ipf/regress/n16			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n16_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n17			tests-ipf-tests		ipfilter
-./usr/tests/ipf/regress/n17_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n18			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n1_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n2			tests-ipf-tests		ipfilter



CVS commit: src/sys/external/bsd/ipf/netinet

2014-07-12 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Sat Jul 12 14:54:32 UTC 2014

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_nat.c

Log Message:
PR kern/47665
For ICMP packets, use the oicmpid and nicmpid fields explicitly rather
than overloading those with port in them and expecting them to work.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/ipf/netinet/ip_nat.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/external/bsd/ipf/netinet/ip_nat.c
diff -u src/sys/external/bsd/ipf/netinet/ip_nat.c:1.12 src/sys/external/bsd/ipf/netinet/ip_nat.c:1.13
--- src/sys/external/bsd/ipf/netinet/ip_nat.c:1.12	Sat Jun 28 08:02:09 2014
+++ src/sys/external/bsd/ipf/netinet/ip_nat.c	Sat Jul 12 14:54:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_nat.c,v 1.12 2014/06/28 08:02:09 darrenr Exp $	*/
+/*	$NetBSD: ip_nat.c,v 1.13 2014/07/12 14:54:32 darrenr Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -113,7 +113,7 @@ extern struct ifnet vpnif;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_nat.c,v 1.12 2014/06/28 08:02:09 darrenr Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_nat.c,v 1.13 2014/07/12 14:54:32 darrenr Exp $);
 #else
 static const char sccsid[] = @(#)ip_nat.c	1.11 6/5/96 (C) 1995 Darren Reed;
 static const char rcsid[] = @(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp;
@@ -3443,7 +3443,7 @@ ipf_nat_insert(ipf_main_softc_t *softc, 
 	}
 
 	ret = ipf_nat_hashtab_add(softc, softn, nat);
-	if (ret == -1)
+	if (ret != 0)
 		MUTEX_DESTROY(nat-nat_lock);
 	return ret;
 }
@@ -4081,7 +4081,7 @@ ipf_nat_inlookup(fr_info_t *fin, u_int f
 	continue;
 
 			} else if (p == IPPROTO_ICMP) {
-if (nat-nat_osport != dport) {
+if (nat-nat_oicmpid != dport) {
 	continue;
 }
 			}
@@ -4106,7 +4106,7 @@ ipf_nat_inlookup(fr_info_t *fin, u_int f
 	continue;
 
 			} else if (p == IPPROTO_ICMP) {
-if (nat-nat_osport != dport) {
+if (nat-nat_nicmpid != dport) {
 	continue;
 }
 			}
@@ -4408,7 +4408,7 @@ ipf_nat_outlookup(fr_info_t *fin, u_int 
 	continue;
 
 			} else if (p == IPPROTO_ICMP) {
-if (nat-nat_osport != dport) {
+if (nat-nat_nicmpid != dport) {
 	continue;
 }
 			}
@@ -4428,7 +4428,7 @@ ipf_nat_outlookup(fr_info_t *fin, u_int 
 	continue;
 
 			} else if (p == IPPROTO_ICMP) {
-if (nat-nat_osport != dport) {
+if (nat-nat_oicmpid != dport) {
 	continue;
 }
 			}
@@ -4818,7 +4818,6 @@ ipf_nat_checkout(fr_info_t *fin, u_32_t 
 			nflags = IPN_UDP;
 			break;
 		case IPPROTO_ICMP :
-
 			/*
 			 * This is an incoming packet, so the destination is
 			 * the icmp_id and the source port equals 0
@@ -5185,9 +5184,18 @@ ipf_nat_out(fr_info_t *fin, nat_t *nat, 
 			}
 		}
 
-		if ((nat-nat_nsport != 0)  (nflags  IPN_ICMPQUERY)) {
+		if ((nat-nat_oicmpid != 0)  (nflags  IPN_ICMPQUERY)) {
 			icmp = fin-fin_dp;
-			icmp-icmp_id = nat-nat_nicmpid;
+
+			switch (nat-nat_dir)
+			{
+			case NAT_OUTBOUND :
+icmp-icmp_id = nat-nat_nicmpid;
+break;
+			case NAT_INBOUND :
+icmp-icmp_id = nat-nat_oicmpid;
+break;
+			}
 		}
 
 		csump = ipf_nat_proto(fin, nat, nflags);
@@ -5653,10 +5661,18 @@ ipf_nat_in(fr_info_t *fin, nat_t *nat, i
 		}
 
 
-		if ((nat-nat_odport != 0)  (nflags  IPN_ICMPQUERY)) {
+		if ((nat-nat_oicmpid != 0)  (nflags  IPN_ICMPQUERY)) {
 			icmp = fin-fin_dp;
 
-			icmp-icmp_id = nat-nat_nicmpid;
+			switch (nat-nat_dir)
+			{
+			case NAT_INBOUND :
+icmp-icmp_id = nat-nat_nicmpid;
+break;
+			case NAT_OUTBOUND :
+icmp-icmp_id = nat-nat_oicmpid;
+break;
+			}
 		}
 
 		csump = ipf_nat_proto(fin, nat, nflags);



CVS commit: src/share/misc

2014-07-12 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jul 12 15:19:47 UTC 2014

Modified Files:
src/share/misc: airport

Log Message:
Add HCJ. About a dozen mountain tops where nuked to make place for the runway,
see http://cdn2.spiegel.de/images/image-723855-galleryV9-jjgv.jpg


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/share/misc/airport

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/misc/airport
diff -u src/share/misc/airport:1.52 src/share/misc/airport:1.53
--- src/share/misc/airport:1.52	Fri Mar 28 10:16:28 2014
+++ src/share/misc/airport	Sat Jul 12 15:19:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: airport,v 1.52 2014/03/28 10:16:28 apb Exp $
+#	$NetBSD: airport,v 1.53 2014/07/12 15:19:47 mbalmer Exp $
 #	@(#)airport	8.1 (Berkeley) 6/8/93
 #
 # Some of this information is from http://www.mapping.com/airportcodes.html.
@@ -2837,6 +2837,7 @@ HBZ:Heber Springs Municipal Airport, AR,
 HCA:Big Spring, TX, USA
 HCB:Shoal Cove, AK, USA
 HCD:Hutchinson (Butler Field), MN, USA
+HCJ:Hechi Jinchengjiang Airport, China
 HCM:Ell, Somalia
 HCQ:Halls Creek, Western Australia, Australia
 HCR:Holy Cross Airport, AK, USA



CVS commit: src/distrib/sets/lists/tests

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul 12 15:42:57 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Mark stray files obsolete (don't just remove them); noted by Paul Goyette.
(hi darrenr)


To generate a diff of this commit:
cvs rdiff -u -r1.580 -r1.581 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.580 src/distrib/sets/lists/tests/mi:1.581
--- src/distrib/sets/lists/tests/mi:1.580	Sat Jul 12 14:40:06 2014
+++ src/distrib/sets/lists/tests/mi	Sat Jul 12 15:42:56 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.580 2014/07/12 14:40:06 darrenr Exp $
+# $NetBSD: mi,v 1.581 2014/07/12 15:42:56 dholland Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1774,6 +1774,7 @@
 ./usr/tests/ipf/input/n15_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n16			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n17			tests-ipf-tests		ipfilter
+./usr/tests/ipf/input/n17_6			tests-ipf-tests		obsolete
 ./usr/tests/ipf/input/n18			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n1_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/input/n2			tests-ipf-tests		ipfilter
@@ -1938,6 +1939,7 @@
 ./usr/tests/ipf/regress/n16			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n16_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n17			tests-ipf-tests		ipfilter
+./usr/tests/ipf/regress/n17_6			tests-ipf-tests		obsolete
 ./usr/tests/ipf/regress/n18			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n1_6			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/n2			tests-ipf-tests		ipfilter



CVS commit: src

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul 12 16:11:27 UTC 2014

Modified Files:
src/distrib/utils/sysinst: disks.c
src/sbin/fsck_lfs: fsck_lfs.8 main.c

Log Message:
Revert version 1.111 of sysinst/disks.c, which caused sysinst to
create lfs fstab entries with fsck disabled, and instead patch
fsck_lfs to exit successfully without doing anything when given the -p
(bootup preen) option. If you really want to do fsck_lfs -p, you can
do fsck_lfs -f -p to make it go.

This has been sitting in my todo queue since February 2010 and was
ok'd by the committer at the time. The original commit was based on
this post:
   http://mail-index.netbsd.org/tech-kern/2010/02/09/msg007306.html

and I remain unconvinced that it's the right thing, but we can at
least do it properly and not ship a sysinst with -7 that creates
permanently wrong fstab files.

Note that this may cause problems for anyone who's taken -p out of the
bootup fsck flags; but doing that is wrong, so don't.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/distrib/utils/sysinst/disks.c
cvs rdiff -u -r1.24 -r1.25 src/sbin/fsck_lfs/fsck_lfs.8
cvs rdiff -u -r1.45 -r1.46 src/sbin/fsck_lfs/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/distrib/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.130 src/distrib/utils/sysinst/disks.c:1.131
--- src/distrib/utils/sysinst/disks.c:1.130	Sat Dec  7 20:40:42 2013
+++ src/distrib/utils/sysinst/disks.c	Sat Jul 12 16:11:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.130 2013/12/07 20:40:42 martin Exp $ */
+/*	$NetBSD: disks.c,v 1.131 2014/07/12 16:11:27 dholland Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -772,10 +772,7 @@ make_fstab(void)
 			if (!check_lfs_progs())
 s = # ;
 			fstype = lfs;
-			/* XXX fsck_lfs considered harmfull */
-			fsck_pass = 0;
-			dump_freq = 1;
-			break;
+			/* FALLTHROUGH */
 		case FS_BSDFFS:
 			fsck_pass = (strcmp(mp, /) == 0) ? 1 : 2;
 			dump_freq = 1;

Index: src/sbin/fsck_lfs/fsck_lfs.8
diff -u src/sbin/fsck_lfs/fsck_lfs.8:1.24 src/sbin/fsck_lfs/fsck_lfs.8:1.25
--- src/sbin/fsck_lfs/fsck_lfs.8:1.24	Tue Mar 18 18:20:38 2014
+++ src/sbin/fsck_lfs/fsck_lfs.8	Sat Jul 12 16:11:27 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: fsck_lfs.8,v 1.24 2014/03/18 18:20:38 riastradh Exp $
+.\	$NetBSD: fsck_lfs.8,v 1.25 2014/07/12 16:11:27 dholland Exp $
 .\
 .\ Copyright (c) 1980, 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)fsck.8	8.3 (Berkeley) 11/29/94
 .\
-.Dd October 9, 2008
+.Dd July 12, 2014
 .Dt FSCK_LFS 8
 .Os
 .Sh NAME
@@ -134,7 +134,8 @@ Specify
 mode.
 Currently, in this mode
 .Nm
-rolls forward from the older checkpoint, and performs no other action.
+does nothing.
+.\ rolls forward from the older checkpoint, and performs no other action.
 .It Fl q
 Quiet mode, do not output any messages for clean filesystems.
 .It Fl U

Index: src/sbin/fsck_lfs/main.c
diff -u src/sbin/fsck_lfs/main.c:1.45 src/sbin/fsck_lfs/main.c:1.46
--- src/sbin/fsck_lfs/main.c:1.45	Sat Jun  8 02:16:03 2013
+++ src/sbin/fsck_lfs/main.c	Sat Jul 12 16:11:27 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.45 2013/06/08 02:16:03 dholland Exp $	 */
+/* $NetBSD: main.c,v 1.46 2014/07/12 16:11:27 dholland Exp $	 */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -35,6 +35,7 @@
 #include ufs/lfs/lfs.h
 
 #include fstab.h
+#include stdbool.h
 #include stdarg.h
 #include stdlib.h
 #include string.h
@@ -73,7 +74,9 @@ main(int argc, char **argv)
 	int ch;
 	int ret = FSCK_EXIT_OK;
 	const char *optstring = b:dfi:m:npPqUy;
+	bool reallypreen;
 
+	reallypreen = false;
 	ckfinish = ckfini;
 	skipclean = 1;
 	exitonfail = 0;
@@ -95,6 +98,7 @@ main(int argc, char **argv)
 			break;
 		case 'f':
 			skipclean = 0;
+			reallypreen = true;
 			break;
 		case 'i':
 			idaddr = strtol(optarg, NULL, 0);
@@ -142,6 +146,29 @@ main(int argc, char **argv)
 	if (!argc)
 		usage();
 
+	/*
+	 * Don't do anything in preen mode. This is a replacement for
+	 * version 1.111 of src/distrib/utils/sysinst/disks.c, which
+	 * disabled fsck on installer-generated lfs partitions. That
+	 * isn't the right way to do it; better to run fsck but have
+	 * it not do anything, so that when the issues in fsck get
+	 * resolved it can be turned back on.
+	 *
+	 * If you really want to run fsck in preen mode you can do:
+	 *fsck_lfs -p -f image
+	 *
+	 * This was prompted by
+	 * http://mail-index.netbsd.org/tech-kern/2010/02/09/msg007306.html.
+	 *
+	 * It would be nice if someone prepared a more detailed report
+	 * of the problems.
+	 *
+	 * XXX.
+	 */
+	if (preen  !reallypreen) {
+		return ret;
+	}
+
 	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 		(void) signal(SIGINT, catch);
 	if (preen)



CVS commit: src/sys/net

2014-07-12 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Jul 12 16:13:57 UTC 2014

Modified Files:
src/sys/net: bpfjit.c

Log Message:
Some small changes: add missing error checks; move sjump initialisation away
from optimize(); +BJ_HINT_PKT, -BJ_HINT_IND; tweak comments.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/net/bpfjit.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/bpfjit.c
diff -u src/sys/net/bpfjit.c:1.23 src/sys/net/bpfjit.c:1.24
--- src/sys/net/bpfjit.c:1.23	Fri Jul 11 20:43:33 2014
+++ src/sys/net/bpfjit.c	Sat Jul 12 16:13:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfjit.c,v 1.23 2014/07/11 20:43:33 alnsn Exp $	*/
+/*	$NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 Alexander Nasonov.
@@ -31,9 +31,9 @@
 
 #include sys/cdefs.h
 #ifdef _KERNEL
-__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.23 2014/07/11 20:43:33 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $);
 #else
-__RCSID($NetBSD: bpfjit.c,v 1.23 2014/07/11 20:43:33 alnsn Exp $);
+__RCSID($NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $);
 #endif
 
 #include sys/types.h
@@ -123,8 +123,8 @@ __RCSID($NetBSD: bpfjit.c,v 1.23 2014/0
  * Optimization hints.
  */
 typedef unsigned int bpfjit_hint_t;
-#define BJ_HINT_LDW  0x01 /* 32-bit packet read  */
-#define BJ_HINT_IND  0x02 /* packet read at a variable offset */
+#define BJ_HINT_PKT  0x01 /* packet read */
+#define BJ_HINT_LDW  0x02 /* 32-bit load */
 #define BJ_HINT_COP  0x04 /* BPF_COP or BPF_COPX instruction  */
 #define BJ_HINT_XREG 0x08 /* BJ_XREG is needed   */
 #define BJ_HINT_LDX  0x10 /* BPF_LDX instruction */
@@ -252,14 +252,11 @@ nscratches(bpfjit_hint_t hints)
 	sljit_si rv = 2;
 
 #ifdef _KERNEL
-	/*
-	 * Most kernel programs load packet bytes and they generate
-	 * m_xword/m_xhalf/m_xbyte() calls with three arguments.
-	 */
-	rv = 3;
+	if (hints  BJ_HINT_PKT)
+		rv = 3; /* xcall with three arguments */
 #endif
 
-	if (hints  BJ_HINT_LDW)
+	if (hints  (BJ_HINT_LDW|BJ_HINT_PKT))
 		rv = 3; /* uses BJ_TMP2REG */
 
 	if (hints  BJ_HINT_COP)
@@ -354,7 +351,7 @@ append_jump(struct sljit_jump *jump, str
 }
 
 /*
- * Generate code for BPF_LD+BPF_B+BPF_ABSA - P[k:1].
+ * Emit code for BPF_LD+BPF_B+BPF_ABSA - P[k:1].
  */
 static int
 emit_read8(struct sljit_compiler *compiler, uint32_t k)
@@ -367,7 +364,7 @@ emit_read8(struct sljit_compiler *compil
 }
 
 /*
- * Generate code for BPF_LD+BPF_H+BPF_ABSA - P[k:2].
+ * Emit code for BPF_LD+BPF_H+BPF_ABSA - P[k:2].
  */
 static int
 emit_read16(struct sljit_compiler *compiler, uint32_t k)
@@ -409,7 +406,7 @@ emit_read16(struct sljit_compiler *compi
 }
 
 /*
- * Generate code for BPF_LD+BPF_W+BPF_ABSA - P[k:4].
+ * Emit code for BPF_LD+BPF_W+BPF_ABSA - P[k:4].
  */
 static int
 emit_read32(struct sljit_compiler *compiler, uint32_t k)
@@ -504,21 +501,15 @@ emit_read32(struct sljit_compiler *compi
 
 #ifdef _KERNEL
 /*
- * Generate m_xword/m_xhalf/m_xbyte call.
- *
- * pc is one of:
- * BPF_LD+BPF_W+BPF_ABSA - P[k:4]
- * BPF_LD+BPF_H+BPF_ABSA - P[k:2]
- * BPF_LD+BPF_B+BPF_ABSA - P[k:1]
- * BPF_LD+BPF_W+BPF_INDA - P[X+k:4]
- * BPF_LD+BPF_H+BPF_INDA - P[X+k:2]
- * BPF_LD+BPF_B+BPF_INDA - P[X+k:1]
- * BPF_LDX+BPF_B+BPF_MSH   X - 4*(P[k:1]0xf)
+ * Emit code for m_xword/m_xhalf/m_xbyte call.
  *
- * The dst variable should be
- *  - BJ_AREG when emitting code for BPF_LD instructions,
- *  - BJ_XREG or BJ_TMP1REG register when emitting code
- *for BPF_MSH instruction.
+ * @pc BPF_LD+BPF_W+BPF_ABSA - P[k:4]
+ * BPF_LD+BPF_H+BPF_ABSA - P[k:2]
+ * BPF_LD+BPF_B+BPF_ABSA - P[k:1]
+ * BPF_LD+BPF_W+BPF_INDA - P[X+k:4]
+ * BPF_LD+BPF_H+BPF_INDA - P[X+k:2]
+ * BPF_LD+BPF_B+BPF_INDA - P[X+k:1]
+ * BPF_LDX+BPF_B+BPF_MSH   X - 4*(P[k:1]0xf)
  */
 static int
 emit_xcall(struct sljit_compiler *compiler, const struct bpf_insn *pc,
@@ -567,6 +558,8 @@ emit_xcall(struct sljit_compiler *compil
 		SLJIT_SCRATCH_REG2, 0,
 		BJ_XREG, 0,
 		SLJIT_IMM, (uint32_t)pc-k);
+		if (status != SLJIT_SUCCESS)
+			return status;
 
 		/* if (k  X) return 0; */
 		jump = sljit_emit_cmp(compiler,
@@ -584,11 +577,10 @@ emit_xcall(struct sljit_compiler *compil
 		SLJIT_MOV,
 		SLJIT_SCRATCH_REG2, 0,
 		SLJIT_IMM, (uint32_t)pc-k);
+		if (status != SLJIT_SUCCESS)
+			return status;
 	}
 
-	if (status != SLJIT_SUCCESS)
-		return status;
-
 	/*
 	 * The third argument of fn is an address on stack.
 	 */
@@ -602,6 +594,8 @@ emit_xcall(struct sljit_compiler *compil
 	status = sljit_emit_ijump(compiler,
 	SLJIT_CALL3,
 	SLJIT_IMM, SLJIT_FUNC_OFFSET(fn));
+	if (status != SLJIT_SUCCESS)
+		return status;
 
 	if (dst != SLJIT_RETURN_REG) {
 		/* move return value to dst */
@@ -643,7 +637,7 @@ emit_xcall(struct sljit_compiler 

CVS commit: src/sys/net

2014-07-12 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Jul 12 16:52:57 UTC 2014

Modified Files:
src/sys/net: bpfjit.c

Log Message:
Initialise status to avoid -Wuninitialized warning.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/net/bpfjit.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/bpfjit.c
diff -u src/sys/net/bpfjit.c:1.24 src/sys/net/bpfjit.c:1.25
--- src/sys/net/bpfjit.c:1.24	Sat Jul 12 16:13:57 2014
+++ src/sys/net/bpfjit.c	Sat Jul 12 16:52:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $	*/
+/*	$NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 Alexander Nasonov.
@@ -31,9 +31,9 @@
 
 #include sys/cdefs.h
 #ifdef _KERNEL
-__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $);
 #else
-__RCSID($NetBSD: bpfjit.c,v 1.24 2014/07/12 16:13:57 alnsn Exp $);
+__RCSID($NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $);
 #endif
 
 #include sys/types.h
@@ -769,7 +769,7 @@ emit_pkt_read(struct sljit_compiler *com
 const struct bpf_insn *pc, struct sljit_jump *to_mchain_jump,
 struct sljit_jump ***ret0, size_t *ret0_size, size_t *ret0_maxsize)
 {
-	int status;
+	int status = SLJIT_ERR_ALLOC_FAILED;
 	uint32_t width;
 	struct sljit_jump *jump;
 #ifdef _KERNEL



CVS commit: src/lib/libc/arch/sparc/gen

2014-07-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 12 19:11:57 UTC 2014

Modified Files:
src/lib/libc/arch/sparc/gen: _setjmp.S

Log Message:
Use save instruction to set up a local stack frame.

This fixes a segmentation fault caused by bash 4.3 on sparc64
kernels with 32-bit userland, bash uses _setjmp/_longjmp heavyly
via sigsetjmp/siglongjmp since 4.3.

For 32-bit compat library which is compiled with -mcpu=ultrasparc
option (and define __sparc_v9__), use a similar code to 64-bit
library.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/sparc/gen/_setjmp.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/sparc/gen/_setjmp.S
diff -u src/lib/libc/arch/sparc/gen/_setjmp.S:1.9 src/lib/libc/arch/sparc/gen/_setjmp.S:1.10
--- src/lib/libc/arch/sparc/gen/_setjmp.S:1.9	Sat Apr 30 23:41:12 2011
+++ src/lib/libc/arch/sparc/gen/_setjmp.S	Sat Jul 12 19:11:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: _setjmp.S,v 1.9 2011/04/30 23:41:12 martin Exp $	*/
+/*	$NetBSD: _setjmp.S,v 1.10 2014/07/12 19:11:57 nakayama Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include machine/trap.h
 
 #if defined(LIBC_SCCS)  !defined(lint)
-RCSID($NetBSD: _setjmp.S,v 1.9 2011/04/30 23:41:12 martin Exp $)
+RCSID($NetBSD: _setjmp.S,v 1.10 2014/07/12 19:11:57 nakayama Exp $)
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -59,26 +59,46 @@ ENTRY(_setjmp)
 	 clr	%o0		! return 0
 
 ENTRY(_longjmp)
-	sub	%sp, 64, %sp	! set up a local stack frame
-	tst	%o1		! compute v ? v : 1
+#ifdef __sparc_v9__
+	save	%sp, -CCFSZ, %sp
+	flushw
+	/*
+	 * We restore the saved stack pointer to %fp, then issue
+	 * a `restore' instruction which will reload the register
+	 * window from the stack.
+	 */
+	ld	[%i0 + 16], %g3
+	ld	[%i0 + 24], %g2
+	ld	[%i0 + 48], %g4
+	ld	[%i0 + 52], %g7
+	ld	[%i0 + 4], %i7	/* restore return pc */
+	ld	[%i0 + 0], %fp	/* and stack pointer */
+	mov	1, %i0
+	movrnz	%i1, %i1, %i0	! compute v ? v : 1
+	ret
+	 restore
+#else
+	save	%sp, -64, %sp	! set up a local stack frame
+	tst	%i1		! compute v ? v : 1
 	be,a	0f
-	 mov	1, %o1
+	 mov	1, %i1
 0:
 	t	ST_FLUSHWIN	! flush register windows out to the stack
 
 	/* restore globals */
-	ld	[%o0 + 16], %g3
-	ld	[%o0 + 24], %g2
-	ld	[%o0 + 48], %g4
-	ld	[%o0 + 52], %g7
+	ld	[%i0 + 16], %g3
+	ld	[%i0 + 24], %g2
+	ld	[%i0 + 48], %g4
+	ld	[%i0 + 52], %g7
 
 	/*
 	 * We restore the saved stack pointer to %fp, then issue
 	 * a `restore' instruction which will reload the register
 	 * window from the stack.
 	 */
-	ld	[%o0+4], %o7	/* restore return pc */
-	ld	[%o0+0], %fp	/* and stack pointer */
+	ld	[%i0+4], %i7	/* restore return pc */
+	ld	[%i0+0], %fp	/* and stack pointer */
 
-	retl			! success, return %o1
-	 restore	%o1, 0, %o0
+	ret			! success, return %i1
+	 restore	%i1, 0, %o0
+#endif



CVS commit: src/lib/libc/arch/sparc

2014-07-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 12 19:21:48 UTC 2014

Modified Files:
src/lib/libc/arch/sparc: Makefile.inc
src/lib/libc/arch/sparc/gen: Makefile.inc

Log Message:
Include sparc_v8 library into sparc64 32-bit compat libc library.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/sparc/Makefile.inc
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/sparc/gen/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/sparc/Makefile.inc
diff -u src/lib/libc/arch/sparc/Makefile.inc:1.14 src/lib/libc/arch/sparc/Makefile.inc:1.15
--- src/lib/libc/arch/sparc/Makefile.inc:1.14	Tue Apr 12 03:35:47 2011
+++ src/lib/libc/arch/sparc/Makefile.inc	Sat Jul 12 19:21:48 2014
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.14 2011/04/12 03:35:47 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.15 2014/07/12 19:21:48 nakayama Exp $
 
 SRCS+=	__sigaction14_sigtramp.c __sigtramp2.S
 
+.if ${MACHINE} != sparc64
 # `source' files built from m4 source
 # the name `div.o' is taken for the ANSI C `div' function, hence sdiv here
 SRCS+=	rem.S sdiv.S udiv.S urem.S
@@ -34,3 +35,4 @@ urem.S: ${LIBCDIR}/arch/sparc/gen/divrem
 	@(echo define(NAME,\`.urem')define(OP,\`rem')define(S,\`false'); \
 	 cat ${.ALLSRC}) | ${TOOL_M4}  ${.TARGET}
 	@chmod 444 ${.TARGET}
+.endif

Index: src/lib/libc/arch/sparc/gen/Makefile.inc
diff -u src/lib/libc/arch/sparc/gen/Makefile.inc:1.22 src/lib/libc/arch/sparc/gen/Makefile.inc:1.23
--- src/lib/libc/arch/sparc/gen/Makefile.inc:1.22	Sun Dec  6 07:12:17 2009
+++ src/lib/libc/arch/sparc/gen/Makefile.inc	Sat Jul 12 19:21:48 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.22 2009/12/06 07:12:17 uebayasi Exp $
+#	$NetBSD: Makefile.inc,v 1.23 2014/07/12 19:21:48 nakayama Exp $
 
 SRCS+=	fabs.S modf.S
 SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
@@ -20,7 +20,13 @@ SRCS+=	sigsetjmp.S
 
 SRCS+=	makecontext.c resumecontext.c _lwp.c swapcontext.S
 
-SRCS+=	fixunsdfsi.S mul.S umul.S saveregs.S
+.if ${MACHINE} == sparc64
+.PATH: ${NETBSDSRCDIR}/lib/libarch/sparc/v8
+SRCS+=	sparc_v8.S
+.else
+SRCS+=	mul.S umul.S
+.endif
+SRCS+=	fixunsdfsi.S saveregs.S
 SRCS+=	bswap16.c bswap32.c bswap64.c
 
 LSRCS.sparc.gen=	Lint_swapcontext.c



CVS commit: src/sbin/fsck_lfs

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul 12 19:44:00 UTC 2014

Modified Files:
src/sbin/fsck_lfs: lfs.c main.c

Log Message:
Remove pointless function indirection through panic_func(). It was
initialized to one thing, and then set to another right at the top of
main and never changed again.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sbin/fsck_lfs/lfs.c
cvs rdiff -u -r1.46 -r1.47 src/sbin/fsck_lfs/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/sbin/fsck_lfs/lfs.c
diff -u src/sbin/fsck_lfs/lfs.c:1.41 src/sbin/fsck_lfs/lfs.c:1.42
--- src/sbin/fsck_lfs/lfs.c:1.41	Sat Oct 19 01:09:58 2013
+++ src/sbin/fsck_lfs/lfs.c	Sat Jul 12 19:44:00 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.41 2013/10/19 01:09:58 christos Exp $ */
+/* $NetBSD: lfs.c,v 1.42 2014/07/12 19:44:00 dholland Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -85,6 +85,7 @@
 #include unistd.h
 #include util.h
 
+#include fsutil.h
 #include bufcache.h
 #include vnode.h
 #include lfs_user.h
@@ -107,7 +108,6 @@ static int
 lfs_fragextend(struct uvnode *, int, int, daddr_t, struct ubuf **);
 
 int fsdirty = 0;
-void (*panic_func)(int, const char *, va_list) = my_vpanic;
 
 /*
  * LFS buffer and uvnode operations
@@ -835,19 +835,12 @@ check_summary(struct lfs *fs, SEGSUM *sp
 
 /* print message and exit */
 void
-my_vpanic(int fatal, const char *fmt, va_list ap)
-{
-(void) vprintf(fmt, ap);
-	exit(8);
-}
-
-void
 call_panic(const char *fmt, ...)
 {
 	va_list ap;
 
 	va_start(ap, fmt);
-panic_func(1, fmt, ap);
+vmsg(1, fmt, ap);
 	va_end(ap);
 }
 

Index: src/sbin/fsck_lfs/main.c
diff -u src/sbin/fsck_lfs/main.c:1.46 src/sbin/fsck_lfs/main.c:1.47
--- src/sbin/fsck_lfs/main.c:1.46	Sat Jul 12 16:11:27 2014
+++ src/sbin/fsck_lfs/main.c	Sat Jul 12 19:44:00 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.46 2014/07/12 16:11:27 dholland Exp $	 */
+/* $NetBSD: main.c,v 1.47 2014/07/12 19:44:00 dholland Exp $	 */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -57,7 +57,6 @@ static int argtoi(int, const char *, con
 static int checkfilesys(const char *, char *, long, int);
 static void usage(void);
 static void efun(int, const char *, ...);
-extern void (*panic_func)(int, const char *, va_list);
 
 static void
 efun(int eval, const char *fmt, ...)
@@ -81,7 +80,6 @@ main(int argc, char **argv)
 	skipclean = 1;
 	exitonfail = 0;
 	idaddr = 0x0;
-	panic_func = vmsg;
 	esetfunc(efun);
 	while ((ch = getopt(argc, argv, optstring)) != -1) {
 		switch (ch) {



CVS commit: src/distrib/sets/lists/xbase

2014-07-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 12 19:46:22 UTC 2014

Modified Files:
src/distrib/sets/lists/xbase: mi

Log Message:
Remove duplicated line.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/distrib/sets/lists/xbase/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xbase/mi
diff -u src/distrib/sets/lists/xbase/mi:1.123 src/distrib/sets/lists/xbase/mi:1.124
--- src/distrib/sets/lists/xbase/mi:1.123	Fri Jul 11 19:19:16 2014
+++ src/distrib/sets/lists/xbase/mi	Sat Jul 12 19:46:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.123 2014/07/11 19:19:16 mrg Exp $
+# $NetBSD: mi,v 1.124 2014/07/12 19:46:22 nakayama Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1519,7 +1519,6 @@
 ./usr/X11R7/include/drm	base-x11-root	obsolete
 ./usr/X11R7/include/fontconfigbase-x11-root	xorg
 ./usr/X11R7/include/freetype2base-x11-root	xorg
-./usr/X11R7/include/freetype2base-x11-root	xorg
 ./usr/X11R7/include/freetype2/cache			base-x11-root	xorg
 ./usr/X11R7/include/freetype2/config			base-x11-root	xorg
 ./usr/X11R7/include/freetype2/freetype			base-obsolete	obsolete



CVS commit: src/sbin/fsck_lfs

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul 12 19:48:24 UTC 2014

Modified Files:
src/sbin/fsck_lfs: lfs_user.h

Log Message:
G/C my_vpanic().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/fsck_lfs/lfs_user.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_lfs/lfs_user.h
diff -u src/sbin/fsck_lfs/lfs_user.h:1.5 src/sbin/fsck_lfs/lfs_user.h:1.6
--- src/sbin/fsck_lfs/lfs_user.h:1.5	Sat Jun  8 21:13:19 2013
+++ src/sbin/fsck_lfs/lfs_user.h	Sat Jul 12 19:48:24 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_user.h,v 1.5 2013/06/08 21:13:19 dholland Exp $ */
+/* $NetBSD: lfs_user.h,v 1.6 2014/07/12 19:48:24 dholland Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -89,7 +89,6 @@ int check_summary(struct lfs *, struct s
 ulfs_daddr_t try_verify(struct lfs *, struct uvnode *, ulfs_daddr_t, int);
 struct ulfs1_dinode *lfs_ifind(struct lfs *, ino_t, struct ubuf *);
 void call_panic(const char *, ...);
-void my_vpanic(int, const char *, va_list);
 int extend_ifile(struct lfs *);
 struct uvnode *lfs_valloc(struct lfs *, ino_t);
 int lfs_balloc(struct uvnode *, off_t, int, struct ubuf **);



CVS commit: src/external/bsd/dhcp/include

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 20:03:19 UTC 2014

Modified Files:
src/external/bsd/dhcp/include: config.h

Log Message:
update config.h to the new version and enable DHCPv6


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/include/config.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/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.4 src/external/bsd/dhcp/include/config.h:1.5
--- src/external/bsd/dhcp/include/config.h:1.4	Wed Mar 27 00:38:54 2013
+++ src/external/bsd/dhcp/include/config.h	Sat Jul 12 20:03:19 2014
@@ -1,6 +1,9 @@
 /* includes/config.h.  Generated from config.h.in by configure.  */
 /* includes/config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
 /* Define to compile debug-only DHCP software. */
 /* #undef DEBUG */
 
@@ -12,11 +15,8 @@
 #include sys/endian.h
 #define DHCP_BYTE_ORDER _BYTE_ORDER
 
-#if 0
-/* From the Makefile */
 /* Define to 1 to include DHCPv6 support. */
 #define DHCPv6 1
-#endif
 
 /* Define to any value to chroot() prior to loading config. */
 /* #undef EARLY_CHROOT */
@@ -34,7 +34,7 @@
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
MSVC and with C++ compilers. */
-#define FLEXIBLE_ARRAY_MEMBER 
+#define FLEXIBLE_ARRAY_MEMBER /**/
 
 /* Define to 1 to use the Berkeley Packet Filter interface code. */
 #define HAVE_BPF 1
@@ -70,7 +70,7 @@
 #define HAVE_REGEX_H 1
 
 /* Define to 1 if the sockaddr structure has a length field. */
-#define HAVE_SA_LEN 
+#define HAVE_SA_LEN /**/
 
 /* Define to 1 if you have the stdint.h header file. */
 #define HAVE_STDINT_H 1
@@ -84,6 +84,9 @@
 /* Define to 1 if you have the string.h header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
 /* Define to 1 if you have the sys/socket.h header file. */
 #define HAVE_SYS_SOCKET_H 1
 
@@ -121,13 +124,16 @@
 #define PACKAGE_NAME DHCP
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING DHCP 4.2.5-P1
+#define PACKAGE_STRING DHCP 4.3.0
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME dhcp
 
+/* Define to the home page for this package. */
+#define PACKAGE_URL 
+
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 4.2.5-P1
+#define PACKAGE_VERSION 4.3.0
 
 /* Define to any value to include Ari's PARANOIA patch. */
 /* #undef PARANOIA */
@@ -147,23 +153,45 @@
 /* Define to 1 to use the standard BSD socket API. */
 /* #undef USE_SOCKETS */
 
-/* Define to 1 to enable IPv4 packet info support. */
-/* #undef USE_V4_PKTINFO */
-
-/* Version number of package */
-#define VERSION 4.2.5-P1
-
-/* Define to 1 if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
+/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 /* # undef _ALL_SOURCE */
 #endif
-
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE 1
 #endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define to 1 to enable IPv4 packet info support. */
+/* #undef USE_V4_PKTINFO */
+
+/* Version number of package */
+#define VERSION 4.3.0
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
 
 /* Define to 1 if on MINIX. */
 /* #undef _MINIX */
@@ -206,31 +234,20 @@
 /* #undef _POSIX_SOURCE */
 
 /* Define for Solaris 2.5.1 so the uint32_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If the typedef was allowed, the
+   pthread.h, or semaphore.h is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
 /* #undef _UINT32_T */
 
 /* Define for Solaris 2.5.1 so the uint64_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If the typedef was allowed, the
+   pthread.h, or semaphore.h is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
 /* #undef _UINT64_T */
 
 /* Define for Solaris 2.5.1 so the uint8_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If 

CVS commit: src/usr.bin/vmstat

2014-07-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 12 20:04:31 UTC 2014

Modified Files:
src/usr.bin/vmstat: vmstat.c

Log Message:
Use u_long to avoid negative value outputs.


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/usr.bin/vmstat/vmstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.202 src/usr.bin/vmstat/vmstat.c:1.203
--- src/usr.bin/vmstat/vmstat.c:1.202	Sat Jun 14 04:06:54 2014
+++ src/usr.bin/vmstat/vmstat.c	Sat Jul 12 20:04:31 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.202 2014/06/14 04:06:54 joerg Exp $ */
+/* $NetBSD: vmstat.c,v 1.203 2014/07/12 20:04:31 nakayama Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)vmstat.c	8.2 (Berkeley) 3/1/95;
 #else
-__RCSID($NetBSD: vmstat.c,v 1.202 2014/06/14 04:06:54 joerg Exp $);
+__RCSID($NetBSD: vmstat.c,v 1.203 2014/07/12 20:04:31 nakayama Exp $);
 #endif
 #endif /* not lint */
 
@@ -304,7 +304,7 @@ void	needhdr(int);
 void	getnlist(int);
 long	getuptime(void);
 void	printhdr(void);
-long	pct(long, long);
+long	pct(u_long, u_long);
 __dead static void	usage(void);
 void	doforkst(void);
 
@@ -852,7 +852,7 @@ needhdr(int dummy)
 }
 
 long
-pct(long top, long bot)
+pct(u_long top, u_long bot)
 {
 	long ans;
 
@@ -862,7 +862,7 @@ pct(long top, long bot)
 	return (ans);
 }
 
-#define	PCT(top, bot) (int)pct((long)(top), (long)(bot))
+#define	PCT(top, bot) (int)pct((u_long)(top), (u_long)(bot))
 
 void
 dosum(void)



CVS commit: src/sys/net

2014-07-12 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Jul 12 20:14:18 UTC 2014

Modified Files:
src/sys/net: bpfjit.c

Log Message:
emit_xcall: check overflow by comparing X with (UINT32_MAX - pk-k), restore
the A register after checking that xcall succeeded.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/net/bpfjit.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/bpfjit.c
diff -u src/sys/net/bpfjit.c:1.25 src/sys/net/bpfjit.c:1.26
--- src/sys/net/bpfjit.c:1.25	Sat Jul 12 16:52:57 2014
+++ src/sys/net/bpfjit.c	Sat Jul 12 20:14:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $	*/
+/*	$NetBSD: bpfjit.c,v 1.26 2014/07/12 20:14:18 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 Alexander Nasonov.
@@ -31,9 +31,9 @@
 
 #include sys/cdefs.h
 #ifdef _KERNEL
-__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.26 2014/07/12 20:14:18 alnsn Exp $);
 #else
-__RCSID($NetBSD: bpfjit.c,v 1.25 2014/07/12 16:52:57 alnsn Exp $);
+__RCSID($NetBSD: bpfjit.c,v 1.26 2014/07/12 20:14:18 alnsn Exp $);
 #endif
 
 #include sys/types.h
@@ -552,25 +552,24 @@ emit_xcall(struct sljit_compiler *compil
 		return status;
 
 	if (BPF_CLASS(pc-code) == BPF_LD  BPF_MODE(pc-code) == BPF_IND) {
+		/* if (X  UINT32_MAX - pc-k) return 0; */
+		jump = sljit_emit_cmp(compiler,
+		SLJIT_C_GREATER,
+		BJ_XREG, 0,
+		SLJIT_IMM, UINT32_MAX - pc-k);
+		if (jump == NULL)
+			return SLJIT_ERR_ALLOC_FAILED;
+		if (!append_jump(jump, ret0, ret0_size, ret0_maxsize))
+			return SLJIT_ERR_ALLOC_FAILED;
+
 		/* k = X + pc-k; */
 		status = sljit_emit_op2(compiler,
-		SLJIT_ADD | SLJIT_INT_OP,
+		SLJIT_ADD,
 		SLJIT_SCRATCH_REG2, 0,
 		BJ_XREG, 0,
 		SLJIT_IMM, (uint32_t)pc-k);
 		if (status != SLJIT_SUCCESS)
 			return status;
-
-		/* if (k  X) return 0; */
-		jump = sljit_emit_cmp(compiler,
-		SLJIT_C_LESS,
-		SLJIT_SCRATCH_REG2, 0,
-		BJ_XREG, 0);
-		if (jump == NULL)
-			return SLJIT_ERR_ALLOC_FAILED;
-
-		if (!append_jump(jump, ret0, ret0_size, ret0_maxsize))
-			return SLJIT_ERR_ALLOC_FAILED;
 	} else {
 		/* k = pc-k */
 		status = sljit_emit_op1(compiler,
@@ -607,16 +606,6 @@ emit_xcall(struct sljit_compiler *compil
 			return status;
 	}
 
-	if (BPF_CLASS(pc-code) == BPF_LDX) {
-		/* restore A */
-		status = sljit_emit_op1(compiler,
-		SLJIT_MOV,
-		BJ_AREG, 0,
-		BJ_TMP3REG, 0);
-		if (status != SLJIT_SUCCESS)
-			return status;
-	}
-
 	/* tmp2 = *err; */
 	status = sljit_emit_op1(compiler,
 	SLJIT_MOV_UI,
@@ -637,6 +626,16 @@ emit_xcall(struct sljit_compiler *compil
 	if (!append_jump(jump, ret0, ret0_size, ret0_maxsize))
 		return SLJIT_ERR_ALLOC_FAILED;
 
+	if (BPF_CLASS(pc-code) == BPF_LDX) {
+		/* restore A */
+		status = sljit_emit_op1(compiler,
+		SLJIT_MOV,
+		BJ_AREG, 0,
+		BJ_TMP3REG, 0);
+		if (status != SLJIT_SUCCESS)
+			return status;
+	}
+
 	return SLJIT_SUCCESS;
 }
 #endif



CVS commit: src/external/mit/xorg/bin

2014-07-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 12 20:31:04 UTC 2014

Modified Files:
src/external/mit/xorg/bin/xkill: Makefile
src/external/mit/xorg/bin/xlsclients: Makefile
src/external/mit/xorg/bin/xrdb: Makefile
src/external/mit/xorg/bin/xset: Makefile
src/external/mit/xorg/bin/xvinfo: Makefile

Log Message:
Restore package names to PACKAGE_STRING.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/xkill/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/bin/xlsclients/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/bin/xrdb/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/xset/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/bin/xvinfo/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/mit/xorg/bin/xkill/Makefile
diff -u src/external/mit/xorg/bin/xkill/Makefile:1.2 src/external/mit/xorg/bin/xkill/Makefile:1.3
--- src/external/mit/xorg/bin/xkill/Makefile:1.2	Wed Mar 19 23:46:22 2014
+++ src/external/mit/xorg/bin/xkill/Makefile	Sat Jul 12 20:31:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2014/03/19 23:46:22 mrg Exp $
+#	$NetBSD: Makefile,v 1.3 2014/07/12 20:31:04 nakayama Exp $
 
 .include bsd.own.mk
 
@@ -7,7 +7,7 @@ PROG=	xkill
 LDADD+=	-lXmuu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}
 
-CPPFLAGS+=	-DPACKAGE_STRING=\1.0.4\
+CPPFLAGS+=	-DPACKAGE_STRING=\xkill 1.0.4\
 
 .PATH:	${X11SRCDIR.${PROG}} ${X11SRCDIR.${PROG}}/man
 

Index: src/external/mit/xorg/bin/xlsclients/Makefile
diff -u src/external/mit/xorg/bin/xlsclients/Makefile:1.6 src/external/mit/xorg/bin/xlsclients/Makefile:1.7
--- src/external/mit/xorg/bin/xlsclients/Makefile:1.6	Mon Mar 17 09:46:10 2014
+++ src/external/mit/xorg/bin/xlsclients/Makefile	Sat Jul 12 20:31:04 2014
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.6 2014/03/17 09:46:10 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2014/07/12 20:31:04 nakayama Exp $
 
 .include bsd.own.mk
 
 PROG=	xlsclients
 
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR} -DHAVE_STRNLEN \
-		-DPACKAGE_STRING=\1.1.3\
+		-DPACKAGE_STRING=\xlsclients 1.1.3\
 
 #BUILDSYMLINKS=	xlscli.man xlsclients.man
 

Index: src/external/mit/xorg/bin/xrdb/Makefile
diff -u src/external/mit/xorg/bin/xrdb/Makefile:1.5 src/external/mit/xorg/bin/xrdb/Makefile:1.6
--- src/external/mit/xorg/bin/xrdb/Makefile:1.5	Mon Mar 17 10:09:18 2014
+++ src/external/mit/xorg/bin/xrdb/Makefile	Sat Jul 12 20:31:04 2014
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.5 2014/03/17 10:09:18 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2014/07/12 20:31:04 nakayama Exp $
 
 .include bsd.own.mk
 
 PROG=	xrdb
 
 CPPFLAGS+=-DCPP=\/usr/bin/cpp -traditional\ -DHAS_MKSTEMP	# XXX
-CPPFLAGS+=-DHAVE_ASPRINTF -DPACKAGE_STRING=\1.1.0\
+CPPFLAGS+=-DHAVE_ASPRINTF -DPACKAGE_STRING=\xrdb 1.1.0\
 
 LDADD+=	-lXmuu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}

Index: src/external/mit/xorg/bin/xset/Makefile
diff -u src/external/mit/xorg/bin/xset/Makefile:1.3 src/external/mit/xorg/bin/xset/Makefile:1.4
--- src/external/mit/xorg/bin/xset/Makefile:1.3	Mon Mar 17 10:09:18 2014
+++ src/external/mit/xorg/bin/xset/Makefile	Sat Jul 12 20:31:04 2014
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.3 2014/03/17 10:09:18 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2014/07/12 20:31:04 nakayama Exp $
 
 .include bsd.own.mk
 
 PROG=	xset
 
 CPPFLAGS+=${X11FLAGS.EXTENSION} -DXKB
-CPPFLAGS+=	-DPACKAGE_STRING=\1.2.3\
+CPPFLAGS+=	-DPACKAGE_STRING=\xset 1.2.3\
 
 LDADD+=	-lXmuu -lXt -lSM -lICE -lXxf86misc -lXfontcache -lXext -lX11
 DPADD+= ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXXF86MISC} ${LIBXFONTCACHE}

Index: src/external/mit/xorg/bin/xvinfo/Makefile
diff -u src/external/mit/xorg/bin/xvinfo/Makefile:1.3 src/external/mit/xorg/bin/xvinfo/Makefile:1.4
--- src/external/mit/xorg/bin/xvinfo/Makefile:1.3	Mon Mar 17 10:09:18 2014
+++ src/external/mit/xorg/bin/xvinfo/Makefile	Sat Jul 12 20:31:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2014/03/17 10:09:18 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2014/07/12 20:31:04 nakayama Exp $
 
 .include bsd.own.mk
 
@@ -7,7 +7,7 @@ PROG=	xvinfo
 LDADD+=	-lXv -lXext -lX11
 DPADD+=	${LIBXV} ${LIBXEXT} ${LIBX11}
 
-CPPFLAGS+=	-DPACKAGE_STRING=\1.1.2\
+CPPFLAGS+=	-DPACKAGE_STRING=\xvinfo 1.1.2\
 
 .PATH:	${X11SRCDIR.${PROG}} ${X11SRCDIR.${PROG}}/man
 



CVS commit: src/external/gpl3/gcc/dist/gcc

2014-07-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jul 13 00:16:31 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc: Makefile.in

Log Message:
more BCONFIG_H dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/Makefile.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/Makefile.in
diff -u src/external/gpl3/gcc/dist/gcc/Makefile.in:1.9 src/external/gpl3/gcc/dist/gcc/Makefile.in:1.10
--- src/external/gpl3/gcc/dist/gcc/Makefile.in:1.9	Tue May 27 05:18:54 2014
+++ src/external/gpl3/gcc/dist/gcc/Makefile.in	Sat Jul 12 20:16:31 2014
@@ -3918,21 +3918,21 @@ build/gengtype-lex.o: $(BCONFIG_H)
 
 gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
   $(SYSTEM_H)
-gengtype-parse.o: $(CONFIG_H)
+gengtype-parse.o: $(CONFIG_H) $(BCONFIG_H)
 CFLAGS-gengtype-parse.o += -DGENERATOR_FILE
 build/gengtype-parse.o: $(BCONFIG_H)
 
 gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
   gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
   $(XREGEX_H)
-gengtype-state.o: $(CONFIG_H)
+gengtype-state.o: $(CONFIG_H) $(BCONFIG_H)
 CFLAGS-gengtype-state.o += -DGENERATOR_FILE
 build/gengtype-state.o: $(BCONFIG_H)
 
 gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h 	\
   rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \
   $(OBSTACK_H) $(XREGEX_H)
-gengtype.o: $(CONFIG_H)
+gengtype.o: $(CONFIG_H) $(BCONFIG_H)
 CFLAGS-gengtype.o += -DGENERATOR_FILE
 build/gengtype.o: $(BCONFIG_H)
 



CVS commit: src/sys/dev/pci

2014-07-12 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jul 13 01:02:20 UTC 2014

Modified Files:
src/sys/dev/pci: igma.c

Log Message:
The vga driver now detaches wscons.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/igma.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/igma.c
diff -u src/sys/dev/pci/igma.c:1.1 src/sys/dev/pci/igma.c:1.2
--- src/sys/dev/pci/igma.c:1.1	Tue Jan 21 14:52:07 2014
+++ src/sys/dev/pci/igma.c	Sun Jul 13 01:02:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: igma.c,v 1.1 2014/01/21 14:52:07 mlelstv Exp $	*/
+/*	$NetBSD: igma.c,v 1.2 2014/07/13 01:02:20 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2014 Michael van Elst
@@ -21,7 +21,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igma.c,v 1.1 2014/01/21 14:52:07 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: igma.c,v 1.2 2014/07/13 01:02:20 mlelstv Exp $);
 
 #include vga.h
 
@@ -383,9 +383,6 @@ igma_attach(device_t parent, device_t se
 
 #if NVGA  0
 	iaa.iaa_console = vga_cndetach() ? true : false;
-	/* Hack */
-	if (iaa.iaa_console)
-		wsdisplay_cndetach();
 #else
 	iaa.iaa_console = 0;
 #endif



CVS commit: src/sys/external/bsd/drm2/i915drm

2014-07-12 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jul 13 01:17:15 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/i915drm: i915_pci.c

Log Message:
The vga driver now detaches wscons.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/i915drm/i915_pci.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/external/bsd/drm2/i915drm/i915_pci.c
diff -u src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.9 src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.10
--- src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.9	Tue Jul  1 20:03:21 2014
+++ src/sys/external/bsd/drm2/i915drm/i915_pci.c	Sun Jul 13 01:17:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $	*/
+/*	$NetBSD: i915_pci.c,v 1.10 2014/07/13 01:17:15 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: i915_pci.c,v 1.10 2014/07/13 01:17:15 mlelstv Exp $);
 
 #ifdef _KERNEL_OPT
 #include vga.h
@@ -211,11 +211,9 @@ i915drm_attach(device_t parent, device_t
 		 * which kernel messages will go into a black hole,
 		 * until genfb replays the console.  Whattakludge.
 		 *
-		 * wsdisplay_cndetach must come first, to clear cn_tab,
-		 * so that nothing will use it; then vga_cndetach
-		 * unmaps the bus space that it would have used.
+		 * vga_cndetach detaches wscons and unmaps the bus space
+		 * that it would have used.
 		 */
-		wsdisplay_cndetach();
 		vga_cndetach();
 	} else
 #endif



CVS commit: src/usr.bin/quota

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 13 01:46:04 UTC 2014

Modified Files:
src/usr.bin/quota: quota.c

Log Message:
Remove leftover #if 0 code from before the libquota rework.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/quota/quota.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/quota/quota.c
diff -u src/usr.bin/quota/quota.c:1.49 src/usr.bin/quota/quota.c:1.50
--- src/usr.bin/quota/quota.c:1.49	Sat May 12 19:53:22 2012
+++ src/usr.bin/quota/quota.c	Sun Jul 13 01:46:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota.c,v 1.49 2012/05/12 19:53:22 dholland Exp $	*/
+/*	$NetBSD: quota.c,v 1.50 2014/07/13 01:46:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)quota.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: quota.c,v 1.49 2012/05/12 19:53:22 dholland Exp $);
+__RCSID($NetBSD: quota.c,v 1.50 2014/07/13 01:46:04 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -502,30 +502,6 @@ getprivs(id_t id, int idtype)
 			}
 			err(1, %s: quota_open, fst[i].f_mntonname);
 		}
-#if 0
-		if (strncmp(fst[i].f_fstypename, nfs, 
-		sizeof(fst[i].f_fstypename)) == 0) {
-			version = 0;
-			qup-numqvs = QUOTA_NLIMITS;
-			qup-qvs = malloc(qup-numqvs * sizeof(qup-qvs[0]));
-			if (qup-qvs == NULL) {
-err(1, Out of memory);
-			}
-			if (getnfsquota(fst[i].f_mntfromname,
-			qup-qvs, id, ufs_quota_class_names[idtype]) != 1)
-continue;
-		} else if ((fst[i].f_flag  ST_QUOTA) != 0) {
-			qup-numqvs = QUOTA_NLIMITS;
-			qup-qvs = malloc(qup-numqvs * sizeof(qup-qvs[0]));
-			if (qup-qvs == NULL) {
-err(1, Out of memory);
-			}
-			if (getvfsquota(fst[i].f_mntonname, qup-qvs, version,
-			id, idtype, dflag, 0) != 1)
-continue;
-		} else
-			continue;
-#else
 		qup-numqvs = quota_getnumidtypes(qup-qh);
 		qup-qvs = malloc(qup-numqvs * sizeof(qup-qvs[0]));
 		if (qup-qvs == NULL) {
@@ -547,7 +523,6 @@ getprivs(id_t id, int idtype)
 quotaval_clear(qup-qvs[j]);
 			}
 		}
-#endif
 		(void)strlcpy(qup-fsname, fst[i].f_mntonname,
 		sizeof(qup-fsname));
 		if (quphead == NULL)



CVS commit: src/lib/libcurses

2014-07-12 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jul 13 01:58:08 UTC 2014

Modified Files:
src/lib/libcurses: addnstr.c

Log Message:
Remove bogus length check - SUSV2 says add(n)str wraps and performs
special character processing so we should not be trying to limit the
length to the screen edge.  This partially fixes PR 48827, the test case
works now.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libcurses/addnstr.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/addnstr.c
diff -u src/lib/libcurses/addnstr.c:1.13 src/lib/libcurses/addnstr.c:1.14
--- src/lib/libcurses/addnstr.c:1.13	Fri Sep 28 06:07:05 2012
+++ src/lib/libcurses/addnstr.c	Sun Jul 13 01:58:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: addnstr.c,v 1.13 2012/09/28 06:07:05 blymn Exp $	*/
+/*	$NetBSD: addnstr.c,v 1.14 2014/07/13 01:58:08 blymn Exp $	*/
 
 /*
  * Copyright (c) 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)addnstr.c	8.2 (Berkeley) 5/4/94;
 #else
-__RCSID($NetBSD: addnstr.c,v 1.13 2012/09/28 06:07:05 blymn Exp $);
+__RCSID($NetBSD: addnstr.c,v 1.14 2014/07/13 01:58:08 blymn Exp $);
 #endif
 #endif/* not lint */
 
@@ -147,16 +147,11 @@ waddnstr(WINDOW *win, const char *s, int
 	 * ncurses: if (n = 0) then at most n, else len = strlen(s)
 	 * XCURSES: if (n != -1) then at most n, else len = strlen(s)
 	 * 
-	 * Also SUSv2 says these functions do not wrap nor change the
-	 * cursor position.
 	 */
 	if (n = 0)
 		for (p = s, len = 0; n--  *p++; ++len);
 	else
 		len = strlen(s);
 	
-	if (len  (win-maxx - win-curx))
-		len = win-maxx - win-curx;
-
 	return(waddbytes(win, s, (int) len));
 }



CVS commit: src/sbin/fsck_lfs

2014-07-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 13 02:44:21 UTC 2014

Modified Files:
src/sbin/fsck_lfs: lfs.c lfs_user.h main.c

Log Message:
Revert previous; it doesn't work because all the lfs tools
promiscuously .PATH in each other's source files, and I haven't the
time or patience to deal with it tonight.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sbin/fsck_lfs/lfs.c
cvs rdiff -u -r1.6 -r1.7 src/sbin/fsck_lfs/lfs_user.h
cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck_lfs/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/sbin/fsck_lfs/lfs.c
diff -u src/sbin/fsck_lfs/lfs.c:1.42 src/sbin/fsck_lfs/lfs.c:1.43
--- src/sbin/fsck_lfs/lfs.c:1.42	Sat Jul 12 19:44:00 2014
+++ src/sbin/fsck_lfs/lfs.c	Sun Jul 13 02:44:21 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.42 2014/07/12 19:44:00 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.43 2014/07/13 02:44:21 dholland Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -85,7 +85,6 @@
 #include unistd.h
 #include util.h
 
-#include fsutil.h
 #include bufcache.h
 #include vnode.h
 #include lfs_user.h
@@ -108,6 +107,7 @@ static int
 lfs_fragextend(struct uvnode *, int, int, daddr_t, struct ubuf **);
 
 int fsdirty = 0;
+void (*panic_func)(int, const char *, va_list) = my_vpanic;
 
 /*
  * LFS buffer and uvnode operations
@@ -835,12 +835,19 @@ check_summary(struct lfs *fs, SEGSUM *sp
 
 /* print message and exit */
 void
+my_vpanic(int fatal, const char *fmt, va_list ap)
+{
+(void) vprintf(fmt, ap);
+	exit(8);
+}
+
+void
 call_panic(const char *fmt, ...)
 {
 	va_list ap;
 
 	va_start(ap, fmt);
-vmsg(1, fmt, ap);
+panic_func(1, fmt, ap);
 	va_end(ap);
 }
 

Index: src/sbin/fsck_lfs/lfs_user.h
diff -u src/sbin/fsck_lfs/lfs_user.h:1.6 src/sbin/fsck_lfs/lfs_user.h:1.7
--- src/sbin/fsck_lfs/lfs_user.h:1.6	Sat Jul 12 19:48:24 2014
+++ src/sbin/fsck_lfs/lfs_user.h	Sun Jul 13 02:44:21 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_user.h,v 1.6 2014/07/12 19:48:24 dholland Exp $ */
+/* $NetBSD: lfs_user.h,v 1.7 2014/07/13 02:44:21 dholland Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -89,6 +89,7 @@ int check_summary(struct lfs *, struct s
 ulfs_daddr_t try_verify(struct lfs *, struct uvnode *, ulfs_daddr_t, int);
 struct ulfs1_dinode *lfs_ifind(struct lfs *, ino_t, struct ubuf *);
 void call_panic(const char *, ...);
+void my_vpanic(int, const char *, va_list);
 int extend_ifile(struct lfs *);
 struct uvnode *lfs_valloc(struct lfs *, ino_t);
 int lfs_balloc(struct uvnode *, off_t, int, struct ubuf **);

Index: src/sbin/fsck_lfs/main.c
diff -u src/sbin/fsck_lfs/main.c:1.47 src/sbin/fsck_lfs/main.c:1.48
--- src/sbin/fsck_lfs/main.c:1.47	Sat Jul 12 19:44:00 2014
+++ src/sbin/fsck_lfs/main.c	Sun Jul 13 02:44:21 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.47 2014/07/12 19:44:00 dholland Exp $	 */
+/* $NetBSD: main.c,v 1.48 2014/07/13 02:44:21 dholland Exp $	 */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -57,6 +57,7 @@ static int argtoi(int, const char *, con
 static int checkfilesys(const char *, char *, long, int);
 static void usage(void);
 static void efun(int, const char *, ...);
+extern void (*panic_func)(int, const char *, va_list);
 
 static void
 efun(int eval, const char *fmt, ...)
@@ -80,6 +81,7 @@ main(int argc, char **argv)
 	skipclean = 1;
 	exitonfail = 0;
 	idaddr = 0x0;
+	panic_func = vmsg;
 	esetfunc(efun);
 	while ((ch = getopt(argc, argv, optstring)) != -1) {
 		switch (ch) {