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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:55:43 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/include: ntp_stdlib.h
src/external/bsd/ntp/dist/ntpd: refclock_jupiter.c refclock_oncore.c

Log Message:
introduce an NTP_SYSLOG macro.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c

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



CVS commit: src/external/bsd/openpam/dist/include/security

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:54:55 UTC 2015

Modified Files:
src/external/bsd/openpam/dist/include/security: openpam.h

Log Message:
these are syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/bsd/openpam/dist/include/security/openpam.h

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

Modified files:

Index: src/external/bsd/openpam/dist/include/security/openpam.h
diff -u src/external/bsd/openpam/dist/include/security/openpam.h:1.7 src/external/bsd/openpam/dist/include/security/openpam.h:1.8
--- src/external/bsd/openpam/dist/include/security/openpam.h:1.7	Fri Oct 24 14:17:56 2014
+++ src/external/bsd/openpam/dist/include/security/openpam.h	Wed Oct 14 11:54:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam.h,v 1.7 2014/10/24 18:17:56 christos Exp $	*/
+/*	$NetBSD: openpam.h,v 1.8 2015/10/14 15:54:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -92,7 +92,7 @@ int
 pam_error(const pam_handle_t *_pamh,
 	const char *_fmt,
 	...)
-	OPENPAM_FORMAT ((__printf__, 2, 3))
+	OPENPAM_FORMAT ((__syslog__, 2, 3))
 	OPENPAM_NONNULL((1,2));
 
 int
@@ -106,7 +106,7 @@ int
 pam_info(const pam_handle_t *_pamh,
 	const char *_fmt,
 	...)
-	OPENPAM_FORMAT ((__printf__, 2, 3))
+	OPENPAM_FORMAT ((__syslog__, 2, 3))
 	OPENPAM_NONNULL((1,2));
 
 int
@@ -129,14 +129,14 @@ int
 pam_vinfo(const pam_handle_t *_pamh,
 	const char *_fmt,
 	va_list _ap)
-	OPENPAM_FORMAT ((__printf__, 2, 0))
+	OPENPAM_FORMAT ((__syslog__, 2, 0))
 	OPENPAM_NONNULL((1,2));
 
 int
 pam_verror(const pam_handle_t *_pamh,
 	const char *_fmt,
 	va_list _ap)
-	OPENPAM_FORMAT ((__printf__, 2, 0))
+	OPENPAM_FORMAT ((__syslog__, 2, 0))
 	OPENPAM_NONNULL((1,2));
 
 int
@@ -216,7 +216,7 @@ _openpam_log(int _level,
 	const char *_func,
 	const char *_fmt,
 	...)
-	OPENPAM_FORMAT ((__printf__, 3, 4))
+	OPENPAM_FORMAT ((__syslog__, 3, 4))
 	OPENPAM_NONNULL((3));
 
 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
@@ -236,7 +236,7 @@ void
 openpam_log(int _level,
 	const char *_format,
 	...)
-	OPENPAM_FORMAT ((__printf__, 2, 3))
+	OPENPAM_FORMAT ((__syslog__, 2, 3))
 	OPENPAM_NONNULL((2));
 #endif
 



CVS commit: src/external/bsd/openpam/dist/include/security

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:54:55 UTC 2015

Modified Files:
src/external/bsd/openpam/dist/include/security: openpam.h

Log Message:
these are syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/bsd/openpam/dist/include/security/openpam.h

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



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:55:43 UTC 2015

Modified Files:
src/external/bsd/ntp/dist/include: ntp_stdlib.h
src/external/bsd/ntp/dist/ntpd: refclock_jupiter.c refclock_oncore.c

Log Message:
introduce an NTP_SYSLOG macro.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/ntpd/refclock_oncore.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/ntp/dist/include/ntp_stdlib.h
diff -u src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.9 src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.10
--- src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.9	Fri Jul 10 10:20:29 2015
+++ src/external/bsd/ntp/dist/include/ntp_stdlib.h	Wed Oct 14 11:55:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_stdlib.h,v 1.9 2015/07/10 14:20:29 christos Exp $	*/
+/*	$NetBSD: ntp_stdlib.h,v 1.10 2015/10/14 15:55:42 christos Exp $	*/
 
 /*
  * ntp_stdlib.h - Prototypes for NTP lib.
@@ -21,18 +21,20 @@
 
 #ifdef __GNUC__
 #define NTP_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
+#define NTP_SYSLOG(fmt, args) __attribute__((__format__(__syslog__, fmt, args)))
 #else
 #define NTP_PRINTF(fmt, args)
+#define NTP_SYSLOG(fmt, args)
 #endif
 
-extern	int	mprintf(const char *, ...) NTP_PRINTF(1, 2);
-extern	int	mfprintf(FILE *, const char *, ...) NTP_PRINTF(2, 3);
-extern	int	mvfprintf(FILE *, const char *, va_list) NTP_PRINTF(2, 0);
+extern	int	mprintf(const char *, ...) NTP_SYSLOG(1, 2);
+extern	int	mfprintf(FILE *, const char *, ...) NTP_SYSLOG(2, 3);
+extern	int	mvfprintf(FILE *, const char *, va_list) NTP_SYSLOG(2, 0);
 extern	int	mvsnprintf(char *, size_t, const char *, va_list)
-			NTP_PRINTF(3, 0);
+			NTP_SYSLOG(3, 0);
 extern	int	msnprintf(char *, size_t, const char *, ...)
-			NTP_PRINTF(3, 4);
-extern	void	msyslog(int, const char *, ...) NTP_PRINTF(2, 3);
+			NTP_SYSLOG(3, 4);
+extern	void	msyslog(int, const char *, ...) NTP_SYSLOG(2, 3);
 extern	void	init_logging	(const char *, u_int32, int);
 extern	int	change_logfile	(const char *, int);
 extern	void	setup_logfile	(const char *);

Index: src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.8 src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.9
--- src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c:1.8	Fri Jul 10 10:20:33 2015
+++ src/external/bsd/ntp/dist/ntpd/refclock_jupiter.c	Wed Oct 14 11:55:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_jupiter.c,v 1.8 2015/07/10 14:20:33 christos Exp $	*/
+/*	$NetBSD: refclock_jupiter.c,v 1.9 2015/10/14 15:55:43 christos Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 2003
@@ -136,8 +136,7 @@ static	void	jupiter_canmsg	(struct insta
 static	u_short	jupiter_cksum	(u_short *, u_int);
 static	int	jupiter_config	(struct instance *);
 static	void	jupiter_debug	(struct peer *, const char *,
- const char *, ...)
-			__attribute__ ((format (printf, 3, 4)));
+ const char *, ...) NTP_SYSLOG(3, 4);
 static	const char *	jupiter_parse_t	(struct instance *, u_short *);
 static	const char *	jupiter_parse_gpos	(struct instance *, u_short *);
 static	void	jupiter_platform	(struct instance *, u_int);

Index: src/external/bsd/ntp/dist/ntpd/refclock_oncore.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.11 src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.12
--- src/external/bsd/ntp/dist/ntpd/refclock_oncore.c:1.11	Fri Jul 10 10:20:33 2015
+++ src/external/bsd/ntp/dist/ntpd/refclock_oncore.c	Wed Oct 14 11:55:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_oncore.c,v 1.11 2015/07/10 14:20:33 christos Exp $	*/
+/*	$NetBSD: refclock_oncore.c,v 1.12 2015/10/14 15:55:43 christos Exp $	*/
 
 /*
  * 
@@ -380,7 +380,7 @@ static	void	oncore_compute_dH (struc
 static	void	oncore_load_almanac   (struct instance *);
 static	void	oncore_log	  (struct instance *, int, const char *);
 static	int	oncore_log_f	  (struct instance *, int, const char *, ...)
-		NTP_PRINTF(3, 4);
+		NTP_SYSLOG(3, 4);
 static	void	oncore_print_Cb   (struct instance *, u_char *);
 /* static  voidoncore_print_array	 (u_char *, int);	*/
 static	void	oncore_print_posn (struct instance *);



CVS commit: src/usr.sbin/lpr/lpd

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:02:04 UTC 2015

Modified Files:
src/usr.sbin/lpr/lpd: recvjob.c

