CVS commit: src/sys/netinet6

2016-07-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug  1 04:37:53 UTC 2016

Modified Files:
src/sys/netinet6: in6.c in6_ifattach.c

Log Message:
Fix kernel builds (gcc 4.8)


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/sys/netinet6/in6.c
cvs rdiff -u -r1.103 -r1.104 src/sys/netinet6/in6_ifattach.c

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



CVS commit: src/sys/netinet6

2016-07-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug  1 04:37:53 UTC 2016

Modified Files:
src/sys/netinet6: in6.c in6_ifattach.c

Log Message:
Fix kernel builds (gcc 4.8)


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/sys/netinet6/in6.c
cvs rdiff -u -r1.103 -r1.104 src/sys/netinet6/in6_ifattach.c

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

Modified files:

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.213 src/sys/netinet6/in6.c:1.214
--- src/sys/netinet6/in6.c:1.213	Mon Aug  1 03:15:31 2016
+++ src/sys/netinet6/in6.c	Mon Aug  1 04:37:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.213 2016/08/01 03:15:31 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.213 2016/08/01 03:15:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1486,7 +1486,7 @@ static int
 in6_lifaddr_ioctl(struct socket *so, u_long cmd, void *data, 
 	struct ifnet *ifp)
 {
-	struct in6_ifaddr *ia;
+	struct in6_ifaddr *ia = NULL; /* XXX gcc 4.8 maybe-uninitialized */
 	struct if_laddrreq *iflr = (struct if_laddrreq *)data;
 	struct ifaddr *ifa;
 	struct sockaddr *sa;

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.103 src/sys/netinet6/in6_ifattach.c:1.104
--- src/sys/netinet6/in6_ifattach.c:1.103	Mon Aug  1 03:15:31 2016
+++ src/sys/netinet6/in6_ifattach.c	Mon Aug  1 04:37:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.103 2016/08/01 03:15:31 ozaki-r Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.104 2016/08/01 04:37:53 ozaki-r Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.103 2016/08/01 03:15:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.104 2016/08/01 04:37:53 ozaki-r Exp $");
 
 #include 
 #include 
@@ -321,8 +321,8 @@ in6_get_hw_ifid(struct ifnet *ifp, struc
 {
 	struct ifaddr *ifa;
 	const struct sockaddr_dl *sdl = NULL;
-	const char *addr;
-	size_t addrlen;
+	const char *addr = NULL; /* XXX gcc 4.8 -Werror=maybe-uninitialized */
+	size_t addrlen = 0; /* XXX gcc 4.8 -Werror=maybe-uninitialized */
 	static u_int8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 	static u_int8_t allone[8] =
 		{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };



CVS commit: src/sys/sys

2016-07-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug  1 03:43:25 UTC 2016

Modified Files:
src/sys/sys: param.h

Log Message:
Bump kernel version for struct ifaddr change


To generate a diff of this commit:
cvs rdiff -u -r1.500 -r1.501 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.500 src/sys/sys/param.h:1.501
--- src/sys/sys/param.h:1.500	Mon Jul 11 16:10:10 2016
+++ src/sys/sys/param.h	Mon Aug  1 03:43:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.500 2016/07/11 16:10:10 matt Exp $	*/
+/*	$NetBSD: param.h,v 1.501 2016/08/01 03:43:25 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799003400	/* NetBSD 7.99.34 */
+#define	__NetBSD_Version__	799003500	/* NetBSD 7.99.35 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/net

2016-07-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug  1 02:50:03 UTC 2016

Modified Files:
src/sys/net: if.h

Log Message:
Revert "Revert part of "Switch the address list of intefaces to pslist(9)" 
(r1.220)"

netstat now uses sysctl instead of kvm(3) to get address information from
the kernel. So we can avoid the issue introduced by the reverted commit
(PR kern/51325) by updating netstat with the latest source code.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/net/if.h

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

Modified files:

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.222 src/sys/net/if.h:1.223
--- src/sys/net/if.h:1.222	Fri Jul 22 07:09:40 2016
+++ src/sys/net/if.h	Mon Aug  1 02:50:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.222 2016/07/22 07:09:40 knakahara Exp $	*/
+/*	$NetBSD: if.h,v 1.223 2016/08/01 02:50:03 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -596,7 +596,9 @@ struct ifaddr {
 			   const struct sockaddr *);
 	uint32_t	*ifa_seqno;
 	int16_t	ifa_preference;	/* preference level for this address */
-	/* XXX adding variables here breaks kvm(3) users of struct *_ifaddr */
+#ifdef _KERNEL
+	struct pslist_entry ifa_pslist_entry;
+#endif
 };
 #define	IFA_ROUTE	RTF_UP	/* (0x01) route installed */
 
@@ -1051,7 +1053,6 @@ __END_DECLS
 	&(__ifp)->if_addrlist, ifa_list, __nifa)
 #define	IFADDR_EMPTY(__ifp)		TAILQ_EMPTY(&(__ifp)->if_addrlist)
 
-#ifdef notyet
 #define IFADDR_ENTRY_INIT(__ifa)	\
 	PSLIST_ENTRY_INIT((__ifa), ifa_pslist_entry)
 #define IFADDR_ENTRY_DESTROY(__ifa)	\
@@ -1097,34 +1098,6 @@ __END_DECLS
 			}		\
 		}			\
 	} while (0)
-#else
-#define IFADDR_ENTRY_INIT(__ifa)	\
-	do {} while (0)
-#define IFADDR_ENTRY_DESTROY(__ifa)	\
-	do {} while (0)
-#define IFADDR_READER_EMPTY(__ifp)	\
-	IFADDR_EMPTY(__ifp)
-#define IFADDR_READER_FIRST(__ifp)	\
-	IFADDR_FIRST(__ifp)
-#define IFADDR_READER_NEXT(__ifa)	\
-	IFADDR_NEXT(__ifa)
-#define IFADDR_READER_FOREACH(__ifa, __ifp)\
-	IFADDR_FOREACH(__ifa, __ifp)
-#define IFADDR_WRITER_INSERT_HEAD(__ifp, __ifa)\
-	do {} while (0)
-#define IFADDR_WRITER_REMOVE(__ifa)	\
-	do {} while (0)
-#define IFADDR_WRITER_FOREACH(__ifa, __ifp)\
-	IFADDR_FOREACH(__ifa, __ifp)
-#define IFADDR_WRITER_NEXT(__ifp)	\
-	IFADDR_NEXT(__ifa)
-#define IFADDR_WRITER_INSERT_AFTER(__ifp, __new)			\
-	do {} while (0)
-#define IFADDR_WRITER_EMPTY(__ifp)	\
-	IFADDR_EMPTY(__ifp)
-#define IFADDR_WRITER_INSERT_TAIL(__ifp, __new)\
-	do {} while (0)
-#endif /* notyet */
 
 #define	IFNET_LOCK()			mutex_enter(_mtx)
 #define	IFNET_UNLOCK()			mutex_exit(_mtx)



