CVS commit: src/share/man/man4

2016-08-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 28 05:14:36 UTC 2016

Modified Files:
src/share/man/man4: uyap.4

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/uyap.4

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

Modified files:

Index: src/share/man/man4/uyap.4
diff -u src/share/man/man4/uyap.4:1.4 src/share/man/man4/uyap.4:1.5
--- src/share/man/man4/uyap.4:1.4	Sat Aug 27 23:58:27 2016
+++ src/share/man/man4/uyap.4	Sun Aug 28 05:14:35 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: uyap.4,v 1.4 2016/08/27 23:58:27 dholland Exp $
+.\" $NetBSD: uyap.4,v 1.5 2016/08/28 05:14:35 wiz Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -38,7 +38,8 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver downloads firmware into a YAP phone.  The device will then
+driver downloads firmware into a YAP phone.
+The device will then
 disconnect and reappear as a composite device with two audio pipes
 (handled by
 .Xr uaudio 4 )



CVS commit: src/lib/libc/sys

2016-08-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 28 05:07:50 UTC 2016

Modified Files:
src/lib/libc/sys: brk.2

Log Message:
Merge ENOMEM descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/brk.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/brk.2
diff -u src/lib/libc/sys/brk.2:1.33 src/lib/libc/sys/brk.2:1.34
--- src/lib/libc/sys/brk.2:1.33	Sat Aug 27 23:06:01 2016
+++ src/lib/libc/sys/brk.2	Sun Aug 28 05:07:50 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: brk.2,v 1.33 2016/08/27 23:06:01 dholland Exp $
+.\"	$NetBSD: brk.2,v 1.34 2016/08/28 05:07:50 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -183,12 +183,10 @@ one of the following are true:
 .It Bq Er ENOMEM
 The limit, as set by
 .Xr setrlimit 2 ,
-was exceeded.
-.It Bq Er ENOMEM
-The maximum possible size of a data segment (compiled into the
-system) was exceeded.
-.It Bq Er ENOMEM
-Insufficient space existed in the swap area
+was exceeded;
+or the maximum possible size of a data segment (compiled into the
+system) was exceeded;
+or insufficient space existed in the swap area
 to support the expansion.
 .El
 .Sh SEE ALSO



CVS commit: [netbsd-7] src/doc

2016-08-27 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Aug 28 04:37:17 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
1213, 1238


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-7.1

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

Modified files:

Index: src/doc/CHANGES-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.105 src/doc/CHANGES-7.1:1.1.2.106
--- src/doc/CHANGES-7.1:1.1.2.105	Sat Aug 27 15:21:10 2016
+++ src/doc/CHANGES-7.1	Sun Aug 28 04:37:17 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.105 2016/08/27 15:21:10 bouyer Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.106 2016/08/28 04:37:17 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -5243,3 +5243,15 @@ bin/sh/parser.c	1.114 via patch
 	based) shells .. see http://www.in-ulm.de/~mascheck/ (from kre@)
 	[kre, ticket #1212]
 
+sys/arch/x86/pci/ichlpcib.c			1.51
+
+	Disable gpio(4) attachment to ichlpcib(4) by default.
+	GPIO functionality can be enabled by setting ichlpcib_gpio_disable
+	to 0, for instance with `gdb -write`.  PR port-amd64/50733.
+	[maya, ticket #1213]
+
+sys/dev/splash/splash.c1.13
+
+	Don't panic if the splash screen is bigger than the framebuffer.
+	[khorben, ticket #1238]
+



CVS commit: [netbsd-7] src/sys/dev/splash

2016-08-27 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Aug 28 04:31:19 UTC 2016

Modified Files:
src/sys/dev/splash [netbsd-7]: splash.c

Log Message:
Pull up following revision(s) (requested by khorben in ticket #1238):
sys/dev/splash/splash.c: revision 1.13
Do not panic if the splash screen is bigger than the framebuffer
This fixes a kernel crash if the splash screen does not fit inside the
framebuffer. It should probably be truncated (and optionally centered)
instead, but this avoids a panic in the meantime.
Tested on NetBSD/amd64 with a vesa framebuffer.
 From Christian Koch (cfkoch@) of EdgeBSD; thanks!
XXX pull-up(s)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.14.1 src/sys/dev/splash/splash.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/splash/splash.c
diff -u src/sys/dev/splash/splash.c:1.12 src/sys/dev/splash/splash.c:1.12.14.1
--- src/sys/dev/splash/splash.c:1.12	Sat Jun  2 14:24:00 2012
+++ src/sys/dev/splash/splash.c	Sun Aug 28 04:31:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: splash.c,v 1.12 2012/06/02 14:24:00 martin Exp $ */
+/* $NetBSD: splash.c,v 1.12.14.1 2016/08/28 04:31:19 snj Exp $ */
 
 /*-
  * Copyright (c) 2006 Jared D. McNeill 
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.12 2012/06/02 14:24:00 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.12.14.1 2016/08/28 04:31:19 snj Exp $");
 
 #include "opt_splash.h"
 
@@ -195,6 +195,14 @@ splash_render(struct splash_info *si, in
 	aprint_debug("%s: splash loaded, width %d height %d comp %d\n",
 	__func__, width, height, comp);
 
+	if ((width > si->si_width) || (height > si->si_height)) {
+		aprint_error(
+			"WARNING: splash size (%dx%d) too big for framebuffer (%dx%d)\n",
+			width, height, si->si_width, si->si_height);
+		stbi_image_free(data);
+		return EINVAL;
+	}
+
 	/* XXX */
 	if (flg & SPLASH_F_CENTER) {
 		xoff = (si->si_width - width) / 2;



CVS commit: [netbsd-7] src/sys/arch/x86/pci

2016-08-27 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Aug 28 03:38:15 UTC 2016

Modified Files:
src/sys/arch/x86/pci [netbsd-7]: ichlpcib.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1213):
sys/arch/x86/pci/ichlpcib.c: revision 1.51
Disable gpio(4) attachment to ichlpcib(4) by default.
The GPIO lines on an ICH are usually connected to opaque platform-
defined functionality, and may be manipulated by the ACPI DSDT or other
mechanisms behind our backs.  In one instance, it was found this
in combiation with gpio_resume() sabotaged repeated suspend/resume cycles.
GPIO functionality can be enabled by setting ichlpcib_gpio_disable to 0,
for instance with `gdb -write`.


To generate a diff of this commit:
cvs rdiff -u -r1.43.4.4 -r1.43.4.5 src/sys/arch/x86/pci/ichlpcib.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/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.43.4.4 src/sys/arch/x86/pci/ichlpcib.c:1.43.4.5
--- src/sys/arch/x86/pci/ichlpcib.c:1.43.4.4	Thu Apr 30 19:27:20 2015
+++ src/sys/arch/x86/pci/ichlpcib.c	Sun Aug 28 03:38:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.43.4.4 2015/04/30 19:27:20 snj Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.43.4.5 2016/08/28 03:38:15 snj Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.43.4.4 2015/04/30 19:27:20 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.43.4.5 2016/08/28 03:38:15 snj Exp $");
 
 #include 
 #include 
@@ -279,6 +279,14 @@ static struct lpcib_device {
 };
 
 /*
+ * Allow user to enable GPIO functionality if they really need it.  The
+ * vast majority of systems with an ICH should not expose GPIO to the
+ * kernel or user.  In at least one instance the gpio_resume() handler
+ * on ICH GPIO was found to sabotage S3 suspend/resume.
+ */
+int	ichlpcib_gpio_disable = 1;
+
+/*
  * Autoconf callbacks.
  */
 static int
@@ -1073,6 +1081,9 @@ lpcib_gpio_configure(device_t self)
 	int pin, shift, base_reg, cntl_reg, reg;
 	int rv;
 
+	if (ichlpcib_gpio_disable != 0)
+		return;
+
 	/* this implies ICH >= 6, and thus different mapreg */
 	if (sc->sc_has_rcba) {
 		base_reg = LPCIB_PCI_GPIO_BASE_ICH6;



CVS commit: src/lib/libc/sys

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Aug 28 00:15:01 UTC 2016

Modified Files:
src/lib/libc/sys: ntp_adjtime.2

Log Message:
fix broken xrefs


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/sys/ntp_adjtime.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/ntp_adjtime.2
diff -u src/lib/libc/sys/ntp_adjtime.2:1.11 src/lib/libc/sys/ntp_adjtime.2:1.12
--- src/lib/libc/sys/ntp_adjtime.2:1.11	Mon Dec  7 23:20:57 2015
+++ src/lib/libc/sys/ntp_adjtime.2	Sun Aug 28 00:15:01 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ntp_adjtime.2,v 1.11 2015/12/07 23:20:57 pgoyette Exp $
+.\"	$NetBSD: ntp_adjtime.2,v 1.12 2016/08/28 00:15:01 dholland Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -61,10 +61,11 @@ system call is available only for the su
 If the system call fails, the
 .Fn ntp_adjtime
 function in the standard C library will try to use the
-.Xr clockctl 4 device if present, thus making it possible for the NTP
+.Xr clockctl 4
+device if present, thus making it possible for the NTP
 daemon to run as a non-privileged user.
 If
-.X4 clockctl 4
+.Xr clockctl 4
 is not present,
 .Fn ntp_adjtime
 returns



CVS commit: src/share/man/man4/man4.amiga

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Aug 28 00:05:32 UTC 2016

Modified Files:
src/share/man/man4/man4.amiga: a1k2cp.4

Log Message:
Fix broken xrefs (they are now merely dangling)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.amiga/a1k2cp.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/a1k2cp.4
diff -u src/share/man/man4/man4.amiga/a1k2cp.4:1.4 src/share/man/man4/man4.amiga/a1k2cp.4:1.5
--- src/share/man/man4/man4.amiga/a1k2cp.4:1.4	Tue Mar 18 18:20:39 2014
+++ src/share/man/man4/man4.amiga/a1k2cp.4	Sun Aug 28 00:05:32 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: a1k2cp.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
+.\" $NetBSD: a1k2cp.4,v 1.5 2016/08/28 00:05:32 dholland Exp $
 .\"
 .\" Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,9 +64,9 @@ driver was written by
 .Sh CAVEATS
 Even if connected to clockport header, Real Time Clock modules are
 supported by the
-.Xr a2kbbc
+.Xr a2kbbc 4
 and
-.Xr a34kbbc
+.Xr a34kbbc 4
 drivers.
 .Pp
 Only one clockport is supported, even if clockport expander is present.



CVS commit: src/share/man/man4

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 23:59:56 UTC 2016

Modified Files:
src/share/man/man4: wscons.4

Log Message:
Fix broken .Xr


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/wscons.4

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

Modified files:

Index: src/share/man/man4/wscons.4
diff -u src/share/man/man4/wscons.4:1.31 src/share/man/man4/wscons.4:1.32
--- src/share/man/man4/wscons.4:1.31	Tue Jun  5 08:49:16 2012
+++ src/share/man/man4/wscons.4	Sat Aug 27 23:59:56 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: wscons.4,v 1.31 2012/06/05 08:49:16 abs Exp $
+.\" $NetBSD: wscons.4,v 1.32 2016/08/27 23:59:56 dholland Exp $
 .\"
 .\" Copyright (c) 1999, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -67,7 +67,8 @@ is made of a number of cooperating modul
 .It
 hardware support for display adapters, keyboards and mice, see
 .Xr wsdisplay 4 ,
-.Xr wskbd 4 , and
+.Xr wskbd 4 ,
+and
 .Xr wsmouse 4
 .It
 input event multiplexor, see



CVS commit: src/share/man/man4

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 23:58:27 UTC 2016

Modified Files:
src/share/man/man4: uyap.4

Log Message:
Fix broken .Xr


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/uyap.4

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

Modified files:

Index: src/share/man/man4/uyap.4
diff -u src/share/man/man4/uyap.4:1.3 src/share/man/man4/uyap.4:1.4
--- src/share/man/man4/uyap.4:1.3	Wed Apr 30 13:10:55 2008
+++ src/share/man/man4/uyap.4	Sat Aug 27 23:58:27 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: uyap.4,v 1.3 2008/04/30 13:10:55 martin Exp $
+.\" $NetBSD: uyap.4,v 1.4 2016/08/27 23:58:27 dholland Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -41,8 +41,8 @@ The
 driver downloads firmware into a YAP phone.  The device will then
 disconnect and reappear as a composite device with two audio pipes
 (handled by
-.Xr uaudio 4 ) and
-a HID device (handled by
+.Xr uaudio 4 )
+and a HID device (handled by
 .Xr uhid 4 ) .
 .Sh SEE ALSO
 .Xr uaudio 4 ,



CVS commit: src/lib/libc/sys

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 23:06:01 UTC 2016

Modified Files:
src/lib/libc/sys: brk.2

Log Message:
Rework pursuant to PR 7934: be more clear about the page granularity
behavior and when new memory is zeroed.

Also, strengthen the warning about mixing with calls to malloc (which
is not a bug) and mention that the portable way to fetch the initial
break is to call sbrk(0). There are implementations in the wild where
using _end as the initial break doesn't work.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/sys/brk.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/brk.2
diff -u src/lib/libc/sys/brk.2:1.32 src/lib/libc/sys/brk.2:1.33
--- src/lib/libc/sys/brk.2:1.32	Thu May 13 10:20:57 2004
+++ src/lib/libc/sys/brk.2	Sat Aug 27 23:06:01 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: brk.2,v 1.32 2004/05/13 10:20:57 wiz Exp $
+.\"	$NetBSD: brk.2,v 1.33 2016/08/27 23:06:01 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)brk.2	8.4 (Berkeley) 5/1/95
 .\"
-.Dd July 12, 1999
+.Dd August 27, 2016
 .Dt BRK 2
 .Os
 .Sh NAME
@@ -56,16 +56,9 @@ and
 .Fn sbrk
 functions are used to change the amount of memory allocated in a
 process's data segment.
-They do this by moving the location of the
+They do this by moving the address at which the process's heap ends.
+This address is known as the
 .Dq break .
-The break is the first address after the end of the process's
-uninitialized data segment (also known as the
-.Dq BSS ) .
-.Pp
-While the actual process data segment size maintained by the kernel will only
-grow or shrink in page sizes, these functions allow setting the break
-to unaligned values (i.e. it may point to any address inside the last
-page of the data segment).
 .Pp
 The
 .Fn brk
@@ -74,24 +67,27 @@ function sets the break to
 .Pp
 The
 .Fn sbrk
-function raises the break by at least
+function changes the break by
+.Fa incr
+bytes.
+If
 .Fa incr
-bytes, thus allocating at least
+is positive, this allocates
 .Fa incr
 bytes of new memory in the data segment.
 If
 .Fa incr
 is negative,
-the break is lowered by
-.Fa incr
-bytes.
+this releases the corresponding number of bytes.
 .Pp
-.Fn sbrk
-returns the prior address of the break.
-The current value of the program break may be determined by calling
-.Fn sbrk 0 .
-(See also
-.Xr end 3 ) .
+While the break may be set to any address, actual allocation takes
+place in page-sized quantities.
+For allocation and access control purposes the address of the break is
+always rounded up to the next page boundary.
+Thus, changes to the break that do not cross a page boundary have no
+material effect.
+Any new pages that are allocated, however, always appear freshly
+zeroed.
 .Pp
 The
 .Xr getrlimit 2
@@ -99,18 +95,71 @@ system call may be used to determine
 the maximum permissible size of the
 .Em data
 segment;
-it will not be possible to set the break
-beyond the
+it will not be possible to set the break so that the sum of the heap
+size and the data segment is greater than the
 .Dv RLIMIT_DATA
 .Em rlim_max
 value returned from a call to
-.Xr getrlimit 2 ,
-e.g.
-.Dq etext + rlim.rlim_max .
-(see
+.Xr getrlimit 2 .
+One can use the
+.Dq _etext
+symbol to find the end of the program text and thus the beginning of
+the data segment.
+.\" XXX is that always true? there are platforms where there's a fairly
+.\" large unmapped gap between text and data, plus using etext doesn't
+.\" take into account read-only data, which is probably (or should be)
+.\" billed against text size and not data size.
+See
 .Xr end 3
-for the definition of
-.Em etext ) .
+regarding
+.Dq _etext .
+.Pp
+Historically and in
+.Nx
+the heap immediately follows the data segment, and in fact is
+considered part of it.
+Thus the initial break is the first address after the end of the
+process's uninitialized data (also known as the
+.Dq BSS ) .
+This address is provided by the linker as
+.Dq _end ;
+see
+.Xr end 3 .
+.Pp
+There exist implementations in the wild where this is not the case,
+however, or where the initial break is rounded up to a page boundary,
+or other minor variations, so the recommended more-portable way to
+retrieve the initial break is by calling
+.Fn sbrk 0
+at program startup.
+(This returns the current break without changing it.)
+.Pp
+In any event, the break may not be set to an address below its initial
+position.
+.Pp
+Note that ordinary application code should use
+.Xr malloc 3
+and related functions to allocate memory, or
+.Xr mmap 2
+for lower-level page-granularity control.
+While the
+.Fn brk
+and/or
+.Fn sbrk
+functions exist in most Unix-like environments, their semantics
+sometimes vary subtly and their use is not particularly portable.
+Also, one must take care not to mix calls to

CVS commit: src/sys/lib/libsa

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 18:59:18 UTC 2016

Modified Files:
src/sys/lib/libsa: stand.h

Log Message:
Remove gets() from here too.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/lib/libsa/stand.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/lib/libsa/stand.h
diff -u src/sys/lib/libsa/stand.h:1.81 src/sys/lib/libsa/stand.h:1.82
--- src/sys/lib/libsa/stand.h:1.81	Sat Jun 11 06:20:11 2016
+++ src/sys/lib/libsa/stand.h	Sat Aug 27 18:59:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stand.h,v 1.81 2016/06/11 06:20:11 dholland Exp $	*/
+/*	$NetBSD: stand.h,v 1.82 2016/08/27 18:59:18 dholland Exp $	*/
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -77,7 +77,6 @@
 
 #ifdef LIBSA_RENAME_PRINTF
 #define getchar		libsa_getchar
-#define gets		libsa_gets
 #define kgets		libsa_kgets
 #define printf		libsa_printf
 #define putchar		libsa_putchar
@@ -258,7 +257,6 @@ void	vprintf(const char *, va_list)
 int	vsnprintf(char *, size_t, const char *, va_list)
 __attribute__((__format__(__printf__, 3, 0)));
 void	twiddle(void);
-void	gets(char *);
 void	kgets(char *, size_t);
 int	getfile(char *prompt, int mode);
 char	*strerror(int);



CVS commit: src/sys/compat/sys

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 18:54:24 UTC 2016

Modified Files:
src/sys/compat/sys: stat.h

Log Message:
update comment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/stat.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/compat/sys/stat.h
diff -u src/sys/compat/sys/stat.h:1.6 src/sys/compat/sys/stat.h:1.7
--- src/sys/compat/sys/stat.h:1.6	Fri Oct  4 21:07:37 2013
+++ src/sys/compat/sys/stat.h	Sat Aug 27 18:54:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.h,v 1.6 2013/10/04 21:07:37 christos Exp $	*/
+/*	$NetBSD: stat.h,v 1.7 2016/08/27 18:54:24 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -87,7 +87,7 @@ struct stat12 {/* NetBSD-1.2 stat st
  * stat structure used to contain timespecs, which had different
  * alignment constraints than a time_t and a long alone.  The padding
  * should be removed the next time the stat structure ABI is changed.
- * (This will happen whever we change to 8 byte time_t.)
+ * (This happened when we changed to 8 byte time_t.)
  */
 #if defined(_LP64)	/*   && _BSD_TIME_T_ == int */
 #define	__STATPAD(x)	int x;



CVS commit: src/external/bsd/top/dist

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 18:48:30 UTC 2016

Modified Files:
src/external/bsd/top/dist: utils.c

Log Message:
Be more careful/explicit with FP rounding when converting floating time
to timeval. Also, don't truncate the seconds part to int for y2038.

I've had this patch sitting around since 2010 and I completely forget
what motivated it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/top/dist/utils.c

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

Modified files:

Index: src/external/bsd/top/dist/utils.c
diff -u src/external/bsd/top/dist/utils.c:1.4 src/external/bsd/top/dist/utils.c:1.5
--- src/external/bsd/top/dist/utils.c:1.4	Tue May  5 18:51:22 2009
+++ src/external/bsd/top/dist/utils.c	Sat Aug 27 18:48:30 2016
@@ -41,6 +41,7 @@
 
 #include "os.h"
 #include 
+#include 
 #ifdef HAVE_STDARG_H
 #include 
 #else
@@ -711,8 +712,11 @@ diff_per_second(unsigned int x, unsigned
 void
 double2tv(struct timeval *tv, double d)
 {
-tv->tv_sec = (int)d;
-tv->tv_usec = (d - tv->tv_sec) * 100;
+double di;
+
+di = floor(d);
+tv->tv_sec = (time_t)di;
+tv->tv_usec = (int)ceil((d - di) * 100.0);
 }
 
 static int debug_on = 0;



CVS commit: xsrc/external/mit/xf86-video-openchrome/dist/src

2016-08-27 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sat Aug 27 16:35:48 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-openchrome/dist/src: via_display.c

Log Message:
Since CARD32 and uint32_t don't necessarily use the same underlaying
type, e.g. on i386, add an explicit cast as well.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c
diff -u xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c:1.5 xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c:1.6
--- xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c:1.5	Sun Aug 21 18:18:57 2016
+++ xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c	Sat Aug 27 16:35:48 2016
@@ -815,11 +815,11 @@ viaIGA1SetFBStartingAddress(xf86CrtcPtr 
 Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
 DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "Base Address: 0x%"PRIx32"x\n",
-Base));
+(uint32_t)Base));
 Base = (Base + drmmode->front_bo->offset) >> 1;
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "DRI Base Address: 0x%"PRIx32"\n",
-Base);
+(uint32_t)Base);
 
 hwp->writeCrtc(hwp, 0x0D, Base & 0xFF);
 hwp->writeCrtc(hwp, 0x0C, (Base & 0xFF00) >> 8);
@@ -2046,11 +2046,11 @@ viaIGA2SetFBStartingAddress(xf86CrtcPtr 
 Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
 DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "Base Address: 0x%"PRIx32"\n",
-Base));
+(uint32_t)Base));
 Base = (Base + drmmode->front_bo->offset) >> 3;
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "DRI Base Address: 0x%"PRIx32"\n",
-Base);
+(uint32_t)Base);
 
 tmp = hwp->readCrtc(hwp, 0x62) & 0x01;
 tmp |= (Base & 0x7F) << 1;



CVS commit: src/sys/arch/amd64/amd64