Log Message:
this is syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/lpr/lpd/recvjob.c

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



CVS commit: src/sys/sys

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:52:41 UTC 2015

Modified Files:
src/sys/sys: cdefs.h syslog.h

Log Message:
introduce a __syslog__ format, and __sysloglike() macros. If __syslog__
is not available, this fails back to __printf__


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/sys/cdefs.h
cvs rdiff -u -r1.36 -r1.37 src/sys/sys/syslog.h

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



CVS commit: src/sbin/init

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:53:24 UTC 2015

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

Log Message:
these are syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sbin/init/init.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/init/init.c
diff -u src/sbin/init/init.c:1.106 src/sbin/init/init.c:1.107
--- src/sbin/init/init.c:1.106	Tue Jun 16 19:18:55 2015
+++ src/sbin/init/init.c	Wed Oct 14 11:53:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.106 2015/06/16 23:18:55 christos Exp $	*/
+/*	$NetBSD: init.c,v 1.107 2015/10/14 15:53:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
 #if 0
 static char sccsid[] = "@(#)init.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: init.c,v 1.106 2015/06/16 23:18:55 christos Exp $");
+__RCSID("$NetBSD: init.c,v 1.107 2015/10/14 15:53:24 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -110,9 +110,9 @@ static const struct timespec dtrtime = {
 static void handle(sig_t, ...);
 static void delset(sigset_t *, ...);
 
-static void stall(const char *, ...) __printflike(1, 2);
-static void warning(const char *, ...) __printflike(1, 2);
-static void emergency(const char *, ...) __printflike(1, 2);
+static void stall(const char *, ...) __sysloglike(1, 2);
+static void warning(const char *, ...) __sysloglike(1, 2);
+static void emergency(const char *, ...) __sysloglike(1, 2);
 __dead static void disaster(int);
 static void badsys(int);
 



CVS commit: src/sbin/init

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:53:24 UTC 2015

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

Log Message:
these are syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sbin/init/init.c

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



CVS commit: src/external/gpl3

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:05:15 UTC 2015

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/c-family: c-format.c c-format.h
src/external/gpl3/gcc.old/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/dist/gcc/c-family: c-format.c c-format.h
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
Introduce a syslog format that accepts %m. Stop accepting %m in printf
like formats. Support for this is detected via the __syslog_attribute__
macro.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c \
src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/c-family/c-format.c \
src/external/gpl3/gcc/dist/gcc/c-family/c-format.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/config/netbsd.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/mips/ingenic

2015-10-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Oct 14 15:44:57 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_efuse.c

Log Message:
add some comments


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ingenic/ingenic_efuse.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/ingenic/ingenic_efuse.c
diff -u src/sys/arch/mips/ingenic/ingenic_efuse.c:1.2 src/sys/arch/mips/ingenic/ingenic_efuse.c:1.3
--- src/sys/arch/mips/ingenic/ingenic_efuse.c:1.2	Thu Oct  8 18:20:31 2015
+++ src/sys/arch/mips/ingenic/ingenic_efuse.c	Wed Oct 14 15:44:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_efuse.c,v 1.2 2015/10/08 18:20:31 macallan Exp $ */
+/*	$NetBSD: ingenic_efuse.c,v 1.3 2015/10/14 15:44:57 macallan Exp $ */
 
 /*-
  * Copyright (c) 2015 Michael Lorenz
@@ -26,8 +26,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * a driver for the 'EFUSE Slave Interface' found on JZ4780
+ * more or less 8kBit of non-volatile storage containing things like MAC
+ * address, various encryption keys, boot code, serial numbers and parameters.
+ * Using it only to get the MAC address for now.
+ */
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ingenic_efuse.c,v 1.2 2015/10/08 18:20:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ingenic_efuse.c,v 1.3 2015/10/14 15:44:57 macallan Exp $");
 
 #include 
 #include 
@@ -114,6 +121,7 @@ ingenic_efuse_read(struct efuse_softc *s
 	uint32_t abuf;
 	int i;
 
+	/* default, just in case */
 	bus_space_write_4(sc->sc_iot, sc->sc_ioh, JZ_EFUCFG, 0x0004);
 	bus_space_write_4(sc->sc_iot, sc->sc_ioh, JZ_EFUCTRL,
 		JZ_EFUSE_READ |
@@ -127,4 +135,4 @@ ingenic_efuse_read(struct efuse_softc *s
 		memcpy(buf, , 4);
 		buf += 4;
 	}
-}
\ No newline at end of file
+}



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

2015-10-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Oct 14 15:44:57 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_efuse.c

Log Message:
add some comments


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ingenic/ingenic_efuse.c

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



CVS commit: src/usr.sbin/tcpdchk

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:50:48 UTC 2015

Modified Files:
src/usr.sbin/tcpdchk: inetcf.c

Log Message:
eliminate %m complexity. __format_arg__ thinks it is handling a format for
printf, so it does not like %m.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tcpdchk/inetcf.c

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



CVS commit: src/usr.sbin/tcpdchk

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:50:48 UTC 2015

Modified Files:
src/usr.sbin/tcpdchk: inetcf.c

Log Message:
eliminate %m complexity. __format_arg__ thinks it is handling a format for
printf, so it does not like %m.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tcpdchk/inetcf.c

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

Modified files:

Index: src/usr.sbin/tcpdchk/inetcf.c
diff -u src/usr.sbin/tcpdchk/inetcf.c:1.9 src/usr.sbin/tcpdchk/inetcf.c:1.10
--- src/usr.sbin/tcpdchk/inetcf.c:1.9	Wed Aug 31 12:25:00 2011
+++ src/usr.sbin/tcpdchk/inetcf.c	Wed Oct 14 11:50:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: inetcf.c,v 1.9 2011/08/31 16:25:00 plunky Exp $	*/
+/*	$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $	*/
 
  /*
   * Routines to parse an inetd.conf or tlid.conf file. This would be a great
@@ -12,7 +12,7 @@
 #if 0
 static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
 #else
-__RCSID("$NetBSD: inetcf.c,v 1.9 2011/08/31 16:25:00 plunky Exp $");
+__RCSID("$NetBSD: inetcf.c,v 1.10 2015/10/14 15:50:48 christos Exp $");
 #endif
 #endif
 
@@ -102,7 +102,7 @@ char   *conf;
  */
 if (conf != 0) {
 	if ((fp = fopen(conf, "r")) == 0) {
-	fprintf(stderr, percent_m(buf, "open %s: %m\n"), conf);
+	fprintf(stderr, "open %s: %s\n", conf, strerror(errno));
 	exit(1);
 	}
 } else {



CVS commit: src/external/bsd/am-utils/dist/include

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:00:18 UTC 2015

Modified Files:
src/external/bsd/am-utils/dist/include: am_utils.h

Log Message:
use syslog attribute


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/am-utils/dist/include/am_utils.h

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

Modified files:

Index: src/external/bsd/am-utils/dist/include/am_utils.h
diff -u src/external/bsd/am-utils/dist/include/am_utils.h:1.1.1.3 src/external/bsd/am-utils/dist/include/am_utils.h:1.2
--- src/external/bsd/am-utils/dist/include/am_utils.h:1.1.1.3	Sat Jan 17 11:34:18 2015
+++ src/external/bsd/am-utils/dist/include/am_utils.h	Wed Oct 14 12:00:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: am_utils.h,v 1.1.1.3 2015/01/17 16:34:18 christos Exp $	*/
+/*	$NetBSD: am_utils.h,v 1.2 2015/10/14 16:00:17 christos Exp $	*/
 
 /*
  * Copyright (c) 1997-2014 Erez Zadok
@@ -53,6 +53,10 @@
 /*** MACROS***/
 /**/
 
+#if !defined(__syslog_attribute__) && !defined(__syslog__)
+#define __syslog__ __printf__
+#endif
+
 /*
  * General macros.
  */
@@ -324,7 +328,7 @@ extern void getwire(char **name1, char *
 extern void going_down(int);
 extern void mnt_free(mntent_t *);
 extern void plog(int, const char *,...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__syslog__, 2, 3)));
 extern void rmdirs(char *);
 extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long);
 extern void set_amd_program_number(u_long program);