CVS commit: src/sys/net

2016-07-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug  1 02:50:03 UTC 2016

Modified Files:
src/sys/net: if.h

Log Message:
Revert "Revert part of "Switch the address list of intefaces to pslist(9)" 
(r1.220)"

netstat now uses sysctl instead of kvm(3) to get address information from
the kernel. So we can avoid the issue introduced by the reverted commit
(PR kern/51325) by updating netstat with the latest source code.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/net/if.h

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



CVS commit: src/sbin/sysctl

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 23:30:28 UTC 2016

Modified Files:
src/sbin/sysctl: sysctl.c

Log Message:
Apply patch from PR 43587, mostly from martin and kre. When writing a
sysctl variable using ?= fails with EPERM, don't print an error
message.

Ideally setting a sysctl to the same value it already has should also
not fail regardless of permissions, but this would need to be done in
the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sbin/sysctl/sysctl.c

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

Modified files:

Index: src/sbin/sysctl/sysctl.c
diff -u src/sbin/sysctl/sysctl.c:1.157 src/sbin/sysctl/sysctl.c:1.158
--- src/sbin/sysctl/sysctl.c:1.157	Sun Dec 13 14:24:47 2015
+++ src/sbin/sysctl/sysctl.c	Sun Jul 31 23:30:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.c,v 1.157 2015/12/13 14:24:47 christos Exp $ */
+/*	$NetBSD: sysctl.c,v 1.158 2016/07/31 23:30:28 dholland Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
 #if 0
 static char sccsid[] = "@(#)sysctl.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: sysctl.c,v 1.157 2015/12/13 14:24:47 christos Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.158 2016/07/31 23:30:28 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -128,8 +128,8 @@ static void canonicalize(const char *, c
 static void purge_tree(struct sysctlnode *);
 static void print_tree(int *, u_int, struct sysctlnode *, u_int, int, regex_t *,
 size_t *);
-static void write_number(int *, u_int, struct sysctlnode *, char *);
-static void write_string(int *, u_int, struct sysctlnode *, char *);
+static void write_number(int *, u_int, struct sysctlnode *, char *, bool);
+static void write_string(int *, u_int, struct sysctlnode *, char *, bool);
 static void display_number(const struct sysctlnode *, const char *,
 			   const void *, size_t, int);
 static void display_string(const struct sysctlnode *, const char *,
@@ -946,10 +946,10 @@ parse(char *l, regex_t *re, size_t *last
 	case CTLTYPE_INT:
 	case CTLTYPE_BOOL:
 	case CTLTYPE_QUAD:
-		write_number([0], namelen, node, value);
+		write_number([0], namelen, node, value, optional);
 		break;
 	case CTLTYPE_STRING:
-		write_string([0], namelen, node, value);
+		write_string([0], namelen, node, value, optional);
 		break;
 	case CTLTYPE_STRUCT:
 		/*
@@ -1754,7 +1754,8 @@ sysctlperror(const char *fmt, ...)
  * 
  */
 static void