2016-08-27 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 27 16:17:16 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
Don't protect the second page, since it is not part of the IDT.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/arch/amd64/amd64/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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.229 src/sys/arch/amd64/amd64/machdep.c:1.230
--- src/sys/arch/amd64/amd64/machdep.c:1.229	Sat Aug 27 16:07:26 2016
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Aug 27 16:17:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.229 2016/08/27 16:07:26 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.230 2016/08/27 16:17:16 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.229 2016/08/27 16:07:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.230 2016/08/27 16:17:16 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1828,8 +1828,6 @@ cpu_reset(void)
 	 */
 	kpreempt_disable();
 	pmap_changeprot_local(idt_vaddr, VM_PROT_READ|VM_PROT_WRITE);   
-	pmap_changeprot_local(idt_vaddr + PAGE_SIZE,
-	VM_PROT_READ|VM_PROT_WRITE);
 	memset((void *)idt, 0, NIDT * sizeof(idt[0]));
 	kpreempt_enable();
 	breakpoint();



CVS commit: src/sys/arch

2016-08-27 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 27 16:07:26 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/i386/i386: machdep.c
src/sys/arch/x86/x86: pmap.c

Log Message:
Map the boot IDT, GDT and LDT in three different pages on x86. It is much
better this way, and it reduces the diff between x86 and Xen. Also, zero
them properly, otherwise we might end up with garbage in several slots.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.760 -r1.761 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.220 -r1.221 src/sys/arch/x86/x86/pmap.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.228 src/sys/arch/amd64/amd64/machdep.c:1.229
--- src/sys/arch/amd64/amd64/machdep.c:1.228	Sat Aug 27 14:19:47 2016
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Aug 27 16:07:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.229 2016/08/27 16:07:26 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.229 2016/08/27 16:07:26 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -262,6 +262,10 @@ unsigned int msgbuf_p_cnt = 0;
 
 vaddr_t idt_vaddr;
 paddr_t idt_paddr;
+vaddr_t gdt_vaddr;
+paddr_t gdt_paddr;
+vaddr_t ldt_vaddr;
+paddr_t ldt_paddr;
 
 vaddr_t module_start, module_end;
 static struct vm_map module_map_store;
@@ -1624,32 +1628,27 @@ init_x86_64(paddr_t first_avail)
 	kpreempt_disable();
 
 	pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