@@ -489,7 +493,7 @@ extern void malloc_verify(void);
 extern void print_nfs_args(const void *, u_long nfs_version);
 extern int debug_option (char *opt);
 extern void dplog(const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__format__ (__syslog__, 1, 2)));
 
 #else /* not DEBUG */
 



CVS commit: src/external/bsd/am-utils/dist/include

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:00:18 UTC 2015

Modified Files:
src/external/bsd/am-utils/dist/include: am_utils.h

Log Message:
use syslog attribute


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/am-utils/dist/include/am_utils.h

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



CVS commit: src/lib/libwrap

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:54:21 UTC 2015

Modified Files:
src/lib/libwrap: diag.c tcpd.h

Log Message:
these are syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libwrap/diag.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libwrap/tcpd.h

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



CVS commit: src/libexec/identd

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:53:50 UTC 2015

Modified Files:
src/libexec/identd: identd.h

Log Message:
this is syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/libexec/identd/identd.h

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

Modified files:

Index: src/libexec/identd/identd.h
diff -u src/libexec/identd/identd.h:1.9 src/libexec/identd/identd.h:1.10
--- src/libexec/identd/identd.h:1.9	Wed Mar 14 22:02:21 2012
+++ src/libexec/identd/identd.h	Wed Oct 14 11:53:50 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: identd.h,v 1.9 2012/03/15 02:02:21 joerg Exp $ */
+/* $NetBSD: identd.h,v 1.10 2015/10/14 15:53:50 christos Exp $ */
 
 /*
  * identd.h - TCP/IP Ident protocol server.
@@ -14,7 +14,7 @@
 #define satosin6(sa)	((struct sockaddr_in6 *)(sa))
 #define in_hosteq(s,t)	((s).s_addr == (t).s_addr)
 
-void maybe_syslog(int, const char *, ...) __printflike(2, 3);
+void maybe_syslog(int, const char *, ...) __sysloglike(2, 3);
 
 #ifdef WITH_PF
 int pf_natlookup(struct sockaddr_storage *, struct sockaddr *, int *);



CVS commit: src/usr.sbin/lpr/lpd

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:02:04 UTC 2015

Modified Files:
src/usr.sbin/lpr/lpd: recvjob.c

Log Message:
this is syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/lpr/lpd/recvjob.c

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

Modified files:

Index: src/usr.sbin/lpr/lpd/recvjob.c
diff -u src/usr.sbin/lpr/lpd/recvjob.c:1.23 src/usr.sbin/lpr/lpd/recvjob.c:1.24
--- src/usr.sbin/lpr/lpd/recvjob.c:1.23	Tue Aug 30 15:27:37 2011
+++ src/usr.sbin/lpr/lpd/recvjob.c	Wed Oct 14 12:02:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: recvjob.c,v 1.23 2011/08/30 19:27:37 joerg Exp $	*/
+/*	$NetBSD: recvjob.c,v 1.24 2015/10/14 16:02:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)recvjob.c	8.2 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: recvjob.c,v 1.23 2011/08/30 19:27:37 joerg Exp $");
+__RCSID("$NetBSD: recvjob.c,v 1.24 2015/10/14 16:02:03 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -74,7 +74,7 @@ static const char *sp = "";
 static char	 tfname[NAME_MAX];	/* tmp copy of cf before linking */
 
 static intchksize(int);
-static void   frecverr(const char *, ...) __dead __printflike(1, 2);
+static void   frecverr(const char *, ...) __dead __sysloglike(1, 2);
 static intnoresponse(void);
 static void   rcleanup(int);
 static intread_number(const char *);



CVS commit: src/libexec/identd

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:53:50 UTC 2015

Modified Files:
src/libexec/identd: identd.h

Log Message:
this is syslog-like


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/libexec/identd/identd.h

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



CVS commit: src/external/bsd/dhcp/dist/includes

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:58:46 UTC 2015

Modified Files:
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/includes/omapip: omapip_p.h

Log Message:
use __sysloglike where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h

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

Modified files:

Index: src/external/bsd/dhcp/dist/includes/dhcpd.h
diff -u src/external/bsd/dhcp/dist/includes/dhcpd.h:1.6 src/external/bsd/dhcp/dist/includes/dhcpd.h:1.7
--- src/external/bsd/dhcp/dist/includes/dhcpd.h:1.6	Sat Jul 12 08:09:37 2014
+++ src/external/bsd/dhcp/dist/includes/dhcpd.h	Wed Oct 14 11:58:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcpd.h,v 1.6 2014/07/12 12:09:37 spz Exp $	*/
+/*	$NetBSD: dhcpd.h,v 1.7 2015/10/14 15:58:46 christos Exp $	*/
 /* dhcpd.h
 
Definitions for dhcpd... */
@@ -2092,8 +2092,7 @@ int parse_option_token (struct expressio
 			const char **, struct expression *, int, int);
 int parse_allow_deny (struct option_cache **, struct parse *, int);
 int parse_auth_key (struct data_string *, struct parse *);
-int parse_warn (struct parse *, const char *, ...)
-	__attribute__((__format__(__printf__,2,3)));
+int parse_warn (struct parse *, const char *, ...) __sysloglike(2, 3);
 struct expression *parse_domain_list(struct parse *cfile, int);
 
 

Index: src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h
diff -u src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.1.1.4 src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.2
--- src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.1.1.4	Sat Jul 12 07:57:57 2014
+++ src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h	Wed Oct 14 11:58:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapip_p.h,v 1.1.1.4 2014/07/12 11:57:57 spz Exp $	*/
+/*	$NetBSD: omapip_p.h,v 1.2 2015/10/14 15:58:46 christos Exp $	*/
 /* omapip_p.h
 
Private master include file for the OMAPI library. */
@@ -283,14 +283,10 @@ extern int log_priority;
 extern int log_perror;
 extern void (*log_cleanup) (void);
 