-write_number(int *name, u_int namelen, struct sysctlnode *node, char *value)
+write_number(int *name, u_int namelen, struct sysctlnode *node, char *value,
+	bool optional)
 {
 	u_int ii, io;
 	u_quad_t qi, qo;
@@ -1811,7 +1812,9 @@ write_number(int *name, u_int namelen, s
 
 	rc = prog_sysctl(name, namelen, o, , i, si);
 	if (rc == -1) {
-		sysctlerror(0);
+		if (!optional || errno != EPERM) {
+			sysctlerror(0);
+		}
 		return;
 	}
 
@@ -1832,7 +1835,8 @@ write_number(int *name, u_int namelen, s
 }
 
 static void
-write_string(int *name, u_int namelen, struct sysctlnode *node, char *value)
+write_string(int *name, u_int namelen, struct sysctlnode *node, char *value,
+	bool optional)
 {
 	char *i, *o;
 	size_t si, so;
@@ -1853,7 +1857,10 @@ write_string(int *name, u_int namelen, s
 
 	rc = prog_sysctl(name, namelen, o, , i, si);
 	if (rc == -1) {
-		sysctlerror(0);
+		if (!optional || errno != EPERM) {
+			sysctlerror(0);
+		}
+		free(o);
 		return;
 	}
 



CVS commit: src/sbin/sysctl

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 23:30:28 UTC 2016

Modified Files:
src/sbin/sysctl: sysctl.c

Log Message:
Apply patch from PR 43587, mostly from martin and kre. When writing a
sysctl variable using ?= fails with EPERM, don't print an error
message.

Ideally setting a sysctl to the same value it already has should also
not fail regardless of permissions, but this would need to be done in
the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sbin/sysctl/sysctl.c

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



CVS commit: src/usr.bin/xlint/lint1

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 22:38:04 UTC 2016

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
Don't allow initializers of the form { .a = .b = expr } as this is not
valid. Helps a bit with PR 22500.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/xlint/lint1/cgram.y

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.78 src/usr.bin/xlint/lint1/cgram.y:1.79
--- src/usr.bin/xlint/lint1/cgram.y:1.78	Wed Jul 20 18:14:12 2016
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Jul 31 22:38:04 2016
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.78 2016/07/20 18:14:12 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.79 2016/07/31 22:38:04 dholland Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.78 2016/07/20 18:14:12 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.79 2016/07/31 22:38:04 dholland Exp $");
 #endif
 
 #include 
@@ -1233,14 +1233,17 @@ opt_asm_or_symbolrename:		/* expect only
 	;
 
 initializer:
-	  init_expr
+	  init_assign_expr
 	;
 
-init_expr:
-	| expr%prec T_COMMA {
+init_assign_expr:
+	| init_by_name init_base_expr	%prec T_COMMA
+	| init_base_expr
+
+init_base_expr:
+	  expr%prec T_COMMA {
 		mkinit($1);
 	  }
-	| init_by_name init_expr	%prec T_COMMA
 	| init_lbrace init_rbrace
 	| init_lbrace init_expr_list init_rbrace
 	| init_lbrace init_expr_list T_COMMA init_rbrace
@@ -1248,8 +1251,8 @@ init_expr:
 	;
 
 init_expr_list:
-	  init_expr			%prec T_COMMA
-	| init_expr_list T_COMMA init_expr
+	  init_assign_expr		%prec T_COMMA
+	| init_expr_list T_COMMA init_assign_expr
 	;
 
 lorange: 



CVS commit: src/usr.bin/xlint/lint1

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 22:38:04 UTC 2016

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
Don't allow initializers of the form { .a = .b = expr } as this is not
valid. Helps a bit with PR 22500.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/xlint/lint1/cgram.y

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



CVS commit: src/usr.bin/xlint/lint1

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 22:36:53 UTC 2016

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/xlint/lint1/decl.c

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



CVS commit: src/usr.bin/xlint/lint1

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 22:36:53 UTC 2016

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/xlint/lint1/decl.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.61 src/usr.bin/xlint/lint1/decl.c:1.62
--- src/usr.bin/xlint/lint1/decl.c:1.61	Sat Jan  2 17:44:21 2016
+++ src/usr.bin/xlint/lint1/decl.c	Sun Jul 31 22:36:53 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.61 2016/01/02 17:44:21 christos Exp $ */
+/* $NetBSD: decl.c,v 1.62 2016/07/31 22:36:53 dholland Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.61 2016/01/02 17:44:21 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.62 2016/07/31 22:36:53 dholland Exp $");
 #endif
 
 #include 
@@ -664,7 +664,7 @@ popdecl(void)
  *
  * There is no need to clear d_asm in dinfo structs with context AUTO,
  * because these structs are freed at the end of the compound statement.
- * But it must be cleard in the outermost dinfo struct, which has
+ * But it must be cleared in the outermost dinfo struct, which has
  * context EXTERN. This could be done in clrtyp() and would work for
  * C, but not for C++ (due to mixed statements and declarations). Thus
  * we clear it in glclup(), which is used to do some cleanup after



CVS commit: src/sys/sys

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 21:34:53 UTC 2016

Modified Files:
src/sys/sys: termios.h

Log Message:
PR 38290 Adam Hoka: IXANY should exist for _XOPEN_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/sys/termios.h

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



CVS commit: src/sys/sys

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 21:34:53 UTC 2016

Modified Files:
src/sys/sys: termios.h

Log Message:
PR 38290 Adam Hoka: IXANY should exist for _XOPEN_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/sys/termios.h

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

Modified files:

Index: src/sys/sys/termios.h
diff -u src/sys/sys/termios.h:1.32 src/sys/sys/termios.h:1.33
--- src/sys/sys/termios.h:1.32	Thu Jul 11 16:46:06 2013
+++ src/sys/sys/termios.h	Sun Jul 31 21:34:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: termios.h,v 1.32 2013/07/11 16:46:06 christos Exp $	*/
+/*	$NetBSD: termios.h,v 1.33 2016/07/31 21:34:53 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1993, 1994
@@ -98,7 +98,7 @@
 #define	ICRNL		0x0100U	/* map CR to NL (ala CRMOD) */
 #define	IXON		0x0200U	/* enable output flow control */
 #define	IXOFF		0x0400U	/* enable input flow control */
-#if defined(_NETBSD_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #define	IXANY		0x0800U	/* any char will restart after stop */
 #endif
 #if defined(_NETBSD_SOURCE)



CVS commit: src/sys/kern

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 20:34:04 UTC 2016

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.504 -r1.505 src/sys/kern/vfs_syscalls.c

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

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.504 src/sys/kern/vfs_syscalls.c:1.505
--- src/sys/kern/vfs_syscalls.c:1.504	Sat Nov 28 15:26:29 2015
+++ src/sys/kern/vfs_syscalls.c	Sun Jul 31 20:34:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.504 2015/11/28 15:26:29 dholland Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.505 2016/07/31 20:34:04 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.504 2015/11/28 15:26:29 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.505 2016/07/31 20:34:04 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -4323,7 +4323,7 @@ do_sys_renameat(struct lwp *l, int fromf
 	 *
 	 * XXX Because nothing is locked and the compiler may reorder
 	 * things here, unmounting the file system at an inopportune
-	 * moment may cause rename to fail with ENXDEV when it really
+	 * moment may cause rename to fail with EXDEV when it really
 	 * should fail with ENOENT.
 	 */
 	tmp = tdvp->v_mount;



CVS commit: src/sys/kern

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 20:34:04 UTC 2016

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.504 -r1.505 src/sys/kern/vfs_syscalls.c

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



CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:33:18 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c stackframe.h

Log Message:
Speed limit 80.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/unwind/stackframe.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/unwind/stackframe.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/ia64/unwind/stackframe.c
diff -u src/sys/arch/ia64/unwind/stackframe.c:1.8 src/sys/arch/ia64/unwind/stackframe.c:1.9
--- src/sys/arch/ia64/unwind/stackframe.c:1.8	Sun Jul 31 19:22:25 2016
+++ src/sys/arch/ia64/unwind/stackframe.c	Sun Jul 31 19:33:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stackframe.c,v 1.8 2016/07/31 19:22:25 dholland Exp $	*/
+/*	$NetBSD: stackframe.c,v 1.9 2016/07/31 19:33:18 dholland Exp $	*/
 
 /* Contributed to the NetBSD foundation by Cherry G. Mathew 
  * This file contains routines to use decoded unwind descriptor entries
@@ -64,9 +64,11 @@ buildrecordchain(uint64_t unwind_infop, 
 	/* XXX: Ignore zero length records. */
 
 
-	for(rec_cnt = 0; rec_cnt < MAXSTATERECS && (uint64_t)recptr < unwindend;
+	for (rec_cnt = 0;
+	rec_cnt < MAXSTATERECS && (uint64_t)recptr < unwindend;
 	rec_cnt++) {
-		if ((nextrecp = unwind_decode_R1(recptr, [rec_cnt].udesc))){
+		nextrecp = unwind_decode_R1(recptr, [rec_cnt].udesc);
+		if (nextrecp) {
 			region_len = strc[rec_cnt].udesc.R1.rlen;
 			region_type = strc[rec_cnt].udesc.R1.r;
 			strc[rec_cnt].type = R1;
@@ -74,7 +76,8 @@ buildrecordchain(uint64_t unwind_infop, 
 			continue;
 		}
 
-		if ((nextrecp = unwind_decode_R2(recptr, [rec_cnt].udesc))){
+		nextrecp = unwind_decode_R2(recptr, [rec_cnt].udesc);
+		if (nextrecp) {
 			region_len = strc[rec_cnt].udesc.R2.rlen;
 			/* R2 regions are prologue regions */
 			region_type = false;
@@ -83,7 +86,8 @@ buildrecordchain(uint64_t unwind_infop, 
 			continue;
 		}
 
-		if ((nextrecp = unwind_decode_R3(recptr, [rec_cnt].udesc))){
+		nextrecp = unwind_decode_R3(recptr, [rec_cnt].udesc);
+		if (nextrecp) {
 			region_len = strc[rec_cnt].udesc.R3.rlen;
 			region_type = strc[rec_cnt].udesc.R3.r;
 			strc[rec_cnt].type = R3;
@@ -91,119 +95,152 @@ buildrecordchain(uint64_t unwind_infop, 
 			continue;
 		}
 
-		if(region_type == false) {
+		if (region_type == false) {
 			/* Prologue Region */
-			if ((nextrecp = unwind_decode_P1(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P1(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P1;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P2(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P2(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P2;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P3(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P3(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P3;
 recptr = nextrecp;
 continue;
 			}
 
-
-			if ((nextrecp = unwind_decode_P4(recptr, [rec_cnt].udesc, region_len))){
+			nextrecp = unwind_decode_P4(recptr,
+		[rec_cnt].udesc,
+		region_len);
+			if (nextrecp) {
 strc[rec_cnt].type = P4;
 recptr = nextrecp;
 break;
 			}
 		
-
-			if ((nextrecp = unwind_decode_P5(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P5(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P5;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P6(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P6(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P6;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P7(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P7(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P7;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P8(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P8(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P8;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P9(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P9(recptr,
+		[rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P9;
 recptr = nextrecp;
 continue;
 			}
 
-			if ((nextrecp = unwind_decode_P10(recptr, [rec_cnt].udesc))){
+			nextrecp = unwind_decode_P10(recptr,
+		 [rec_cnt].udesc);
+			if (nextrecp) {
 strc[rec_cnt].type = P10;
 recptr = nextrecp;
 continue;
 			}
 
 			printf("Skipping prologue desc slot :: %d \n", rec_cnt);
-		}
+		} else {
 
-		else {
-			
-			if ((nextrecp = unwind_decode_B1(recptr, [rec_cnt].udesc))){
+			nextrecp = 

CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:33:18 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c stackframe.h

Log Message:
Speed limit 80.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/unwind/stackframe.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/unwind/stackframe.h

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



CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:22:25 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c stackframe.h

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/unwind/stackframe.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/unwind/stackframe.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/ia64/unwind/stackframe.c
diff -u src/sys/arch/ia64/unwind/stackframe.c:1.7 src/sys/arch/ia64/unwind/stackframe.c:1.8
--- src/sys/arch/ia64/unwind/stackframe.c:1.7	Sun Jul 31 19:12:41 2016
+++ src/sys/arch/ia64/unwind/stackframe.c	Sun Jul 31 19:22:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stackframe.c,v 1.7 2016/07/31 19:12:41 dholland Exp $	*/
+/*	$NetBSD: stackframe.c,v 1.8 2016/07/31 19:22:25 dholland Exp $	*/
 
 /* Contributed to the NetBSD foundation by Cherry G. Mathew 
  * This file contains routines to use decoded unwind descriptor entries
@@ -19,21 +19,21 @@
 
 //#define UNWIND_DIAGNOSTIC
 
-/* Global variables:
-   array of struct recordchain
-   size of record chain array.
-*/
+/*
+ * Global variables:
+ * array of struct recordchain
+ * size of record chain array.
+ */
 struct recordchain strc[MAXSTATERECS];
 int rec_cnt = 0;
 
-/* Build a recordchain of a region, given the pointer to unwind table
+/*
+ * Build a recordchain of a region, given the pointer to unwind table
  * entry, and the number of entries to decode.
  */
-
-void buildrecordchain(uint64_t unwind_infop, struct recordchain *xxx)
+void
+buildrecordchain(uint64_t unwind_infop, struct recordchain *xxx)
 {
-
-
 	uint64_t unwindstart, unwindend;
 	uint64_t unwindlen;
 	uint64_t region_len = 0;
@@ -76,7 +76,8 @@ void buildrecordchain(uint64_t unwind_in
 
 		if ((nextrecp = unwind_decode_R2(recptr, [rec_cnt].udesc))){
 			region_len = strc[rec_cnt].udesc.R2.rlen;
-			region_type = false; /* R2 regions are prologue regions */
+			/* R2 regions are prologue regions */
+			region_type = false;
 			strc[rec_cnt].type = R2;
 			recptr = nextrecp;
 			continue;
@@ -90,7 +91,8 @@ void buildrecordchain(uint64_t unwind_in
 			continue;
 		}
 
-		if(region_type == false) { /* Prologue Region */
+		if(region_type == false) {
+			/* Prologue Region */
 			if ((nextrecp = unwind_decode_P1(recptr, [rec_cnt].udesc))){
 strc[rec_cnt].type = P1;
 recptr = nextrecp;
@@ -208,8 +210,6 @@ void buildrecordchain(uint64_t unwind_in
 			}
 
 			printf("Skipping body desc slot :: %d \n", rec_cnt);
-
-			
 		}
 	}
 
@@ -220,20 +220,20 @@ void buildrecordchain(uint64_t unwind_in
 	}
 
 #endif /* UNWIND_DIAGNOSTIC */
-
 }
 
 
 
 
-/* Debug support: dump a record chain entry */
-void dump_recordchain(struct recordchain *rchain)
+/*
+ * Debug support: dump a record chain entry
+ */
+void
+dump_recordchain(struct recordchain *rchain)
 {
 
 	switch(rchain->type) {
 	case R1:
-
-
 		printf("\t R1:");
 		if(rchain->udesc.R1.r)
 			printf("body (");
@@ -574,12 +574,14 @@ void dump_recordchain(struct recordchain
 
 }
 
-/* State record stuff. based on section 11. and Appendix A. of the 
- *"Itanium Software Conventions and Runtime Architecture Guide"
+/*
+ * State record stuff. based on section 11. and Appendix A. of the 
+ * "Itanium Software Conventions and Runtime Architecture Guide"
  */
 
 
-/* Global variables:
+/*
+ * Global variables:
  * 1. Two arrays of staterecords: recordstack[], recordstackcopy[]
  *	XXX:	Since we don't use malloc, we have two arbitrary sized arrays
  *		providing guaranteed memory from the BSS. See the TODO file 
@@ -593,12 +595,13 @@ struct staterecord current_state;
 struct staterecord *unwind_rsp, *unwind_rscp;
 
 
-uint64_t spill_base = 0;	/* Base of spill area in memory stack frame as a psp relative offset */
+/* Base of spill area in memory stack frame as a psp relative offset */
+uint64_t spill_base = 0;
 
-/* Initialises a staterecord from a given template,
+/*
+ * Initialises a staterecord from a given template,
  * with default values as described by the Runtime Spec.
  */
-
 void
 initrecord(struct staterecord *target)
 {
@@ -617,27 +620,27 @@ initrecord(struct staterecord *target)
 }
 
 
-/* Modifies a staterecord structure by parsing 
+/*
+ * Modifies a staterecord structure by parsing 
  * a single record chain structure.
  * regionoffset is the offset within a (prologue) region 
  * where the stack unwinding began.
  */
-
-void modifyrecord(struct staterecord *srec, struct recordchain *rchain, 
-			 uint64_t regionoffset)
+void
+modifyrecord(struct staterecord *srec, struct recordchain *rchain, 
+	uint64_t regionoffset)
 {
-
-
-	uint64_t grno = 32; /* Default start save GR for prologue_save 
-			 * GRs.
-			 */
-
+	/*
+	 * Default start save GR for prologue_save GRs.
+	 */
+	uint64_t grno = 32;
 
 
 	switch (rchain->type) {
 	
 	case R2:
-		/* R2, prologue_gr is the only region encoding 
+		/*
+		 * 

CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:22:25 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c stackframe.h

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/unwind/stackframe.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/unwind/stackframe.h

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



CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:12:41 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c

Log Message:
Instead of testing for unsigned < 0, compare before subtracting.
Reset of PR 51297 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/unwind/stackframe.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/ia64/unwind/stackframe.c
diff -u src/sys/arch/ia64/unwind/stackframe.c:1.6 src/sys/arch/ia64/unwind/stackframe.c:1.7
--- src/sys/arch/ia64/unwind/stackframe.c:1.6	Sun Jul 31 19:10:54 2016
+++ src/sys/arch/ia64/unwind/stackframe.c	Sun Jul 31 19:12:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stackframe.c,v 1.6 2016/07/31 19:10:54 dholland Exp $	*/
+/*	$NetBSD: stackframe.c,v 1.7 2016/07/31 19:12:41 dholland Exp $	*/
 
 /* Contributed to the NetBSD foundation by Cherry G. Mathew 
  * This file contains routines to use decoded unwind descriptor entries
@@ -946,8 +946,8 @@ struct staterecord *buildrecordstack(str
 		switch (rchain[i].type) {
 		case R1:
 			rlen = rchain[i].udesc.R1.rlen;
+			if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			rdepth = procoffset - roffset;
-			if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			roffset += rlen;
 			rtype = rchain[i].udesc.R1.r;
 			if (!rtype) {
@@ -957,8 +957,8 @@ struct staterecord *buildrecordstack(str
 
 		case R3:
 			rlen = rchain[i].udesc.R3.rlen;
+			if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			rdepth = procoffset - roffset;
-			if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			roffset += rlen;
 			rtype = rchain[i].udesc.R3.r;
 			if (!rtype) {
@@ -968,8 +968,8 @@ struct staterecord *buildrecordstack(str
 
 		case R2:
 			rlen = rchain[i].udesc.R2.rlen;
+			if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			rdepth = procoffset - roffset;
-			if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */ 
 			roffset += rlen;
 			rtype = false; /* prologue region */
 			pushrecord(_state);



CVS commit: src/sys/arch/ia64/unwind

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:12:41 UTC 2016

Modified Files:
src/sys/arch/ia64/unwind: stackframe.c

Log Message:
Instead of testing for unsigned < 0, compare before subtracting.
Reset of PR 51297 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/unwind/stackframe.c

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



CVS commit: src/sys/arch/ia64

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:10:54 UTC 2016

Modified Files:
src/sys/arch/ia64/ia64: db_trace.c
src/sys/arch/ia64/unwind: stackframe.c

Log Message:
Don't check for unsigned variables being less than 0 in
patchunwindframe(). Instead, check before subtracting, which in this
case means at the call site.

It would probably be better to change the call signature so the
subtraction happens inside patchunwindframe(), but since I don't
really know exactly what this code is trying to do I'm not comfortable
changing it.

Issue 1 in PR 51297 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/unwind/stackframe.c

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



CVS commit: src/sys/arch/ia64

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 19:10:54 UTC 2016

Modified Files:
src/sys/arch/ia64/ia64: db_trace.c
src/sys/arch/ia64/unwind: stackframe.c

Log Message:
Don't check for unsigned variables being less than 0 in
patchunwindframe(). Instead, check before subtracting, which in this
case means at the call site.

It would probably be better to change the call signature so the
subtraction happens inside patchunwindframe(), but since I don't
really know exactly what this code is trying to do I'm not comfortable
changing it.

Issue 1 in PR 51297 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/unwind/stackframe.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/ia64/ia64/db_trace.c
diff -u src/sys/arch/ia64/ia64/db_trace.c:1.4 src/sys/arch/ia64/ia64/db_trace.c:1.5
--- src/sys/arch/ia64/ia64/db_trace.c:1.4	Mon Apr 28 20:23:25 2008
+++ src/sys/arch/ia64/ia64/db_trace.c	Sun Jul 31 19:10:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.4 2008/04/28 20:23:25 martin Exp $	*/
+/*	$NetBSD: db_trace.c,v 1.5 2016/07/31 19:10:54 dholland Exp $	*/
 
 /* Inspired by reading alpha/db_trace.c */
 
@@ -99,6 +99,7 @@ db_stack_trace_print(db_expr_t addr, boo
 		struct unwind_frame *uwf = _frame;
 		debug_frame_dump_XXX(uwf);
 #endif
+		KASSERT(ip >= kernstart);
 		patchunwindframe(_frame, ip - kernstart, kernstart);
 #ifdef UNWIND_DIAGNOSTIC
 		debug_frame_dump_XXX(uwf);
@@ -186,6 +187,7 @@ rewindframe(struct unwind_frame *uwf, db
 
 	/* Stomp on rp and pfs 
 	 */
+	KASSERT(ip >= kernstart);
 	patchunwindframe(uwf, ip - kernstart, kernstart);
 
 #ifdef UNWIND_DIAGNOSTIC

Index: src/sys/arch/ia64/unwind/stackframe.c
diff -u src/sys/arch/ia64/unwind/stackframe.c:1.5 src/sys/arch/ia64/unwind/stackframe.c:1.6
--- src/sys/arch/ia64/unwind/stackframe.c:1.5	Mon Mar 10 13:47:16 2014
+++ src/sys/arch/ia64/unwind/stackframe.c	Sun Jul 31 19:10:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: stackframe.c,v 1.5 2014/03/10 13:47:16 martin Exp $	*/
+/*	$NetBSD: stackframe.c,v 1.6 2016/07/31 19:10:54 dholland Exp $	*/
 
 /* Contributed to the NetBSD foundation by Cherry G. Mathew 
  * This file contains routines to use decoded unwind descriptor entries
@@ -1169,10 +1169,12 @@ patchunwindframe(struct unwind_frame *uw
 	struct uwtable_ent *uwt;
 	uint64_t infoptr, procoffset, slotoffset;
 
+#if 0 /* does not work - moved to assertion at the call site */
 	if (iprel < 0) {
 		panic("unwind ip out of range!!! \n");
 		return;
 	}
+#endif
 
 
 	uwt = get_unwind_table_entry(iprel);



CVS commit: src/sbin/fsck_lfs

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 18:27:27 UTC 2016

Modified Files:
src/sbin/fsck_lfs: bufcache.c

Log Message:
PR 51264 Jose Luis Rodriguez Garcia: lfs userland bufcache rehash is broken


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck_lfs/bufcache.c

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

Modified files:

Index: src/sbin/fsck_lfs/bufcache.c
diff -u src/sbin/fsck_lfs/bufcache.c:1.15 src/sbin/fsck_lfs/bufcache.c:1.16
--- src/sbin/fsck_lfs/bufcache.c:1.15	Sun Mar 29 19:35:58 2015
+++ src/sbin/fsck_lfs/bufcache.c	Sun Jul 31 18:27:26 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.15 2015/03/29 19:35:58 chopps Exp $ */
+/* $NetBSD: bufcache.c,v 1.16 2016/07/31 18:27:26 dholland Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -101,17 +101,19 @@ bufinit(int max)
 /* Widen the hash table. */
 void bufrehash(int max)
 {
-	int i, newhashmax, newhashmask;
+	int i, newhashmax;
 	struct ubuf *bp, *nbp;
 	struct bufhash_struct *np;
 
-	if (max < 0 || max < hashmax)
+	if (max < 0 || max <= hashmax)
 		return;
 
 	/* Round up to a power of two */
 	for (newhashmax = 1; newhashmax < max; newhashmax <<= 1)
 		;
-	newhashmask = newhashmax - 1;
+
+	/* update the mask right away so vl_hash() uses it */
+	hashmask = newhashmax - 1;
 
 	/* Allocate new empty hash table, if we can */
 	np = emalloc(newhashmax * sizeof(*bufhash));
@@ -134,7 +136,6 @@ void bufrehash(int max)
 	free(bufhash);
 	bufhash = np;
 	hashmax = newhashmax;
-	hashmask = newhashmask;
 }
 
 /* Print statistics of buffer cache usage */



CVS commit: src/sbin/fsck_lfs

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 18:27:27 UTC 2016

Modified Files:
src/sbin/fsck_lfs: bufcache.c

Log Message:
PR 51264 Jose Luis Rodriguez Garcia: lfs userland bufcache rehash is broken


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck_lfs/bufcache.c

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



CVS commit: src/sbin/ping

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 18:14:36 UTC 2016

Modified Files:
src/sbin/ping: ping.c

Log Message:
Manipulate the signal masks so signals only arrive while we're waiting,
so they can't illegally reenter libc.

Fixes the problem Greg A. Woods describes in PR 51267, which might or
might not be the original submitter's problem.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sbin/ping/ping.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/ping/ping.c
diff -u src/sbin/ping/ping.c:1.110 src/sbin/ping/ping.c:1.111
--- src/sbin/ping/ping.c:1.110	Sun Jul 31 17:59:08 2016
+++ src/sbin/ping/ping.c	Sun Jul 31 18:14:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ping.c,v 1.110 2016/07/31 17:59:08 dholland Exp $	*/
+/*	$NetBSD: ping.c,v 1.111 2016/07/31 18:14:36 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.110 2016/07/31 17:59:08 dholland Exp $");
+__RCSID("$NetBSD: ping.c,v 1.111 2016/07/31 18:14:36 dholland Exp $");
 #endif
 
 #include 
@@ -160,6 +160,8 @@ static struct sockaddr_in loc_addr;		/* 
 static int datalen;/* How much data */
 static int phdrlen;
 
+static sigset_t blockmask, enablemask;		/* signal masks */
+
 #ifndef __NetBSD__
 static char *progname;
 #define	getprogname()		(progname)
@@ -210,6 +212,8 @@ __dead static void doit(void);
 static void prefinish(int);
 static void prtsig(int);
 __dead static void finish(int);
+static void blocksignals(void);
+static void enablesignals(void);
 static void summary(int);
 static void pinger(void);
 static void fill(void);
@@ -669,6 +673,21 @@ main(int argc, char *argv[])
 
 	(void)signal(SIGINT, prefinish);
 
+	/*
+	 * Set up two signal masks:
+	 *- blockmask blocks the signals we catch
+	 *- enablemask does not
+	 */
+
+	sigemptyset();
+	sigemptyset();
+	sigaddset(, SIGINT);
+#ifdef SIGINFO
+	sigaddset(, SIGINFO);
+#else
+	sigaddset(, SIGQUIT);
+#endif
+
 #ifdef SIGINFO
 	sa.sa_handler = prtsig;
 	sa.sa_flags = SA_NOKERNINFO;
@@ -679,6 +698,8 @@ main(int argc, char *argv[])
 #endif
 	(void)signal(SIGCONT, prtsig);
 
+	blocksignals();
+
 	/* fire off them quickies */
 	for (i = 0; i < preload; i++) {
 		clock_gettime(CLOCK_MONOTONIC, );
@@ -689,7 +710,6 @@ main(int argc, char *argv[])
 	return 0;
 }
 
-
 static void
 doit(void)
 {
@@ -740,9 +760,14 @@ doit(void)
 break;
 		}
 
+
 		fdmaskp[0].fd = s;
 		fdmaskp[0].events = POLLIN;
+
+		enablesignals();
 		cc = prog_poll(fdmaskp, 1, (int)(sec * 1000));
+		blocksignals();
+
 		if (cc <= 0) {
 			if (cc < 0) {
 if (errno == EINTR)
@@ -1430,6 +1455,22 @@ finish(int dummy)
 	exit(nreceived > 0 ? 0 : 2);
 }
 
+static void
+blocksignals(void)
+{
+	if (sigprocmask(SIG_SETMASK, , NULL) == -1) {
+		err(EXIT_FAILURE, "blocksignals: sigprocmask");
+	}
+}
+
+static void
+enablesignals(void)
+{
+	if (sigprocmask(SIG_SETMASK, , NULL) == -1) {
+		err(EXIT_FAILURE, "enablesignals: sigprocmask");
+	}
+}
+
 
 static int/* 0=do not print it */
 ck_pr_icmph(struct icmp *icp,



CVS commit: src/sbin/ping

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 17:59:09 UTC 2016

Modified Files:
src/sbin/ping: ping.c

Log Message:
Don't call variables that are used "dummy".


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sbin/ping/ping.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/ping/ping.c
diff -u src/sbin/ping/ping.c:1.109 src/sbin/ping/ping.c:1.110
--- src/sbin/ping/ping.c:1.109	Sat Nov 29 14:48:42 2014
+++ src/sbin/ping/ping.c	Sun Jul 31 17:59:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ping.c,v 1.109 2014/11/29 14:48:42 christos Exp $	*/
+/*	$NetBSD: ping.c,v 1.110 2016/07/31 17:59:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.109 2014/11/29 14:48:42 christos Exp $");
+__RCSID("$NetBSD: ping.c,v 1.110 2016/07/31 17:59:08 dholland Exp $");
 #endif
 
 #include 
@@ -1401,13 +1401,13 @@ prtsig(int dummy)
  * On the first SIGINT, allow any outstanding packets to dribble in
  */
 static void
-prefinish(int dummy)
+prefinish(int sig)
 {
 	if (lastrcvd			/* quit now if caught up */
 	|| nreceived == 0)		/* or if remote is dead */
 		finish(0);
 
-	(void)signal(dummy, finish);	/* do this only the 1st time */
+	(void)signal(sig, finish);	/* do this only the 1st time */
 
 	if (npackets > ntransmitted)	/* let the normal limit work */
 		npackets = ntransmitted;



CVS commit: src/sbin/ping

2016-07-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 31 17:59:09 UTC 2016

Modified Files:
src/sbin/ping: ping.c

Log Message:
Don't call variables that are used "dummy".


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sbin/ping/ping.c

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



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

2016-07-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jul 31 15:33:42 UTC 2016

Modified Files:
src/sys/arch/mips/mips: vm_machdep.c

Log Message:
Fix up uarea page mapping compile conditional - we only need code if
USPACE is > PAGE_SIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/mips/mips/vm_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/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.149 src/sys/arch/mips/mips/vm_machdep.c:1.150
--- src/sys/arch/mips/mips/vm_machdep.c:1.149	Sat Jul 30 06:20:54 2016
+++ src/sys/arch/mips/mips/vm_machdep.c	Sun Jul 31 15:33:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.149 2016/07/30 06:20:54 matt Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.150 2016/07/31 15:33:42 skrll Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.149 2016/07/30 06:20:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.150 2016/07/31 15:33:42 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_coredump.h"
@@ -115,7 +115,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 		tf->tf_regs[_R_SP] = (intptr_t)stack + stacksize;
 
 	l2->l_md.md_utf = tf;
-#if (USPACE > PAGE_SIZE) || !defined(_LP64)
+#if (USPACE > PAGE_SIZE)
 	if (!pmap_md_direct_mapped_vaddr_p(ua2)) {
 		__CTASSERT((PGSHIFT & 1) || UPAGES % 2 == 0);
 		pt_entry_t * const pte = pmap_pte_lookup(pmap_kernel(), ua2);



CVS commit: [pgoyette-localcount] src/sys/dev

2016-07-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 31 13:12:59 UTC 2016

Modified Files:
src/sys/dev [pgoyette-localcount]: fss.c

Log Message:
mport rev 1.95 from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.93.2.6 -r1.93.2.7 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.93.2.6 src/sys/dev/fss.c:1.93.2.7
--- src/sys/dev/fss.c:1.93.2.6	Sun Jul 31 01:36:49 2016
+++ src/sys/dev/fss.c	Sun Jul 31 13:12:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $	*/
+/*	$NetBSD: fss.c,v 1.93.2.7 2016/07/31 13:12:59 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.7 2016/07/31 13:12:59 pgoyette Exp $");
 
 #include 
 #include 
@@ -472,17 +472,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;
 }
 
 /*
@@ -605,9 +608,8 @@ fss_unmount_hook(struct mount *mp)
 			continue;
 		sc = device_private(self);
 		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);
 		device_release(self);
 	}
@@ -917,7 +919,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: [pgoyette-localcount] src/sys/dev

2016-07-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 31 13:12:59 UTC 2016

Modified Files:
src/sys/dev [pgoyette-localcount]: fss.c

Log Message:
mport rev 1.95 from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.93.2.6 -r1.93.2.7 src/sys/dev/fss.c

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



CVS commit: src/tests/lib/libpthread

2016-07-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jul 31 13:01:29 UTC 2016

Modified Files:
src/tests/lib/libpthread: t_mutex.c

Log Message:
we require root for sched_fifo, and more verbose messages.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libpthread/t_mutex.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/libpthread/t_mutex.c
diff -u src/tests/lib/libpthread/t_mutex.c:1.9 src/tests/lib/libpthread/t_mutex.c:1.10
--- src/tests/lib/libpthread/t_mutex.c:1.9	Wed Jul  6 10:42:53 2016
+++ src/tests/lib/libpthread/t_mutex.c	Sun Jul 31 09:01:29 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.9 2016/07/06 14:42:53 christos Exp $ */
+/* $NetBSD: t_mutex.c,v 1.10 2016/07/31 13:01:29 christos Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_mutex.c,v 1.9 2016/07/06 14:42:53 christos Exp $");
+__RCSID("$NetBSD: t_mutex.c,v 1.10 2016/07/31 13:01:29 christos Exp $");
 
 #include 
 #include 
@@ -318,7 +318,7 @@ child_func(void* arg)
 
 	printf("child is waiting\n");
 	res = _sched_protect(-2);
-	ATF_REQUIRE_EQ(res, -1);
+	ATF_REQUIRE_EQ_MSG(res, -1, "sched_protect returned %d", res);
 	ATF_REQUIRE_EQ(errno, ENOENT);
 	PTHREAD_REQUIRE(pthread_mutex_lock());
 	printf("child is owning resource\n");
@@ -334,6 +334,7 @@ ATF_TC(mutex5);
 ATF_TC_HEAD(mutex5, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Checks mutexes for priority setting");
+	atf_tc_set_md_var(tc, "require.user", "root");
 }
 
 ATF_TC_BODY(mutex5, tc)
@@ -352,7 +353,8 @@ ATF_TC_BODY(mutex5, tc)
 	printf("previous policy used = %d\n", res);
 
 	res = sched_getscheduler(getpid());
-	ATF_REQUIRE_EQ(res, 1);
+	ATF_REQUIRE_EQ_MSG(res, SCHED_FIFO, "sched %d != FIFO %d", res, 
+	SCHED_FIFO);
 
 	PTHREAD_REQUIRE(pthread_mutexattr_init());
 	PTHREAD_REQUIRE(pthread_mutexattr_setprotocol(,
@@ -444,6 +446,7 @@ ATF_TC_HEAD(mutex6, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Checks scheduling for priority ceiling");
+	atf_tc_set_md_var(tc, "require.user", "root");
 }
 
 /*



CVS commit: src/tests/lib/libpthread

2016-07-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jul 31 13:01:29 UTC 2016

Modified Files:
src/tests/lib/libpthread: t_mutex.c

Log Message:
we require root for sched_fifo, and more verbose messages.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libpthread/t_mutex.c

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



CVS commit: src/sys/dev

2016-07-31 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Jul 31 12:17:36 UTC 2016

Modified Files:
src/sys/dev: fss.c

Log Message:
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.94 -r1.95 src/sys/dev/fss.c

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



CVS commit: src/sys/dev

2016-07-31 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Jul 31 12:17:36 UTC 2016

Modified Files:
src/sys/dev: fss.c

Log Message:
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.94 -r1.95 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.94 src/sys/dev/fss.c:1.95
--- src/sys/dev/fss.c:1.94	Sat Jul 30 22:36:14 2016
+++ src/sys/dev/fss.c	Sun Jul 31 12:17:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.94 2016/07/30 22:36:14 pgoyette Exp $	*/
+/*	$NetBSD: fss.c,v 1.95 2016/07/31 12:17:36 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.94 2016/07/30 22:36:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.95 2016/07/31 12:17:36 hannken 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: src/sys/arch/mips/mips

2016-07-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jul 31 07:06:24 UTC 2016

Modified Files:
src/sys/arch/mips/mips: syscall.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mips/mips/syscall.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/syscall.c
diff -u src/sys/arch/mips/mips/syscall.c:1.48 src/sys/arch/mips/mips/syscall.c:1.49
--- src/sys/arch/mips/mips/syscall.c:1.48	Wed Jun 26 08:38:03 2013
+++ src/sys/arch/mips/mips/syscall.c	Sun Jul 31 07:06:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $	*/
+/*	$NetBSD: syscall.c,v 1.49 2016/07/31 07:06:24 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.49 2016/07/31 07:06:24 skrll Exp $");
 
 #include 
 #include 
@@ -188,7 +188,8 @@ EMULNAME(syscall)(struct lwp *l, u_int s
 			KASSERT(nargs <= __arraycount(copyargs));
 			args = copyargs;
 			/*
-			 * Copy the arguments passed via register from the * trapframe to our argument array
+			 * Copy the arguments passed via register from the
+			 * trapframe to our argument array
 			 */
 			memcpy(copyargs, fargs, nregs * sizeof(register_t));
 			/*
@@ -205,10 +206,10 @@ EMULNAME(syscall)(struct lwp *l, u_int s
 	} else do {
 		/*
 		 * The only difference between O32 and N32 is the calling
-		 * sequence.  If you make O32 
+		 * sequence.  If you make O32
 		 */
 		int32_t copy32args[SYS_MAXSYSARGS];
-		int32_t *cargs = copy32args; 
+		int32_t *cargs = copy32args;
 		unsigned int arg64mask = SYCALL_ARG_64_MASK(callp);
 		bool doing_arg64;
 		size_t narg64 = SYCALL_NARGS64(callp);
@@ -251,7 +252,7 @@ EMULNAME(syscall)(struct lwp *l, u_int s
 		for (i = 0, doing_arg64 = false; i < nargs + narg64;) {
 			register_t arg;
 			if (nregs > 0) {
-arg = (int32_t) *fargs++; 
+arg = (int32_t) *fargs++;
 nregs--;
 			} else {
 arg = *cargs++;
@@ -325,7 +326,7 @@ EMULNAME(syscall)(struct lwp *l, u_int s
 			 */
 			mips_reg_t tmp = reg->r_regs[_R_V0];
 			reg->r_regs[_R_V0 + _QUAD_LOWWORD] = (int32_t) tmp;
-			reg->r_regs[_R_V0 + _QUAD_HIGHWORD] = tmp >> 32; 
+			reg->r_regs[_R_V0 + _QUAD_HIGHWORD] = tmp >> 32;
 		}
 #endif
 #ifdef MIPS_SYSCALL_DEBUG



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

2016-07-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jul 31 07:06:24 UTC 2016

Modified Files:
src/sys/arch/mips/mips: syscall.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mips/mips/syscall.c

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