+	pmap_kenter_pa(gdt_vaddr, gdt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
+	pmap_kenter_pa(ldt_vaddr, ldt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
 	pmap_update(pmap_kernel());
 	memset((void *)idt_vaddr, 0, PAGE_SIZE);
+	memset((void *)gdt_vaddr, 0, PAGE_SIZE);
+	memset((void *)ldt_vaddr, 0, PAGE_SIZE);
 
 #ifndef XEN
 	pmap_changeprot_local(idt_vaddr, VM_PROT_READ);
 #endif
-	pmap_kenter_pa(idt_vaddr + PAGE_SIZE, idt_paddr + PAGE_SIZE,
-	VM_PROT_READ|VM_PROT_WRITE, 0);
-#ifdef XEN
-	/* Steal one more page for LDT */
-	pmap_kenter_pa(idt_vaddr + 2 * PAGE_SIZE, idt_paddr + 2 * PAGE_SIZE,
-	VM_PROT_READ|VM_PROT_WRITE, 0);
-#endif
+
 	pmap_update(pmap_kernel());
 
 #ifndef XEN
 	idt = (struct gate_descriptor *)idt_vaddr;
-	gdtstore = (char *)(idt + NIDT);
-	ldtstore = gdtstore + DYNSEL_START;
 #else
 	xen_idt = (struct trap_info *)idt_vaddr;
 	xen_idt_idx = 0;
-	/* Xen wants page aligned GDT/LDT in separated pages */
-	ldtstore = (char *) roundup((vaddr_t) (xen_idt + NIDT), PAGE_SIZE);
-	gdtstore = (char *) (ldtstore + PAGE_SIZE);
-#endif /* XEN */
+#endif
+	gdtstore = (char *)gdt_vaddr;
+	ldtstore = (char *)ldt_vaddr;
 
 	/*
 	 * Make GDT gates and memory segments.

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.760 src/sys/arch/i386/i386/machdep.c:1.761
--- src/sys/arch/i386/i386/machdep.c:1.760	Sat Aug 27 14:19:47 2016
+++ src/sys/arch/i386/i386/machdep.c	Sat Aug 27 16:07:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.761 2016/08/27 16:07:26 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.761 2016/08/27 16:07:26 maxv Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -243,6 +243,11 @@ unsigned int msgbuf_p_cnt = 0;
 
 vaddr_t idt_vaddr;
 paddr_t idt_paddr;
+vaddr_t gdt_vaddr;
+paddr_t gdt_paddr;
+vaddr_t ldt_vaddr;
+paddr_t ldt_paddr;
+
 vaddr_t pentium_idt_vaddr;
 
 struct vm_map *phys_map = NULL;
@@ -1300,19 +1305,22 @@ init386(paddr_t first_avail)
 #endif /* !XEN */
 
 	pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
+	pmap_kenter_pa(gdt_vaddr, gdt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
+	pmap_kenter_pa(ldt_vaddr, ldt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0);
 	pmap_update(pmap_kernel());
 	memset((void *)idt_vaddr, 0, PAGE_SIZE);
+	memset((void *)gdt_vaddr, 0, PAGE_SIZE);
+	memset((void *)ldt_vaddr, 0, PAGE_SIZE);
 
 #ifndef XEN
-	idt = (struct gate_descriptor *)idt_vaddr;
 	pmap_kenter_pa(pentium_idt_vaddr, idt_paddr, VM_PROT_READ, 0);
 	pmap_update(pmap_kernel());
 	pentium_idt = (union descriptor *)pentium_idt_vaddr;
 
 	tgdt = gdt;
-	gdt = (union descriptor *)
-		((char *)idt + NIDT * sizeof(struct gate_descriptor));
-	ldt = gdt + NGDT;
+	idt = (struct gate_descriptor *)idt_vaddr;
+	gdt = (union descriptor *)gdt_vaddr;
+	ldt = (union descriptor *)ldt_vaddr;
 
 	

CVS commit: xsrc/external/mit/xf86-video-chips/dist/src

2016-08-27 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Sat Aug 27 15:41:45 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-chips/dist/src: ct_driver.c

Log Message:
fix build for powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 \
xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c
diff -u xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.22 xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.23
--- xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.22	Sat Aug 27 03:46:07 2016
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c	Sat Aug 27 15:41:45 2016
@@ -1367,7 +1367,7 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int 
 #if defined(__arm__)
 vgaHWSetMmioFuncs(hwp, (CARD8 *)IOPortBase, 0);
 #elif defined(__powerpc__)
-vgaHWSetMmioFuncs(hwp, ioBase, 0);
+vgaHWSetMmioFuncs(hwp, (void *)ioBase, 0);
 #else
 vgaHWSetStdFuncs(hwp);
 #endif



CVS commit: [netbsd-7-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:21:28 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.2

Log Message:
tickets 1210, 1211


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.0.2

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

Modified files:

Index: src/doc/CHANGES-7.0.2
diff -u src/doc/CHANGES-7.0.2:1.1.2.8 src/doc/CHANGES-7.0.2:1.1.2.9
--- src/doc/CHANGES-7.0.2:1.1.2.8	Sat Aug 27 15:11:46 2016
+++ src/doc/CHANGES-7.0.2	Sat Aug 27 15:21:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.2,v 1.1.2.8 2016/08/27 15:11:46 bouyer Exp $
+# $NetBSD: CHANGES-7.0.2,v 1.1.2.9 2016/08/27 15:21:28 bouyer Exp $
 
 A complete list of changes from the NetBSD 7.0.1 release to the NetBSD 7.0.2
 release:
@@ -224,3 +224,27 @@ sys/compat/common/vfs_syscalls_43.c		1.5
 	fill in the tv_nsec parts of the converted timespec in cvtstat().
 	[mrg, ticket #1240]
 
+sbin/fsdb/fsdb.c1.49
+sys/ufs/ffs/ffs_vfsops.c			1.340
+usr.sbin/quot/quot.c1.34
+
+From Michael Plass:
+
+The superblock field that distinguishes between 4.2BSD and 4.4BSD
+inodes is really only relevant on a UFS1 file system. Make sure that
+it is a UFS1 fs before using fs_old_inodefmt.
+
+Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
+even for UFS2, so problems were apparent only on file systems created
+by other operating systems, for example, FreeBSD.
+[martin, ticket #1210]
+
+sys/arch/evbppc/conf/Makefile.ev64260.inc	1.8
+sys/arch/evbppc/conf/Makefile.obs405.inc	1.13
+sys/arch/evbppc/conf/Makefile.walnut.inc	1.9
+
+Fix typo in Makefile which resulted in kernel image not being generated
+
+From Rin Okuyama in PR/51369
+[maya, ticket #1211]
+



CVS commit: [netbsd-7] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:21:10 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
tickets 1210, 1211, 1212


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-7.1

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

Modified files:

Index: src/doc/CHANGES-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.104 src/doc/CHANGES-7.1:1.1.2.105
--- src/doc/CHANGES-7.1:1.1.2.104	Sat Aug 27 15:11:31 2016
+++ src/doc/CHANGES-7.1	Sat Aug 27 15:21:10 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.104 2016/08/27 15:11:31 bouyer Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.105 2016/08/27 15:21:10 bouyer Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -5208,3 +5208,38 @@ sys/compat/common/vfs_syscalls_43.c		1.5
 	fill in the tv_nsec parts of the converted timespec in cvtstat().
 	[mrg, ticket #1240]
 
+sbin/fsdb/fsdb.c1.49
+sys/ufs/ffs/ffs_vfsops.c			1.340
+usr.sbin/quot/quot.c1.34
+
+From Michael Plass:
+
+The superblock field that distinguishes between 4.2BSD and 4.4BSD
+inodes is really only relevant on a UFS1 file system. Make sure that
+it is a UFS1 fs before using fs_old_inodefmt.
+
+Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
+even for UFS2, so problems were apparent only on file systems created
+by other operating systems, for example, FreeBSD.
+[martin, ticket #1210]
+
+sys/arch/evbppc/conf/Makefile.ev64260.inc	1.8
+sys/arch/evbppc/conf/Makefile.obs405.inc	1.13
+sys/arch/evbppc/conf/Makefile.walnut.inc	1.9
+
+Fix typo in Makefile which resulted in kernel image not being generated
+
+From Rin Okuyama in PR/51369
+[maya, ticket #1211]
+
+bin/sh/parser.c	1.114 via patch
+
+	PR bin/51027 - fix the parsing of references to shell parameters
+	when given without braces (ie: $2 etc).  Only the first 9 shell
+	parameters ($1 .. $9) and the special parameter ($0) can be
+	referenced this way, $10 is ${1}0 not ${10}.   Make it so.
+	This bug brought to notice by Sven Mascheck's web pages which
+	discuss (among other things) the history of this (and other ash
+	based) shells .. see http://www.in-ulm.de/~mascheck/ (from kre@)
+	[kre, ticket #1212]
+



CVS commit: [netbsd-7] src/bin/sh

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:20:49 UTC 2016

Modified Files:
src/bin/sh [netbsd-7]: parser.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1212):
bin/sh/parser.c: revision 1.114 via patch
PR bin/51027 - fix the parsing of references to shell parameters
when given without braces (ie: $2 etc).  Only the first 9 shell
parameters ($1 .. $9) and the special parameter ($0) can be
referenced this way, $10 is ${1}0 not ${10}.   Make it so.
This bug brought to notice by Sven Mascheck's web pages which
discuss (among other things) the history of this (and other ash
based) shells .. see http://www.in-ulm.de/~mascheck/ (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.90.4.1 src/bin/sh/parser.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/parser.c
diff -u src/bin/sh/parser.c:1.90 src/bin/sh/parser.c:1.90.4.1
--- src/bin/sh/parser.c:1.90	Wed Jan  1 19:50:44 2014
+++ src/bin/sh/parser.c	Sat Aug 27 15:20:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.90 2014/01/01 19:50:44 christos Exp $	*/
+/*	$NetBSD: parser.c,v 1.90.4.1 2016/08/27 15:20:48 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.90 2014/01/01 19:50:44 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.90.4.1 2016/08/27 15:20:48 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -1330,7 +1330,7 @@ parsesub: {
 			do {
 USTPUTC(c, out);
 c = pgetc();
-			} while (is_digit(c));
+			} while (subtype != VSNORMAL && is_digit(c));
 		}
 		else if (is_special(c)) {
 			USTPUTC(c, out);



CVS commit: [netbsd-7-0] src/sys/arch/evbppc/conf

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:18:48 UTC 2016

Modified Files:
src/sys/arch/evbppc/conf [netbsd-7-0]: Makefile.ev64260.inc
Makefile.obs405.inc Makefile.walnut.inc

Log Message:
Pull up following revision(s) (requested by maya in ticket #1211):
sys/arch/evbppc/conf/Makefile.walnut.inc: revision 1.9
sys/arch/evbppc/conf/Makefile.obs405.inc: revision 1.13
sys/arch/evbppc/conf/Makefile.ev64260.inc: revision 1.8
Fix typo in Makefile which resulted in kernel image not being generated
>From Rin Okuyama in PR/51369


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.8.1 src/sys/arch/evbppc/conf/Makefile.ev64260.inc
cvs rdiff -u -r1.12 -r1.12.6.1 src/sys/arch/evbppc/conf/Makefile.obs405.inc
cvs rdiff -u -r1.8 -r1.8.8.1 src/sys/arch/evbppc/conf/Makefile.walnut.inc

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

Modified files:

Index: src/sys/arch/evbppc/conf/Makefile.ev64260.inc
diff -u src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7 src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7.8.1
--- src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7	Mon Mar  3 19:08:46 2014
+++ src/sys/arch/evbppc/conf/Makefile.ev64260.inc	Sat Aug 27 15:18:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ev64260.inc,v 1.7 2014/03/03 19:08:46 joerg Exp $
+#	$NetBSD: Makefile.ev64260.inc,v 1.7.8.1 2016/08/27 15:18:47 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 
@@ -9,5 +9,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/${BOARDTY
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img

Index: src/sys/arch/evbppc/conf/Makefile.obs405.inc
diff -u src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12 src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12.6.1
--- src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12	Tue Aug  5 15:40:59 2014
+++ src/sys/arch/evbppc/conf/Makefile.obs405.inc	Sat Aug 27 15:18:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.obs405.inc,v 1.12 2014/08/05 15:40:59 apb Exp $
+#	$NetBSD: Makefile.obs405.inc,v 1.12.6.1 2016/08/27 15:18:47 bouyer Exp $
 
 CFLAGS+=-mcpu=405
 AFLAGS+=-mcpu=405
@@ -15,7 +15,7 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/obs405/ob
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 
@@ -30,7 +30,7 @@ SYSTEM_FIRST_SFILE=	${POWERPC}/${PPCDIR}
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 

Index: src/sys/arch/evbppc/conf/Makefile.walnut.inc
diff -u src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8 src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8.8.1
--- src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8	Mon Mar  3 19:08:46 2014
+++ src/sys/arch/evbppc/conf/Makefile.walnut.inc	Sat Aug 27 15:18:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.walnut.inc,v 1.8 2014/03/03 19:08:46 joerg Exp $
+#	$NetBSD: Makefile.walnut.inc,v 1.8.8.1 2016/08/27 15:18:47 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 CFLAGS+=-mcpu=403
@@ -10,5 +10,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/walnut/wa
 
 SYSTEM_LD_TAIL_EXTRA_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img



CVS commit: [netbsd-7] src/sys/arch/evbppc/conf

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:19:09 UTC 2016

Modified Files:
src/sys/arch/evbppc/conf [netbsd-7]: Makefile.ev64260.inc
Makefile.obs405.inc Makefile.walnut.inc

Log Message:
Pull up following revision(s) (requested by maya in ticket #1211):
sys/arch/evbppc/conf/Makefile.walnut.inc: revision 1.9
sys/arch/evbppc/conf/Makefile.obs405.inc: revision 1.13
sys/arch/evbppc/conf/Makefile.ev64260.inc: revision 1.8
Fix typo in Makefile which resulted in kernel image not being generated
>From Rin Okuyama in PR/51369


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/arch/evbppc/conf/Makefile.ev64260.inc
cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/arch/evbppc/conf/Makefile.obs405.inc
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/arch/evbppc/conf/Makefile.walnut.inc

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

Modified files:

Index: src/sys/arch/evbppc/conf/Makefile.ev64260.inc
diff -u src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7 src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7.4.1
--- src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.7	Mon Mar  3 19:08:46 2014
+++ src/sys/arch/evbppc/conf/Makefile.ev64260.inc	Sat Aug 27 15:19:09 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ev64260.inc,v 1.7 2014/03/03 19:08:46 joerg Exp $
+#	$NetBSD: Makefile.ev64260.inc,v 1.7.4.1 2016/08/27 15:19:09 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 
@@ -9,5 +9,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/${BOARDTY
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img

Index: src/sys/arch/evbppc/conf/Makefile.obs405.inc
diff -u src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12 src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12.2.1
--- src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.12	Tue Aug  5 15:40:59 2014
+++ src/sys/arch/evbppc/conf/Makefile.obs405.inc	Sat Aug 27 15:19:09 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.obs405.inc,v 1.12 2014/08/05 15:40:59 apb Exp $
+#	$NetBSD: Makefile.obs405.inc,v 1.12.2.1 2016/08/27 15:19:09 bouyer Exp $
 
 CFLAGS+=-mcpu=405
 AFLAGS+=-mcpu=405
@@ -15,7 +15,7 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/obs405/ob
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 
@@ -30,7 +30,7 @@ SYSTEM_FIRST_SFILE=	${POWERPC}/${PPCDIR}
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 

Index: src/sys/arch/evbppc/conf/Makefile.walnut.inc
diff -u src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8 src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8.4.1
--- src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.8	Mon Mar  3 19:08:46 2014
+++ src/sys/arch/evbppc/conf/Makefile.walnut.inc	Sat Aug 27 15:19:09 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.walnut.inc,v 1.8 2014/03/03 19:08:46 joerg Exp $
+#	$NetBSD: Makefile.walnut.inc,v 1.8.4.1 2016/08/27 15:19:09 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 CFLAGS+=-mcpu=403
@@ -10,5 +10,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/walnut/wa
 
 SYSTEM_LD_TAIL_EXTRA_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img



CVS commit: [netbsd-7-0] src

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:18:05 UTC 2016

Modified Files:
src/sbin/fsdb [netbsd-7-0]: fsdb.c
src/sys/ufs/ffs [netbsd-7-0]: ffs_vfsops.c
src/usr.sbin/quot [netbsd-7-0]: quot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1210):
sys/ufs/ffs/ffs_vfsops.c: revision 1.340
usr.sbin/quot/quot.c: revision 1.34
sbin/fsdb/fsdb.c: revision 1.49
>From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.48.8.1 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.299.2.3 -r1.299.2.3.2.1 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.33 -r1.33.6.1 src/usr.sbin/quot/quot.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/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.48 src/sbin/fsdb/fsdb.c:1.48.8.1
--- src/sbin/fsdb/fsdb.c:1.48	Sun Jun 23 02:06:04 2013
+++ src/sbin/fsdb/fsdb.c	Sat Aug 27 15:18:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.48 2013/06/23 02:06:04 dholland Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.48.8.1 2016/08/27 15:18:05 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.48 2013/06/23 02:06:04 dholland Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.48.8.1 2016/08/27 15:18:05 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -1232,7 +1232,7 @@ CMDFUNC(chgroup)
 			return 1;
 		}
 	}
-	if (sblock->fs_old_inodefmt < FS_44INODEFMT)
+	if (!is_ufs2 && sblock->fs_old_inodefmt < FS_44INODEFMT)
 		curinode->dp1.di_ogid = iswap32(gid);
 	else
 		DIP_SET(curinode, gid, iswap32(gid));

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.3 src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.3.2.1
--- src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.3	Wed Jan 28 18:34:11 2015
+++ src/sys/ufs/ffs/ffs_vfsops.c	Sat Aug 27 15:18:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.299.2.3 2015/01/28 18:34:11 martin Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.299.2.3.2.1 2016/08/27 15:18:05 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.299.2.3 2015/01/28 18:34:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.299.2.3.2.1 2016/08/27 15:18:05 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1450,7 +1450,8 @@ ffs_oldfscompat_read(struct fs *fs, stru
 		fs->fs_old_trackskew = 0;
 	}
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
@@ -1895,7 +1896,8 @@ ffs_loadvnode(struct mount *mp, struct v
 	 * fix until fsck has been changed to do the update.
 	 */
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
+	if (fs->fs_magic == FS_UFS1_MAGIC &&			/* XXX */
+	fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
 		ip->i_uid = ip->i_ffs1_ouid;			/* XXX */
 		ip->i_gid = ip->i_ffs1_ogid;			/* XXX */
 	}			/* XXX */

Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.33 src/usr.sbin/quot/quot.c:1.33.6.1
--- src/usr.sbin/quot/quot.c:1.33	Sat Oct 19 17:16:38 2013
+++ src/usr.sbin/quot/quot.c	Sat Aug 27 15:18:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $	*/
+/*	$NetBSD: quot.c,v 1.33.6.1 2016/08/27 15:18:05 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $");
+__RCSID("$NetBSD: quot.c,v 1.33.6.1 2016/08/27 15:18:05 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -521,7 +521,8 @@ ffs_oldfscompat(struct fs *fs)
 {
 	int i;
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		quad_t sizepb = fs->fs_bsize;
 
 		fs->fs_maxfilesize = fs->fs_bsize * UFS_NDADDR - 1;



CVS commit: [netbsd-7] src

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:17:34 UTC 2016

Modified Files:
src/sbin/fsdb [netbsd-7]: fsdb.c
src/sys/ufs/ffs [netbsd-7]: ffs_vfsops.c
src/usr.sbin/quot [netbsd-7]: quot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1210):
sys/ufs/ffs/ffs_vfsops.c: revision 1.340
usr.sbin/quot/quot.c: revision 1.34
sbin/fsdb/fsdb.c: revision 1.49
>From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.48.6.1 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.299.2.3 -r1.299.2.4 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.33 -r1.33.4.1 src/usr.sbin/quot/quot.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/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.48 src/sbin/fsdb/fsdb.c:1.48.6.1
--- src/sbin/fsdb/fsdb.c:1.48	Sun Jun 23 02:06:04 2013
+++ src/sbin/fsdb/fsdb.c	Sat Aug 27 15:17:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.48 2013/06/23 02:06:04 dholland Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.48.6.1 2016/08/27 15:17:34 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.48 2013/06/23 02:06:04 dholland Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.48.6.1 2016/08/27 15:17:34 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -1232,7 +1232,7 @@ CMDFUNC(chgroup)
 			return 1;
 		}
 	}
-	if (sblock->fs_old_inodefmt < FS_44INODEFMT)
+	if (!is_ufs2 && sblock->fs_old_inodefmt < FS_44INODEFMT)
 		curinode->dp1.di_ogid = iswap32(gid);
 	else
 		DIP_SET(curinode, gid, iswap32(gid));

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.3 src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.4
--- src/sys/ufs/ffs/ffs_vfsops.c:1.299.2.3	Wed Jan 28 18:34:11 2015
+++ src/sys/ufs/ffs/ffs_vfsops.c	Sat Aug 27 15:17:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.299.2.3 2015/01/28 18:34:11 martin Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.299.2.4 2016/08/27 15:17:34 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.299.2.3 2015/01/28 18:34:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.299.2.4 2016/08/27 15:17:34 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1450,7 +1450,8 @@ ffs_oldfscompat_read(struct fs *fs, stru
 		fs->fs_old_trackskew = 0;
 	}
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
@@ -1895,7 +1896,8 @@ ffs_loadvnode(struct mount *mp, struct v
 	 * fix until fsck has been changed to do the update.
 	 */
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
+	if (fs->fs_magic == FS_UFS1_MAGIC &&			/* XXX */
+	fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
 		ip->i_uid = ip->i_ffs1_ouid;			/* XXX */
 		ip->i_gid = ip->i_ffs1_ogid;			/* XXX */
 	}			/* XXX */

Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.33 src/usr.sbin/quot/quot.c:1.33.4.1
--- src/usr.sbin/quot/quot.c:1.33	Sat Oct 19 17:16:38 2013
+++ src/usr.sbin/quot/quot.c	Sat Aug 27 15:17:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $	*/
+/*	$NetBSD: quot.c,v 1.33.4.1 2016/08/27 15:17:34 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $");
+__RCSID("$NetBSD: quot.c,v 1.33.4.1 2016/08/27 15:17:34 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -521,7 +521,8 @@ ffs_oldfscompat(struct fs *fs)
 {
 	int i;
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		quad_t sizepb = fs->fs_bsize;
 
 		fs->fs_maxfilesize = fs->fs_bsize * UFS_NDADDR - 1;



CVS commit: [netbsd-7] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:11:31 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
tickets 1239, 1240


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-7.1

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

Modified files:

Index: src/doc/CHANGES-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.103 src/doc/CHANGES-7.1:1.1.2.104
--- src/doc/CHANGES-7.1:1.1.2.103	Sat Aug 27 04:32:15 2016
+++ src/doc/CHANGES-7.1	Sat Aug 27 15:11:31 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.103 2016/08/27 04:32:15 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.104 2016/08/27 15:11:31 bouyer Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -5195,3 +5195,16 @@ sys/netinet/ip_carp.c1.76
 	wrong hash, to help debugging.
 	[is, ticket #1209]
 
+sys/dev/fss.c	1.95
+
+	Disestablish COW handler on error.  No need to do further copies after
+	the snapshot device failed.
+
+	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
+	[hannken, ticket #1239]
+
+sys/compat/common/vfs_syscalls_43.c		1.58
+
+	fill in the tv_nsec parts of the converted timespec in cvtstat().
+	[mrg, ticket #1240]
+



CVS commit: [netbsd-7-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:11:46 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.2

Log Message:
tickets 1239, 1240


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-7.0.2

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

Modified files:

Index: src/doc/CHANGES-7.0.2
diff -u src/doc/CHANGES-7.0.2:1.1.2.7 src/doc/CHANGES-7.0.2:1.1.2.8
--- src/doc/CHANGES-7.0.2:1.1.2.7	Thu Jul 21 12:56:33 2016
+++ src/doc/CHANGES-7.0.2	Sat Aug 27 15:11:46 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.2,v 1.1.2.7 2016/07/21 12:56:33 martin Exp $
+# $NetBSD: CHANGES-7.0.2,v 1.1.2.8 2016/08/27 15:11:46 bouyer Exp $
 
 A complete list of changes from the NetBSD 7.0.1 release to the NetBSD 7.0.2
 release:
@@ -211,3 +211,16 @@ libexec/mail.local/mail.local.c			1.28
 	Fix error checks in open(2) calls.
 	[shm, ticket #1207]
 
+sys/dev/fss.c	1.95
+
+	Disestablish COW handler on error.  No need to do further copies after
+	the snapshot device failed.
+
+	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
+	[hannken, ticket #1239]
+
+sys/compat/common/vfs_syscalls_43.c		1.58
+
+	fill in the tv_nsec parts of the converted timespec in cvtstat().
+	[mrg, ticket #1240]
+



CVS commit: [netbsd-7-0] src/sys/compat/common

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:10:42 UTC 2016

Modified Files:
src/sys/compat/common [netbsd-7-0]: vfs_syscalls_43.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1240):
sys/compat/common/vfs_syscalls_43.c: revision 1.58
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.6.1 src/sys/compat/common/vfs_syscalls_43.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/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.56 src/sys/compat/common/vfs_syscalls_43.c:1.56.6.1
--- src/sys/compat/common/vfs_syscalls_43.c:1.56	Tue Jan 28 01:29:04 2014
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 27 15:10:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.56 2014/01/28 01:29:04 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.56.6.1 2016/08/27 15:10:42 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.56 2014/01/28 01:29:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.56.6.1 2016/08/27 15:10:42 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -75,15 +75,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -95,9 +122,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(>st_atimespec, >st_atimespec);
+	cvttimespec(>st_mtimespec, >st_mtimespec);
+	cvttimespec(>st_ctimespec, >st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: [netbsd-7] src/sys/compat/common

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:10:59 UTC 2016

Modified Files:
src/sys/compat/common [netbsd-7]: vfs_syscalls_43.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1240):
sys/compat/common/vfs_syscalls_43.c: revision 1.58
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/compat/common/vfs_syscalls_43.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/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.56 src/sys/compat/common/vfs_syscalls_43.c:1.56.4.1
--- src/sys/compat/common/vfs_syscalls_43.c:1.56	Tue Jan 28 01:29:04 2014
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 27 15:10:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.56 2014/01/28 01:29:04 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.56.4.1 2016/08/27 15:10:59 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.56 2014/01/28 01:29:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.56.4.1 2016/08/27 15:10:59 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -75,15 +75,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -95,9 +122,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(>st_atimespec, >st_atimespec);
+	cvttimespec(>st_mtimespec, >st_mtimespec);
+	cvttimespec(>st_ctimespec, >st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: [netbsd-7-0] src/sys/dev

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:09:48 UTC 2016

Modified Files:
src/sys/dev [netbsd-7-0]: fss.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1239):
sys/dev/fss.c: revision 1.95
Disestablish COW handler on error.  No need to do further copies after
the snapshot device failed.
Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.4.1 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.91 src/sys/dev/fss.c:1.91.4.1
--- src/sys/dev/fss.c:1.91	Fri Jul 25 08:10:35 2014
+++ src/sys/dev/fss.c	Sat Aug 27 15:09:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.91 2014/07/25 08:10:35 dholland Exp $	*/
+/*	$NetBSD: fss.c,v 1.91.4.1 2016/08/27 15:09:48 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.91 2014/07/25 08:10:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.91.4.1 2016/08/27 15:09:48 bouyer Exp $");
 
 #include 
 #include 
@@ -445,17 +445,20 @@ fss_dump(dev_t dev, daddr_t blkno, void 
 
 /*
  * An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
  * The caller holds the mutex.
  */
 static inline void
 fss_error(struct fss_softc *sc, const char *msg)
 {
 
-	if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
-		aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
-	if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
-		sc->sc_flags |= FSS_ERROR;
+	if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+		return;
+
+	aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+	sc->sc_flags |= FSS_ERROR;
 }
 
 /*
@@ -575,9 +578,8 @@ fss_unmount_hook(struct mount *mp)
 		if ((sc = device_lookup_private(_cd, i)) == NULL)
 			continue;
 		mutex_enter(>sc_slock);
-		if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
-		sc->sc_mount == mp)
-			fss_error(sc, "forced unmount");
+		if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+			fss_error(sc, "forced by unmount");
 		mutex_exit(>sc_slock);
 	}
 	mutex_exit(_device_lock);
@@ -886,7 +888,7 @@ static int
 fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
 {
 
-	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+	if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
 		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
 
 	mutex_enter(>sc_slock);



CVS commit: [netbsd-7] src/sys/dev

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 15:09:22 UTC 2016

Modified Files:
src/sys/dev [netbsd-7]: fss.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1239):
sys/dev/fss.c: revision 1.95
Disestablish COW handler on error.  No need to do further copies after
the snapshot device failed.
Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.2.1 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.91 src/sys/dev/fss.c:1.91.2.1
--- src/sys/dev/fss.c:1.91	Fri Jul 25 08:10:35 2014
+++ src/sys/dev/fss.c	Sat Aug 27 15:09:22 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.91 2014/07/25 08:10:35 dholland Exp $	*/
+/*	$NetBSD: fss.c,v 1.91.2.1 2016/08/27 15:09:22 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.91 2014/07/25 08:10:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.91.2.1 2016/08/27 15:09:22 bouyer Exp $");
 
 #include 
 #include 
@@ -445,17 +445,20 @@ fss_dump(dev_t dev, daddr_t blkno, void 
 
 /*
  * An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
  * The caller holds the mutex.
  */
 static inline void
 fss_error(struct fss_softc *sc, const char *msg)
 {
 
-	if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
-		aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
-	if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
-		sc->sc_flags |= FSS_ERROR;
+	if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+		return;
+
+	aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+	sc->sc_flags |= FSS_ERROR;
 }
 
 /*
@@ -575,9 +578,8 @@ fss_unmount_hook(struct mount *mp)
 		if ((sc = device_lookup_private(_cd, i)) == NULL)
 			continue;
 		mutex_enter(>sc_slock);
-		if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
-		sc->sc_mount == mp)
-			fss_error(sc, "forced unmount");
+		if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+			fss_error(sc, "forced by unmount");
 		mutex_exit(>sc_slock);
 	}
 	mutex_exit(_device_lock);
@@ -886,7 +888,7 @@ static int
 fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
 {
 
-	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+	if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
 		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
 
 	mutex_enter(>sc_slock);



CVS commit: xsrc/external/mit/xf86-video-intel-old/dist/src

2016-08-27 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sat Aug 27 15:00:39 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-intel-old/dist/src: i810_dri.c

Log Message:
Fix memset use.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c
diff -u xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c:1.1.1.1 xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c:1.2
--- xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c:1.1.1.1	Mon May 18 22:11:08 2015
+++ xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c	Sat Aug 27 15:00:39 2016
@@ -1088,7 +1088,7 @@ I810DRIFinishScreenInit(ScreenPtr pScree
ScrnInfoPtrpScrn = xf86Screens[pScreen->myNum];
I810Ptr info  = I810PTR(pScrn);
 
-   memset(sPriv, 0, sizeof(sPriv));
+   memset(sPriv, 0, sizeof(*sPriv));
 
/* Have shadow run only while there is 3d active.
 */



CVS commit: [netbsd-6] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:53:48 UTC 2016

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
tickets 1390 1394 1395 1396 1397 1399 1400


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.259 -r1.1.2.260 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.259 src/doc/CHANGES-6.2:1.1.2.260
--- src/doc/CHANGES-6.2:1.1.2.259	Sat Aug 27 14:18:42 2016
+++ src/doc/CHANGES-6.2	Sat Aug 27 14:53:48 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.259 2016/08/27 14:18:42 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.260 2016/08/27 14:53:48 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -14667,3 +14667,79 @@ sys/ufs/lfs/lfs_vnops.c1.304
 	Fix a deadlock
 	[dholland, ticket #1389]
 
+sys/arch/mips/mips/pmap.c			1.221 - 1.223
+
+	Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
+
+	pmap_page_remove from the previous change neglected to terminate the pv
+	list correctly when it started with an initial unmanaged mapping and
+	subsequent managed mappings.  Fix this.
+
+	Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
+	looking for bad aliases and removing the bad entries.  That is, revert
+	to the code before the matt-mips64 merge.
+
+	Additionally, fix the pmap_update call to not use the (recently
+	  removed/freed) pv for the pmap_t.
+
+	Fixes the following two PRs
+
+	PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst
+		  uncompressing base.tgz
+	PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation
+	[skrll, ticket #1390]
+
+sys/netinet/ip_carp.c1.76
+
+	Print the IPv6 or IPv4 source addresses of packets with wrong hash, to
+	help debugging.
+	[is, ticket #1394]
+
+sbin/fsdb/fsdb.c1.49
+sys/ufs/ffs/ffs_vfsops.c			1.340
+usr.sbin/quot/quot.c1.34
+
+	From Michael Plass:
+
+	The superblock field that distinguishes between 4.2BSD and 4.4BSD
+	inodes is really only relevant on a UFS1 file system. Make sure that
+	it is a UFS1 fs before using fs_old_inodefmt.
+
+	Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
+	even for UFS2, so problems were apparent only on file systems created
+	by other operating systems, for example, FreeBSD.
+	[martin, ticket #1395]
+
+sys/arch/evbppc/conf/Makefile.ev64260.inc	1.8
+sys/arch/evbppc/conf/Makefile.obs405.inc	1.13
+sys/arch/evbppc/conf/Makefile.walnut.inc	1.9
+
+	Fix typo in Makefile which resulted in kernel image not being generated
+
+	From Rin Okuyama in PR/51369
+	[maya, ticket #1396]
+
+bin/sh/parser.c	1.114 via patch
+
+	PR bin/51027 - fix the parsing of references to shell parameters
+	when given without braces (ie: $2 etc).  Only the first 9 shell
+	parameters ($1 .. $9) and the special parameter ($0) can be
+	referenced this way, $10 is ${1}0 not ${10}.   Make it so.
+	This bug brought to notice by Sven Mascheck's web pages which
+	discuss (among other things) the history of this (and other ash
+	based) shells .. see http://www.in-ulm.de/~mascheck/ (from kre@)
+	[kre, ticket #1397]
+
+sys/dev/fss.c	1.95
+
+	Disestablish COW handler on error.  No need to do further copies after
+	the snapshot device failed.
+
+	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
+	[hannken, ticket #1399]
+
+sys/compat/common/vfs_syscalls_43.c		1.58
+
+	fill in the tv_nsec parts of the converted timespec in cvtstat().
+	[mrg, ticket #1400]
+



CVS commit: [netbsd-6-1] src/sys/compat/common

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:52:25 UTC 2016

Modified Files:
src/sys/compat/common [netbsd-6-1]: vfs_syscalls_43.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1400):
sys/compat/common/vfs_syscalls_43.c: revision 1.58
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.54.14.1 -r1.54.14.1.2.1 \
src/sys/compat/common/vfs_syscalls_43.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/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.54.14.1 src/sys/compat/common/vfs_syscalls_43.c:1.54.14.1.2.1
--- src/sys/compat/common/vfs_syscalls_43.c:1.54.14.1	Thu Mar 14 16:33:09 2013
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 27 14:52:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.54.14.1 2013/03/14 16:33:09 riz Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.54.14.1.2.1 2016/08/27 14:52:25 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54.14.1 2013/03/14 16:33:09 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54.14.1.2.1 2016/08/27 14:52:25 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -74,15 +74,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -94,9 +121,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(>st_atimespec, >st_atimespec);
+	cvttimespec(>st_mtimespec, >st_mtimespec);
+	cvttimespec(>st_ctimespec, >st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: [netbsd-6-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:52:08 UTC 2016

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
ticket 1400


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.74 -r1.1.2.75 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.74 src/doc/CHANGES-6.0.7:1.1.2.75
--- src/doc/CHANGES-6.0.7:1.1.2.74	Sat Aug 27 14:48:31 2016
+++ src/doc/CHANGES-6.0.7	Sat Aug 27 14:52:08 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.74 2016/08/27 14:48:31 bouyer Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.75 2016/08/27 14:52:08 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -8716,3 +8716,8 @@ sys/dev/fss.c	1.95
 	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
 	[hannken, ticket #1399]
 
+sys/compat/common/vfs_syscalls_43.c		1.58
+
+	fill in the tv_nsec parts of the converted timespec in cvtstat().
+	[mrg, ticket #1400]
+



CVS commit: [netbsd-6-1] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:52:39 UTC 2016

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
ticket 1400


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.72 -r1.1.2.73 src/doc/CHANGES-6.1.6

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

Modified files:

Index: src/doc/CHANGES-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.72 src/doc/CHANGES-6.1.6:1.1.2.73
--- src/doc/CHANGES-6.1.6:1.1.2.72	Sat Aug 27 14:49:09 2016
+++ src/doc/CHANGES-6.1.6	Sat Aug 27 14:52:39 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.72 2016/08/27 14:49:09 bouyer Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.73 2016/08/27 14:52:39 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -8436,3 +8436,8 @@ sys/dev/fss.c	1.95
 	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
 	[hannken, ticket #1399]
 
+sys/compat/common/vfs_syscalls_43.c		1.58
+
+	fill in the tv_nsec parts of the converted timespec in cvtstat().
+	[mrg, ticket #1400]
+



CVS commit: [netbsd-6-0] src/sys/compat/common

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:51:50 UTC 2016

Modified Files:
src/sys/compat/common [netbsd-6-0]: vfs_syscalls_43.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1400):
sys/compat/common/vfs_syscalls_43.c: revision 1.58
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.20.1 src/sys/compat/common/vfs_syscalls_43.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/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.54 src/sys/compat/common/vfs_syscalls_43.c:1.54.20.1
--- src/sys/compat/common/vfs_syscalls_43.c:1.54	Fri Nov 19 06:44:36 2010
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 27 14:51:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.54 2010/11/19 06:44:36 dholland Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.54.20.1 2016/08/27 14:51:50 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54 2010/11/19 06:44:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54.20.1 2016/08/27 14:51:50 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -72,15 +72,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -92,9 +119,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(>st_atimespec, >st_atimespec);
+	cvttimespec(>st_mtimespec, >st_mtimespec);
+	cvttimespec(>st_ctimespec, >st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: [netbsd-6] src/sys/compat/common

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:51:29 UTC 2016

Modified Files:
src/sys/compat/common [netbsd-6]: vfs_syscalls_43.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1400):
sys/compat/common/vfs_syscalls_43.c: revision 1.58
fill in the tv_nsec parts of the converted timespec in cvtstat().


To generate a diff of this commit:
cvs rdiff -u -r1.54.14.1 -r1.54.14.2 src/sys/compat/common/vfs_syscalls_43.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/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.54.14.1 src/sys/compat/common/vfs_syscalls_43.c:1.54.14.2
--- src/sys/compat/common/vfs_syscalls_43.c:1.54.14.1	Thu Mar 14 16:33:09 2013
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Aug 27 14:51:29 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.54.14.1 2013/03/14 16:33:09 riz Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.54.14.2 2016/08/27 14:51:29 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54.14.1 2013/03/14 16:33:09 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.54.14.2 2016/08/27 14:51:29 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -74,15 +74,42 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 
+static void cvttimespec(struct timespec *, struct timespec50 *);
 static void cvtstat(struct stat *, struct stat43 *);
 
 /*
+ * Convert from an old to a new timespec structure.
+ */
+static void
+cvttimespec(struct timespec *ts, struct timespec50 *ots)
+{
+
+	if (ts->tv_sec > INT_MAX) {
+#if defined(DEBUG) || 1
+		static bool first = true;
+
+		if (first) {
+			first = false;
+			printf("%s[%s:%d]: time_t does not fit\n",
+			__func__, curlwp->l_proc->p_comm,
+			curlwp->l_lid);
+		}
+#endif
+		ots->tv_sec = INT_MAX;
+	} else
+		ots->tv_sec = ts->tv_sec;
+	ots->tv_nsec = ts->tv_nsec;
+}
+
+/*
  * Convert from an old to a new stat structure.
  */
 static void
 cvtstat(struct stat *st, struct stat43 *ost)
 {
 
+	/* Handle any padding. */
+	memset(ost, 0, sizeof *ost);
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode & 0x;
@@ -94,9 +121,9 @@ cvtstat(struct stat *st, struct stat43 *
 		ost->st_size = st->st_size;
 	else
 		ost->st_size = -2;
-	ost->st_atime = st->st_atime;
-	ost->st_mtime = st->st_mtime;
-	ost->st_ctime = st->st_ctime;
+	cvttimespec(>st_atimespec, >st_atimespec);
+	cvttimespec(>st_mtimespec, >st_mtimespec);
+	cvttimespec(>st_ctimespec, >st_ctimespec);
 	ost->st_blksize = st->st_blksize;
 	ost->st_blocks = st->st_blocks;
 	ost->st_flags = st->st_flags;



CVS commit: [netbsd-6-1] src/sys/dev

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:48:50 UTC 2016

Modified Files:
src/sys/dev [netbsd-6-1]: fss.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1399):
sys/dev/fss.c: revision 1.95
Disestablish COW handler on error.  No need to do further copies after
the snapshot device failed.
Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write


To generate a diff of this commit:
cvs rdiff -u -r1.81.4.3 -r1.81.4.3.2.1 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.81.4.3 src/sys/dev/fss.c:1.81.4.3.2.1
--- src/sys/dev/fss.c:1.81.4.3	Mon Feb 11 20:39:28 2013
+++ src/sys/dev/fss.c	Sat Aug 27 14:48:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.81.4.3 2013/02/11 20:39:28 riz Exp $	*/
+/*	$NetBSD: fss.c,v 1.81.4.3.2.1 2016/08/27 14:48:50 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.3 2013/02/11 20:39:28 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.3.2.1 2016/08/27 14:48:50 bouyer Exp $");
 
 #include 
 #include 
@@ -430,17 +430,20 @@ fss_dump(dev_t dev, daddr_t blkno, void 
 
 /*
  * An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
  * The caller holds the mutex.
  */
 static inline void
 fss_error(struct fss_softc *sc, const char *msg)
 {
 
-	if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
-		aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
-	if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
-		sc->sc_flags |= FSS_ERROR;
+	if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+		return;
+
+	aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+	sc->sc_flags |= FSS_ERROR;
 }
 
 /*
@@ -560,9 +563,8 @@ fss_unmount_hook(struct mount *mp)
 		if ((sc = device_lookup_private(_cd, i)) == NULL)
 			continue;
 		mutex_enter(>sc_slock);
-		if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
-		sc->sc_mount == mp)
-			fss_error(sc, "forced unmount");
+		if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+			fss_error(sc, "forced by unmount");
 		mutex_exit(>sc_slock);
 	}
 	mutex_exit(_device_lock);
@@ -888,7 +890,7 @@ static int
 fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
 {
 
-	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+	if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
 		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
 
 	mutex_enter(>sc_slock);



CVS commit: [netbsd-6-0] src/sys/dev

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:48:09 UTC 2016

Modified Files:
src/sys/dev [netbsd-6-0]: fss.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1399):
sys/dev/fss.c: revision 1.95
Disestablish COW handler on error.  No need to do further copies after
the snapshot device failed.
Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write


To generate a diff of this commit:
cvs rdiff -u -r1.81.4.1.4.2 -r1.81.4.1.4.3 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.81.4.1.4.2 src/sys/dev/fss.c:1.81.4.1.4.3
--- src/sys/dev/fss.c:1.81.4.1.4.2	Mon Feb 11 20:39:04 2013
+++ src/sys/dev/fss.c	Sat Aug 27 14:48:09 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.81.4.1.4.2 2013/02/11 20:39:04 riz Exp $	*/
+/*	$NetBSD: fss.c,v 1.81.4.1.4.3 2016/08/27 14:48:09 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.1.4.2 2013/02/11 20:39:04 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.1.4.3 2016/08/27 14:48:09 bouyer Exp $");
 
 #include 
 #include 
@@ -430,17 +430,20 @@ fss_dump(dev_t dev, daddr_t blkno, void 
 
 /*
  * An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
  * The caller holds the mutex.
  */
 static inline void
 fss_error(struct fss_softc *sc, const char *msg)
 {
 
-	if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
-		aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
-	if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
-		sc->sc_flags |= FSS_ERROR;
+	if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+		return;
+
+	aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+	sc->sc_flags |= FSS_ERROR;
 }
 
 /*
@@ -560,9 +563,8 @@ fss_unmount_hook(struct mount *mp)
 		if ((sc = device_lookup_private(_cd, i)) == NULL)
 			continue;
 		mutex_enter(>sc_slock);
-		if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
-		sc->sc_mount == mp)
-			fss_error(sc, "forced unmount");
+		if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+			fss_error(sc, "forced by unmount");
 		mutex_exit(>sc_slock);
 	}
 	mutex_exit(_device_lock);
@@ -888,7 +890,7 @@ static int
 fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
 {
 
-	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+	if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
 		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
 
 	mutex_enter(>sc_slock);



CVS commit: [netbsd-6-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:48:31 UTC 2016

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
ticket 1399


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.73 src/doc/CHANGES-6.0.7:1.1.2.74
--- src/doc/CHANGES-6.0.7:1.1.2.73	Sat Aug 27 14:41:25 2016
+++ src/doc/CHANGES-6.0.7	Sat Aug 27 14:48:31 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.73 2016/08/27 14:41:25 bouyer Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.74 2016/08/27 14:48:31 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -8708,3 +8708,11 @@ usr.sbin/quot/quot.c1.34
 	by other operating systems, for example, FreeBSD.
 	[martin, ticket #1395]
 
+sys/dev/fss.c	1.95
+
+	Disestablish COW handler on error.  No need to do further copies after
+	the snapshot device failed.
+
+	Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write
+	[hannken, ticket #1399]
+



CVS commit: [netbsd-6] src/sys/dev

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:47:48 UTC 2016

Modified Files:
src/sys/dev [netbsd-6]: fss.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1399):
sys/dev/fss.c: revision 1.95
Disestablish COW handler on error.  No need to do further copies after
the snapshot device failed.
Should fix PR kern/51377: fss(4) panic if snapshot mounted read/write


To generate a diff of this commit:
cvs rdiff -u -r1.81.4.3 -r1.81.4.4 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.81.4.3 src/sys/dev/fss.c:1.81.4.4
--- src/sys/dev/fss.c:1.81.4.3	Mon Feb 11 20:39:28 2013
+++ src/sys/dev/fss.c	Sat Aug 27 14:47:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.81.4.3 2013/02/11 20:39:28 riz Exp $	*/
+/*	$NetBSD: fss.c,v 1.81.4.4 2016/08/27 14:47:47 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.3 2013/02/11 20:39:28 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.81.4.4 2016/08/27 14:47:47 bouyer Exp $");
 
 #include 
 #include 
@@ -430,17 +430,20 @@ fss_dump(dev_t dev, daddr_t blkno, void 
 
 /*
  * An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
  * The caller holds the mutex.
  */
 static inline void
 fss_error(struct fss_softc *sc, const char *msg)
 {
 
-	if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
-		aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
-	if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
-		sc->sc_flags |= FSS_ERROR;
+	if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+		return;
+
+	aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+	sc->sc_flags |= FSS_ERROR;
 }
 
 /*
@@ -560,9 +563,8 @@ fss_unmount_hook(struct mount *mp)
 		if ((sc = device_lookup_private(_cd, i)) == NULL)
 			continue;
 		mutex_enter(>sc_slock);
-		if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
-		sc->sc_mount == mp)
-			fss_error(sc, "forced unmount");
+		if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+			fss_error(sc, "forced by unmount");
 		mutex_exit(>sc_slock);
 	}
 	mutex_exit(_device_lock);
@@ -888,7 +890,7 @@ static int
 fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
 {
 
-	if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+	if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
 		fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
 
 	mutex_enter(>sc_slock);



CVS commit: [netbsd-6] src/bin/sh

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:46:36 UTC 2016

Modified Files:
src/bin/sh [netbsd-6]: parser.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1397):
bin/sh/parser.c: revision 1.114 via patch
PR bin/51027 - fix the parsing of references to shell parameters
when given without braces (ie: $2 etc).  Only the first 9 shell
parameters ($1 .. $9) and the special parameter ($0) can be
referenced this way, $10 is ${1}0 not ${10}.   Make it so.
This bug brought to notice by Sven Mascheck's web pages which
discuss (among other things) the history of this (and other ash
based) shells .. see http://www.in-ulm.de/~mascheck/ (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.80.4.1 src/bin/sh/parser.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/parser.c
diff -u src/bin/sh/parser.c:1.80 src/bin/sh/parser.c:1.80.4.1
--- src/bin/sh/parser.c:1.80	Wed Aug 31 16:24:55 2011
+++ src/bin/sh/parser.c	Sat Aug 27 14:46:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $	*/
+/*	$NetBSD: parser.c,v 1.80.4.1 2016/08/27 14:46:36 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: parser.c,v 1.80.4.1 2016/08/27 14:46:36 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -1294,7 +1294,7 @@ parsesub: {
 			do {
 USTPUTC(c, out);
 c = pgetc();
-			} while (is_digit(c));
+			} while (subtype != VSNORMAL && is_digit(c));
 		}
 		else if (is_special(c)) {
 			USTPUTC(c, out);



CVS commit: [netbsd-6] src/sys/arch/evbppc/conf

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:44:11 UTC 2016

Modified Files:
src/sys/arch/evbppc/conf [netbsd-6]: Makefile.ev64260.inc
Makefile.obs405.inc Makefile.walnut.inc

Log Message:
Pull up following revision(s) (requested by maya in ticket #1396):
sys/arch/evbppc/conf/Makefile.walnut.inc: revision 1.9
sys/arch/evbppc/conf/Makefile.obs405.inc: revision 1.13
sys/arch/evbppc/conf/Makefile.ev64260.inc: revision 1.8
Fix typo in Makefile which resulted in kernel image not being generated
>From Rin Okuyama in PR/51369


To generate a diff of this commit:
cvs rdiff -u -r1.5.14.1 -r1.5.14.2 \
src/sys/arch/evbppc/conf/Makefile.ev64260.inc
cvs rdiff -u -r1.6.14.1 -r1.6.14.2 \
src/sys/arch/evbppc/conf/Makefile.obs405.inc
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/sys/arch/evbppc/conf/Makefile.walnut.inc

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

Modified files:

Index: src/sys/arch/evbppc/conf/Makefile.ev64260.inc
diff -u src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.5.14.1 src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.5.14.2
--- src/sys/arch/evbppc/conf/Makefile.ev64260.inc:1.5.14.1	Fri Apr 11 08:31:56 2014
+++ src/sys/arch/evbppc/conf/Makefile.ev64260.inc	Sat Aug 27 14:44:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ev64260.inc,v 1.5.14.1 2014/04/11 08:31:56 msaitoh Exp $
+#	$NetBSD: Makefile.ev64260.inc,v 1.5.14.2 2016/08/27 14:44:10 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 
@@ -9,5 +9,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/${BOARDTY
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img

Index: src/sys/arch/evbppc/conf/Makefile.obs405.inc
diff -u src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.6.14.1 src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.6.14.2
--- src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.6.14.1	Fri Apr 11 08:31:56 2014
+++ src/sys/arch/evbppc/conf/Makefile.obs405.inc	Sat Aug 27 14:44:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.obs405.inc,v 1.6.14.1 2014/04/11 08:31:56 msaitoh Exp $
+#	$NetBSD: Makefile.obs405.inc,v 1.6.14.2 2016/08/27 14:44:10 bouyer Exp $
 
 CFLAGS+=-mcpu=405
 AFLAGS+=-mcpu=405
@@ -15,7 +15,7 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/obs405/ob
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 
@@ -30,7 +30,7 @@ SYSTEM_FIRST_SFILE=	${POWERPC}/${PPCDIR}
 
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img
 
 

Index: src/sys/arch/evbppc/conf/Makefile.walnut.inc
diff -u src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.6.2.1 src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.6.2.2
--- src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.6.2.1	Fri Apr 11 08:31:56 2014
+++ src/sys/arch/evbppc/conf/Makefile.walnut.inc	Sat Aug 27 14:44:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.walnut.inc,v 1.6.2.1 2014/04/11 08:31:56 msaitoh Exp $
+#	$NetBSD: Makefile.walnut.inc,v 1.6.2.2 2016/08/27 14:44:10 bouyer Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 CFLAGS+=-mcpu=403
@@ -10,5 +10,5 @@ SYSTEM_FIRST_SFILE=	${THISPPC}/walnut/wa
 
 SYSTEM_LD_TAIL_EXTRA_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
-	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT]; \
+	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; STAT=${TOOL_STAT}; \
 		export OBJDUMP OBJCOPY STAT; ${MKIMG} $@ $@.img



CVS commit: [netbsd-6-1] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:42:02 UTC 2016

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
ticket 1395


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-6.1.6

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

Modified files:

Index: src/doc/CHANGES-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.70 src/doc/CHANGES-6.1.6:1.1.2.71
--- src/doc/CHANGES-6.1.6:1.1.2.70	Sat Aug 27 13:23:24 2016
+++ src/doc/CHANGES-6.1.6	Sat Aug 27 14:42:02 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.70 2016/08/27 13:23:24 bouyer Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.71 2016/08/27 14:42:02 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -8413,3 +8413,18 @@ etc/Makefile	1.403
 	spwd.db should be 0600 (Brooks Davis)
 	[christos, ticket #1369]
 
+sbin/fsdb/fsdb.c1.49
+sys/ufs/ffs/ffs_vfsops.c			1.340
+usr.sbin/quot/quot.c1.34
+
+	From Michael Plass:
+
+	The superblock field that distinguishes between 4.2BSD and 4.4BSD
+	inodes is really only relevant on a UFS1 file system. Make sure that
+	it is a UFS1 fs before using fs_old_inodefmt.
+
+	Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
+	even for UFS2, so problems were apparent only on file systems created
+	by other operating systems, for example, FreeBSD.
+	[martin, ticket #1395]
+



CVS commit: [netbsd-6-1] src

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:41:48 UTC 2016

Modified Files:
src/sbin/fsdb [netbsd-6-1]: fsdb.c
src/sys/ufs/ffs [netbsd-6-1]: ffs_vfsops.c
src/usr.sbin/quot [netbsd-6-1]: quot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1395):
sys/ufs/ffs/ffs_vfsops.c: revision 1.340
usr.sbin/quot/quot.c: revision 1.34
sbin/fsdb/fsdb.c: revision 1.49
>From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.10.1 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.275.2.2.4.1 -r1.275.2.2.4.2 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.29 -r1.29.14.1 src/usr.sbin/quot/quot.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/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.43 src/sbin/fsdb/fsdb.c:1.43.10.1
--- src/sbin/fsdb/fsdb.c:1.43	Mon Aug 29 14:34:59 2011
+++ src/sbin/fsdb/fsdb.c	Sat Aug 27 14:41:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.43.10.1 2016/08/27 14:41:48 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.43.10.1 2016/08/27 14:41:48 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -1235,7 +1235,7 @@ CMDFUNCSTART(chgroup)
 			return 1;
 		}
 	}
-	if (sblock->fs_old_inodefmt < FS_44INODEFMT)
+	if (!is_ufs2 && sblock->fs_old_inodefmt < FS_44INODEFMT)
 		curinode->dp1.di_ogid = iswap32(gid);
 	else
 		DIP_SET(curinode, gid, iswap32(gid));

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.4.1 src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.4.2
--- src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.4.1	Mon Apr 21 10:17:47 2014
+++ src/sys/ufs/ffs/ffs_vfsops.c	Sat Aug 27 14:41:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.275.2.2.4.1 2014/04/21 10:17:47 bouyer Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.275.2.2.4.2 2016/08/27 14:41:48 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.2.4.1 2014/04/21 10:17:47 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.2.4.2 2016/08/27 14:41:48 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1360,7 +1360,8 @@ ffs_oldfscompat_read(struct fs *fs, stru
 		fs->fs_old_trackskew = 0;
 	}
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
@@ -1874,7 +1875,8 @@ ffs_vget(struct mount *mp, ino_t ino, st
 	 * fix until fsck has been changed to do the update.
 	 */
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
+	if (fs->fs_magic == FS_UFS1_MAGIC &&			/* XXX */
+	fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
 		ip->i_uid = ip->i_ffs1_ouid;			/* XXX */
 		ip->i_gid = ip->i_ffs1_ogid;			/* XXX */
 	}			/* XXX */

Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.29 src/usr.sbin/quot/quot.c:1.29.14.1
--- src/usr.sbin/quot/quot.c:1.29	Sun Mar  6 23:41:47 2011
+++ src/usr.sbin/quot/quot.c	Sat Aug 27 14:41:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $	*/
+/*	$NetBSD: quot.c,v 1.29.14.1 2016/08/27 14:41:48 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $");
+__RCSID("$NetBSD: quot.c,v 1.29.14.1 2016/08/27 14:41:48 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -517,7 +517,8 @@ ffs_oldfscompat(struct fs *fs)
 {
 	int i;
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		quad_t sizepb = fs->fs_bsize;
 
 		fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1;



CVS commit: [netbsd-6-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:41:25 UTC 2016

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
ticket 1395


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.72 -r1.1.2.73 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.72 src/doc/CHANGES-6.0.7:1.1.2.73
--- src/doc/CHANGES-6.0.7:1.1.2.72	Sat Aug 27 13:22:11 2016
+++ src/doc/CHANGES-6.0.7	Sat Aug 27 14:41:25 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.72 2016/08/27 13:22:11 bouyer Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.73 2016/08/27 14:41:25 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -8693,3 +8693,18 @@ etc/Makefile	1.403
 	spwd.db should be 0600 (Brooks Davis)
 	[christos, ticket #1369]
 
+sbin/fsdb/fsdb.c1.49
+sys/ufs/ffs/ffs_vfsops.c			1.340
+usr.sbin/quot/quot.c1.34
+
+	From Michael Plass:
+
+	The superblock field that distinguishes between 4.2BSD and 4.4BSD
+	inodes is really only relevant on a UFS1 file system. Make sure that
+	it is a UFS1 fs before using fs_old_inodefmt.
+
+	Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
+	even for UFS2, so problems were apparent only on file systems created
+	by other operating systems, for example, FreeBSD.
+	[martin, ticket #1395]
+



CVS commit: [netbsd-6-0] src

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:41:00 UTC 2016

Modified Files:
src/sbin/fsdb [netbsd-6-0]: fsdb.c
src/sys/ufs/ffs [netbsd-6-0]: ffs_vfsops.c
src/usr.sbin/quot [netbsd-6-0]: quot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1395):
sys/ufs/ffs/ffs_vfsops.c: revision 1.340
usr.sbin/quot/quot.c: revision 1.34
sbin/fsdb/fsdb.c: revision 1.49
>From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.8.1 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.275.2.2.2.1 -r1.275.2.2.2.2 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.29 -r1.29.12.1 src/usr.sbin/quot/quot.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/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.43 src/sbin/fsdb/fsdb.c:1.43.8.1
--- src/sbin/fsdb/fsdb.c:1.43	Mon Aug 29 14:34:59 2011
+++ src/sbin/fsdb/fsdb.c	Sat Aug 27 14:41:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.43.8.1 2016/08/27 14:41:00 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.43.8.1 2016/08/27 14:41:00 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -1235,7 +1235,7 @@ CMDFUNCSTART(chgroup)
 			return 1;
 		}
 	}
-	if (sblock->fs_old_inodefmt < FS_44INODEFMT)
+	if (!is_ufs2 && sblock->fs_old_inodefmt < FS_44INODEFMT)
 		curinode->dp1.di_ogid = iswap32(gid);
 	else
 		DIP_SET(curinode, gid, iswap32(gid));

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.2.1 src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.2.2
--- src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2.2.1	Mon Apr 21 10:15:36 2014
+++ src/sys/ufs/ffs/ffs_vfsops.c	Sat Aug 27 14:41:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.275.2.2.2.1 2014/04/21 10:15:36 bouyer Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.275.2.2.2.2 2016/08/27 14:41:00 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.2.2.1 2014/04/21 10:15:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.2.2.2 2016/08/27 14:41:00 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1360,7 +1360,8 @@ ffs_oldfscompat_read(struct fs *fs, stru
 		fs->fs_old_trackskew = 0;
 	}
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
@@ -1874,7 +1875,8 @@ ffs_vget(struct mount *mp, ino_t ino, st
 	 * fix until fsck has been changed to do the update.
 	 */
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
+	if (fs->fs_magic == FS_UFS1_MAGIC &&			/* XXX */
+	fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
 		ip->i_uid = ip->i_ffs1_ouid;			/* XXX */
 		ip->i_gid = ip->i_ffs1_ogid;			/* XXX */
 	}			/* XXX */

Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.29 src/usr.sbin/quot/quot.c:1.29.12.1
--- src/usr.sbin/quot/quot.c:1.29	Sun Mar  6 23:41:47 2011
+++ src/usr.sbin/quot/quot.c	Sat Aug 27 14:41:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $	*/
+/*	$NetBSD: quot.c,v 1.29.12.1 2016/08/27 14:41:00 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $");
+__RCSID("$NetBSD: quot.c,v 1.29.12.1 2016/08/27 14:41:00 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -517,7 +517,8 @@ ffs_oldfscompat(struct fs *fs)
 {
 	int i;
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		quad_t sizepb = fs->fs_bsize;
 
 		fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1;



CVS commit: [netbsd-6] src

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:40:35 UTC 2016

Modified Files:
src/sbin/fsdb [netbsd-6]: fsdb.c
src/sys/ufs/ffs [netbsd-6]: ffs_vfsops.c
src/usr.sbin/quot [netbsd-6]: quot.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1395):
sys/ufs/ffs/ffs_vfsops.c: revision 1.340
usr.sbin/quot/quot.c: revision 1.34
sbin/fsdb/fsdb.c: revision 1.49
>From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.4.1 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.275.2.4 -r1.275.2.5 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.29 -r1.29.6.1 src/usr.sbin/quot/quot.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/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.43 src/sbin/fsdb/fsdb.c:1.43.4.1
--- src/sbin/fsdb/fsdb.c:1.43	Mon Aug 29 14:34:59 2011
+++ src/sbin/fsdb/fsdb.c	Sat Aug 27 14:40:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.43.4.1 2016/08/27 14:40:35 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.43 2011/08/29 14:34:59 joerg Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.43.4.1 2016/08/27 14:40:35 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -1235,7 +1235,7 @@ CMDFUNCSTART(chgroup)
 			return 1;
 		}
 	}
-	if (sblock->fs_old_inodefmt < FS_44INODEFMT)
+	if (!is_ufs2 && sblock->fs_old_inodefmt < FS_44INODEFMT)
 		curinode->dp1.di_ogid = iswap32(gid);
 	else
 		DIP_SET(curinode, gid, iswap32(gid));

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.4 src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.5
--- src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.4	Thu Dec  4 05:38:54 2014
+++ src/sys/ufs/ffs/ffs_vfsops.c	Sat Aug 27 14:40:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.275.2.4 2014/12/04 05:38:54 snj Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.275.2.5 2016/08/27 14:40:35 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.4 2014/12/04 05:38:54 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.5 2016/08/27 14:40:35 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1352,7 +1352,8 @@ ffs_oldfscompat_read(struct fs *fs, stru
 		fs->fs_old_trackskew = 0;
 	}
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		fs->fs_maxfilesize = (u_quad_t) 1LL << 39;
 		fs->fs_qbmask = ~fs->fs_bmask;
 		fs->fs_qfmask = ~fs->fs_fmask;
@@ -1867,7 +1868,8 @@ ffs_vget(struct mount *mp, ino_t ino, st
 	 * fix until fsck has been changed to do the update.
 	 */
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
+	if (fs->fs_magic == FS_UFS1_MAGIC &&			/* XXX */
+	fs->fs_old_inodefmt < FS_44INODEFMT) {		/* XXX */
 		ip->i_uid = ip->i_ffs1_ouid;			/* XXX */
 		ip->i_gid = ip->i_ffs1_ogid;			/* XXX */
 	}			/* XXX */

Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.29 src/usr.sbin/quot/quot.c:1.29.6.1
--- src/usr.sbin/quot/quot.c:1.29	Sun Mar  6 23:41:47 2011
+++ src/usr.sbin/quot/quot.c	Sat Aug 27 14:40:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $	*/
+/*	$NetBSD: quot.c,v 1.29.6.1 2016/08/27 14:40:35 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.29 2011/03/06 23:41:47 christos Exp $");
+__RCSID("$NetBSD: quot.c,v 1.29.6.1 2016/08/27 14:40:35 bouyer Exp $");
 #endif /* not lint */
 
 #include 
@@ -517,7 +517,8 @@ ffs_oldfscompat(struct fs *fs)
 {
 	int i;
 
-	if (fs->fs_old_inodefmt < FS_44INODEFMT) {
+	if (fs->fs_magic == FS_UFS1_MAGIC &&
+	fs->fs_old_inodefmt < FS_44INODEFMT) {
 		quad_t sizepb = fs->fs_bsize;
 
 		fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1;



CVS commit: [netbsd-6] src/sys/netinet

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:39:10 UTC 2016

Modified Files:
src/sys/netinet [netbsd-6]: ip_carp.c

Log Message:
Pull up following revision(s) (requested by is in ticket #1394):
sys/netinet/ip_carp.c: revision 1.76
Print the IPv6 or IPv4 source addresses of packets with wrong hash, to
help debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.47.4.3 -r1.47.4.4 src/sys/netinet/ip_carp.c

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

Modified files:

Index: src/sys/netinet/ip_carp.c
diff -u src/sys/netinet/ip_carp.c:1.47.4.3 src/sys/netinet/ip_carp.c:1.47.4.4
--- src/sys/netinet/ip_carp.c:1.47.4.3	Tue Jun  3 15:34:00 2014
+++ src/sys/netinet/ip_carp.c	Sat Aug 27 14:39:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_carp.c,v 1.47.4.3 2014/06/03 15:34:00 msaitoh Exp $	*/
+/*	$NetBSD: ip_carp.c,v 1.47.4.4 2016/08/27 14:39:10 bouyer Exp $	*/
 /*	$OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
 #include "opt_mbuftrace.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.47.4.3 2014/06/03 15:34:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.47.4.4 2016/08/27 14:39:10 bouyer Exp $");
 
 /*
  * TODO:
@@ -92,6 +92,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 
 #include 
 #include 
 #include 
+#include 
 #endif
 
 #include 
@@ -673,9 +674,29 @@ carp_proto_input_c(struct mbuf *m, struc
 
 	/* verify the hash */
 	if (carp_hmac_verify(sc, ch->carp_counter, ch->carp_md)) {
+		struct ip *ip;
+		struct ip6_hdr *ip6;
+
 		CARP_STATINC(CARP_STAT_BADAUTH);
 		sc->sc_if.if_ierrors++;
-		CARP_LOG(sc, ("incorrect hash"));
+
+		switch(af) {
+		
+		case AF_INET:
+			ip = mtod(m, struct ip *);
+			CARP_LOG(sc, ("incorrect hash from %s", 
+			in_fmtaddr(ip->ip_src)));
+			break;
+
+		case AF_INET6:
+			ip6 = mtod(m, struct ip6_hdr *);
+			CARP_LOG(sc, ("incorrect hash from %s",
+ip6_sprintf(>ip6_src)));
+			break;
+
+		default: CARP_LOG(sc, ("incorrect hash"));
+			break;
+		}
 		m_freem(m);
 		return;
 	}



CVS commit: src/tests/lib/libc/rpc

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 14:36:22 UTC 2016

Modified Files:
src/tests/lib/libc/rpc: t_rpc.c

Log Message:
skip if we are not running rpcbind.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/rpc/t_rpc.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/rpc/t_rpc.c
diff -u src/tests/lib/libc/rpc/t_rpc.c:1.9 src/tests/lib/libc/rpc/t_rpc.c:1.10
--- src/tests/lib/libc/rpc/t_rpc.c:1.9	Fri Nov 27 08:59:40 2015
+++ src/tests/lib/libc/rpc/t_rpc.c	Sat Aug 27 10:36:22 2016
@@ -1,7 +1,7 @@
-/*	$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $	*/
+/*	$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $	*/
 
 #include 
-__RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $");
+__RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $");
 
 #include 
 #include 
@@ -21,12 +21,12 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/
 
 #define SKIPX(ev, msg, ...)	do {			\
 	atf_tc_skip(msg, __VA_ARGS__);			\
-	return;		\
+	return ev;	\
 } while(/*CONSTCOND*/0)
 
 #else
-#define ERRX(ev, msg, ...)	errx(ev, msg, __VA_ARGS__)
-#define SKIPX(ev, msg, ...)	errx(ev, msg, __VA_ARGS__)
+#define ERRX(ev, msg, ...)	errx(EXIT_FAILURE, msg, __VA_ARGS__)
+#define SKIPX(ev, msg, ...)	errx(EXIT_FAILURE, msg, __VA_ARGS__)
 #endif
 
 #ifdef DEBUG
@@ -72,13 +72,13 @@ onehost(const char *host, const char *tr
 	__rpc_control(CLCR_SET_RPCB_TIMEOUT, );
 
 	if ((clnt = clnt_create(host, RPCBPROG, RPCBVERS, transp)) == NULL)
-		SKIPX(EXIT_FAILURE, "clnt_create (%s)", clnt_spcreateerror(""));
+		SKIPX(, "clnt_create (%s)", clnt_spcreateerror(""));
 
 	tv.tv_sec = 1;
 	tv.tv_usec = 0;
 	if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv)
 	!= RPC_SUCCESS)
-		ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, ""));
+		ERRX(, "clnt_call (%s)", clnt_sperror(clnt, ""));
 	clnt_control(clnt, CLGET_SVC_ADDR, (char *) );
 	reply(NULL, , NULL);
 }
@@ -100,13 +100,13 @@ server(struct svc_req *rqstp, SVCXPRT *t
 	switch (rqstp->rq_proc) {
 	case NULLPROC:
 		if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL))
-			ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0);
+			ERRX(, "svc_sendreply failed %d", 0);
 		return;
 	case PLUSONE:
 		break;
 	case DESTROY:
 		if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL))
-			ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0);
+			ERRX(, "svc_sendreply failed %d", 0);
 		svc_destroy(transp);
 		exit(0);
 	default:
@@ -121,7 +121,7 @@ server(struct svc_req *rqstp, SVCXPRT *t
 	DPRINTF("About to increment\n");
 	num++;
 	if (!svc_sendreply(transp, (xdrproc_t)xdr_int, (void *)))
-		ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 1);
+		ERRX(, "svc_sendreply failed %d", 1);
 	DPRINTF("Leaving server procedure.\n");
 }
 
@@ -176,7 +176,7 @@ regtest(const char *hostname, const char
 
 	svc_fdset_init(p ? SVC_FDSET_POLL : 0);
 	if (!svc_create(server, PROGNUM, VERSNUM, transp))
-		ERRX(EXIT_FAILURE, "Cannot create server %d", num);
+		SKIPX(EXIT_FAILURE, "Cannot create server %d", num);
 
 	switch ((pid = fork())) {
 	case 0:



CVS commit: [netbsd-6] src/sys/arch/mips/mips

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:34:55 UTC 2016

Modified Files:
src/sys/arch/mips/mips [netbsd-6]: pmap.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1390):
sys/arch/mips/mips/pmap.c: revision 1.221
sys/arch/mips/mips/pmap.c: revision 1.222
sys/arch/mips/mips/pmap.c: revision 1.223
Fix a bug introduced by me in 1.214 where unmanaged mappings would be
affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
mappings are left intact.
Thanks to chuq for spotting my mistake and reviewing this diff.
Thanks to everyone who tested it as well.
Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
pmap_page_remove from the previous change neglected to terminate the pv
list correctly when it started with an initial unmanaged mapping and
subsequent managed mappings.  Fix this.
Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
looking for bad aliases and removing the bad entries.  That is, revert
to the code before the matt-mips64 merge.
Additionally, fix the pmap_update call to not use the (recently
  removed/freed) pv for the pmap_t.
Fixes the following two PRs
PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst 
uncompressing base.tgz
PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


To generate a diff of this commit:
cvs rdiff -u -r1.207.2.3 -r1.207.2.4 src/sys/arch/mips/mips/pmap.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/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.207.2.3 src/sys/arch/mips/mips/pmap.c:1.207.2.4
--- src/sys/arch/mips/mips/pmap.c:1.207.2.3	Wed Jun 11 15:38:05 2014
+++ src/sys/arch/mips/mips/pmap.c	Sat Aug 27 14:34:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.207.2.3 2014/06/11 15:38:05 msaitoh Exp $	*/
+/*	$NetBSD: pmap.c,v 1.207.2.4 2016/08/27 14:34:55 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.207.2.3 2014/06/11 15:38:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.207.2.4 2016/08/27 14:34:55 bouyer Exp $");
 
 /*
  *	Manages physical address maps.
@@ -316,6 +316,7 @@ u_int		pmap_page_colormask;
 	 (pm) == curlwp->l_proc->p_vmspace->vm_map.pmap)
 
 /* Forward function declarations */
+void pmap_page_remove(struct vm_page *);
 void pmap_remove_pv(pmap_t, vaddr_t, struct vm_page *, bool);
 void pmap_enter_pv(pmap_t, vaddr_t, struct vm_page *, u_int *, int);
 pt_entry_t *pmap_pte(pmap_t, vaddr_t);
@@ -1063,6 +1064,10 @@ pmap_page_protect(struct vm_page *pg, vm
 			while (pv != NULL) {
 const pmap_t pmap = pv->pv_pmap;
 const uint16_t gen = PG_MD_PVLIST_GEN(md);
+if (pv->pv_va & PV_KENTER) {
+	pv = pv->pv_next;
+	continue;
+}
 va = trunc_page(pv->pv_va);
 PG_MD_PVLIST_UNLOCK(md);
 pmap_protect(pmap, va, va + PAGE_SIZE, prot);
@@ -1087,17 +1092,7 @@ pmap_page_protect(struct vm_page *pg, vm
 		if (pmap_clear_mdpage_attributes(md, PG_MD_EXECPAGE)) {
 			PMAP_COUNT(exec_uncached_page_protect);
 		}
-		(void)PG_MD_PVLIST_LOCK(md, false);
-		pv = >pvh_first;
-		while (pv->pv_pmap != NULL) {
-			const pmap_t pmap = pv->pv_pmap;
-			va = trunc_page(pv->pv_va);
-			PG_MD_PVLIST_UNLOCK(md);
-			pmap_remove(pmap, va, va + PAGE_SIZE);
-			pmap_update(pmap);
-			(void)PG_MD_PVLIST_LOCK(md, false);
-		}
-		PG_MD_PVLIST_UNLOCK(md);
+		pmap_page_remove(pg);
 	}
 }
 
@@ -2069,6 +2064,32 @@ pmap_set_modified(paddr_t pa)
 / pv_entry management /
 
 static void
+pmap_check_alias(struct vm_page *pg)
+{
+#ifdef MIPS3_PLUS	/* XXX mmu XXX */
+#ifndef MIPS3_NO_PV_UNCACHED
+	struct vm_page_md * const md = VM_PAGE_TO_MD(pg);
+
+	if (MIPS_HAS_R4K_MMU && PG_MD_UNCACHED_P(md)) {
+		/*
+		 * Page is currently uncached, check if alias mapping has been
+		 * removed.  If it was, then reenable caching.
+		 */
+		pv_entry_t pv = >pvh_first;
+		pv_entry_t pv0 = pv->pv_next;
+
+		for (; pv0; pv0 = pv0->pv_next) {
+			if (mips_cache_badalias(pv->pv_va, pv0->pv_va))
+break;
+		}
+		if (pv0 == NULL)
+			pmap_page_cache(pg, true);
+	}
+#endif
+#endif	/* MIPS3_PLUS */
+}
+
+static void
 pmap_check_pvlist(struct vm_page_md *md)
 {
 #ifdef PARANOIADIAG
@@ -2155,12 +2176,12 @@ again:
 			 * be mapped with one index at any given time.
 			 */
 
-			if (mips_cache_badalias(pv->pv_va, va)) {
-for (npv = pv; npv; npv = npv->pv_next) {
-	vaddr_t nva = trunc_page(npv->pv_va);
-	pmap_remove(npv->pv_pmap, nva,
-	nva + PAGE_SIZE);
-	pmap_update(npv->pv_pmap);
+			for (npv = pv; npv; npv = npv->pv_next) {
+vaddr_t nva = trunc_page(npv->pv_va);
+pmap_t npm = npv->pv_pmap;
+if (mips_cache_badalias(nva, va)) {
+	pmap_remove(npm, nva, nva + PAGE_SIZE);
+	pmap_update(npm);
 	goto again;
 }
 			}
@@ -2283,6 

CVS commit: src/tests/rump/modautoload

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 14:23:54 UTC 2016

Modified Files:
src/tests/rump/modautoload: Makefile

Log Message:
don't disable PIE


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/rump/modautoload/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/rump/modautoload/Makefile
diff -u src/tests/rump/modautoload/Makefile:1.5 src/tests/rump/modautoload/Makefile:1.6
--- src/tests/rump/modautoload/Makefile:1.5	Sat Aug 27 10:21:07 2016
+++ src/tests/rump/modautoload/Makefile	Sat Aug 27 10:23:54 2016
@@ -1,9 +1,8 @@
-#	$NetBSD: Makefile,v 1.5 2016/08/27 14:21:07 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2016/08/27 14:23:54 christos Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/rump/modautoload
-.include 
-NOPIE=yes
+
 TESTS_C=	t_modautoload
 PAXCTL_FLAGS=	+m
 



CVS commit: src/tests/rump/modautoload

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 14:21:07 UTC 2016

Modified Files:
src/tests/rump/modautoload: Makefile

Log Message:
needs mprotect disable since it loads kernel code and relocates it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/modautoload/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/rump/modautoload/Makefile
diff -u src/tests/rump/modautoload/Makefile:1.4 src/tests/rump/modautoload/Makefile:1.5
--- src/tests/rump/modautoload/Makefile:1.4	Sat Aug 20 13:06:18 2016
+++ src/tests/rump/modautoload/Makefile	Sat Aug 27 10:21:07 2016
@@ -1,9 +1,11 @@
-#	$NetBSD: Makefile,v 1.4 2016/08/20 17:06:18 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2016/08/27 14:21:07 christos Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/rump/modautoload
-
+.include 
+NOPIE=yes
 TESTS_C=	t_modautoload
+PAXCTL_FLAGS=	+m
 
 SRCS.t_modautoload+=	t_modautoload.c
 



CVS commit: src/sys/arch

2016-08-27 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 27 14:19:47 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/amd64/include: segments.h
src/sys/arch/i386/i386: machdep.c
src/sys/arch/i386/include: segments.h
src/sys/arch/x86/x86: idt.c

Log Message:
Remove idt_init.


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amd64/include/segments.h
cvs rdiff -u -r1.759 -r1.760 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/i386/include/segments.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/idt.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.227 src/sys/arch/amd64/amd64/machdep.c:1.228
--- src/sys/arch/amd64/amd64/machdep.c:1.227	Sat Aug 27 14:12:58 2016
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Aug 27 14:19:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1640,7 +1640,6 @@ init_x86_64(paddr_t first_avail)
 	pmap_update(pmap_kernel());
 
 #ifndef XEN
-	idt_init();
 	idt = (struct gate_descriptor *)idt_vaddr;
 	gdtstore = (char *)(idt + NIDT);
 	ldtstore = gdtstore + DYNSEL_START;
@@ -1652,25 +1651,29 @@ init_x86_64(paddr_t first_avail)
 	gdtstore = (char *) (ldtstore + PAGE_SIZE);
 #endif /* XEN */
 
-	/* make gdt gates and memory segments */
+	/*
+	 * Make GDT gates and memory segments.
+	 */
 	set_mem_segment(GDT_ADDR_MEM(gdtstore, GCODE_SEL), 0,
 	0xf, SDT_MEMERA, SEL_KPL, 1, 0, 1);
 
 	set_mem_segment(GDT_ADDR_MEM(gdtstore, GDATA_SEL), 0,
 	0xf, SDT_MEMRWA, SEL_KPL, 1, 0, 1);
 
-#ifndef XEN
-	set_sys_segment(GDT_ADDR_SYS(gdtstore, GLDT_SEL), ldtstore,
-	LDT_SIZE - 1, SDT_SYSLDT, SEL_KPL, 0);
-#endif
-
 	set_mem_segment(GDT_ADDR_MEM(gdtstore, GUCODE_SEL), 0,
 	x86_btop(VM_MAXUSER_ADDRESS) - 1, SDT_MEMERA, SEL_UPL, 1, 0, 1);
 
 	set_mem_segment(GDT_ADDR_MEM(gdtstore, GUDATA_SEL), 0,
 	x86_btop(VM_MAXUSER_ADDRESS) - 1, SDT_MEMRWA, SEL_UPL, 1, 0, 1);
 
-	/* make ldt gates and memory segments */
+#ifndef XEN
+	set_sys_segment(GDT_ADDR_SYS(gdtstore, GLDT_SEL), ldtstore,
+	LDT_SIZE - 1, SDT_SYSLDT, SEL_KPL, 0);
+#endif
+
+	/*
+	 * Make LDT gates and memory segments.
+	 */
 	setgate((struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),
 	(oosyscall), 0, SDT_SYS386CGT, SEL_UPL,
 	GSEL(GCODE_SEL, SEL_KPL));
@@ -1705,7 +1708,7 @@ init_x86_64(paddr_t first_avail)
 	SDT_MEMRWA, SEL_UPL, 1, 1, 0);
 
 	/*
-	 * Other entries.
+	 * Other LDT entries.
 	 */
 	memcpy((struct gate_descriptor *)(ldtstore + LSOL26CALLS_SEL),
 	(struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),

Index: src/sys/arch/amd64/include/segments.h
diff -u src/sys/arch/amd64/include/segments.h:1.26 src/sys/arch/amd64/include/segments.h:1.27
--- src/sys/arch/amd64/include/segments.h:1.26	Sat Aug 27 14:12:58 2016
+++ src/sys/arch/amd64/include/segments.h	Sat Aug 27 14:19:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.26 2016/08/27 14:12:58 maxv Exp $	*/
+/*	$NetBSD: segments.h,v 1.27 2016/08/27 14:19:47 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -248,7 +248,6 @@ void cpu_init_idt(void);
 void update_descriptor(void *, void *);
 
 #if !defined(XEN)
-void idt_init(void);
 void idt_vec_reserve(int);
 int idt_vec_alloc(int, int);
 void idt_vec_set(int, void (*)(void));

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.759 src/sys/arch/i386/i386/machdep.c:1.760
--- src/sys/arch/i386/i386/machdep.c:1.759	Sat Jul 16 17:02:34 2016
+++ src/sys/arch/i386/i386/machdep.c	Sat Aug 27 14:19:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.759 2016/07/16 17:02:34 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.759 2016/07/16 17:02:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -1303,10 +1303,7 @@ init386(paddr_t first_avail)
 	pmap_update(pmap_kernel());
 	memset((void *)idt_vaddr, 0, PAGE_SIZE);
 
-
 #ifndef XEN
-	idt_init();
-
 	idt = (struct gate_descriptor *)idt_vaddr;
 	pmap_kenter_pa(pentium_idt_vaddr, idt_paddr, VM_PROT_READ, 0);
 	pmap_update(pmap_kernel());

Index: 

CVS commit: [netbsd-6] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:18:43 UTC 2016

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
tickets 1375 1384 1386 1389


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.258 -r1.1.2.259 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.258 src/doc/CHANGES-6.2:1.1.2.259
--- src/doc/CHANGES-6.2:1.1.2.258	Sat Aug 27 13:34:42 2016
+++ src/doc/CHANGES-6.2	Sat Aug 27 14:18:42 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.258 2016/08/27 13:34:42 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.259 2016/08/27 14:18:42 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -14633,3 +14633,37 @@ bin/cp/cp.c	1.59
 	From Timo Buhrmester.
 	[uwe, ticket #1372]
 
+src/usr.bin/ftp/cmds.c:		patch
+src/usr.bin/ftp/fetch.c:	patch
+src/usr.bin/ftp/ftp.1:		patch
+src/usr.bin/ftp/ftp.c:		patch
+src/usr.bin/ftp/ftp_var.h:	patch
+src/usr.bin/ftp/main.c:		patch
+src/usr.bin/ftp/ssl.c:		patch
+src/usr.bin/ftp/ssl.h:		patch
+src/usr.bin/ftp/version.h:	patch
+
+	Update ftp(1) to version 20150912, adding https via proxy support.
+	[nonaka, ticket #1375]
+
+sys/dev/ic/gem.c1.105
+	PR kern/46083
+	Track the start of each packet, so that we set the "Start of Frame"
+	bit in all the relevant transmit descriptors when enqueing multiple
+	packets.
+	Patch from Valery Ushakov, slightly modified by me to handle debug
+	output. Tested on macppc/6.x and sparc64/7.99.x.
+	[jdc, ticket #1384]
+
+sys/dev/isapnp/isapnpdevs			1.69
+sys/dev/isapnp/isapnpdevs.c			regen
+sys/dev/isapnp/isapnpdevs.h			regen
+
+	Add another le board.
+	[pgoyette, ticket #1386]
+
+sys/ufs/lfs/lfs_vnops.c1.304
+
+	Fix a deadlock
+	[dholland, ticket #1389]
+



CVS commit: [netbsd-6] src/sys/ufs/lfs

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:13:18 UTC 2016

Modified Files:
src/sys/ufs/lfs [netbsd-6]: lfs_vnops.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1389):
sys/ufs/lfs/lfs_vnops.c: revision 1.304
Fix a deadlock
ok dholland@


To generate a diff of this commit:
cvs rdiff -u -r1.239.2.1 -r1.239.2.2 src/sys/ufs/lfs/lfs_vnops.c

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

Modified files:

Index: src/sys/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.239.2.1 src/sys/ufs/lfs/lfs_vnops.c:1.239.2.2
--- src/sys/ufs/lfs/lfs_vnops.c:1.239.2.1	Sat Mar 17 17:40:06 2012
+++ src/sys/ufs/lfs/lfs_vnops.c	Sat Aug 27 14:13:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.239.2.1 2012/03/17 17:40:06 bouyer Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.239.2.2 2016/08/27 14:13:18 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.239.2.1 2012/03/17 17:40:06 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.239.2.2 2016/08/27 14:13:18 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -443,8 +443,10 @@ lfs_set_dirop(struct vnode *dvp, struct 
 		if ((error = mtsleep(_dirvcount,
 		PCATCH | PUSER | PNORELOCK, "lfs_maxdirop", 0,
 		_lock)) != 0) {
+			mutex_exit(_lock);
 			goto unreserve;
 		}
+		mutex_exit(_lock);
 		goto restart;
 	}
 



CVS commit: src/sys/arch/amd64

2016-08-27 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 27 14:12:58 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/amd64/include: segments.h

Log Message:
Rename this value, and use it.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amd64/include/segments.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/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.226 src/sys/arch/amd64/amd64/machdep.c:1.227
--- src/sys/arch/amd64/amd64/machdep.c:1.226	Fri Jul 22 14:08:33 2016
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Aug 27 14:12:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.226 2016/07/22 14:08:33 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.226 2016/07/22 14:08:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1714,8 +1714,8 @@ init_x86_64(paddr_t first_avail)
 	(struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),
 	sizeof (struct gate_descriptor));
 
-	/* exceptions */
-	for (x = 0; x < 32; x++) {
+	/* CPU-specific IDT exceptions. */
+	for (x = 0; x < NCPUIDT; x++) {
 #ifndef XEN
 		idt_vec_reserve(x);
 		switch (x) {

Index: src/sys/arch/amd64/include/segments.h
diff -u src/sys/arch/amd64/include/segments.h:1.25 src/sys/arch/amd64/include/segments.h:1.26
--- src/sys/arch/amd64/include/segments.h:1.25	Sun Aug 21 11:48:59 2016
+++ src/sys/arch/amd64/include/segments.h	Sat Aug 27 14:12:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.25 2016/08/21 11:48:59 maxv Exp $	*/
+/*	$NetBSD: segments.h,v 1.26 2016/08/27 14:12:58 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -331,7 +331,7 @@ void cpu_fsgs_reload(struct lwp *, int, 
  * Entries in the Interrupt Descriptor Table (IDT)
  */
 #define NIDT	256
-#define NRSVIDT	32		/* reserved entries for CPU exceptions */
+#define NCPUIDT	32		/* reserved entries for CPU exceptions */
 
 /*
  * Entries in the Global Descriptor Table (GDT)



CVS commit: [netbsd-6] src/sys/dev/isapnp

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:11:02 UTC 2016

Modified Files:
src/sys/dev/isapnp [netbsd-6]: isapnpdevs.c isapnpdevs.h

Log Message:
regen for ticket 1386


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.40.1 src/sys/dev/isapnp/isapnpdevs.c
cvs rdiff -u -r1.66 -r1.66.40.1 src/sys/dev/isapnp/isapnpdevs.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/isapnp/isapnpdevs.c
diff -u src/sys/dev/isapnp/isapnpdevs.c:1.71 src/sys/dev/isapnp/isapnpdevs.c:1.71.40.1
--- src/sys/dev/isapnp/isapnpdevs.c:1.71	Mon Apr 28 20:23:53 2008
+++ src/sys/dev/isapnp/isapnpdevs.c	Sat Aug 27 14:11:02 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: isapnpdevs.c,v 1.71 2008/04/28 20:23:53 martin Exp $	*/
+/*	$NetBSD: isapnpdevs.c,v 1.71.40.1 2016/08/27 14:11:02 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: isapnpdevs,v 1.66 2008/04/20 13:24:34 tsutsui Exp
+ *	NetBSD: isapnpdevs,v 1.68.20.1 2016/08/27 14:09:42 bouyer Exp
  */
 
 /*-
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isapnpdevs.c,v 1.71 2008/04/28 20:23:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isapnpdevs.c,v 1.71.40.1 2016/08/27 14:11:02 bouyer Exp $");
 
 #include 
 #include 
@@ -224,9 +224,10 @@ static const struct isapnp_matchinfo isa
 	{"ATK1500", 0},	/* Lance Ethernet on Allied Telesyn board */
 	{"CSI2203", 0},	/* Cabletron E22xx */
 	{"BUF0001", 0},	/* Melco Inc. LGY-IV */
+	{"SKD8000", 0},	/* SysKonnect SK-NET Flash */
 };
 const struct isapnp_devinfo isapnp_le_devinfo = {
-	isapnp_le_devlogic, 4,
+	isapnp_le_devlogic, 5,
 	NULL, 0,
 };
 

Index: src/sys/dev/isapnp/isapnpdevs.h
diff -u src/sys/dev/isapnp/isapnpdevs.h:1.66 src/sys/dev/isapnp/isapnpdevs.h:1.66.40.1
--- src/sys/dev/isapnp/isapnpdevs.h:1.66	Mon Apr 28 20:23:53 2008
+++ src/sys/dev/isapnp/isapnpdevs.h	Sat Aug 27 14:11:02 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: isapnpdevs.h,v 1.66 2008/04/28 20:23:53 martin Exp $	*/
+/*	$NetBSD: isapnpdevs.h,v 1.66.40.1 2016/08/27 14:11:02 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: isapnpdevs,v 1.66 2008/04/20 13:24:34 tsutsui Exp
+ *	NetBSD: isapnpdevs,v 1.68.20.1 2016/08/27 14:09:42 bouyer Exp
  */
 
 
@@ -38,6 +38,11 @@
  */
 
 /*
+ * Use "make -f Makefile.isapnpdevs" to regenerate isapnpdevs.h and
+ * isapnpdevs.c
+ */
+
+/*
  * List of known drivers
  */
 struct isapnp_matchinfo {



CVS commit: [netbsd-6] src/sys/dev/isapnp

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:09:42 UTC 2016

Modified Files:
src/sys/dev/isapnp [netbsd-6]: isapnpdevs

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1386):
sys/dev/isapnp/isapnpdevs: revision 1.69
Add another le board.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.20.1 src/sys/dev/isapnp/isapnpdevs

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/isapnp/isapnpdevs
diff -u src/sys/dev/isapnp/isapnpdevs:1.68 src/sys/dev/isapnp/isapnpdevs:1.68.20.1
--- src/sys/dev/isapnp/isapnpdevs:1.68	Wed Jan 21 14:22:46 2009
+++ src/sys/dev/isapnp/isapnpdevs	Sat Aug 27 14:09:42 2016
@@ -1,4 +1,4 @@
-$NetBSD: isapnpdevs,v 1.68 2009/01/21 14:22:46 jnemeth Exp $
+$NetBSD: isapnpdevs,v 1.68.20.1 2016/08/27 14:09:42 bouyer Exp $
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -184,6 +184,7 @@ devlogic	le	TKN0010		0	Lance Ethernet on
 devlogic	le	ATK1500		0	Lance Ethernet on Allied Telesyn board
 devlogic	le	CSI2203		0	Cabletron E22xx
 devlogic	le	BUF0001		0	Melco Inc. LGY-IV
+devlogic	le	SKD8000		0	SysKonnect SK-NET Flash
 
 /*
  * mpu



CVS commit: [netbsd-6] src/sys/dev/ic

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 14:04:25 UTC 2016

Modified Files:
src/sys/dev/ic [netbsd-6]: gem.c

Log Message:
Pull up following revision(s) (requested by jdc in ticket #1384):
sys/dev/ic/gem.c: revision 1.105
PR kern/46083
Track the start of each packet, so that we set the "Start of Frame" bit in
all the relevant transmit descriptors when enqueing multiple packets.
Patch from Valery Ushakov, slightly modified by me to handle debug output.
Tested on macppc/6.x and sparc64/7.99.x.


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.1 -r1.98.2.2 src/sys/dev/ic/gem.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/gem.c
diff -u src/sys/dev/ic/gem.c:1.98.2.1 src/sys/dev/ic/gem.c:1.98.2.2
--- src/sys/dev/ic/gem.c:1.98.2.1	Thu Jul  5 17:59:12 2012
+++ src/sys/dev/ic/gem.c	Sat Aug 27 14:04:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: gem.c,v 1.98.2.1 2012/07/05 17:59:12 riz Exp $ */
+/*	$NetBSD: gem.c,v 1.98.2.2 2016/08/27 14:04:25 bouyer Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.98.2.1 2012/07/05 17:59:12 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.98.2.2 2016/08/27 14:04:25 bouyer Exp $");
 
 #include "opt_inet.h"
 
@@ -1359,6 +1359,9 @@ gem_start(struct ifnet *ifp)
 	struct gem_txsoft *txs;
 	bus_dmamap_t dmamap;
 	int error, firsttx, nexttx = -1, lasttx = -1, ofree, seg;
+#ifdef GEM_DEBUG
+	int otxnext;
+#endif
 	uint64_t flags = 0;
 
 	if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
@@ -1369,10 +1372,12 @@ gem_start(struct ifnet *ifp)
 	 * the first descriptor we'll use.
 	 */
 	ofree = sc->sc_txfree;
-	firsttx = sc->sc_txnext;
+#ifdef GEM_DEBUG
+	otxnext = sc->sc_txnext;
+#endif
 
 	DPRINTF(sc, ("%s: gem_start: txfree %d, txnext %d\n",
-	device_xname(sc->sc_dev), ofree, firsttx));
+	device_xname(sc->sc_dev), ofree, otxnext));
 
 	/*
 	 * Loop through the send queue, setting up transmit descriptors
@@ -1477,7 +1482,8 @@ gem_start(struct ifnet *ifp)
 		/*
 		 * Initialize the transmit descriptors.
 		 */
-		for (nexttx = sc->sc_txnext, seg = 0;
+		firsttx = sc->sc_txnext;
+		for (nexttx = firsttx, seg = 0;
 		 seg < dmamap->dm_nsegs;
 		 seg++, nexttx = GEM_NEXTTX(nexttx)) {
 
@@ -1599,7 +1605,7 @@ gem_start(struct ifnet *ifp)
 
 	if (sc->sc_txfree != ofree) {
 		DPRINTF(sc, ("%s: packets enqueued, IC on %d, OWN on %d\n",
-		device_xname(sc->sc_dev), lasttx, firsttx));
+		device_xname(sc->sc_dev), lasttx, otxnext));
 		/*
 		 * The entire packet chain is set up.
 		 * Kick the transmitter.



CVS commit: [netbsd-6] src/usr.bin/ftp

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:57:01 UTC 2016

Modified Files:
src/usr.bin/ftp [netbsd-6]: cmds.c fetch.c ftp.1 ftp.c ftp_var.h main.c
ssl.c ssl.h version.h

Log Message:
Apply patch, requested by nonaka in ticket #1375:
src/usr.bin/ftp/cmds.c: patch
src/usr.bin/ftp/fetch.c:patch
src/usr.bin/ftp/ftp.1:  patch
src/usr.bin/ftp/ftp.c:  patch
src/usr.bin/ftp/ftp_var.h:  patch
src/usr.bin/ftp/main.c: patch
src/usr.bin/ftp/ssl.c:  patch
src/usr.bin/ftp/ssl.h:  patch
src/usr.bin/ftp/version.h:  patch
Update ftp(1) to version 20150912, adding https via proxy support.


To generate a diff of this commit:
cvs rdiff -u -r1.134.2.1 -r1.134.2.2 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.195.2.2 -r1.195.2.3 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.131.8.1 -r1.131.8.2 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.163.2.1 -r1.163.2.2 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.81.8.1 -r1.81.8.2 src/usr.bin/ftp/ftp_var.h
cvs rdiff -u -r1.120.2.1 -r1.120.2.2 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.2.10.2 -r1.2.10.3 src/usr.bin/ftp/ssl.c
cvs rdiff -u -r1.1.10.2 -r1.1.10.3 src/usr.bin/ftp/ssl.h
cvs rdiff -u -r1.82.8.2 -r1.82.8.3 src/usr.bin/ftp/version.h

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

Modified files:

Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.134.2.1 src/usr.bin/ftp/cmds.c:1.134.2.2
--- src/usr.bin/ftp/cmds.c:1.134.2.1	Tue Dec 17 21:07:59 2013
+++ src/usr.bin/ftp/cmds.c	Sat Aug 27 13:57:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.134.2.1 2013/12/17 21:07:59 bouyer Exp $	*/
+/*	$NetBSD: cmds.c,v 1.134.2.2 2016/08/27 13:57:01 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.134.2.1 2013/12/17 21:07:59 bouyer Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.134.2.2 2016/08/27 13:57:01 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -1967,15 +1967,15 @@ dotrans(char *dst, size_t dlen, const ch
 	char *cp2 = dst;
 	size_t i, ostop;
 
-	for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++)
+	for (ostop = 0; ntout[ostop] && ostop < sizeof(ntout); ostop++)
 		continue;
 	for (cp1 = src; *cp1; cp1++) {
 		int found = 0;
-		for (i = 0; *(ntin + i) && i < 16; i++) {
-			if (*cp1 == *(ntin + i)) {
+		for (i = 0; i < sizeof(ntin) && ntin[i]; i++) {
+			if (*cp1 == ntin[i]) {
 found++;
 if (i < ostop) {
-	*cp2++ = *(ntout + i);
+	*cp2++ = ntout[i];
 	if (cp2 - dst >= (ptrdiff_t)(dlen - 1))
 		goto out;
 }

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.195.2.2 src/usr.bin/ftp/fetch.c:1.195.2.3
--- src/usr.bin/ftp/fetch.c:1.195.2.2	Mon Oct 27 05:53:04 2014
+++ src/usr.bin/ftp/fetch.c	Sat Aug 27 13:57:01 2016
@@ -1,7 +1,7 @@
-/*	$NetBSD: fetch.c,v 1.195.2.2 2014/10/27 05:53:04 snj Exp $	*/
+/*	$NetBSD: fetch.c,v 1.195.2.3 2016/08/27 13:57:01 bouyer Exp $	*/
 
 /*-
- * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -10,6 +10,9 @@
  * This code is derived from software contributed to The NetBSD Foundation
  * by Scott Aaron Bamford.
  *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Thomas Klausner.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -34,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.195.2.2 2014/10/27 05:53:04 snj Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.195.2.3 2016/08/27 13:57:01 bouyer Exp $");
 #endif /* not lint */
 
 /*
@@ -71,27 +74,47 @@ __RCSID("$NetBSD: fetch.c,v 1.195.2.2 20
 typedef enum {
 	UNKNOWN_URL_T=-1,
 	HTTP_URL_T,
-#ifdef WITH_SSL
 	HTTPS_URL_T,
-#endif
 	FTP_URL_T,
 	FILE_URL_T,
 	CLASSIC_URL_T
 } url_t;
 
+struct authinfo {
+	char *auth;
+	char *user;
+	char *pass;
+};
+
+struct urlinfo {
+	char *host;
+	char *port;
+	char *path;
+	url_t utype;
+	in_port_t portnum;
+};
+
+struct posinfo {
+	off_t rangestart;
+	off_t rangeend;
+	off_t entitylen;
+};
+
 __dead static void	aborthttp(int);
 __dead static void	timeouthttp(int);
 #ifndef NO_AUTH
-static int	auth_url(const char *, char **, const char *, const char *);
+static int	auth_url(const char *, char **, const struct authinfo *);
 static void	base64_encode(const unsigned char *, size_t, unsigned char *);
 #endif
 static int	go_fetch(const char *);
 static int	fetch_ftp(const char *);
 static int	fetch_url(const char *, const char *, char *, char *);
 static const char *match_token(const char **, const char *);
-static int	parse_url(const char *, 

CVS commit: [netbsd-6] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:34:42 UTC 2016

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
tickets 1367, 1369, 1372


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.257 -r1.1.2.258 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.257 src/doc/CHANGES-6.2:1.1.2.258
--- src/doc/CHANGES-6.2:1.1.2.257	Thu Jul 21 12:58:24 2016
+++ src/doc/CHANGES-6.2	Sat Aug 27 13:34:42 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.257 2016/07/21 12:58:24 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.258 2016/08/27 13:34:42 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -14603,3 +14603,33 @@ libexec/mail.local/mail.local.c			1.28
 	Fix error checks in open(2) calls.
 	[shm, ticket #1392]
 
+sys/miscfs/kernfs/kernfs_vnops.c		1.151
+	>From Ilya Zykov: Unbreak kernfs which was broken by this commit
+
+	|Make the spec_node table implementation private to spec_vnops.c.
+	|To retrieve a spec_node, two new lookup functions (by device or
+	| by mount) are implemented.  Both return a referenced vnode,
+	| for an opened block device the opened vnode is returned so
+	| further diagnostic checks "vp == ... sd_bdevvp" will not fire.
+	| Otherwise any vnode matching the criteria gets returned.
+	|No objections on tech-kern.
+
+	The effect was that ls /kernfs appeared empty in most cases.
+	[is, ticket #1367]
+
+etc/Makefile	1.403
+
+	spwd.db should be 0600 (Brooks Davis)
+	[christos, ticket #1369]
+
+bin/cp/cp.c	1.59
+
+	The '-i' flag should work regardless of whether the standard input is
+	a terminal.  The Open Group notes this historic behavior and correctly
+	notes that it doesn't make much sense.  Note also, that mv(1) has
+	always respected its '-i' regardless of whether the standard input is
+	a terminal.
+
+	From Timo Buhrmester.
+	[uwe, ticket #1372]
+



CVS commit: [netbsd-6] src/bin/cp

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:25:23 UTC 2016

Modified Files:
src/bin/cp [netbsd-6]: cp.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1372):
bin/cp/cp.c: revision 1.59
The '-i' flag should work regardless of whether the standard input is
a terminal.  The Open Group notes this historic behavior and correctly
notes that it doesn't make much sense.  Note also, that mv(1) has
always respected its '-i' regardless of whether the standard input is
a terminal.
>From Timo Buhrmester.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.58.2.1 src/bin/cp/cp.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/cp/cp.c
diff -u src/bin/cp/cp.c:1.58 src/bin/cp/cp.c:1.58.2.1
--- src/bin/cp/cp.c:1.58	Wed Jan  4 15:58:37 2012
+++ src/bin/cp/cp.c	Sat Aug 27 13:25:23 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cp.c,v 1.58 2012/01/04 15:58:37 christos Exp $ */
+/* $NetBSD: cp.c,v 1.58.2.1 2016/08/27 13:25:23 bouyer Exp $ */
 
 /*
  * Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@ __COPYRIGHT(
 #if 0
 static char sccsid[] = "@(#)cp.c	8.5 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: cp.c,v 1.58 2012/01/04 15:58:37 christos Exp $");
+__RCSID("$NetBSD: cp.c,v 1.58.2.1 2016/08/27 13:25:23 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -145,7 +145,7 @@ main(int argc, char *argv[])
 			iflag = 0;
 			break;
 		case 'i':
-			iflag = isatty(fileno(stdin));
+			iflag = 1;
 			fflag = 0;
 			break;
 		case 'l':



CVS commit: [netbsd-6-1] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:23:24 UTC 2016

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
ticket 1369


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.69 -r1.1.2.70 src/doc/CHANGES-6.1.6

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

Modified files:

Index: src/doc/CHANGES-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.69 src/doc/CHANGES-6.1.6:1.1.2.70
--- src/doc/CHANGES-6.1.6:1.1.2.69	Thu Jul 21 13:11:29 2016
+++ src/doc/CHANGES-6.1.6	Sat Aug 27 13:23:24 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.69 2016/07/21 13:11:29 martin Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.70 2016/08/27 13:23:24 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -8408,3 +8408,8 @@ libexec/mail.local/mail.local.c			1.28
 	Fix error checks in open(2) calls.
 	[shm, ticket #1392]
 
+etc/Makefile	1.403
+
+	spwd.db should be 0600 (Brooks Davis)
+	[christos, ticket #1369]
+



CVS commit: [netbsd-6-1] src/etc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:23:05 UTC 2016

Modified Files:
src/etc [netbsd-6-1]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #1369):
etc/Makefile: revision 1.403
spwd.db should be 0600 (Brooks Davis)


To generate a diff of this commit:
cvs rdiff -u -r1.396.2.2 -r1.396.2.2.4.1 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.396.2.2 src/etc/Makefile:1.396.2.2.4.1
--- src/etc/Makefile:1.396.2.2	Mon Sep 17 19:00:34 2012
+++ src/etc/Makefile	Sat Aug 27 13:23:05 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.396.2.2 2012/09/17 19:00:34 riz Exp $
+#	$NetBSD: Makefile,v 1.396.2.2.4.1 2016/08/27 13:23:05 bouyer Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -288,8 +288,10 @@ install-etc-files: .PHONY .MAKE check_DE
 	${DESTDIR}/etc/master.passwd
 .if ${MKUNPRIVED} != "no"
 	( \
-		for metaent in passwd pwd.db spwd.db; do \
-			echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
+		mode=0600; \
+		for metaent in spwd.db passwd pwd.db; do \
+			echo "./etc/$${metaent} type=file mode=$${mode} uname=root gname=wheel tags=etc_pkg"; \
+			mode=0644; \
 		done; \
 	) | ${METALOG.add}
 .endif	# MKUNPRIVED != no



CVS commit: [netbsd-6-0] src/doc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:22:11 UTC 2016

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
ticket 1369


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.71 src/doc/CHANGES-6.0.7:1.1.2.72
--- src/doc/CHANGES-6.0.7:1.1.2.71	Thu Jul 21 13:14:35 2016
+++ src/doc/CHANGES-6.0.7	Sat Aug 27 13:22:11 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.71 2016/07/21 13:14:35 martin Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.72 2016/08/27 13:22:11 bouyer Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -8688,3 +8688,8 @@ libexec/mail.local/mail.local.c			1.28
 	Fix error checks in open(2) calls.
 	[shm, ticket #1392]
 
+etc/Makefile	1.403
+
+	spwd.db should be 0600 (Brooks Davis)
+	[christos, ticket #1369]
+



CVS commit: [netbsd-6-0] src/etc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:21:44 UTC 2016

Modified Files:
src/etc [netbsd-6-0]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #1369):
etc/Makefile: revision 1.403
spwd.db should be 0600 (Brooks Davis)


To generate a diff of this commit:
cvs rdiff -u -r1.396.2.2 -r1.396.2.2.2.1 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.396.2.2 src/etc/Makefile:1.396.2.2.2.1
--- src/etc/Makefile:1.396.2.2	Mon Sep 17 19:00:34 2012
+++ src/etc/Makefile	Sat Aug 27 13:21:44 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.396.2.2 2012/09/17 19:00:34 riz Exp $
+#	$NetBSD: Makefile,v 1.396.2.2.2.1 2016/08/27 13:21:44 bouyer Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -288,8 +288,10 @@ install-etc-files: .PHONY .MAKE check_DE
 	${DESTDIR}/etc/master.passwd
 .if ${MKUNPRIVED} != "no"
 	( \
-		for metaent in passwd pwd.db spwd.db; do \
-			echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
+		mode=0600; \
+		for metaent in spwd.db passwd pwd.db; do \
+			echo "./etc/$${metaent} type=file mode=$${mode} uname=root gname=wheel tags=etc_pkg"; \
+			mode=0644; \
 		done; \
 	) | ${METALOG.add}
 .endif	# MKUNPRIVED != no



CVS commit: [netbsd-6] src/etc

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:20:19 UTC 2016

Modified Files:
src/etc [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #1369):
etc/Makefile: revision 1.403
spwd.db should be 0600 (Brooks Davis)


To generate a diff of this commit:
cvs rdiff -u -r1.396.2.2 -r1.396.2.3 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.396.2.2 src/etc/Makefile:1.396.2.3
--- src/etc/Makefile:1.396.2.2	Mon Sep 17 19:00:34 2012
+++ src/etc/Makefile	Sat Aug 27 13:20:19 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.396.2.2 2012/09/17 19:00:34 riz Exp $
+#	$NetBSD: Makefile,v 1.396.2.3 2016/08/27 13:20:19 bouyer Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -288,8 +288,10 @@ install-etc-files: .PHONY .MAKE check_DE
 	${DESTDIR}/etc/master.passwd
 .if ${MKUNPRIVED} != "no"
 	( \
-		for metaent in passwd pwd.db spwd.db; do \
-			echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
+		mode=0600; \
+		for metaent in spwd.db passwd pwd.db; do \
+			echo "./etc/$${metaent} type=file mode=$${mode} uname=root gname=wheel tags=etc_pkg"; \
+			mode=0644; \
 		done; \
 	) | ${METALOG.add}
 .endif	# MKUNPRIVED != no



CVS commit: src/lib/libc/stdio

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 13:15:48 UTC 2016

Modified Files:
src/lib/libc/stdio: fgetwln.c

Log Message:
Improvements to fgetwln(3) from Andrey Chernov:

1) Set the stdio error indicator on __slbexpand() failure.

2) fgetwc(3) may succeed even when ferror(3) is already set
   (for example, consider a program using SIG_IGN on SIGTTIN,
   reading from the tty while in the background, getting EIO,
   then coming to the foreground and reading again).
   So do not force fgetwln(3) to fail in such a case either.
   (Yes, the program should probably clearerr(3) before
   reading again, but let's be nicer in case it forgets.)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/stdio/fgetwln.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/fgetwln.c
diff -u src/lib/libc/stdio/fgetwln.c:1.7 src/lib/libc/stdio/fgetwln.c:1.8
--- src/lib/libc/stdio/fgetwln.c:1.7	Mon Aug 22 03:41:10 2016
+++ src/lib/libc/stdio/fgetwln.c	Sat Aug 27 09:15:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fgetwln.c,v 1.7 2016/08/22 07:41:10 christos Exp $	*/
+/*	$NetBSD: fgetwln.c,v 1.8 2016/08/27 13:15:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2004 Tim J. Robbins.
@@ -31,7 +31,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/libc/stdio/fgetwln.c,v 1.2 2004/08/06 17:00:09 tjr Exp $");
 #else
-__RCSID("$NetBSD: fgetwln.c,v 1.7 2016/08/22 07:41:10 christos Exp $");
+__RCSID("$NetBSD: fgetwln.c,v 1.8 2016/08/27 13:15:48 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -88,13 +88,25 @@ fgetwln(FILE * __restrict fp, size_t *le
 	while ((wc = __fgetwc_unlock(fp)) != WEOF) {
 #define	GROW	512
 		if (len * sizeof(wchar_t) >= _EXT(fp)->_fgetstr_len &&
-		__slbexpand(fp, (len + GROW) * sizeof(wchar_t)))
+		__slbexpand(fp, (len + GROW) * sizeof(wchar_t))) {
+			fp->_flags |= __SERR;
 			goto error;
+		}
 		*((wchar_t *)(void *)_EXT(fp)->_fgetstr_buf + len++) = wc;
 		if (wc == L'\n')
 			break;
 	}
-	if (len == 0 || fp->_flags & __SERR)
+
+	/*
+	 * The following test assumes that fgetwc() fails when
+	 * feof() is already set, and that fgetwc() will never
+	 * set feof() in the same call where it also sets ferror()
+	 * or returns non-WEOF.
+	 * Testing ferror() would not be better because fgetwc()
+	 * may succeed even when ferror() is already set.
+	 */
+
+	if (len == 0 || (wc == WEOF && !__sfeof(fp)))
 		goto error;
 
 	FUNLOCKFILE(fp);



CVS commit: [netbsd-6] src/sys/miscfs/kernfs

2016-08-27 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Aug 27 13:13:31 UTC 2016

Modified Files:
src/sys/miscfs/kernfs [netbsd-6]: kernfs_vnops.c

Log Message:
Pull up following revision(s) (requested by is in ticket #1367):
sys/miscfs/kernfs/kernfs_vnops.c: revision 1.151
>From Ilya Zykov: Unbreak kernfs which was broken by this commit

|Make the spec_node table implementation private to spec_vnops.c.
|To retrieve a spec_node, two new lookup functions (by device or by mount)
|are implemented.  Both return a referenced vnode, for an opened block device
|the opened vnode is returned so further diagnostic checks "vp == ... sd_bdevvp"
|will not fire.  Otherwise any vnode matching the criteria gets returned.
|No objections on tech-kern.

The effect was that ls /kernfs appeared empty in most cases.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.144.2.1 src/sys/miscfs/kernfs/kernfs_vnops.c

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

Modified files:

Index: src/sys/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.144 src/sys/miscfs/kernfs/kernfs_vnops.c:1.144.2.1
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.144	Mon Dec 12 19:11:22 2011
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Sat Aug 27 13:13:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.144 2011/12/12 19:11:22 njoly Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.144.2.1 2016/08/27 13:13:31 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.144 2011/12/12 19:11:22 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.144.2.1 2016/08/27 13:13:31 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -63,6 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: kernfs_vnops
 
 #include 
 #include 
+#include 
 
 #ifdef IPSEC
 #include 
@@ -859,6 +860,11 @@ kernfs_getattr(void *v)
 		vap->va_bytes = vap->va_size = DEV_BSIZE;
 		break;
 
+	case KFSdevice:
+		vap->va_nlink = 1;
+		vap->va_rdev = ap->a_vp->v_rdev;
+		break;
+
 	case KFSroot:
 		vap->va_nlink = 1;
 		vap->va_bytes = vap->va_size = DEV_BSIZE;
@@ -876,7 +882,6 @@ kernfs_getattr(void *v)
 	case KFSstring:
 	case KFShostname:
 	case KFSavenrun:
-	case KFSdevice:
 	case KFSmsgbuf:
 #ifdef IPSEC
 	case KFSipsecsa:
@@ -1050,18 +1055,8 @@ kernfs_setdirentfileno_kt(struct dirent 
 	if ((error = kernfs_allocvp(ap->a_vp->v_mount, , kt->kt_tag, kt,
 	value)) != 0)
 		return error;
-	if (kt->kt_tag == KFSdevice) {
-		struct vattr va;
-
-		error = VOP_GETATTR(vp, , ap->a_cred);
-		if (error != 0) {
-			return error;
-		}
-		d->d_fileno = va.va_fileid;
-	} else {
-		kfs = VTOKERN(vp);
-		d->d_fileno = kfs->kfs_fileno;
-	}
+	kfs = VTOKERN(vp);
+	d->d_fileno = kfs->kfs_fileno;
 	vput(vp);
 	return 0;
 }



CVS commit: src/tests/usr.bin/config

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 12:08:14 UTC 2016

Modified Files:
src/tests/usr.bin/config: t_config.sh

Log Message:
adjust to current config format


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/config/t_config.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/usr.bin/config/t_config.sh
diff -u src/tests/usr.bin/config/t_config.sh:1.7 src/tests/usr.bin/config/t_config.sh:1.8
--- src/tests/usr.bin/config/t_config.sh:1.7	Sun Oct  4 03:59:47 2015
+++ src/tests/usr.bin/config/t_config.sh	Sat Aug 27 08:08:14 2016
@@ -1,4 +1,4 @@
-# $NetBSD: t_config.sh,v 1.7 2015/10/04 07:59:47 uebayasi Exp $
+# $NetBSD: t_config.sh,v 1.8 2016/08/27 12:08:14 christos Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,12 +25,32 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+srcdir=..
+merge_backslash()
+{
+	sed '
+: again
+/\\$/ {
+N
+s/\\\n//
+t again
+}
+' "$1"
+}
 run_and_check_prep()
 {
 	local name="${1}"; shift
 
-	mkdir compile
-	supportdir="$(atf_get_srcdir)/support"
+	mkdir -p compile
+	srcdir="$(atf_get_srcdir)"
+	if [ ! -d "${srcdir}/support" ]; then
+		srcdir="$(dirname "${srcdir}")"
+		if [ ! -d "${srcdir}/support" ]; then
+			atf_fail "bad source directory ${srcdir}"
+			exit 1
+		fi
+	fi
+	supportdir="${srcdir}/support"
 
 	local config_str
 	eval config_str=\$${name}_config_str
@@ -38,7 +58,7 @@ run_and_check_prep()
 		config="d_${name}"
 		printf "$config_str" >"${config}"
 	else
-		config="$(atf_get_srcdir)/d_${name}"
+		config="${srcdir}/d_${name}"
 	fi
 }
 
@@ -121,28 +141,28 @@ test_case deffs_redef fail "Checks that 
 "the same name as a previous defflag/defparam"
 
 # Selecting an undefined option.
-undefined_opt_config_str='
-include "../d_min"
+undefined_opt_config_str="
+include \"${srcdir}/d_min\"
 options UNDEFINED
-'
+"
 test_case undefined_opt pass \
 "Checks that config allows a selection for an undefined options"
 
 # Negating an undefined option.
-no_undefined_opt_config_str='
-include "../d_min"
+no_undefined_opt_config_str="
+include \"${srcdir}/d_min\"
 no options UNDEFINED
-'
+"
 no_undefined_opt_stderr='match:UNDEFINED'
 test_case no_undefined_opt warn \
 "Checks that config allows a negation for an undefined options"
 
 # Attribute selection
 test_case select pass "Attribute selection"
-select_config_str='
-include "../d_min"
+select_config_str="
+include \"${srcdir}/d_min\"
 select c
-'
+"
 check_select()
 {
 	local f=Makefile
@@ -158,11 +178,11 @@ select_body() {
 
 # Attribute negation
 test_case no_select pass "Attribute negation"
-no_select_config_str='
-include "../d_min"
+no_select_config_str="
+include \"${srcdir}/d_min\"
 select c
 no select a
-'
+"
 check_no_select()
 {
 	local f=Makefile
@@ -181,10 +201,10 @@ no_select_body() {
 
 # Device instance
 test_case devi pass "Device instance"
-devi_config_str='
-include "../d_min"
+devi_config_str="
+include \"${srcdir}/d_min\"
 d0 at root
-'
+"
 check_devi()
 {
 	local f=ioconf.c
@@ -226,9 +246,7 @@ check_min_makefile()
 	grep -q '^%' $f >tmp.template
 
 	grep -q '^MACHINE=regress$' $f &&
-	grep -q '^PARAM=-DMAXUSERS=4$' $f &&
-	grep -q '^all: regress$' $f &&
-	grep -q '^regress:' $f &&
+	(merge_backslash $f | grep -q '^IDENT=[ 	]*-DMAXUSERS="4"') &&
 	[ ! -s tmp.template ] &&
 	:
 }



CVS commit: src/tests/sys/net

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 11:30:49 UTC 2016

Modified Files:
src/tests/sys/net: t_print.c

Log Message:
catch up with link printing.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sys/net/t_print.c

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

Modified files:

Index: src/tests/sys/net/t_print.c
diff -u src/tests/sys/net/t_print.c:1.1 src/tests/sys/net/t_print.c:1.2
--- src/tests/sys/net/t_print.c:1.1	Tue Dec  2 14:48:21 2014
+++ src/tests/sys/net/t_print.c	Sat Aug 27 07:30:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $	*/
+/*	$NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $");
+__RCSID("$NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $");
 
 #include "net/dl_print.c"
 
@@ -147,7 +147,10 @@ ATF_TC_BODY(sdl_print, tc)
 		memcpy(_addr, [i].ia, sizeof(sdl.sdl_addr));
 		sdl.sdl_index = (uint16_t)i;
 		r = sdl_print(buf, l, );
-		e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
+		if (i == 3)
+			e = snprintf(res, l, "link#%zu", i);
+		else
+			e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
 		ATF_REQUIRE_STREQ(buf, res);
 		ATF_REQUIRE_EQ(r, e);
 	}
@@ -157,7 +160,10 @@ ATF_TC_BODY(sdl_print, tc)
 		memcpy(_addr, [i].ia, sizeof(sdl.sdl_addr));
 		sdl.sdl_index = (uint16_t)i;
 		r = sdl_print(buf, l, );
-		e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
+		if (i == 3)
+			e = snprintf(res, l, "link#%zu", i);
+		else
+			e = snprintf(res, l, "[%s]:%zu", tst[i].str, i);
 		ATF_REQUIRE_STREQ(buf, res);
 		ATF_REQUIRE_EQ(r, e);
 	}



CVS commit: src/tests/lib/libm

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 10:07:05 UTC 2016

Modified Files:
src/tests/lib/libm: t_precision.c

Log Message:
do the long double tests if we have long double.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libm/t_precision.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/libm/t_precision.c
diff -u src/tests/lib/libm/t_precision.c:1.2 src/tests/lib/libm/t_precision.c:1.3
--- src/tests/lib/libm/t_precision.c:1.2	Mon Nov  3 19:20:19 2014
+++ src/tests/lib/libm/t_precision.c	Sat Aug 27 06:07:05 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $");
 
 #include 
 
@@ -45,7 +45,9 @@ ATF_TC_HEAD(t_precision, tc)
 }
 
 volatile double x = 1;
+#if __HAVE_LONG_DOUBLE
 volatile long double y = 1;
+#endif
 
 ATF_TC_BODY(t_precision, tc)
 {
@@ -58,6 +60,7 @@ ATF_TC_BODY(t_precision, tc)
 	x += DBL_EPSILON;
 	ATF_CHECK(x == 2.0);
 
+#if __HAVE_LONG_DOUBLE
 	y += LDBL_EPSILON;
 	ATF_CHECK(y != 1.0L);
 	y -= 1;
@@ -65,6 +68,7 @@ ATF_TC_BODY(t_precision, tc)
 	y = 2;
 	y += LDBL_EPSILON;
 	ATF_CHECK(y == 2.0L);
+#endif
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src/lib/libm/src

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 10:03:16 UTC 2016

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
no need for stdio.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libm/src/k_standard.c

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

Modified files:

Index: src/lib/libm/src/k_standard.c
diff -u src/lib/libm/src/k_standard.c:1.21 src/lib/libm/src/k_standard.c:1.22
--- src/lib/libm/src/k_standard.c:1.21	Sat Aug 27 06:00:38 2016
+++ src/lib/libm/src/k_standard.c	Sat Aug 27 06:03:16 2016
@@ -12,13 +12,12 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.21 2016/08/27 10:00:38 christos Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.22 2016/08/27 10:03:16 christos Exp $");
 #endif
 
 #include "math.h"
 #include "math_private.h"
 #include 
-#include 
 
 #ifndef _USE_WRITE
 #include 			/* fputs(), stderr */



CVS commit: src/lib/libm/src

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 10:00:38 UTC 2016

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
correct case 23 for -0.0


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libm/src/k_standard.c

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

Modified files:

Index: src/lib/libm/src/k_standard.c
diff -u src/lib/libm/src/k_standard.c:1.20 src/lib/libm/src/k_standard.c:1.21
--- src/lib/libm/src/k_standard.c:1.20	Tue Sep  8 01:23:31 2015
+++ src/lib/libm/src/k_standard.c	Sat Aug 27 06:00:38 2016
@@ -12,12 +12,13 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.20 2015/09/08 05:23:31 dholland Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.21 2016/08/27 10:00:38 christos Exp $");
 #endif
 
 #include "math.h"
 #include "math_private.h"
 #include 
+#include 
 
 #ifndef _USE_WRITE
 #include 			/* fputs(), stderr */
@@ -468,8 +469,11 @@ __kernel_standard(double x, double y, in
 		exc.name = type < 100 ? "pow" : "powf";
 		if (_LIB_VERSION == _SVID_)
 		  exc.retval = zero;
-		else
+		else {
 		  exc.retval = HUGE_VAL;
+		  y *= 0.5;
+		  if(signbit(x)&(y)!=y) exc.retval = -HUGE_VAL;
+		}
 		if (_LIB_VERSION == _POSIX_)
 		  errno = EDOM;
 		else if (!matherr()) {



CVS commit: src/lib/libm/src

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 10:01:08 UTC 2016

Modified Files:
src/lib/libm/src: e_pow.c e_powf.c

Log Message:
sync with FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libm/src/e_pow.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libm/src/e_powf.c

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

Modified files:

Index: src/lib/libm/src/e_pow.c
diff -u src/lib/libm/src/e_pow.c:1.16 src/lib/libm/src/e_pow.c:1.17
--- src/lib/libm/src/e_pow.c:1.16	Fri Apr 23 15:17:07 2010
+++ src/lib/libm/src/e_pow.c	Sat Aug 27 06:01:08 2016
@@ -1,9 +1,8 @@
-/* @(#)e_pow.c 5.1 93/09/24 */
+/* @(#)e_pow.c 1.5 04/04/22 SMI */
 /*
  * 
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
  *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
  * software is freely granted, provided that this notice
  * is preserved.
@@ -12,7 +11,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_pow.c,v 1.16 2010/04/23 19:17:07 drochner Exp $");
+__RCSID("$NetBSD: e_pow.c,v 1.17 2016/08/27 10:01:08 christos Exp $");
 #endif
 
 /* __ieee754_pow(x,y) return x**y
@@ -29,13 +28,13 @@ __RCSID("$NetBSD: e_pow.c,v 1.16 2010/04
  * Special cases:
  *	1.  (anything) ** 0  is 1
  *	2.  (anything) ** 1  is itself
- *	3.  (anything) ** NAN is NAN
+ *	3.  (anything) ** NAN is NAN except 1 ** NAN = 1
  *	4.  NAN ** (anything except 0) is NAN
  *	5.  +-(|x| > 1) **  +INF is +INF
  *	6.  +-(|x| > 1) **  -INF is +0
  *	7.  +-(|x| < 1) **  +INF is +0
  *	8.  +-(|x| < 1) **  -INF is +INF
- *	9.  +-1 ** +-INF is NAN
+ *	9.  +-1 ** +-INF is 1
  *	10. +0 ** (+anything except 0, NAN)   is +0
  *	11. -0 ** (+anything except 0, NAN, odd integer)  is +0
  *	12. +0 ** (-anything except 0, NAN)   is +INF
@@ -113,10 +112,13 @@ __ieee754_pow(double x, double y)
 /* y==zero: x**0 = 1 */
 	if((iy|ly)==0) return one;
 
-/* +-NaN return x+y */
+/* x==1: 1**y = 1, even if y is NaN */
+	if (hx==0x3ff0 && lx == 0) return one;
+
+/* y!=zero: result is NaN if either arg is NaN */
 	if(ix > 0x7ff0 || ((ix==0x7ff0)&&(lx!=0)) ||
 	   iy > 0x7ff0 || ((iy==0x7ff0)&&(ly!=0)))
-		return x+y;
+		return (x+0.0)+(y+0.0);
 
 /* determine if y is an odd int when x < 0
  * yisint = 0	... y is not an integer
@@ -142,7 +144,7 @@ __ieee754_pow(double x, double y)
 	if(ly==0) {
 	if (iy==0x7ff0) {	/* y is +-inf */
 	if(((ix-0x3ff0)|lx)==0)
-		return  y - y;	/* inf**+-1 is NaN */
+		return  one;	/* (-1)**+-inf is 1 */
 	else if (ix >= 0x3ff0)/* (|x|>1)**+-inf = inf,0 */
 		return (hy>=0)? y: zero;
 	else			/* (|x|<1)**-,+inf = inf,0 */
@@ -174,7 +176,11 @@ __ieee754_pow(double x, double y)
 	}
 	}
 
+/* CYGNUS LOCAL + fdlibm-5.3 fix: This used to be
 	n = (hx>>31)+1;
+   but ANSI C says a right shift of a signed negative quantity is
+   implementation defined.  */
+	n = ((u_int32_t)hx>>31)-1;
 
 /* (x<0)**(non-int) is NaN */
 	if((n|yisint)==0) return (x-x)/(x-x);

Index: src/lib/libm/src/e_powf.c
diff -u src/lib/libm/src/e_powf.c:1.15 src/lib/libm/src/e_powf.c:1.16
--- src/lib/libm/src/e_powf.c:1.15	Fri Apr 23 15:17:07 2010
+++ src/lib/libm/src/e_powf.c	Sat Aug 27 06:01:08 2016
@@ -15,15 +15,13 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_powf.c,v 1.15 2010/04/23 19:17:07 drochner Exp $");
+__RCSID("$NetBSD: e_powf.c,v 1.16 2016/08/27 10:01:08 christos Exp $");
 #endif
 
 #include "namespace.h"
 #include "math.h"
 #include "math_private.h"
 
-static const float huge = 1.0e+30, tiny = 1.0e-30;
-
 static const float
 bp[] = {1.0, 1.5,},
 dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */
@@ -32,6 +30,8 @@ zero=  0.0,
 one	=  1.0,
 two	=  2.0,
 two24	=  16777216.0,	/* 0x4b80 */
+huge	=  1.0e30,
+tiny=  1.0e-30,
 	/* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
 L1  =  6.002384e-01, /* 0x3f1a */
 L2  =  4.2857143283e-01, /* 0x3edb6db7 */
@@ -49,8 +49,8 @@ lg2_h  =  6.93145752e-01, /* 0x3f317200 
 lg2_l  =  1.42860654e-06, /* 0x35bfbe8c */
 ovt =  4.2995665694e-08, /* -(128-log2(ovfl+.5ulp)) */
 cp=  9.6179670095e-01, /* 0x3f76384f =2/(3ln2) */
-cp_h  =  9.6179199219e-01, /* 0x3f763800 =head of cp */
-cp_l  =  4.7017383622e-06, /* 0x369dc3a0 =tail of cp_h */
+cp_h  =  9.6191406250e-01, /* 0x3f764000 =12b cp */
+cp_l  = -1.1736857402e-04, /* 0xb8f623c6 =tail of cp_h */
 ivln2=  1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
 ivln2_h  =  1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
 ivln2_l  =  7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
@@ -59,7 +59,7 @@ float
 __ieee754_powf(float x, float y)
 {
 	float z,ax,z_h,z_l,p_h,p_l;
-	

CVS commit: src/lib/libc/compat/gen

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 09:35:13 UTC 2016

Modified Files:
src/lib/libc/compat/gen: compat_ldexp_ieee754.c

Log Message:
remove debugging


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/compat/gen/compat_ldexp_ieee754.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/compat/gen/compat_ldexp_ieee754.c
diff -u src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.6 src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.7
--- src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.6	Sat Aug 27 05:11:56 2016
+++ src/lib/libc/compat/gen/compat_ldexp_ieee754.c	Sat Aug 27 05:35:13 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_ldexp_ieee754.c,v 1.6 2016/08/27 09:11:56 christos Exp $ */
+/* $NetBSD: compat_ldexp_ieee754.c,v 1.7 2016/08/27 09:35:13 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.6 2016/08/27 09:11:56 christos Exp $");
+__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.7 2016/08/27 09:35:13 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -40,7 +40,6 @@ __RCSID("$NetBSD: compat_ldexp_ieee754.c
 
 double ldexp(double, int);
 
-#include 
 /*
  * Multiply the given value by 2^expon.
  */
@@ -100,7 +99,6 @@ ldexp(double val, int expon)
 	 * Calculate the new exponent and check for underflow and overflow.
 	 */
 	newexp = oldexp + expon;
-	printf("ee %#x oldexp %#x\n", oldexp, expon);
 
 	if (newexp >= DBL_EXP_INFNAN ||
 	(oldexp >= 0 && expon >= DBL_EXP_INFNAN)) {



CVS commit: src/lib/libm

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 09:15:44 UTC 2016

Modified Files:
src/lib/libm: Makefile

Log Message:
skip buggy assembly for libm_g.a


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/lib/libm/Makefile

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.183 src/lib/libm/Makefile:1.184
--- src/lib/libm/Makefile:1.183	Fri Aug 26 04:33:48 2016
+++ src/lib/libm/Makefile	Sat Aug 27 05:15:44 2016
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.183 2016/08/26 08:33:48 christos Exp $
+#  $NetBSD: Makefile,v 1.184 2016/08/27 09:15:44 christos Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -113,7 +113,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S 
 # do not pick up the i387 asm version for the following functions;
 # it is incorrect
 .for f in modf ilogb ilogbl ilogbf
-s_${f}.o s_${f}.pico s_${f}.po s_${f}.d: s_${f}.c
+s_${f}.o s_${f}.pico s_${f}.po s_${f}.go s_${f}.d: s_${f}.c
 .endfor
 
 .if (${MACHINE_ARCH} == "i386")



CVS commit: src/lib/libc/compat/gen

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 09:11:56 UTC 2016

Modified Files:
src/lib/libc/compat/gen: compat_ldexp_ieee754.c

Log Message:
detect overflow in oldexp + newexp


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/compat/gen/compat_ldexp_ieee754.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/compat/gen/compat_ldexp_ieee754.c
diff -u src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.5 src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.6
--- src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.5	Fri Apr 23 15:04:54 2010
+++ src/lib/libc/compat/gen/compat_ldexp_ieee754.c	Sat Aug 27 05:11:56 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_ldexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $ */
+/* $NetBSD: compat_ldexp_ieee754.c,v 1.6 2016/08/27 09:11:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $");
+__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.6 2016/08/27 09:11:56 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -40,6 +40,7 @@ __RCSID("$NetBSD: compat_ldexp_ieee754.c
 
 double ldexp(double, int);
 
+#include 
 /*
  * Multiply the given value by 2^expon.
  */
@@ -99,8 +100,19 @@ ldexp(double val, int expon)
 	 * Calculate the new exponent and check for underflow and overflow.
 	 */
 	newexp = oldexp + expon;
+	printf("ee %#x oldexp %#x\n", oldexp, expon);
 
-	if (newexp <= 0) {
+	if (newexp >= DBL_EXP_INFNAN ||
+	(oldexp >= 0 && expon >= DBL_EXP_INFNAN)) {
+		/*
+		 * The result overflowed; return +/-Inf.
+		 */
+		u.dblu_dbl.dbl_exp = DBL_EXP_INFNAN;
+		u.dblu_dbl.dbl_frach = 0;
+		u.dblu_dbl.dbl_fracl = 0;
+		errno = ERANGE;
+		return (u.dblu_d);
+	} else if (newexp <= 0) {
 		/*
 		 * The output number is either denormal or underflows (see
 		 * comments in machine/ieee.h).
@@ -123,15 +135,6 @@ ldexp(double val, int expon)
 		mul.dblu_dbl.dbl_exp = expon + DBL_EXP_BIAS;
 		u.dblu_d *= mul.dblu_d;
 		return (u.dblu_d);
-	} else if (newexp >= DBL_EXP_INFNAN) {
-		/*
-		 * The result overflowed; return +/-Inf.
-		 */
-		u.dblu_dbl.dbl_exp = DBL_EXP_INFNAN;
-		u.dblu_dbl.dbl_frach = 0;
-		u.dblu_dbl.dbl_fracl = 0;
-		errno = ERANGE;
-		return (u.dblu_d);
 	} else {
 		/*
 		 * The result is normal; just replace the old exponent with the



CVS commit: src/sys/dev/usb

2016-08-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 08:57:21 UTC 2016

Modified Files:
src/sys/dev/usb: if_axe.c

Log Message:
Fix harmless typo


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/usb/if_axe.c

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

Modified files:

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.73 src/sys/dev/usb/if_axe.c:1.74
--- src/sys/dev/usb/if_axe.c:1.73	Sat Aug 27 08:45:59 2016
+++ src/sys/dev/usb/if_axe.c	Sat Aug 27 08:57:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.73 2016/08/27 08:45:59 skrll Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.74 2016/08/27 08:57:21 skrll Exp $	*/
 /*	$OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
 
 /*
@@ -89,7 +89,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.73 2016/08/27 08:45:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.74 2016/08/27 08:57:21 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -155,7 +155,7 @@ static const struct axe_type axe_devs[] 
 	{ { USB_VENDOR_COREGA,		USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100}, 0 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
-	{ { USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
+	{ { USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK2_DUBE100B1 }, AX772 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100C1 }, AX772 | AX772B },
 	{ { USB_VENDOR_GOODWAY,		USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
 	{ { USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_ETGUS2 }, AX178 },



CVS commit: src/sys/dev/usb

2016-08-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 08:45:59 UTC 2016

Modified Files:
src/sys/dev/usb: if_axe.c

Log Message:
flxd's axe(4) - I think.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/usb/if_axe.c

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

Modified files:

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.72 src/sys/dev/usb/if_axe.c:1.73
--- src/sys/dev/usb/if_axe.c:1.72	Fri Jun 10 13:27:15 2016
+++ src/sys/dev/usb/if_axe.c	Sat Aug 27 08:45:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.72 2016/06/10 13:27:15 ozaki-r Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.73 2016/08/27 08:45:59 skrll Exp $	*/
 /*	$OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
 
 /*
@@ -89,7 +89,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.72 2016/06/10 13:27:15 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.73 2016/08/27 08:45:59 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -155,6 +155,7 @@ static const struct axe_type axe_devs[] 
 	{ { USB_VENDOR_COREGA,		USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100}, 0 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
+	{ { USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
 	{ { USB_VENDOR_DLINK,		USB_PRODUCT_DLINK_DUBE100C1 }, AX772 | AX772B },
 	{ { USB_VENDOR_GOODWAY,		USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
 	{ { USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_ETGUS2 }, AX178 },



CVS commit: src/sys/dev/usb

2016-08-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 08:43:37 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.707 -r1.708 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.708 -r1.709 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.707 src/sys/dev/usb/usbdevs.h:1.708
--- src/sys/dev/usb/usbdevs.h:1.707	Wed Jun  1 04:51:33 2016
+++ src/sys/dev/usb/usbdevs.h	Sat Aug 27 08:43:36 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.707 2016/06/01 04:51:33 pgoyette Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.708 2016/08/27 08:43:36 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp
+ *	NetBSD: usbdevs,v 1.716 2016/08/27 08:42:16 skrll Exp
  */
 
 /*
@@ -1407,6 +1407,7 @@
 #define	USB_PRODUCT_DLINK2_AR9271	0x3a10		/* AR9271 */
 #define	USB_PRODUCT_DLINK2_DWLG122C1	0x3c03		/* DWL-G122 rev C1 */
 #define	USB_PRODUCT_DLINK2_WUA1340	0x3c04		/* WUA-1340 */
+#define	USB_PRODUCT_DLINK2_DUBE100B1	0x3c05		/* DUB-E100 rev B1 */
 #define	USB_PRODUCT_DLINK2_DWA111	0x3c06		/* DWA-111 */
 #define	USB_PRODUCT_DLINK2_DWA110	0x3c07		/* DWA-110 */
 #define	USB_PRODUCT_DLINK2_RT2870_1	0x3c09		/* RT2870 */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.708 src/sys/dev/usb/usbdevs_data.h:1.709
--- src/sys/dev/usb/usbdevs_data.h:1.708	Wed Jun  1 04:52:20 2016
+++ src/sys/dev/usb/usbdevs_data.h	Sat Aug 27 08:43:36 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.708 2016/06/01 04:52:20 pgoyette Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.709 2016/08/27 08:43:36 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp
+ *	NetBSD: usbdevs,v 1.716 2016/08/27 08:42:16 skrll Exp
  */
 
 /*
@@ -1768,6 +1768,8 @@ static const uint16_t usb_products[] = {
 	8956, 8507, 8915, 0,
 	USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340, 
 	9063, 0,
+	USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DUBE100B1, 
+	8906, 8507, 9007, 0,
 	USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111, 
 	9072, 0,
 	USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110, 
@@ -5867,7 +5869,7 @@ static const char usb_words[] = { "." 
 	"XH1153\0" /* 1 refs @ 8486 */
 	"C-Net\0" /* 1 refs @ 8493 */
 	"CWD-854\0" /* 1 refs @ 8499 */
-	"rev\0" /* 15 refs @ 8507 */
+	"rev\0" /* 16 refs @ 8507 */
 	"F\0" /* 2 refs @ 8511 */
 	"RTL8187\0" /* 4 refs @ 8513 */
 	"AccelePort\0" /* 3 refs @ 8521 */
@@ -5917,7 +5919,7 @@ static const char usb_words[] = { "." 
 	"SD-U2VDH\0" /* 1 refs @ 8881 */
 	"nanovision\0" /* 1 refs @ 8890 */
 	"MiMo\0" /* 1 refs @ 8901 */
-	"DUB-E100\0" /* 2 refs @ 8906 */
+	"DUB-E100\0" /* 3 refs @ 8906 */
 	"C1\0" /* 3 refs @ 8915 */
 	"E\0" /* 1 refs @ 8918 */
 	"DWA-130\0" /* 3 refs @ 8920 */
@@ -5933,7 +5935,7 @@ static const char usb_words[] = { "." 
 	"DWL-AG122\0" /* 2 refs @ 8987 */
 	"AirPlus\0" /* 1 refs @ 8997 */
 	"G\0" /* 1 refs @ 9005 */
-	"B1\0" /* 1 refs @ 9007 */
+	"B1\0" /* 2 refs @ 9007 */
 	"DWA-140\0" /* 1 refs @ 9010 */
 	"B3\0" /* 1 refs @ 9018 */
 	"DWA-160\0" /* 3 refs @ 9021 */



CVS commit: src/sys/dev/usb

2016-08-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 08:42:16 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add flxd's axe(4)


To generate a diff of this commit:
cvs rdiff -u -r1.715 -r1.716 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.715 src/sys/dev/usb/usbdevs:1.716
--- src/sys/dev/usb/usbdevs:1.715	Wed Jun  1 04:47:02 2016
+++ src/sys/dev/usb/usbdevs	Sat Aug 27 08:42:16 2016
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.715 2016/06/01 04:47:02 pgoyette Exp $
+$NetBSD: usbdevs,v 1.716 2016/08/27 08:42:16 skrll Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1400,6 +1400,7 @@ product DLINK2 DWA130D1		0x3a0f	DWA-130 
 product DLINK2 AR9271		0x3a10	AR9271
 product DLINK2 DWLG122C1	0x3c03	DWL-G122 rev C1
 product DLINK2 WUA1340		0x3c04	WUA-1340
+product DLINK2 DUBE100B1	0x3c05	DUB-E100 rev B1
 product DLINK2 DWA111		0x3c06	DWA-111
 product DLINK2 DWA110		0x3c07	DWA-110
 product DLINK2 RT2870_1		0x3c09	RT2870



CVS commit: src/tests/fs/vfs

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 08:38:58 UTC 2016

Modified Files:
src/tests/fs/vfs: Makefile

Log Message:
Fix static linking.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/fs/vfs/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/fs/vfs/Makefile
diff -u src/tests/fs/vfs/Makefile:1.21 src/tests/fs/vfs/Makefile:1.22
--- src/tests/fs/vfs/Makefile:1.21	Sat Aug 13 07:21:06 2016
+++ src/tests/fs/vfs/Makefile	Sat Aug 27 04:38:58 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2016/08/13 11:21:06 christos Exp $
+#	$NetBSD: Makefile,v 1.22 2016/08/27 08:38:58 christos Exp $
 #
 
 .include 
@@ -36,6 +36,7 @@ VFSTESTDIR != cd ${.CURDIR}/../common &&
 LDADD+=-L${VFSTESTDIR} -lvfstest
 
 LDADD+=-lrumpvfs -lrumpkern_sysproxy -lrump -lrumpuser		# base
+LDADD+=-lrumpnet		# static linking
 LDADD+=-lpthread
 
 LDADD+=-lutil



CVS commit: src/lib/libc/atomic

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 08:03:13 UTC 2016

Modified Files:
src/lib/libc/atomic: Makefile.inc

Log Message:
Add MLINKS for atomic_add_nv, atomic_cas_ni, and so forth - otherwise
you have to remember that they're the same page as plain atomic_add and
atomic_cas, or remember one of the types that they're defined on.
PR 51033.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/atomic/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/atomic/Makefile.inc
diff -u src/lib/libc/atomic/Makefile.inc:1.2 src/lib/libc/atomic/Makefile.inc:1.3
--- src/lib/libc/atomic/Makefile.inc:1.2	Fri Feb 12 22:34:38 2010
+++ src/lib/libc/atomic/Makefile.inc	Sat Aug 27 08:03:13 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.2 2010/02/12 22:34:38 dyoung Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2016/08/27 08:03:13 dholland Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -18,6 +18,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_add.3 atomic_add_long_nv.3 \
 	atomic_add.3 atomic_add_ptr_nv.3 \
 	atomic_add.3 atomic_add_64_nv.3 \
+	atomic_add.3 atomic_add_nv.3 \
 	atomic_and.3 atomic_and_32.3 \
 	atomic_and.3 atomic_and_uint.3 \
 	atomic_and.3 atomic_and_ulong.3 \
@@ -26,6 +27,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_and.3 atomic_and_uint_nv.3 \
 	atomic_and.3 atomic_and_ulong_nv.3 \
 	atomic_and.3 atomic_and_64_nv.3 \
+	atomic_and.3 atomic_and_nv.3 \
 	atomic_cas.3 atomic_cas_32.3 \
 	atomic_cas.3 atomic_cas_uint.3 \
 	atomic_cas.3 atomic_cas_ulong.3 \
@@ -36,6 +38,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_cas.3 atomic_cas_ulong_ni.3 \
 	atomic_cas.3 atomic_cas_ptr_ni.3 \
 	atomic_cas.3 atomic_cas_64_ni.3 \
+	atomic_cas.3 atomic_cas_ni.3 \
 	atomic_dec.3 atomic_dec_32.3 \
 	atomic_dec.3 atomic_dec_uint.3 \
 	atomic_dec.3 atomic_dec_ulong.3 \
@@ -46,6 +49,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_dec.3 atomic_dec_ulong_nv.3 \
 	atomic_dec.3 atomic_dec_ptr_nv.3 \
 	atomic_dec.3 atomic_dec_64_nv.3 \
+	atomic_dec.3 atomic_dec_nv.3 \
 	atomic_inc.3 atomic_inc_32.3 \
 	atomic_inc.3 atomic_inc_uint.3 \
 	atomic_inc.3 atomic_inc_ulong.3 \
@@ -56,6 +60,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_inc.3 atomic_inc_ulong_nv.3 \
 	atomic_inc.3 atomic_inc_ptr_nv.3 \
 	atomic_inc.3 atomic_inc_64_nv.3 \
+	atomic_inc.3 atomic_inc_nv.3 \
 	atomic_or.3 atomic_or_32.3 \
 	atomic_or.3 atomic_or_uint.3 \
 	atomic_or.3 atomic_or_ulong.3 \
@@ -64,6 +69,7 @@ MLINKS+=atomic_add.3 atomic_add_32.3 \
 	atomic_or.3 atomic_or_uint_nv.3 \
 	atomic_or.3 atomic_or_ulong_nv.3 \
 	atomic_or.3 atomic_or_64_nv.3 \
+	atomic_or.3 atomic_or_nv.3 \
 	atomic_swap.3 atomic_swap_32.3 \
 	atomic_swap.3 atomic_swap_uint.3 \
 	atomic_swap.3 atomic_swap_ulong.3 \



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

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 08:03:47 UTC 2016

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

Log Message:
Setlists for PR 51033.


To generate a diff of this commit:
cvs rdiff -u -r1.2058 -r1.2059 src/distrib/sets/lists/comp/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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2058 src/distrib/sets/lists/comp/mi:1.2059
--- src/distrib/sets/lists/comp/mi:1.2058	Sat Aug 20 12:37:06 2016
+++ src/distrib/sets/lists/comp/mi	Sat Aug 27 08:03:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2058 2016/08/20 12:37:06 hannken Exp $
+#	$NetBSD: mi,v 1.2059 2016/08/27 08:03:47 dholland Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -5216,6 +5216,7 @@
 ./usr/share/man/cat3/atomic_add_int_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_add_long.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_add_long_nv.0	comp-c-catman		.cat
+./usr/share/man/cat3/atomic_add_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_add_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_add_ptr_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and.0		comp-c-catman		.cat
@@ -5223,6 +5224,7 @@
 ./usr/share/man/cat3/atomic_and_32_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and_64.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and_64_nv.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_and_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and_uint.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and_uint_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_and_ulong.0		comp-c-catman		.cat
@@ -5232,6 +5234,7 @@
 ./usr/share/man/cat3/atomic_cas_32_ni.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_64.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_64_ni.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_cas_ni.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_ptr_ni.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_cas_uint.0		comp-c-catman		.cat
@@ -5243,6 +5246,7 @@
 ./usr/share/man/cat3/atomic_dec_32_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_64.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_64_nv.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_dec_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_ptr_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_dec_uint.0		comp-c-catman		.cat
@@ -5254,6 +5258,7 @@
 ./usr/share/man/cat3/atomic_inc_32_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_inc_64.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_inc_64_nv.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_inc_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_inc_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_inc_ptr_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_inc_uint.0		comp-c-catman		.cat
@@ -5266,6 +5271,7 @@
 ./usr/share/man/cat3/atomic_or_32_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_or_64.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_or_64_nv.0		comp-c-catman		.cat
+./usr/share/man/cat3/atomic_or_nv.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_or_uint.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_or_uint_nv.0	comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_or_ulong.0		comp-c-catman		.cat
@@ -12550,6 +12556,7 @@
 ./usr/share/man/html3/atomic_add_int_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_add_long.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_add_long_nv.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_add_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_add_ptr.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_add_ptr_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and.html		comp-c-htmlman		html
@@ -12557,6 +12564,7 @@
 ./usr/share/man/html3/atomic_and_32_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and_64.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and_64_nv.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_and_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and_uint.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and_uint_nv.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_and_ulong.html	comp-c-htmlman		html
@@ -12566,6 +12574,7 @@
 ./usr/share/man/html3/atomic_cas_32_ni.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_64.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_64_ni.html	comp-c-htmlman		html
+./usr/share/man/html3/atomic_cas_ni.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_ptr.html	comp-c-htmlman		html
 ./usr/share/man/html3/atomic_cas_ptr_ni.html	comp-c-htmlman		html
 

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

2016-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 27 07:54:31 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: shl.mi

Log Message:
Add missing picinstall (Rin Okuyama)


To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 src/distrib/sets/lists/comp/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.293 src/distrib/sets/lists/comp/shl.mi:1.294
--- src/distrib/sets/lists/comp/shl.mi:1.293	Sat Aug 20 07:34:49 2016
+++ src/distrib/sets/lists/comp/shl.mi	Sat Aug 27 03:54:31 2016
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.293 2016/08/20 11:34:49 christos Exp $
+# $NetBSD: shl.mi,v 1.294 2016/08/27 07:54:31 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -258,7 +258,7 @@
 ./usr/lib/libubsan_pic.a			comp-c-piclib		compatfile,picinstall,gcc=53
 ./usr/lib/libukfs_pic.acomp-c-piclib		compatfile,picinstall,rump
 ./usr/lib/libumem_pic.acomp-zfs-piclib		compatfile,picinstall,zfs
-./usr/lib/libunbound_pic.a			comp-c-piclib		compatfile,crypto,unbound
+./usr/lib/libunbound_pic.a			comp-c-piclib		compatfile,picinstall,crypto,unbound
 ./usr/lib/libusb_pic.acomp-obsolete		obsolete
 ./usr/lib/libusbhid_pic.a			comp-c-piclib		compatfile,picinstall
 ./usr/lib/libutil_pic.acomp-c-piclib		compatfile,picinstall



CVS commit: src/sys/arch/mips/mips

2016-08-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Aug 27 07:22:15 UTC 2016

Modified Files:
src/sys/arch/mips/mips: mipsX_subr.S

Log Message:
Comment consistency.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/mips/mips/mipsX_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.92 src/sys/arch/mips/mips/mipsX_subr.S:1.93
--- src/sys/arch/mips/mips/mipsX_subr.S:1.92	Wed Aug 17 20:59:08 2016
+++ src/sys/arch/mips/mips/mipsX_subr.S	Sat Aug 27 07:22:14 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.92 2016/08/17 20:59:08 skrll Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.93 2016/08/27 07:22:14 skrll Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -1540,10 +1540,16 @@ NESTED_NOPROFILE(MIPSX(user_intr), CALLF
 	 */
 	mfc0	v1, MIPS_COP_0_STATUS
 #ifdef NOFPU
+	/*
+	 * enter kernel mode
+	 */
 	MFC0_HAZARD
-	and	v0, v1, MIPS_SR_KSU_MASK|MIPS_SR_EXL
-	xor	v0, v1# clear the bits
+	and	v0, v1, MIPS_SR_EXL|MIPS_SR_KSU_MASK # bits to clear
+	xor	v0, v1# clear them.
 #else
+	/*
+	 * Turn off FPU and enter kernel mode
+	 */
 	lui	v0, %hi(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	addiu	v0, %lo(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	and	v0, v1
@@ -1729,18 +1735,21 @@ NESTED_NOPROFILE(MIPSX(systemcall), CALL
 #endif
 	PTR_L	s0, L_PROC(MIPS_CURLWP)		# curlwp->l_proc
 	PTR_L	t9, P_MD_SYSCALL(s0)		# t9 = syscall
+#ifdef NOFPU
 	/*
-	 * Turn off FPU and enter kernel mode
+	 * enter kernel mode
 	 */
-#ifdef NOFPU
-	and	t0, a1, MIPS_SR_EXL|MIPS_SR_KSU_MASK
-	xor	t0, a1# turns off the FPU & ints on
+	and	t0, a1, MIPS_SR_EXL|MIPS_SR_KSU_MASK # bits to clear
+	xor	t0, a1# clear them.
 #else
+	/*
+	 * Turn off FPU and enter kernel mode
+	 */
 	lui	t0, %hi(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	addiu	t0, %lo(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	and	t0, a1
 #endif
-	mtc0	t0, MIPS_COP_0_STATUS		# re-enable interrupts
+	mtc0	t0, MIPS_COP_0_STATUS
 	COP0_SYNC
 /*
  * Call the system call handler.



CVS commit: src/sys/lib/libsa

2016-08-27 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 27 06:31:42 UTC 2016

Modified Files:
src/sys/lib/libsa: gets.c

Log Message:
PR 51200 gets in libsa considered harmful: remove gets() from libsa.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/lib/libsa/gets.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/lib/libsa/gets.c
diff -u src/sys/lib/libsa/gets.c:1.13 src/sys/lib/libsa/gets.c:1.14
--- src/sys/lib/libsa/gets.c:1.13	Sat Jun 11 06:20:11 2016
+++ src/sys/lib/libsa/gets.c	Sat Aug 27 06:31:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: gets.c,v 1.13 2016/06/11 06:20:11 dholland Exp $	*/
+/*	$NetBSD: gets.c,v 1.14 2016/08/27 06:31:42 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -33,11 +33,13 @@
 
 #include "stand.h"
 
+#if 0 /* harmful */
 void
 gets(char *buf)
 {
 	kgets(buf, (size_t)-1);
 }
+#endif
 
 void
 kgets(char *buf, size_t size)