-void log_fatal (const char *, ...)
-	__attribute__((__format__(__printf__,1,2))) ISC_DHCP_NORETURN;
-int log_error (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
-int log_info (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
-int log_debug (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
+void log_fatal (const char *, ...) __sysloglike(1, 2) ISC_DHCP_NORETURN;
+int log_error (const char *, ...) __sysloglike(1, 2);
+int log_info (const char *, ...) __sysloglike(1, 2);
+int log_debug (const char *, ...) __sysloglike(1, 2);
 void do_percentm (char *obuf, const char *ibuf);
 
 isc_result_t uerr2isc (int);



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:20:44 UTC 2015

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

Log Message:
fix conditionals for libproc and librtld_db lint libraries


To generate a diff of this commit:
cvs rdiff -u -r1.1997 -r1.1998 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.1997 src/distrib/sets/lists/comp/mi:1.1998
--- src/distrib/sets/lists/comp/mi:1.1997	Tue Oct 13 17:28:34 2015
+++ src/distrib/sets/lists/comp/mi	Wed Oct 14 11:20:44 2015
@@ -1,8 +1,6 @@
-#	$NetBSD: mi,v 1.1997 2015/10/13 21:28:34 rjs Exp $
+#	$NetBSD: mi,v 1.1998 2015/10/14 15:20:44 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
-#
-#./usr/libdata/lint/llib-ldtrace.ln		comp-c-lintlib		lint,dtrace
 ./etc/mtree/set.compcomp-sys-root
 ./usr/bin/addr2linecomp-debug-bin		binutils
 ./usr/bin/ar	comp-util-bin		binutils
@@ -3676,7 +3674,7 @@
 ./usr/libdata/lint/llib-lperfuse.ln		comp-perfuse-lintlib	lint
 ./usr/libdata/lint/llib-lposix.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lppath.ln		comp-c-lintlib		lint
-./usr/libdata/lint/llib-lproc.ln		comp-c-lintlib		lint
+./usr/libdata/lint/llib-lproc.ln		comp-c-lintlib		lint,dtrace
 ./usr/libdata/lint/llib-lprop.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lpthread.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lpthread_dbg.ln		comp-c-lintlib		lint
@@ -3689,7 +3687,7 @@
 ./usr/libdata/lint/llib-lroken.ln		comp-krb5-lintlib	lint,kerberos
 ./usr/libdata/lint/llib-lrpcsvc.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lrt.ln			comp-c-lintlib		lint
-./usr/libdata/lint/llib-lrtld_db.ln		comp-c-lintlib		lint
+./usr/libdata/lint/llib-lrtld_db.ln		comp-c-lintlib		lint,dtrace
 ./usr/libdata/lint/llib-lrumpclient.ln		comp-c-lintlib		lint,rump
 ./usr/libdata/lint/llib-lrumphijack.ln		comp-c-lintlib		lint,rump
 ./usr/libdata/lint/llib-lrumpuser.ln		comp-c-lintlib		lint,rump



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:20:44 UTC 2015

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

Log Message:
fix conditionals for libproc and librtld_db lint libraries


To generate a diff of this commit:
cvs rdiff -u -r1.1997 -r1.1998 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.



CVS commit: src/external/gpl3

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:05:15 UTC 2015

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/c-family: c-format.c c-format.h
src/external/gpl3/gcc.old/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/dist/gcc/c-family: c-format.c c-format.h
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
Introduce a syslog format that accepts %m. Stop accepting %m in printf
like formats. Support for this is detected via the __syslog_attribute__
macro.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c \
src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/c-family/c-format.c \
src/external/gpl3/gcc/dist/gcc/c-family/c-format.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

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

Modified files:

Index: src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c
diff -u src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c:1.1.1.1 src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c:1.2
--- src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c:1.1.1.1	Tue Sep 22 23:03:26 2015
+++ src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.c	Wed Oct 14 12:05:14 2015
@@ -860,14 +860,20 @@ static const format_kind_info format_typ
   },
   { "gnu_strftime", NULL, time_char_table,  "_-0^#", "EO",
 strftime_flag_specs, strftime_flag_pairs,
-FMT_FLAG_FANCY_PERCENT_OK, 'w', 0, 0, 0, 0, 0,
+FMT_FLAG_FANCY_PERCENT_OK|FMT_FLAG_M_OK, 'w', 0, 0, 0, 0, 0,
 NULL, NULL
   },
   { "gnu_strfmon",  strfmon_length_specs, monetary_char_table, "=^+(!-", NULL,
 strfmon_flag_specs, strfmon_flag_pairs,
 FMT_FLAG_ARG_CONVERT, 'w', '#', 'p', 0, 'L', 0,
 NULL, NULL
-  }
+  },
+  { "gnu_syslog",   printf_length_specs,  print_char_table, " +#0-'I", NULL,
+printf_flag_specs, printf_flag_pairs,
+FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK|FMT_FLAG_M_OK,
+'w', 0, 'p', 0, 'L', 0,
+_type_node, _type_node
+  },
 };
 
 /* This layer of indirection allows GCC to reassign format_types with
@@ -1983,6 +1989,14 @@ check_format_info_main (format_check_res
 	  warning (OPT_Wformat_, "conversion lacks type at end of format");
 	  continue;
 	}
+
+  if (format_char == 'm' && !(fki->flags & FMT_FLAG_M_OK))
+{
+	  warning (OPT_Wformat_,
+	  "%%m is only allowed in syslog(3) like functions");
+	  continue;
+	}
+	
   format_chars++;
   fci = fki->conversion_specs;
   while (fci->format_chars != 0
@@ -2854,6 +2868,7 @@ extern const target_ovr_attr TARGET_OVER
 static const target_ovr_attr gnu_target_overrides_format_attributes[] =
 {
   { "gnu_printf",   "printf" },
+  { "gnu_syslog",   "syslog" },
   { "gnu_scanf","scanf" },
   { "gnu_strftime", "strftime" },
   { "gnu_strfmon",  "strfmon" },
Index: src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h
diff -u src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h:1.1.1.1 src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h:1.2
--- src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h:1.1.1.1	Tue Sep 22 23:03:26 2015
+++ src/external/gpl3/gcc.old/dist/gcc/c-family/c-format.h	Wed Oct 14 12:05:14 2015
@@ -75,11 +75,13 @@ enum
   FMT_FLAG_DOLLAR_GAP_POINTER_OK = 128,
   /* The format arg is an opaque object that will be parsed by an external
  facility.  */
-  FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256
+  FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256,
   /* Not included here: details of whether width or precision may occur
  (controlled by width_char and precision_char); details of whether
  '*' can be used for these (width_type and precision_type); details
  of whether length modifiers can occur (length_char_specs).  */
+  FMT_FLAG_M_OK = 512
+  /* %m is only allowed in syslog */
 };
 
 /* Structure describing a length modifier supported in format checking, and

Index: src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.3 src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.4
--- src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h:1.3	Tue Sep 22 23:39:12 2015
+++ src/external/gpl3/gcc.old/dist/gcc/config/netbsd.h	Wed Oct 14 12:05:15 2015
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.  
 {		\
   builtin_define ("__NetBSD__");		\
   builtin_define ("__unix__");		\
+  builtin_define ("__syslog_attribute__");	\
   builtin_assert ("system=bsd");		\
   builtin_assert ("system=unix");		\
   builtin_assert ("system=NetBSD");		\

Index: src/external/gpl3/gcc/dist/gcc/c-family/c-format.c
diff -u 

CVS commit: src/external/bsd/blacklist/bin

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:01:29 UTC 2015

Modified Files:
src/external/bsd/blacklist/bin: internal.h

Log Message:
syslog attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/blacklist/bin/internal.h

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

Modified files:

Index: src/external/bsd/blacklist/bin/internal.h
diff -u src/external/bsd/blacklist/bin/internal.h:1.12 src/external/bsd/blacklist/bin/internal.h:1.13
--- src/external/bsd/blacklist/bin/internal.h:1.12	Tue Jan 27 14:40:37 2015
+++ src/external/bsd/blacklist/bin/internal.h	Wed Oct 14 12:01:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: internal.h,v 1.12 2015/01/27 19:40:37 christos Exp $	*/
+/*	$NetBSD: internal.h,v 1.13 2015/10/14 16:01:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -47,7 +47,11 @@ extern const char *rulename;
 extern const char *controlprog;
 extern struct ifaddrs *ifas;
 
+#if !defined(__syslog_attribute__) && !defined(__syslog__)
+#define __syslog__ __printf__
+#endif
+
 void (*lfun)(int, const char *, ...)
-__attribute__((__format__(__printf__, 2, 3)));
+__attribute__((__format__(__syslog__, 2, 3)));
 
 #endif /* _INTERNAL_H */



CVS commit: src/external/bsd/blacklist/bin

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:01:29 UTC 2015

Modified Files:
src/external/bsd/blacklist/bin: internal.h

Log Message:
syslog attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/blacklist/bin/internal.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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:52:41 UTC 2015

Modified Files:
src/sys/sys: cdefs.h syslog.h

Log Message:
introduce a __syslog__ format, and __sysloglike() macros. If __syslog__
is not available, this fails back to __printf__


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/sys/cdefs.h
cvs rdiff -u -r1.36 -r1.37 src/sys/sys/syslog.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/cdefs.h
diff -u src/sys/sys/cdefs.h:1.126 src/sys/sys/cdefs.h:1.127
--- src/sys/sys/cdefs.h:1.126	Sun Aug 30 04:46:44 2015
+++ src/sys/sys/cdefs.h	Wed Oct 14 11:52:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.126 2015/08/30 08:46:44 mlelstv Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.127 2015/10/14 15:52:40 christos Exp $	*/
 
 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -478,12 +478,18 @@
 #if __GNUC_PREREQ__(2, 7)
 #define __printflike(fmtarg, firstvararg)	\
 	__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
+#ifndef __syslog_attribute__
+#define __syslog__ __printf__
+#endif
+#define __sysloglike(fmtarg, firstvararg)	\
+	__attribute__((__format__ (__syslog__, fmtarg, firstvararg)))
 #define __scanflike(fmtarg, firstvararg)	\
 	__attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
 #define __format_arg(fmtarg)__attribute__((__format_arg__ (fmtarg)))
 #else
 #define __printflike(fmtarg, firstvararg)	/* nothing */
 #define __scanflike(fmtarg, firstvararg)	/* nothing */
+#define __sysloglike(fmtarg, firstvararg)	/* nothing */
 #define __format_arg(fmtarg)			/* nothing */
 #endif
 

Index: src/sys/sys/syslog.h
diff -u src/sys/sys/syslog.h:1.36 src/sys/sys/syslog.h:1.37
--- src/sys/sys/syslog.h:1.36	Sun Jul 20 16:55:17 2014
+++ src/sys/sys/syslog.h	Wed Oct 14 11:52:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslog.h,v 1.36 2014/07/20 20:55:17 dholland Exp $	*/
+/*	$NetBSD: syslog.h,v 1.37 2015/10/14 15:52:40 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -201,27 +201,27 @@ __BEGIN_DECLS
 void	closelog(void);
 void	openlog(const char *, int, int);
 int	setlogmask(int);
-void	syslog(int, const char *, ...) __printflike(2, 3);
+void	syslog(int, const char *, ...) __sysloglike(2, 3);
 #if defined(_NETBSD_SOURCE)
-void	vsyslog(int, const char *, __va_list) __printflike(2, 0);
+void	vsyslog(int, const char *, __va_list) __sysloglike(2, 0);
 #ifndef __LIBC12_SOURCE__
 void	closelog_r(struct syslog_data *) __RENAME(__closelog_r60);
 void	openlog_r(const char *, int, int, struct syslog_data *)
 __RENAME(__openlog_r60);
 int	setlogmask_r(int, struct syslog_data *) __RENAME(__setlogmask_r60);
 void	syslog_r(int, struct syslog_data *, const char *, ...)
-__RENAME(__syslog_r60) __printflike(3, 4);
+__RENAME(__syslog_r60) __sysloglike(3, 4);
 void	vsyslog_r(int, struct syslog_data *, const char *, __va_list)
-__RENAME(__vsyslog_r60) __printflike(3, 0);
+__RENAME(__vsyslog_r60) __sysloglike(3, 0);
 void	syslogp_r(int, struct syslog_data *, const char *, const char *,
-const char *, ...) __RENAME(__syslogp_r60) __printflike(5, 6);
+const char *, ...) __RENAME(__syslogp_r60) __sysloglike(5, 6);
 void	vsyslogp_r(int, struct syslog_data *, const char *, const char *,
-const char *, __va_list) __RENAME(__vsyslogp_r60) __printflike(5, 0);
+const char *, __va_list) __RENAME(__vsyslogp_r60) __sysloglike(5, 0);
 #endif
 void	syslogp(int, const char *, const char *, const char *, ...)
-__printflike(4, 5);
+__sysloglike(4, 5);
 void	vsyslogp(int, const char *, const char *, const char *, __va_list)
-__printflike(4, 0);
+__sysloglike(4, 0);
 #endif
 __END_DECLS
 



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:58:09 UTC 2015

Modified Files:
src/external/bsd/dhcpcd/dist: common.h

Log Message:
We really mean __sysloglike here...


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/common.h

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/common.h
diff -u src/external/bsd/dhcpcd/dist/common.h:1.10 src/external/bsd/dhcpcd/dist/common.h:1.11
--- src/external/bsd/dhcpcd/dist/common.h:1.10	Thu Jul  9 06:15:34 2015
+++ src/external/bsd/dhcpcd/dist/common.h	Wed Oct 14 11:58:08 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.10 2015/07/09 10:15:34 roy Exp $ */
+/* $NetBSD: common.h,v 1.11 2015/10/14 15:58:08 christos Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -121,8 +121,11 @@
 # ifndef __packed
 #  define __packed   __attribute__((__packed__))
 # endif
-# ifndef __printflike
-#  define __printflike(a, b) __attribute__((format(printf, a, b)))
+# ifndef __syslog_attribute__
+#  define __syslog__ __printf__
+# endif
+# ifndef __sysloglike
+#  define __sysloglike(a, b) __attribute__((__format__(__syslog__, a, b)))
 # endif
 # ifndef __unused
 #  define __unused   __attribute__((__unused__))
@@ -134,8 +137,8 @@
 # ifndef __packed
 #  define __packed
 # endif
-# ifndef __printflike
-#  define __printflike
+# ifndef __sysloglike
+#  define __sysloglike
 # endif
 # ifndef __unused
 #  define __unused
@@ -174,7 +177,7 @@ int get_monotonic(struct timespec *);
 #if USE_LOGFILE
 void logger_open(struct dhcpcd_ctx *);
 #define logger_mask(ctx, lvl) setlogmask((lvl))
-__printflike(3, 4) void logger(struct dhcpcd_ctx *, int, const char *, ...);
+__sysloglike(3, 4) void logger(struct dhcpcd_ctx *, int, const char *, ...);
 void logger_close(struct dhcpcd_ctx *);
 #else
 #define logger_open(ctx) openlog(PACKAGE, LOG_PERROR | LOG_PID, LOG_DAEMON)



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:58:09 UTC 2015

Modified Files:
src/external/bsd/dhcpcd/dist: common.h

Log Message:
We really mean __sysloglike here...


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/common.h

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



CVS commit: src/external/bsd/dhcp/dist/includes

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:58:46 UTC 2015

Modified Files:
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/includes/omapip: omapip_p.h

Log Message:
use __sysloglike where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h

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



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:32:55 UTC 2015

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: d_c99_anon_struct.c

Log Message:
Add an anonymous struct test


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_anon_struct.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/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.10 src/tests/usr.bin/xlint/lint1/Makefile:1.11
--- src/tests/usr.bin/xlint/lint1/Makefile:1.10	Wed Jul 29 14:26:15 2015
+++ src/tests/usr.bin/xlint/lint1/Makefile	Wed Oct 14 12:32:55 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2015/07/29 18:26:15 christos Exp $
+# $NetBSD: Makefile,v 1.11 2015/10/14 16:32:55 christos Exp $
 
 NOMAN=		# defined
 
@@ -10,6 +10,7 @@ TESTS_SH=	t_integration
 
 FILESDIR=	${TESTSDIR}
 FILES+=		d_alignof.c
+FILES+=		d_c99_anon_struct.c
 FILES+=		d_c99_complex_num.c
 FILES+=		d_c99_complex_split.c
 FILES+=		d_c99_compound_literal_comma.c

Added files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c:1.1
--- /dev/null	Wed Oct 14 12:32:55 2015
+++ src/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c	Wed Oct 14 12:32:55 2015
@@ -0,0 +1,26 @@
+/* Anonymous struct test */
+
+typedef int type;
+
+struct point {
+	int x;
+	int y;
+};
+
+struct bar {
+	struct {
+		struct point top_left;
+		struct point bottom_right;
+	};
+	type z;
+};
+
+
+int
+main(void)
+{
+	struct bar b;
+	b.top_left.x = 1;
+	return 0;
+}
+	



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:32:55 UTC 2015

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: d_c99_anon_struct.c

Log Message:
Add an anonymous struct test


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_anon_struct.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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 18:31:52 UTC 2015

Modified Files:
src/usr.bin/xlint/lint1: err.c tree.c

Log Message:
more descriptive errors


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.81 -r1.82 src/usr.bin/xlint/lint1/tree.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/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.48 src/usr.bin/xlint/lint1/err.c:1.49
--- src/usr.bin/xlint/lint1/err.c:1.48	Wed Jul 29 14:22:06 2015
+++ src/usr.bin/xlint/lint1/err.c	Wed Oct 14 14:31:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.c,v 1.48 2015/07/29 18:22:06 christos Exp $	*/
+/*	$NetBSD: err.c,v 1.49 2015/10/14 18:31:52 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.48 2015/07/29 18:22:06 christos Exp $");
+__RCSID("$NetBSD: err.c,v 1.49 2015/10/14 18:31:52 christos Exp $");
 #endif
 
 #include 
@@ -182,7 +182,7 @@ const	char *msgs[] = {
 	"bitwise operation on signed value nonportable",	  /* 120 */
 	"negative shift",	  /* 121 */
 	"shift greater than size of object",			  /* 122 */
-	"illegal combination of pointer and integer, op %s",	  /* 123 */
+	"illegal combination of %s (%s) and %s (%s), op %s",	  /* 123 */
 	"illegal pointer combination, op %s",			  /* 124 */
 	"ANSI C forbids ordered comparisons of pointers to functions",/* 125 */
 	"incompatible types in conditional",			  /* 126 */
@@ -213,7 +213,7 @@ const	char *msgs[] = {
 	"void expressions may not be arguments, arg #%d",	  /* 151 */
 	"argument cannot have unknown size, arg #%d",		  /* 152 */
 	"argument has incompatible pointer type, arg #%d (%s != %s)", /* 153 */
-	"illegal combination of pointer and integer, arg #%d",	  /* 154 */
+	"illegal combination of %s (%s) and %s (%s), arg #%d",	  /* 154 */
 	"argument is incompatible with prototype, arg #%d",	  /* 155 */
 	"enum type mismatch, arg #%d",			   	  /* 156 */
 	"ANSI C treats constant as unsigned",			  /* 157 */
@@ -242,7 +242,7 @@ const	char *msgs[] = {
 	"bit-field initializer does not fit",			  /* 180 */
 	"{}-enclosed initializer required",			  /* 181 */
 	"incompatible pointer types (%s != %s)",		  /* 182 */
-	"illegal combination of pointer and integer",		  /* 183 */
+	"illegal combination of %s (%s) and %s (%s)",	  	  /* 183 */
 	"illegal pointer combination",  /* 184 */
 	"initialisation type mismatch",  /* 185 */
 	"bit-field initialisation is illegal in traditional C",	  /* 186 */

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.81 src/usr.bin/xlint/lint1/tree.c:1.82
--- src/usr.bin/xlint/lint1/tree.c:1.81	Fri Aug 28 05:42:07 2015
+++ src/usr.bin/xlint/lint1/tree.c	Wed Oct 14 14:31:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.81 2015/08/28 09:42:07 joerg Exp $	*/
+/*	$NetBSD: tree.c,v 1.82 2015/10/14 18:31:52 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.81 2015/08/28 09:42:07 joerg Exp $");
+__RCSID("$NetBSD: tree.c,v 1.82 2015/10/14 18:31:52 christos Exp $");
 #endif
 
 #include 
@@ -1243,19 +1243,24 @@ asgntypok(op_t op, int arg, tnode_t *ln,
 	}
 
 	if ((lt == PTR && isityp(rt)) || (isityp(lt) && rt == PTR)) {
+		const char *lx = lt == PTR ? "pointer" : "integer";
+		const char *rx = rt == PTR ? "pointer" : "integer";
+		tyname(lbuf, sizeof(lbuf), ltp);
+		tyname(rbuf, sizeof(rbuf), rtp);
+
 		switch (op) {
 		case INIT:
 		case RETURN:
 			/* illegal combination of pointer and integer */
-			warning(183);
+			warning(183, lx, lbuf, rx, rbuf);
 			break;
 		case FARG:
 			/* illegal comb. of ptr. and int., arg #%d */
-			warning(154, arg);
+			warning(154, lx, lbuf, rx, rbuf, arg);
 			break;
 		default:
 			/* illegal comb. of ptr. and int., op %s */
-			warning(123, mp->m_name);
+			warning(123, lx, lbuf, rx, rbuf, mp->m_name);
 			break;
 		}
 		return (1);



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 18:31:52 UTC 2015

Modified Files:
src/usr.bin/xlint/lint1: err.c tree.c

Log Message:
more descriptive errors


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.81 -r1.82 src/usr.bin/xlint/lint1/tree.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/pci

2015-10-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Oct 14 07:16:04 UTC 2015

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

Log Message:
- Update TODO:
  - "Multiqueue" -> "TX Multiqueue" because RX Multiqueue was added.
  - Sort entries.
- Grouping functions.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.370 src/sys/dev/pci/if_wm.c:1.371
--- src/sys/dev/pci/if_wm.c:1.370	Tue Oct 13 21:28:41 2015
+++ src/sys/dev/pci/if_wm.c	Wed Oct 14 07:16:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.370 2015/10/13 21:28:41 christos Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.371 2015/10/14 07:16:04 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -73,17 +73,17 @@
  * TODO (in order of importance):
  *
  *	- Check XXX'ed comments
- *	- EEE (Energy Efficiency Ethernet)
- *	- Multi queue
- *	- Image Unique ID
  *	- LPLU other than PCH*
+ *	- TX Multi queue
+ *	- EEE (Energy Efficiency Ethernet)
  *	- Virtual Function
  *	- Set LED correctly (based on contents in EEPROM)
  *	- Rework how parameters are loaded from the EEPROM.
+ *	- Image Unique ID
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.370 2015/10/13 21:28:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.371 2015/10/14 07:16:04 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -566,12 +566,15 @@ static void	wm_reset(struct wm_softc *);
 static int	wm_add_rxbuf(struct wm_rxqueue *, int);
 static void	wm_rxdrain(struct wm_rxqueue *);
 static void	wm_init_rss(struct wm_softc *);
+#ifdef WM_MSI_MSIX
+static void	wm_adjust_qnum(struct wm_softc *, int);
+static int	wm_setup_legacy(struct wm_softc *);
+static int	wm_setup_msix(struct wm_softc *);
+#endif
 static int	wm_init(struct ifnet *);
 static int	wm_init_locked(struct ifnet *);
 static void	wm_stop(struct ifnet *, int);
 static void	wm_stop_locked(struct ifnet *, int);
-static int	wm_tx_offload(struct wm_softc *, struct wm_txsoft *,
-uint32_t *, uint8_t *);
 static void	wm_dump_mbuf_chain(struct wm_softc *, struct mbuf *);
 static void	wm_82547_txfifo_stall(void *);
 static int	wm_82547_txfifo_bugchk(struct wm_softc *, struct mbuf *);
@@ -595,6 +598,8 @@ static int	wm_alloc_txrx_queues(struct w
 static void	wm_free_txrx_queues(struct wm_softc *);
 static int	wm_init_txrx_queues(struct wm_softc *);
 /* Start */
+static int	wm_tx_offload(struct wm_softc *, struct wm_txsoft *,
+uint32_t *, uint8_t *);
 static void	wm_start(struct ifnet *);
 static void	wm_start_locked(struct ifnet *);
 static int	wm_nq_tx_offload(struct wm_softc *, struct wm_txsoft *,
@@ -610,9 +615,6 @@ static void	wm_linkintr_serdes(struct wm
 static void	wm_linkintr(struct wm_softc *, uint32_t);
 static int	wm_intr_legacy(void *);
 #ifdef WM_MSI_MSIX
-static void	wm_adjust_qnum(struct wm_softc *, int);
-static int	wm_setup_legacy(struct wm_softc *);
-static int	wm_setup_msix(struct wm_softc *);
 static int	wm_txintr_msix(void *);
 static int	wm_rxintr_msix(void *);
 static int	wm_linkintr_msix(void *);
@@ -5052,202 +5054,6 @@ wm_stop_locked(struct ifnet *ifp, int di
 #endif
 }
 
-/*
- * wm_tx_offload:
- *
- *	Set up TCP/IP checksumming parameters for the
- *	specified packet.
- */
-static int
-wm_tx_offload(struct wm_softc *sc, struct wm_txsoft *txs, uint32_t *cmdp,
-uint8_t *fieldsp)
-{
-	struct wm_txqueue *txq = >sc_txq[0];
-	struct mbuf *m0 = txs->txs_mbuf;
-	struct livengood_tcpip_ctxdesc *t;
-	uint32_t ipcs, tucs, cmd, cmdlen, seg;
-	uint32_t ipcse;
-	struct ether_header *eh;
-	int offset, iphl;
-	uint8_t fields;
-
-	/*
-	 * XXX It would be nice if the mbuf pkthdr had offset
-	 * fields for the protocol headers.
-	 */
-
-	eh = mtod(m0, struct ether_header *);
-	switch (htons(eh->ether_type)) {
-	case ETHERTYPE_IP:
-	case ETHERTYPE_IPV6:
-		offset = ETHER_HDR_LEN;
-		break;
-
-	case ETHERTYPE_VLAN:
-		offset = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
-		break;
-
-	default:
-		/*
-		 * Don't support this protocol or encapsulation.
-		 */
-		*fieldsp = 0;
-		*cmdp = 0;
-		return 0;
-	}
-
-	if ((m0->m_pkthdr.csum_flags &
-	(M_CSUM_TSOv4|M_CSUM_UDPv4|M_CSUM_TCPv4)) != 0) {
-		iphl = M_CSUM_DATA_IPv4_IPHL(m0->m_pkthdr.csum_data);
-	} else {
-		iphl = M_CSUM_DATA_IPv6_HL(m0->m_pkthdr.csum_data);
-	}
-	ipcse = offset + iphl - 1;
-
-	cmd = WTX_CMD_DEXT | WTX_DTYP_D;
-	cmdlen = WTX_CMD_DEXT | WTX_DTYP_C | WTX_CMD_IDE;
-	seg = 0;
-	fields = 0;
-
-	if ((m0->m_pkthdr.csum_flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) != 0) {
-		int hlen = offset + iphl;
-		bool v4 = (m0->m_pkthdr.csum_flags & M_CSUM_TSOv4) != 0;
-
-		if (__predict_false(m0->m_len <
-(hlen + sizeof(struct tcphdr {
-			/*
-			 * TCP/IP headers are not in the first mbuf; we need
-			 * to do this the slow and painful way.  Let's just
-			 * hope 

CVS commit: src/sys/dev/pci

2015-10-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Oct 14 07:16:04 UTC 2015

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

Log Message:
- Update TODO:
  - "Multiqueue" -> "TX Multiqueue" because RX Multiqueue was added.
  - Sort entries.
- Grouping functions.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/sys/dev/pci/if_wm.c

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



CVS commit: src/share/man/man4

2015-10-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct 14 08:32:24 UTC 2015

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

Log Message:
Improve wording; add missing comma.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/valz.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/valz.4
diff -u src/share/man/man4/valz.4:1.1 src/share/man/man4/valz.4:1.2
--- src/share/man/man4/valz.4:1.1	Wed Oct 14 04:22:45 2015
+++ src/share/man/man4/valz.4	Wed Oct 14 08:32:24 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: valz.4,v 1.1 2015/10/14 04:22:45 nonaka Exp $
+.\" $NetBSD: valz.4,v 1.2 2015/10/14 08:32:24 wiz Exp $
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -33,8 +33,8 @@
 .Sh SYNOPSIS
 .Cd "valz* at acpi?"
 .Sh DESCRIPTION
-Toshiba Dynabook series computers provide HCI/SCI I/O controller
-that handles various interface devices.
+Toshiba Dynabook series computers provide HCI/SCI I/O controllers
+that handle various interface devices.
 This special I/O controller is accessed by the
 .Dq GHCI
 ACPI method.
@@ -55,10 +55,10 @@ Toggle LCD backlight.
 .Pp
 The
 .Nm
-driver has only been tested on Dynabook R63/PS and some 2013 year or later
-Dynabook models.
+driver has only been tested on the Dynabook R63/PS and some Dynabook
+models from 2013 or later.
 .Sh SEE ALSO
-.Xr acpi 4
+.Xr acpi 4 ,
 .Xr vald 4
 .Sh HISTORY
 The
@@ -66,4 +66,4 @@ The
 driver appeared in
 .Nx 8.0 .
 .Sh BUGS
-Not all HCI/SCI function is not implemented.
+Not all HCI/SCI functions are implemented.



CVS commit: src/share/man/man4

2015-10-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct 14 08:32:24 UTC 2015

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

Log Message:
Improve wording; add missing comma.


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

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



CVS commit: src/sys/net

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 19:40:09 UTC 2015

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

Log Message:
PR/49386: Ryota Ozaki: Add a mutex for bpf creation/removal to avoid races.
Add M_CANFAIL to malloc.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/net/bpf.c

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

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.191 src/sys/net/bpf.c:1.192
--- src/sys/net/bpf.c:1.191	Sat May 30 15:14:46 2015
+++ src/sys/net/bpf.c	Wed Oct 14 15:40:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.191 2015/05/30 19:14:46 joerg Exp $	*/
+/*	$NetBSD: bpf.c,v 1.192 2015/10/14 19:40:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.191 2015/05/30 19:14:46 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.192 2015/10/14 19:40:09 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -340,6 +340,7 @@ bad:
 static void
 bpf_attachd(struct bpf_d *d, struct bpf_if *bp)
 {
+	KASSERT(mutex_owned(_mtx));
 	/*
 	 * Point d at bp, and add d to the interface's list of listeners.
 	 * Finally, point the driver's bpf cookie at the interface so
@@ -361,6 +362,8 @@ bpf_detachd(struct bpf_d *d)
 	struct bpf_d **p;
 	struct bpf_if *bp;
 
+	KASSERT(mutex_owned(_mtx));
+
 	bp = d->bd_bif;
 	/*
 	 * Check if this descriptor had requested promiscuous mode.
@@ -476,6 +479,7 @@ bpf_close(struct file *fp)
 	int s;
 
 	KERNEL_LOCK(1, NULL);
+	mutex_enter(_mtx);
 
 	/*
 	 * Refresh the PID associated with this bpf file.
@@ -490,15 +494,14 @@ bpf_close(struct file *fp)
 		bpf_detachd(d);
 	splx(s);
 	bpf_freed(d);
-	mutex_enter(_mtx);
 	LIST_REMOVE(d, bd_list);
-	mutex_exit(_mtx);
 	callout_destroy(>bd_callout);
 	seldestroy(>bd_sel);
 	softint_disestablish(d->bd_sih);
 	free(d, M_DEVBUF);
 	fp->f_bpf = NULL;
 
+	mutex_exit(_mtx);
 	KERNEL_UNLOCK_ONE(NULL);
 
 	return (0);
@@ -900,10 +903,12 @@ bpf_ioctl(struct file *fp, u_long cmd, v
 	 * Set device parameters.
 	 */
 	case BIOCSDLT:
+		mutex_enter(_mtx);
 		if (d->bd_bif == NULL)
 			error = EINVAL;
 		else
 			error = bpf_setdlt(d, *(u_int *)addr);
+		mutex_exit(_mtx);
 		break;
 
 	/*
@@ -926,7 +931,9 @@ bpf_ioctl(struct file *fp, u_long cmd, v
 	case OBIOCSETIF:
 #endif
 	case BIOCSETIF:
+		mutex_enter(_mtx);
 		error = bpf_setif(d, addr);
+		mutex_exit(_mtx);
 		break;
 
 	/*
@@ -1152,6 +1159,7 @@ bpf_setif(struct bpf_d *d, struct ifreq 
 	char *cp;
 	int unit_seen, i, s, error;
 
+	KASSERT(mutex_owned(_mtx));
 	/*
 	 * Make sure the provided name has a unit number, and default
 	 * it to '0' if not specified.
@@ -1717,10 +1725,10 @@ static int
 bpf_allocbufs(struct bpf_d *d)
 {
 
-	d->bd_fbuf = malloc(d->bd_bufsize, M_DEVBUF, M_WAITOK | M_CANFAIL);
+	d->bd_fbuf = malloc(d->bd_bufsize, M_DEVBUF, M_NOWAIT);
 	if (!d->bd_fbuf)
 		return (ENOBUFS);
-	d->bd_sbuf = malloc(d->bd_bufsize, M_DEVBUF, M_WAITOK | M_CANFAIL);
+	d->bd_sbuf = malloc(d->bd_bufsize, M_DEVBUF, M_NOWAIT);
 	if (!d->bd_sbuf) {
 		free(d->bd_fbuf, M_DEVBUF);
 		return (ENOBUFS);
@@ -1770,6 +1778,7 @@ _bpfattach(struct ifnet *ifp, u_int dlt,
 	if (bp == NULL)
 		panic("bpfattach");
 
+	mutex_enter(_mtx);
 	bp->bif_dlist = NULL;
 	bp->bif_driverp = driverp;
 	bp->bif_ifp = ifp;
@@ -1781,6 +1790,7 @@ _bpfattach(struct ifnet *ifp, u_int dlt,
 	*bp->bif_driverp = NULL;
 
 	bp->bif_hdrlen = hdrlen;
+	mutex_exit(_mtx);
 #if 0
 	printf("bpf: %s attached\n", ifp->if_xname);
 #endif
@@ -1796,6 +1806,7 @@ _bpfdetach(struct ifnet *ifp)
 	struct bpf_d *d;
 	int s;
 
+	mutex_enter(_mtx);
 	/* Nuke the vnodes for any open instances */
 	LIST_FOREACH(d, _list, bd_list) {
 		if (d->bd_bif != NULL && d->bd_bif->bif_ifp == ifp) {
@@ -1819,6 +1830,7 @@ _bpfdetach(struct ifnet *ifp)
 			goto again;
 		}
 	}
+	mutex_exit(_mtx);
 }
 
 /*
@@ -1879,6 +1891,8 @@ bpf_setdlt(struct bpf_d *d, u_int dlt)
 	struct ifnet *ifp;
 	struct bpf_if *bp;
 
+	KASSERT(mutex_owned(_mtx));
+
 	if (d->bd_bif->bif_dlt == dlt)
 		return 0;
 	ifp = d->bd_bif->bif_ifp;



CVS commit: src/sys/net

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 19:40:09 UTC 2015

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

Log Message:
PR/49386: Ryota Ozaki: Add a mutex for bpf creation/removal to avoid races.
Add M_CANFAIL to malloc.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/net/bpf.c

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



CVS commit: src/sys/netinet

2015-10-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Oct 14 11:22:55 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
In the event of an error within arpresolve(), delete the cloned route
otherwise it would never be deleted.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/netinet/if_arp.c

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

Modified files:

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.188 src/sys/netinet/if_arp.c:1.189
--- src/sys/netinet/if_arp.c:1.188	Wed Oct 14 11:17:57 2015
+++ src/sys/netinet/if_arp.c	Wed Oct 14 11:22:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.189 2015/10/14 11:22:55 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.189 2015/10/14 11:22:55 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -840,8 +840,8 @@ notfound:
 	if (ifp->if_flags & _IFF_NOARP) {
 		if (la != NULL)
 			LLE_RUNLOCK(la);
-		m_freem(m);
-		return ENOTSUP;
+		error = ENOTSUP;
+		goto bad;
 	}
 #undef _IFF_NOARP
 	if (la == NULL) {
@@ -859,13 +859,13 @@ notfound:
 		IF_AFDATA_RUNLOCK(ifp);
 	}
 
+	error = EINVAL;
 	if (la == NULL) {
 		log(LOG_DEBUG,
 		"%s: failed to %s llentry for %s on %s\n",
 		__func__, create_lookup, inet_ntoa(satocsin(dst)->sin_addr),
 		ifp->if_xname);
-		m_freem(m);
-		return EINVAL;
+		goto bad;
 	}
 
 	/* Just in case */
@@ -875,8 +875,7 @@ notfound:
 		"%s: valid llentry has no rtentry for %s on %s\n",
 		__func__, inet_ntoa(satocsin(dst)->sin_addr),
 		ifp->if_xname);
-		m_freem(m);
-		return EINVAL;
+		goto bad;
 	}
 	rt = la->la_rt;
 
@@ -917,11 +916,11 @@ notfound:
 	}
 
 	if (la->la_flags & LLE_STATIC) {   /* should not happen! */
+		LLE_RUNLOCK(la);
 		log(LOG_DEBUG, "arpresolve: ouch, empty static llinfo for %s\n",
 		inet_ntoa(satocsin(dst)->sin_addr));
-		m_freem(m);
 		error = EINVAL;
-		goto done;
+		goto bad;
 	}
 
 	renew = (la->la_asked == 0 || la->la_expire != time_uptime);
@@ -983,9 +982,16 @@ notfound:
 		(dst)->sin_addr, enaddr);
 		return error;
 	}
-done:
+
 	LLE_RUNLOCK(la);
+	return error;
 
+bad:
+	m_freem(m);
+	if (rt != NULL && (rt->rt_flags & RTF_CLONED) != 0) {
+		rtrequest(RTM_DELETE, rt_getkey(rt),
+		rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
+	}
 	return error;
 }
 



CVS commit: src/sys/netinet

2015-10-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Oct 14 11:22:55 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
In the event of an error within arpresolve(), delete the cloned route
otherwise it would never be deleted.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/netinet/if_arp.c

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



CVS commit: src/sys/netinet

2015-10-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Oct 14 11:17:57 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Save and clear the la route while we have a write lock


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/netinet/if_arp.c

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



CVS commit: src/sys/netinet

2015-10-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Oct 14 11:17:57 UTC 2015

Modified Files:
src/sys/netinet: if_arp.c

Log Message:
Save and clear the la route while we have a write lock


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/netinet/if_arp.c

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

Modified files:

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.187 src/sys/netinet/if_arp.c:1.188
--- src/sys/netinet/if_arp.c:1.187	Tue Oct 13 12:33:07 2015
+++ src/sys/netinet/if_arp.c	Wed Oct 14 11:17:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.187 2015/10/13 12:33:07 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.187 2015/10/13 12:33:07 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -315,6 +315,7 @@ arptimer(void *arg)
 {
 	struct llentry *lle = arg;
 	struct ifnet *ifp;
+	struct rtentry *rt;
 
 	mutex_enter(softnet_lock);
 
@@ -345,16 +346,17 @@ arptimer(void *arg)
 		goto out;
 	}
 	ifp = lle->lle_tbl->llt_ifp;
+	rt = lle->la_rt;
+	lle->la_rt = NULL;
 
 	callout_stop(>la_timer);
 
 	/* XXX: LOR avoidance. We still have ref on lle. */
 	LLE_WUNLOCK(lle);
 
-	if (lle->la_rt != NULL) {
+	if (rt != NULL) {
 		/* We have to call arptfree w/o IF_AFDATA_LOCK */
-		arptfree(lle->la_rt);
-		lle->la_rt = NULL;
+		arptfree(rt);
 	}
 
 	IF_AFDATA_LOCK(ifp);



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:33:42 UTC 2015

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

Log Message:
add new test


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

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.649 src/distrib/sets/lists/tests/mi:1.650
--- src/distrib/sets/lists/tests/mi:1.649	Wed Oct  7 01:24:41 2015
+++ src/distrib/sets/lists/tests/mi	Wed Oct 14 12:33:42 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.649 2015/10/07 05:24:41 ozaki-r Exp $
+# $NetBSD: mi,v 1.650 2015/10/14 16:33:42 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3751,6 +3751,7 @@
 ./usr/tests/usr.bin/xlint/lint1/Atffile		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/Kyuafile	tests-usr.bin-tests	compattestfile,atf,kyua
 ./usr/tests/usr.bin/xlint/lint1/d_alignof.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_complex_num.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_complex_split.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c	tests-usr.bin-tests	compattestfile,atf



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

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 16:33:42 UTC 2015

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

Log Message:
add new test


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

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



CVS commit: src/sys/dev/pci

2015-10-14 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Oct 15 02:40:38 UTC 2015

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

Log Message:
Name the interrupt handler for intrctl


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/virtio.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/pci

2015-10-14 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Oct 15 02:40:38 UTC 2015

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

Log Message:
Name the interrupt handler for intrctl


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/virtio.c

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

Modified files:

Index: src/sys/dev/pci/virtio.c
diff -u src/sys/dev/pci/virtio.c:1.9 src/sys/dev/pci/virtio.c:1.10
--- src/sys/dev/pci/virtio.c:1.9	Tue May  5 10:58:35 2015
+++ src/sys/dev/pci/virtio.c	Thu Oct 15 02:40:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtio.c,v 1.9 2015/05/05 10:58:35 ozaki-r Exp $	*/
+/*	$NetBSD: virtio.c,v 1.10 2015/10/15 02:40:38 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.9 2015/05/05 10:58:35 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.10 2015/10/15 02:40:38 ozaki-r Exp $");
 
 #include 
 #include 
@@ -177,7 +177,8 @@ virtio_attach(device_t parent, device_t 
 	if (sc->sc_flags & VIRTIO_F_PCI_INTR_MPSAFE)
 		pci_intr_setattr(pc, , PCI_INTR_MPSAFE, true);
 
-	sc->sc_ih = pci_intr_establish(pc, ih, sc->sc_ipl, virtio_intr, sc);
+	sc->sc_ih = pci_intr_establish_xname(pc, ih, sc->sc_ipl, virtio_intr, sc,
+	device_xname(sc->sc_dev));
 
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt");