CVS commit: src/usr.bin/telnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Dec 14 06:28:49 UTC 2018

Modified Files:
src/usr.bin/telnet: sys_bsd.c

Log Message:
Remove unneeded casts


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/telnet/sys_bsd.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/telnet/sys_bsd.c
diff -u src/usr.bin/telnet/sys_bsd.c:1.39 src/usr.bin/telnet/sys_bsd.c:1.40
--- src/usr.bin/telnet/sys_bsd.c:1.39	Fri Dec 14 06:27:40 2018
+++ src/usr.bin/telnet/sys_bsd.c	Fri Dec 14 06:28:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_bsd.c,v 1.39 2018/12/14 06:27:40 maya Exp $	*/
+/*	$NetBSD: sys_bsd.c,v 1.40 2018/12/14 06:28:49 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 from: static char sccsid[] = "@(#)sys_bsd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: sys_bsd.c,v 1.39 2018/12/14 06:27:40 maya Exp $");
+__RCSID("$NetBSD: sys_bsd.c,v 1.40 2018/12/14 06:28:49 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -416,8 +416,8 @@ TerminalNewMode(int f)
 if (tcsetattr(tin, TCSADRAIN, _tc) < 0)
 	tcsetattr(tin, TCSANOW, _tc);
 
-ioctl(tin, FIONBIO, (char *));
-ioctl(tout, FIONBIO, (char *));
+ioctl(tin, FIONBIO, );
+ioctl(tout, FIONBIO, );
 
 }
 



CVS commit: src/usr.bin/telnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Dec 14 06:27:40 UTC 2018

Modified Files:
src/usr.bin/telnet: sys_bsd.c

Log Message:
Remove some effectively if 0'd code.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/telnet/sys_bsd.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/telnet/sys_bsd.c
diff -u src/usr.bin/telnet/sys_bsd.c:1.38 src/usr.bin/telnet/sys_bsd.c:1.39
--- src/usr.bin/telnet/sys_bsd.c:1.38	Fri Dec 14 06:17:30 2018
+++ src/usr.bin/telnet/sys_bsd.c	Fri Dec 14 06:27:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_bsd.c,v 1.38 2018/12/14 06:17:30 maya Exp $	*/
+/*	$NetBSD: sys_bsd.c,v 1.39 2018/12/14 06:27:40 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 from: static char sccsid[] = "@(#)sys_bsd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: sys_bsd.c,v 1.38 2018/12/14 06:17:30 maya Exp $");
+__RCSID("$NetBSD: sys_bsd.c,v 1.39 2018/12/14 06:27:40 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -76,32 +76,6 @@ int
 struct	termios old_tc = { .c_iflag = 0 };
 extern struct termios new_tc;
 
-# ifndef	TCSANOW
-#  ifdef TCSETS
-#   define	TCSANOW		TCSETS
-#   define	TCSADRAIN	TCSETSW
-#   define	tcgetattr(f, t) ioctl(f, TCGETS, (char *)t)
-#  else
-#   ifdef TCSETA
-#define	TCSANOW		TCSETA
-#define	TCSADRAIN	TCSETAW
-#define	tcgetattr(f, t) ioctl(f, TCGETA, (char *)t)
-#   else
-#define	TCSANOW		TIOCSETA
-#define	TCSADRAIN	TIOCSETAW
-#define	tcgetattr(f, t) ioctl(f, TIOCGETA, (char *)t)
-#   endif
-#  endif
-#  define	tcsetattr(f, a, t) ioctl(f, a, (char *)t)
-#  define	cfgetospeed(ptr)	((ptr)->c_cflag)
-#  ifdef CIBAUD
-#   define	cfgetispeed(ptr)	(((ptr)->c_cflag) >> IBSHIFT)
-#  else
-#   define	cfgetispeed(ptr)	cfgetospeed(ptr)
-#  endif
-# endif /* TCSANOW */
-
-
 void
 init_sys(void)
 {



CVS commit: src/sys/dev/pci

2018-12-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec 14 06:28:09 UTC 2018

Modified Files:
src/sys/dev/pci: if_wmvar.h

Log Message:
 Print CLSEM workaround bit correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_wmvar.h

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

Modified files:

Index: src/sys/dev/pci/if_wmvar.h
diff -u src/sys/dev/pci/if_wmvar.h:1.39 src/sys/dev/pci/if_wmvar.h:1.40
--- src/sys/dev/pci/if_wmvar.h:1.39	Wed Aug  8 03:15:18 2018
+++ src/sys/dev/pci/if_wmvar.h	Fri Dec 14 06:28:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmvar.h,v 1.39 2018/08/08 03:15:18 msaitoh Exp $	*/
+/*	$NetBSD: if_wmvar.h,v 1.40 2018/12/14 06:28:09 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -105,7 +105,7 @@
 	"\15" "PCIX"	"\16" "CSA"	"\17" "PCIE"	"\20" "SGMII"	\
 	"\21" "NEWQUEUE" "\22" "ASF_FIRM" "\23" "ARC_SUBSYS" "\24" "AMT" \
 	"\25" "MANAGE"	"\26" "WOL"	"\27" "EEE"	"\30" "ATTACHED" \
-	"\31" "MDIC_WA"	"\32" "PCS_DIS_AUTONEGO" "\33" "PLLWA" "\40" "CLSEMWA"
+	"\31" "MDIC_WA"	"\32" "PCS_DIS_AUTONEGO" "\33" "PLLWA" "\34" "CLSEMWA"
 
 /*
  * Variations of Intel gigabit Ethernet controller:



CVS commit: src/usr.bin/telnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Dec 14 06:17:31 UTC 2018

Modified Files:
src/usr.bin/telnet: externs.h sys_bsd.c

Log Message:
Inline the only use of NetNonblockingIO.
While here inline SetSockOpt. From openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/telnet/externs.h
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/telnet/sys_bsd.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/telnet/externs.h
diff -u src/usr.bin/telnet/externs.h:1.42 src/usr.bin/telnet/externs.h:1.43
--- src/usr.bin/telnet/externs.h:1.42	Fri Dec 14 06:08:18 2018
+++ src/usr.bin/telnet/externs.h	Fri Dec 14 06:17:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: externs.h,v 1.42 2018/12/14 06:08:18 maya Exp $	*/
+/*	$NetBSD: externs.h,v 1.43 2018/12/14 06:17:30 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -250,7 +250,6 @@ void TerminalNewMode(int);
 void TerminalSpeeds(long *, long *);
 int TerminalWindowSize(long *, long *);
 int NetClose(int);
-void NetNonblockingIO(int, int);
 void NetSigIO(int, int);
 void NetSetPgrp(int);
 void sys_telnet_init(void);

Index: src/usr.bin/telnet/sys_bsd.c
diff -u src/usr.bin/telnet/sys_bsd.c:1.37 src/usr.bin/telnet/sys_bsd.c:1.38
--- src/usr.bin/telnet/sys_bsd.c:1.37	Thu Dec 13 09:20:05 2018
+++ src/usr.bin/telnet/sys_bsd.c	Fri Dec 14 06:17:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_bsd.c,v 1.37 2018/12/13 09:20:05 maya Exp $	*/
+/*	$NetBSD: sys_bsd.c,v 1.38 2018/12/14 06:17:30 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 from: static char sccsid[] = "@(#)sys_bsd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: sys_bsd.c,v 1.37 2018/12/13 09:20:05 maya Exp $");
+__RCSID("$NetBSD: sys_bsd.c,v 1.38 2018/12/14 06:17:30 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -481,14 +481,6 @@ NetClose(int fd)
 return close(fd);
 }
 
-
-void
-NetNonblockingIO(int fd, int onoff)
-{
-ioctl(fd, FIONBIO, (char *));
-}
-
-
 /*
  * Various signal handling routines.
  */
@@ -553,6 +545,8 @@ ayt(int sig)
 void
 sys_telnet_init(void)
 {
+int one = 1;
+
 (void) signal(SIGINT, intr);
 (void) signal(SIGQUIT, intr2);
 (void) signal(SIGPIPE, SIG_IGN);
@@ -562,11 +556,9 @@ sys_telnet_init(void)
 
 setconnmode(0);
 
-NetNonblockingIO(net, 1);
-
-
-if (SetSockOpt(net, SOL_SOCKET, SO_OOBINLINE, 1) == -1) {
-	perror("SetSockOpt");
+ioctl(net, FIONBIO, );
+if (setsockopt(net, SOL_SOCKET, SO_OOBINLINE, , sizeof(one)) == -1) {
+	perror("setsockopt");
 }
 }
 



CVS commit: src/lib/libc/stdio

2018-12-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Dec 14 03:43:22 UTC 2018

Modified Files:
src/lib/libc/stdio: setbuf.3

Log Message:
Don't leave a subordinate clause out in the cold.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdio/setbuf.3

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

Modified files:

Index: src/lib/libc/stdio/setbuf.3
diff -u src/lib/libc/stdio/setbuf.3:1.19 src/lib/libc/stdio/setbuf.3:1.20
--- src/lib/libc/stdio/setbuf.3:1.19	Tue Feb 20 17:23:39 2018
+++ src/lib/libc/stdio/setbuf.3	Fri Dec 14 03:43:22 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: setbuf.3,v 1.19 2018/02/20 17:23:39 uwe Exp $
+.\"	$NetBSD: setbuf.3,v 1.20 2018/12/14 03:43:22 uwe Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -66,10 +66,10 @@ output or input is read from any stream 
 .Va stdin ) .
 .Pp
 The default buffer settings can be overwritten per descriptor
-.Ev ( STDBUF Ns Ar n )
+.Ev ( STDBUF Ns Ar n ,
 where
 .Ar n
-is the numeric value of the file descriptor represented by the stream, or
+is the numeric value of the file descriptor represented by the stream), or
 for all descriptors
 .Ev ( STDBUF ) .
 The environment variable value is a letter followed by an optional numeric



CVS commit: src/lib/libc/stdio

2018-12-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Dec 14 03:29:54 UTC 2018

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

Log Message:
Fix typo in the function comment.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/stdio/makebuf.c

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

Modified files:

Index: src/lib/libc/stdio/makebuf.c
diff -u src/lib/libc/stdio/makebuf.c:1.18 src/lib/libc/stdio/makebuf.c:1.19
--- src/lib/libc/stdio/makebuf.c:1.18	Wed Jul 15 19:08:43 2015
+++ src/lib/libc/stdio/makebuf.c	Fri Dec 14 03:29:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: makebuf.c,v 1.18 2015/07/15 19:08:43 christos Exp $	*/
+/*	$NetBSD: makebuf.c,v 1.19 2018/12/14 03:29:54 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)makebuf.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: makebuf.c,v 1.18 2015/07/15 19:08:43 christos Exp $");
+__RCSID("$NetBSD: makebuf.c,v 1.19 2018/12/14 03:29:54 uwe Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -57,7 +57,7 @@ __RCSID("$NetBSD: makebuf.c,v 1.18 2015/
 /*
  * Override the file buffering based on the environment setting STDBUF%d
  * (for the specific file descriptor) and STDBUF (for all descriptors).
- * the setting is ULB standing for "Unbuffered", "Linebuffered",
+ * the setting is ULF standing for "Unbuffered", "Linebuffered",
  * and Fullybuffered", and  is a value from 0 to 1M.
  */
 static int



CVS commit: src/sys/net

2018-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 13 20:54:50 UTC 2018

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

Log Message:
Panic rather than silently dropping packets when TX offload options are
enabled for unsupported frame types.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/net/ether_sw_offload.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/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.3 src/sys/net/ether_sw_offload.c:1.4
--- src/sys/net/ether_sw_offload.c:1.3	Thu Dec 13 20:44:33 2018
+++ src/sys/net/ether_sw_offload.c	Thu Dec 13 20:54:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $");
 
 #include 
 #include 
@@ -99,7 +99,7 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 		ehlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
 		break;
 	default:
-		goto quit;
+		panic("%s: unexpected frame type", __func__);
 	}
 	KASSERT(m->m_pkthdr.len >= ehlen);
 
@@ -331,7 +331,6 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 		break;
 	default:
 		panic("%s: impossible", __func__);
-		break;
 	}
 
 done:



CVS commit: src/sys/net

2018-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 13 20:44:33 UTC 2018

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

Log Message:
Also take care of non-DIAGNOSTIC case.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net/ether_sw_offload.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/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.2 src/sys/net/ether_sw_offload.c:1.3
--- src/sys/net/ether_sw_offload.c:1.2	Thu Dec 13 12:13:33 2018
+++ src/sys/net/ether_sw_offload.c	Thu Dec 13 20:44:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.2 2018/12/13 12:13:33 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.2 2018/12/13 12:13:33 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $");
 
 #include 
 #include 
@@ -68,7 +68,11 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 {
 	struct ether_header *ep;
 	int flags, ehlen;
+#ifdef INET6
 	bool v6;
+#else
+	bool v6 __diagused;
+#endif
 
 	KASSERT(m->m_flags & M_PKTHDR);
 	flags = m->m_pkthdr.csum_flags;



CVS commit: src/sys/dev/ieee1394

2018-12-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 13 16:38:26 UTC 2018

Modified Files:
src/sys/dev/ieee1394: fwdma.c

Log Message:
Fix fwdma_free() for when bus_dmamap_unload() clobbers the dmamap.

Prevents KASSERTs on detaches of sbp(4) and fwohci(4) on amd64.

We should pass the dmamem segs around seperately, not in loaded dmamap...


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ieee1394/fwdma.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/ieee1394/fwdma.c
diff -u src/sys/dev/ieee1394/fwdma.c:1.16 src/sys/dev/ieee1394/fwdma.c:1.17
--- src/sys/dev/ieee1394/fwdma.c:1.16	Sun May 23 18:56:58 2010
+++ src/sys/dev/ieee1394/fwdma.c	Thu Dec 13 16:38:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwdma.c,v 1.16 2010/05/23 18:56:58 christos Exp $	*/
+/*	$NetBSD: fwdma.c,v 1.17 2018/12/13 16:38:26 jakllsch Exp $	*/
 /*-
  * Copyright (c) 2003
  * 	Hidetoshi Shimokawa. All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fwdma.c,v 1.16 2010/05/23 18:56:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwdma.c,v 1.17 2018/12/13 16:38:26 jakllsch Exp $");
 #if defined(__FreeBSD__)
 __FBSDID("$FreeBSD: src/sys/dev/firewire/fwdma.c,v 1.9 2007/06/06 14:31:36 simokawa Exp $");
 #endif
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD: src/sys/dev/firewire
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -108,11 +109,21 @@ fwdma_malloc(device_t dev, bus_dma_tag_t
 void
 fwdma_free(bus_dma_tag_t dmat, bus_dmamap_t dmamap, void *vaddr)
 {
+	bus_dma_segment_t *segs;
 
+	/* XXX we shouldn't pass around the segs in the dmamap */
+	const bus_size_t mapsize = dmamap->dm_mapsize;
+	const int nsegs = dmamap->dm_nsegs;
+	const size_t segssz = sizeof(bus_dma_segment_t) * nsegs;
+	segs = kmem_alloc(segssz, KM_SLEEP);
+	memcpy(segs, dmamap->dm_segs, segssz);
+	
 	bus_dmamap_unload(dmat, dmamap);
-	bus_dmamem_unmap(dmat, vaddr, dmamap->dm_mapsize);
-	bus_dmamem_free(dmat, dmamap->dm_segs, dmamap->dm_nsegs);
+	bus_dmamem_unmap(dmat, vaddr, mapsize);
+	bus_dmamem_free(dmat, segs, nsegs);
 	bus_dmamap_destroy(dmat, dmamap);
+	
+	kmem_free(segs, segssz);
 }
 
 



CVS commit: src/sys/dev/nvmm/x86

2018-12-13 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Dec 13 16:28:10 UTC 2018

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c

Log Message:
Don't forget to advance the RIP after an XSETBV emulation.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/nvmm/x86/nvmm_x86_svm.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/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.6 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.7
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.6	Sun Nov 25 14:09:57 2018
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Thu Dec 13 16:28:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_svm.c,v 1.6 2018/11/25 14:09:57 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_svm.c,v 1.7 2018/12/13 16:28:10 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.6 2018/11/25 14:09:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.7 2018/12/13 16:28:10 maxv Exp $");
 
 #include 
 #include 
@@ -963,6 +963,7 @@ svm_exit_xsetbv(struct nvmm_machine *mac
 
 	state->crs[NVMM_X64_CR_XCR0] = val;
 
+	cpudata->vmcb->state.rip = cpudata->vmcb->ctrl.nrip;
 	return;
 
 error:



CVS commit: src/sys/dev/usb

2018-12-13 Thread Santhosh Raju
Module Name:src
Committed By:   fox
Date:   Thu Dec 13 16:20:20 UTC 2018

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

Log Message:
Add Logitech Gamepad F310 and Logitech Dual Action Gamepad


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.762 src/sys/dev/usb/usbdevs:1.763
--- src/sys/dev/usb/usbdevs:1.762	Mon Dec 10 14:14:20 2018
+++ src/sys/dev/usb/usbdevs	Thu Dec 13 16:20:20 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.762 2018/12/10 14:14:20 jakllsch Exp $
+$NetBSD: usbdevs,v 1.763 2018/12/13 16:20:20 fox Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2152,6 +2152,8 @@ product LOGITECH CDO		0xc504	Cordless De
 product LOGITECH MX700		0xc506	Cordless optical mouse
 product LOGITECH CBT44		0xc517	C-BT44 Receiver
 product LOGITECH QUICKCAMPRO2	0xd001	QuickCam Pro
+product LOGITECH GF310		0xc21d	Gamepad F310
+product LOGITECH DAG		0xc216	Dual Action Gamepad
 
 /* Longcheer products */
 product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA



CVS commit: src/sys/arch/x86/include

2018-12-13 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Thu Dec 13 16:16:51 UTC 2018

Modified Files:
src/sys/arch/x86/include: intr.h

Log Message:
Allow x86 builds to have the opportunity to not have pre-emption
enabled by default. This can be effected by having a:

"optionsNO_PREEMPTION"

line in the kernel configuration file.

While it was tempting to tie __HAVE_PREEMPTION to MULTIPROCESSOR,
as is currently assumed in sys/kern/kern_stub.c ,

having MULTIPROCESSOR without __HAVE_PREEMPTION
and not having either are valid configuration options which users
could have choice of. We thus err on the side of configurability.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/x86/include/intr.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/x86/include/intr.h
diff -u src/sys/arch/x86/include/intr.h:1.56 src/sys/arch/x86/include/intr.h:1.57
--- src/sys/arch/x86/include/intr.h:1.56	Sun Jun 24 13:35:33 2018
+++ src/sys/arch/x86/include/intr.h	Thu Dec 13 16:16:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.56 2018/06/24 13:35:33 jdolecek Exp $	*/
+/*	$NetBSD: intr.h,v 1.57 2018/12/13 16:16:51 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,9 @@
 
 #if !defined(XEN)
 #define	__HAVE_FAST_SOFTINTS
+#if !defined(NO_PREEMPTION)
 #define	__HAVE_PREEMPTION
+#endif /* !defined(NO_PREEMPTION) */
 #endif /*  !defined(XEN) */
 
 #ifdef _KERNEL



CVS commit: src/libexec/identd

2018-12-13 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec 13 13:11:28 UTC 2018

Modified Files:
src/libexec/identd: ipf.c

Log Message:
IPFilter 5 requires you to specify IPv4 or IPv6


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/libexec/identd/ipf.c

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

Modified files:

Index: src/libexec/identd/ipf.c
diff -u src/libexec/identd/ipf.c:1.3 src/libexec/identd/ipf.c:1.4
--- src/libexec/identd/ipf.c:1.3	Sat Dec 10 05:43:11 2016
+++ src/libexec/identd/ipf.c	Thu Dec 13 13:11:28 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipf.c,v 1.3 2016/12/10 05:43:11 christos Exp $ */
+/* $NetBSD: ipf.c,v 1.4 2018/12/13 13:11:28 sborrill Exp $ */
 
 /*
  * ipf.c - NAT lookup code for IP Filter.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ipf.c,v 1.3 2016/12/10 05:43:11 christos Exp $");
+__RCSID("$NetBSD: ipf.c,v 1.4 2018/12/13 13:11:28 sborrill Exp $");
 
 #include 
 #include 
@@ -57,6 +57,7 @@ ipf_natlookup(const struct sockaddr_stor
 		nl.nl_realport = ntohs(csatosin([0])->sin_port);
 		nl.nl_outport = ntohs(csatosin([1])->sin_port);
 		nl.nl_flags = IPN_TCP | IPN_IN;
+		nl.nl_v = 4; /* IPv4 */
 		break;
 	case AF_INET6:
 		/* XXX IP Filter doesn't support IPv6 NAT yet. */



CVS commit: src/usr.sbin/sysinst

2018-12-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Dec 13 12:28:25 UTC 2018

Modified Files:
src/usr.sbin/sysinst: partman.c

Log Message:
Avoid undefined behaviour, pointed out by maxv


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/partman.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/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.24 src/usr.sbin/sysinst/partman.c:1.25
--- src/usr.sbin/sysinst/partman.c:1.24	Tue Nov 27 17:13:41 2018
+++ src/usr.sbin/sysinst/partman.c	Thu Dec 13 12:28:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.24 2018/11/27 17:13:41 martin Exp $ */
+/*	$NetBSD: partman.c,v 1.25 2018/12/13 12:28:25 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -913,7 +913,7 @@ pm_vnd_commit(void)
 			for (ii = 0; ii < 6; ii++) {
 strcpy(buf, pm_i->bsdlabel[ii].pi_mount);
 if (buf[strlen(buf)-1] != '/')
-	sprintf(buf,"%s/", buf);
+	strcat(buf, "/");
 printf("%s\n",buf);
 if (strstr(vnds[i].filepath, buf) == vnds[i].filepath)
 	if (part_suit < 0 || pm_suit == NULL ||



CVS commit: src/sys/net

2018-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 13 12:13:33 UTC 2018

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

Log Message:
Fix (bridge && !inet6) build.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/net/ether_sw_offload.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/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.1 src/sys/net/ether_sw_offload.c:1.2
--- src/sys/net/ether_sw_offload.c:1.1	Wed Dec 12 01:40:20 2018
+++ src/sys/net/ether_sw_offload.c	Thu Dec 13 12:13:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.1 2018/12/12 01:40:20 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.2 2018/12/13 12:13:33 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,8 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef _KERNEL_OPT
+#include "opt_inet.h"
+#endif
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.1 2018/12/12 01:40:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.2 2018/12/13 12:13:33 rin Exp $");
 
 #include 
 #include 
@@ -43,12 +47,14 @@ __KERNEL_RCSID(0, "$NetBSD: ether_sw_off
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
+#ifdef INET6
+#include 
 #include 
 #include 
+#endif
 
 /*
  * Handle TX offload in software. For TSO, split the packet into
@@ -62,7 +68,7 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 {
 	struct ether_header *ep;
 	int flags, ehlen;
-	bool v4;
+	bool v6;
 
 	KASSERT(m->m_flags & M_PKTHDR);
 	flags = m->m_pkthdr.csum_flags;
@@ -93,7 +99,10 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 	}
 	KASSERT(m->m_pkthdr.len >= ehlen);
 
-	v4 = flags & (M_CSUM_TSOv4 | M_CSUM_IPv4 | M_CSUM_TCPv4 | M_CSUM_UDPv4);
+	v6 = flags & (M_CSUM_TSOv6 | M_CSUM_TCPv6 | M_CSUM_UDPv6);
+#ifndef INET6
+	KASSERT(!v6);
+#endif
 
 	if (flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) {
 		/*
@@ -103,16 +112,20 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 		 *
 		 * XXX Do we need some KASSERT's?
 		 */
-		if (v4)
-			return tcp4_segment(m, ehlen);
-		else
+#ifdef INET6
+		if (v6)
 			return tcp6_segment(m, ehlen);
+		else
+#endif
+			return tcp4_segment(m, ehlen);
 	}
 
-	if (v4)
-		in_undefer_cksum(m, ehlen, flags);
-	else
+#ifdef INET6
+	if (v6)
 		in6_undefer_cksum(m, ehlen, flags);
+	else
+#endif
+		in_undefer_cksum(m, ehlen, flags);
 done:
 	m->m_pkthdr.csum_flags = 0;
 	m->m_nextpkt = NULL;
@@ -134,13 +147,12 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 {
 	struct ether_header *eh;
 	struct ip *ip;
-	struct ip6_hdr *ip6;
 	struct tcphdr *th;
 	struct udphdr *uh;
 	uint16_t sum, osum;
 	uint8_t proto;
 	int flags, enabled, len, ehlen, iphlen, l4offset;
-	bool v4;
+	bool v6;
 
 	flags = 0;
 
@@ -181,9 +193,46 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 			return NULL;
 	}
 	ip = (void *)(mtod(m, char *) + ehlen);
-	v4 = (ip->ip_v == IPVERSION);
+	v6 = (ip->ip_v != IPVERSION);
+
+	if (v6) {
+#ifdef INET6
+		struct ip6_hdr *ip6;
+
+		KASSERT(len >= sizeof(*ip6));
+		if (m->m_len < ehlen + sizeof(*ip6)) {
+			m = m_pullup(m, ehlen + sizeof(*ip6));
+			if (m == NULL)
+return NULL;
+		}
+		ip6 = (void *)(mtod(m, char *) + ehlen);
+		KASSERT((ip6->ip6_vfc & IPV6_VERSION_MASK) == IPV6_VERSION);
 
-	if (v4) {
+		iphlen = sizeof(*ip6);
+
+		len -= iphlen;
+
+		proto = ip6->ip6_nxt;
+		switch (proto) {
+		case IPPROTO_TCP:
+			if (!(enabled & M_CSUM_TCPv6))
+goto done;
+			break;
+		case IPPROTO_UDP:
+			if (!(enabled & M_CSUM_UDPv6))
+goto done;
+			break;
+		default:
+			/* XXX Extension headers are not supported. */
+			goto done;
+		}
+
+		sum = in6_cksum_phdr(>ip6_src, >ip6_dst, htonl(len),
+		htonl(proto));
+#else
+		goto done;
+#endif
+	} else {
 		if (enabled & M_CSUM_IPv4)
 			flags |= M_CSUM_IPv4;
 
@@ -220,37 +269,6 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 
 		sum = in_cksum_phdr(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		htons((uint16_t)len + proto));
-	} else {
-		KASSERT(len >= sizeof(*ip6));
-		if (m->m_len < ehlen + sizeof(*ip6)) {
-			m = m_pullup(m, ehlen + sizeof(*ip6));
-			if (m == NULL)
-return NULL;
-		}
-		ip6 = (void *)(mtod(m, char *) + ehlen);
-		KASSERT((ip6->ip6_vfc & IPV6_VERSION_MASK) == IPV6_VERSION);
-
-		iphlen = sizeof(*ip6);
-
-		len -= iphlen;
-
-		proto = ip6->ip6_nxt;
-		switch (proto) {
-		case IPPROTO_TCP:
-			if (!(enabled & M_CSUM_TCPv6))
-goto done;
-			break;
-		case IPPROTO_UDP:
-			if (!(enabled & M_CSUM_UDPv6))
-goto done;
-			break;
-		default:
-			/* XXX Extension headers are not supported. */
-			goto done;
-		}
-
-		sum = in6_cksum_phdr(>ip6_src, >ip6_dst, htonl(len),
-		htonl(proto));
 	}
 
 	l4offset = ehlen + iphlen;
@@ -265,12 +283,15 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 		th = (void *)(mtod(m, char *) + l4offset);
 		osum = th->th_sum;
 		th->th_sum = sum;
-		if (v4) {
-			flags |= M_CSUM_TCPv4;
-			sum = in4_cksum(m, 0, l4offset, len);
-		} else {
+#ifdef 

CVS commit: src/doc

2018-12-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 13 11:28:00 UTC 2018

Modified Files:
src/doc: TODO.modules

Log Message:
Add a note about the (lack of) correspondence between a module's name and
the name of the file from which it is loaded.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.15 src/doc/TODO.modules:1.16
--- src/doc/TODO.modules:1.15	Fri May  4 00:25:26 2018
+++ src/doc/TODO.modules	Thu Dec 13 11:28:00 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.15 2018/05/04 00:25:26 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.16 2018/12/13 11:28:00 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -192,3 +192,11 @@ christos and pgoyette.
 invocations of module_class_init(), and it might be useful to have a
 non-dependency mechanism to provide "IF module-A and module-B are
 BOTH present, module-A needs to be initialized before module-B".
+
+20. (Long-ago memory rises to the surface) Note that currently there is
+nothing that requires a module's name to correspond in any way with
+the name of file from which the module is loaded.  Thus, it is
+possible to attempt to access device /dev/x, discover that there is
+no such device so we autoload /stand/.../x/x.kmod and initialize
+the module loaded, even if the loaded module is for some other
+device entirely!



CVS commit: src/sys/arch/aarch64

2018-12-13 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Dec 13 10:44:25 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: cpuswitch.S db_machdep.c genassym.cf
locore.S process_machdep.c trap.c
src/sys/arch/aarch64/include: armreg.h ptrace.h

Log Message:
add support PT_STEP


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/cpuswitch.S
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/aarch64/db_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/aarch64/process_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/aarch64/trap.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/aarch64/include/armreg.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/include/ptrace.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/aarch64/aarch64/cpuswitch.S
diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.9 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.10
--- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.9	Wed Dec 12 11:14:51 2018
+++ src/sys/arch/aarch64/aarch64/cpuswitch.S	Thu Dec 13 10:44:25 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuswitch.S,v 1.9 2018/12/12 11:14:51 ryo Exp $ */
+/* $NetBSD: cpuswitch.S,v 1.10 2018/12/13 10:44:25 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include "opt_ddb.h"
 #include "opt_kasan.h"
 
-RCSID("$NetBSD: cpuswitch.S,v 1.9 2018/12/12 11:14:51 ryo Exp $")
+RCSID("$NetBSD: cpuswitch.S,v 1.10 2018/12/13 10:44:25 ryo Exp $")
 
 /*
  * At IPL_SCHED:
@@ -341,6 +341,13 @@ ENTRY_NP(el0_trap_exit)
 	msr	spsr_el1, x1		/* exception pstate */
 	msr	sp_el0, x2		/* restore EL0 stack */
 
+	/* if the process is traced, enable MDSCR_EL1.SS */
+	tbz	x1, #SPSR_SS_SHIFT, 1f
+	mrs	x0, mdscr_el1
+	orr	x0, x0, #MDSCR_SS
+	msr	mdscr_el1, x0
+1:
+
 	unwind_x0_x2
 
 	/* leave sp at l_md.md_utf, return back to EL0 user process */

Index: src/sys/arch/aarch64/aarch64/db_machdep.c
diff -u src/sys/arch/aarch64/aarch64/db_machdep.c:1.11 src/sys/arch/aarch64/aarch64/db_machdep.c:1.12
--- src/sys/arch/aarch64/aarch64/db_machdep.c:1.11	Wed Nov 28 19:13:15 2018
+++ src/sys/arch/aarch64/aarch64/db_machdep.c	Thu Dec 13 10:44:25 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.11 2018/11/28 19:13:15 ryo Exp $ */
+/* $NetBSD: db_machdep.c,v 1.12 2018/12/13 10:44:25 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.11 2018/11/28 19:13:15 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.12 2018/12/13 10:44:25 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -616,11 +616,9 @@ db_machdep_init(void)
 	}
 
 	mdscr = reg_mdscr_el1_read();
-	mdscr |= __BIT(15);
-	mdscr |= __BIT(13);
+	mdscr |= MDSCR_MDE;	/* enable watchpoint and breakpoint */
 	reg_mdscr_el1_write(mdscr);
 	reg_oslar_el1_write(0);
-	daif_enable(DAIF_D);
 }
 
 static void

Index: src/sys/arch/aarch64/aarch64/genassym.cf
diff -u src/sys/arch/aarch64/aarch64/genassym.cf:1.10 src/sys/arch/aarch64/aarch64/genassym.cf:1.11
--- src/sys/arch/aarch64/aarch64/genassym.cf:1.10	Tue Dec 11 05:46:14 2018
+++ src/sys/arch/aarch64/aarch64/genassym.cf	Thu Dec 13 10:44:25 2018
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.10 2018/12/11 05:46:14 ryo Exp $
+# $NetBSD: genassym.cf,v 1.11 2018/12/13 10:44:25 ryo Exp $
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -329,6 +329,7 @@ define	DAIF_SETCLR_SHIFT	DAIF_SETCLR_SHI
 define	CNTHCTL_EL1PCTEN	CNTHCTL_EL1PCTEN
 define	CNTHCTL_EL1PCEN		CNTHCTL_EL1PCEN
 define	CNTKCTL_EL0VCTEN	CNTKCTL_EL0VCTEN
+define	SPSR_SS_SHIFT		SPSR_SS_SHIFT
 define	SPSR_F			SPSR_F
 define	SPSR_I			SPSR_I
 define	SPSR_A			SPSR_A
@@ -352,6 +353,11 @@ define	MPIDR_AFF1		MPIDR_AFF1
 define	MPIDR_AFF2		MPIDR_AFF2
 define	MPIDR_AFF3		MPIDR_AFF3
 
+define	MDSCR_MDE		MDSCR_MDE
+define	MDSCR_KDE		MDSCR_KDE
+define	MDSCR_TDCC		MDSCR_TDCC
+define	MDSCR_SS		MDSCR_SS
+
 define	MAIR_ATTR0		MAIR_ATTR0
 define	MAIR_ATTR1		MAIR_ATTR1
 define	MAIR_ATTR2		MAIR_ATTR2

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.31 src/sys/arch/aarch64/aarch64/locore.S:1.32
--- src/sys/arch/aarch64/aarch64/locore.S:1.31	Thu Nov  8 08:28:07 2018
+++ src/sys/arch/aarch64/aarch64/locore.S	Thu Dec 13 10:44:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.31 2018/11/08 08:28:07 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.32 2018/12/13 10:44:25 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -39,7 +39,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.31 2018/11/08 08:28:07 maxv Exp $")
+RCSID("$NetBSD: locore.S,v 1.32 2018/12/13 10:44:25 ryo Exp $")
 
 
 /*#define DEBUG_LOCORE			/* debug print */
@@ -218,8 +218,10 @@ 

CVS commit: src/sys/netinet6

2018-12-13 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Dec 13 10:27:51 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: discard any received NA with a LL address we own

This matches ARP behaviour.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/netinet6/nd6_nbr.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/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.162 src/sys/netinet6/nd6_nbr.c:1.163
--- src/sys/netinet6/nd6_nbr.c:1.162	Fri Dec  7 14:47:24 2018
+++ src/sys/netinet6/nd6_nbr.c	Thu Dec 13 10:27:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.162 2018/12/07 14:47:24 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.163 2018/12/13 10:27:51 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.162 2018/12/07 14:47:24 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.163 2018/12/13 10:27:51 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -653,9 +653,26 @@ nd6_na_input(struct mbuf *m, int off, in
 		goto freeit;
 	}
 
-	if (ndopts.nd_opts_tgt_lladdr) {
+	if (ndopts.nd_opts_tgt_lladdr != NULL) {
+		struct ifnet *ifp_ll;
+		struct psref psref_ll;
+
 		lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1);
 		lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
+
+		if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
+			nd6log(LOG_INFO, "lladdrlen mismatch for %s "
+			"(if %d, NA packet %d)\n", IN6_PRINT(ip6buf, ),
+			ifp->if_addrlen, lladdrlen - 2);
+			goto bad;
+		}
+
+		ifp_ll = if_get_bylla(lladdr, ifp->if_addrlen, _ll);
+		if (ifp_ll != NULL) {
+			/* it's from me, ignore it. */
+			if_put(ifp_ll, _ll);
+			goto freeit;
+		}
 	}
 
 	ifa = (struct ifaddr *)in6ifa_ifpwithaddr_psref(ifp, , _ia);
@@ -691,13 +708,6 @@ nd6_na_input(struct mbuf *m, int off, in
 		goto bad;
 	}
 
-	if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
-		nd6log(LOG_INFO, "lladdrlen mismatch for %s "
-		"(if %d, NA packet %d)\n", IN6_PRINT(ip6buf, ),
-		ifp->if_addrlen, lladdrlen - 2);
-		goto bad;
-	}
-
 	/*
 	 * If no neighbor cache entry is found, NA SHOULD silently be
 	 * discarded.



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2018-12-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Dec 13 10:20:51 UTC 2018

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Drop v_interlock for zfs_range_lock(), another thread might hold part
of this range and wait for v_interlock.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.38 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.39
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.38	Thu Dec 13 10:20:20 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Thu Dec 13 10:20:51 2018
@@ -5985,7 +5985,9 @@ zfs_netbsd_putpages(void *v)
 			len = UINT64_MAX;
 		else
 			len = offhi - offlo;
+		mutex_exit(vp->v_interlock);
 		rl = zfs_range_lock(zp, offlo, len, RL_WRITER);
+		mutex_enter(vp->v_interlock);
 		tsd_set(zfs_putpage_key, );
 	}
 	error = genfs_putpages(v);



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2018-12-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Dec 13 10:20:20 UTC 2018

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Operation zfs_range_lock() needs range as (offset,length), not as (low,high).


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.37 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.38
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.37	Thu Dec  6 10:00:40 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Thu Dec 13 10:20:20 2018
@@ -5968,6 +5968,7 @@ zfs_netbsd_putpages(void *v)
 	znode_t *zp = VTOZ(vp);
 	zfsvfs_t *zfsvfs = zp->z_zfsvfs;
 	rl_t *rl = NULL;
+	uint64_t len;
 	int error;
 	bool cleaned = false;
 
@@ -5978,7 +5979,13 @@ zfs_netbsd_putpages(void *v)
 	ZFS_VERIFY_ZP(zp);
 
 	if (cleaning) {
-		rl = zfs_range_lock(zp, offlo, offhi, RL_WRITER);
+		ASSERT((offlo & PAGE_MASK) == 0 && (offhi & PAGE_MASK) == 0);
+		ASSERT(offlo < offhi || offhi == 0);
+		if (offhi == 0)
+			len = UINT64_MAX;
+		else
+			len = offhi - offlo;
+		rl = zfs_range_lock(zp, offlo, len, RL_WRITER);
 		tsd_set(zfs_putpage_key, );
 	}
 	error = genfs_putpages(v);



CVS commit: src/external/cddl/osnet/sys/kern

2018-12-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Dec 13 10:19:47 UTC 2018

Modified Files:
src/external/cddl/osnet/sys/kern: mod.c

Log Message:
Don't allow module to init before mp_online.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/kern/mod.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/cddl/osnet/sys/kern/mod.c
diff -u src/external/cddl/osnet/sys/kern/mod.c:1.3 src/external/cddl/osnet/sys/kern/mod.c:1.4
--- src/external/cddl/osnet/sys/kern/mod.c:1.3	Mon May 28 21:05:09 2018
+++ src/external/cddl/osnet/sys/kern/mod.c	Thu Dec 13 10:19:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mod.c,v 1.3 2018/05/28 21:05:09 chs Exp $	*/
+/*	$NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.3 2018/05/28 21:05:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mod.c,v 1.4 2018/12/13 10:19:47 hannken Exp $");
 
 #include 
 #include 
@@ -49,6 +49,9 @@ solaris_modcmd(modcmd_t cmd, void *arg)
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		if (!mp_online)
+			return EAGAIN;
+
 		opensolaris_utsname_init();
 		callb_init(NULL);
 		taskq_init();



CVS commit: src/usr.bin/telnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 09:20:05 UTC 2018

Modified Files:
src/usr.bin/telnet: sys_bsd.c

Log Message:
Expand SIG_FUNC_RET -from openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/telnet/sys_bsd.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/telnet/sys_bsd.c
diff -u src/usr.bin/telnet/sys_bsd.c:1.36 src/usr.bin/telnet/sys_bsd.c:1.37
--- src/usr.bin/telnet/sys_bsd.c:1.36	Thu Dec 13 05:22:14 2018
+++ src/usr.bin/telnet/sys_bsd.c	Thu Dec 13 09:20:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_bsd.c,v 1.36 2018/12/13 05:22:14 maya Exp $	*/
+/*	$NetBSD: sys_bsd.c,v 1.37 2018/12/13 09:20:05 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 from: static char sccsid[] = "@(#)sys_bsd.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: sys_bsd.c,v 1.36 2018/12/13 05:22:14 maya Exp $");
+__RCSID("$NetBSD: sys_bsd.c,v 1.37 2018/12/13 09:20:05 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -60,14 +60,12 @@ __RCSID("$NetBSD: sys_bsd.c,v 1.36 2018/
 #include "externs.h"
 #include "types.h"
 
-#define	SIG_FUNC_RET	void
+void susp(int);
+void ayt(int);
 
-SIG_FUNC_RET susp(int);
-SIG_FUNC_RET ayt(int);
-
-SIG_FUNC_RET intr(int);
-SIG_FUNC_RET intr2(int);
-SIG_FUNC_RET sendwin(int);
+void intr(int);
+void intr2(int);
+void sendwin(int);
 
 
 int
@@ -496,7 +494,7 @@ NetNonblockingIO(int fd, int onoff)
  */
 
 /* ARGSUSED */
-SIG_FUNC_RET
+void
 intr(int sig)
 {
 if (localchars) {
@@ -508,7 +506,7 @@ intr(int sig)
 }
 
 /* ARGSUSED */
-SIG_FUNC_RET
+void
 intr2(int sig)
 {
 if (localchars) {
@@ -523,7 +521,7 @@ intr2(int sig)
 }
 
 /* ARGSUSED */
-SIG_FUNC_RET
+void
 susp(int sig)
 {
 if ((rlogin != _POSIX_VDISABLE) && rlogin_susp())
@@ -533,7 +531,7 @@ susp(int sig)
 }
 
 /* ARGSUSED */
-SIG_FUNC_RET
+void
 sendwin(int sig)
 {
 if (connected) {
@@ -542,7 +540,7 @@ sendwin(int sig)
 }
 
 /* ARGSUSED */
-SIG_FUNC_RET
+void
 ayt(int sig)
 {
 if (connected)



CVS commit: src/lib/libtelnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 09:09:32 UTC 2018

Modified Files:
src/lib/libtelnet: spx.c

Log Message:
Remove unused code


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libtelnet/spx.c

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

Modified files:

Index: src/lib/libtelnet/spx.c
diff -u src/lib/libtelnet/spx.c:1.7 src/lib/libtelnet/spx.c:1.8
--- src/lib/libtelnet/spx.c:1.7	Tue Apr 19 03:19:46 2005
+++ src/lib/libtelnet/spx.c	Thu Dec 13 09:09:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: spx.c,v 1.7 2005/04/19 03:19:46 christos Exp $ */
+/*	$NetBSD: spx.c,v 1.8 2018/12/13 09:09:32 maya Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
 #if 0
 static char sccsid[] = "@(#)spx.c	8.2 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: spx.c,v 1.7 2005/04/19 03:19:46 christos Exp $");
+__RCSID("$NetBSD: spx.c,v 1.8 2018/12/13 09:09:32 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -578,17 +578,3 @@ spx_printsub(data, cnt, buf, buflen)
 }
 
 #endif
-
-#ifdef notdef
-
-prkey(msg, key)
-	char *msg;
-	unsigned char *key;
-{
-	register int i;
-	printf("%s:", msg);
-	for (i = 0; i < 8; i++)
-		printf(" %3d", key[i]);
-	printf("\r\n");
-}
-#endif



CVS commit: src/usr.bin/telnet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 09:07:53 UTC 2018

Modified Files:
src/usr.bin/telnet: ring.c ring.h

Log Message:
Remove unused code.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/telnet/ring.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/telnet/ring.h

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

Modified files:

Index: src/usr.bin/telnet/ring.c
diff -u src/usr.bin/telnet/ring.c:1.13 src/usr.bin/telnet/ring.c:1.14
--- src/usr.bin/telnet/ring.c:1.13	Thu Aug  7 11:16:10 2003
+++ src/usr.bin/telnet/ring.c	Thu Dec 13 09:07:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ring.c,v 1.13 2003/08/07 11:16:10 agc Exp $	*/
+/*	$NetBSD: ring.c,v 1.14 2018/12/13 09:07:53 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)ring.c	8.2 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: ring.c,v 1.13 2003/08/07 11:16:10 agc Exp $");
+__RCSID("$NetBSD: ring.c,v 1.14 2018/12/13 09:07:53 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -284,26 +284,6 @@ ring_supply_data(Ring *ring, unsigned ch
 }
 }
 
-#ifdef notdef
-
-/*
- * Move data from the "consume" portion of the ring buffer
- */
-void
-ring_consume_data(Ring *ring, unsigned char *buffer, int count)
-{
-int i;
-
-while (count) {
-	i = MIN(count, ring_full_consecutive(ring));
-	memmove(buffer, ring->consume, i);
-	ring_consumed(ring, i);
-	count -= i;
-	buffer += i;
-}
-}
-#endif
-
 #ifdef	ENCRYPTION
 void
 ring_encrypt(Ring *ring, void (*encryptor)(unsigned char *, int))

Index: src/usr.bin/telnet/ring.h
diff -u src/usr.bin/telnet/ring.h:1.10 src/usr.bin/telnet/ring.h:1.11
--- src/usr.bin/telnet/ring.h:1.10	Thu Aug  7 11:16:10 2003
+++ src/usr.bin/telnet/ring.h	Thu Dec 13 09:07:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ring.h,v 1.10 2003/08/07 11:16:10 agc Exp $	*/
+/*	$NetBSD: ring.h,v 1.11 2018/12/13 09:07:53 maya Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -75,10 +75,6 @@ extern int
 /* Data movement routines */
 extern void
 	ring_supply_data(Ring *ring, unsigned char *buffer, int count);
-#ifdef notdef
-extern void
-	ring_consume_data(Ring *ring, unsigned char *buffer, int count);
-#endif
 
 /* Buffer state transition routines */
 extern void



CVS commit: src/lib/libc/resolv

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 08:45:30 UTC 2018

Modified Files:
src/lib/libc/resolv: res_debug.c

Log Message:
Remove unused macro


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/resolv/res_debug.c

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

Modified files:

Index: src/lib/libc/resolv/res_debug.c
diff -u src/lib/libc/resolv/res_debug.c:1.14 src/lib/libc/resolv/res_debug.c:1.15
--- src/lib/libc/resolv/res_debug.c:1.14	Tue Feb 24 17:56:20 2015
+++ src/lib/libc/resolv/res_debug.c	Thu Dec 13 08:45:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_debug.c,v 1.14 2015/02/24 17:56:20 christos Exp $	*/
+/*	$NetBSD: res_debug.c,v 1.15 2018/12/13 08:45:29 maya Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
@@ -97,7 +97,7 @@
 static const char sccsid[] = "@(#)res_debug.c	8.1 (Berkeley) 6/4/93";
 static const char rcsid[] = "Id: res_debug.c,v 1.19 2009/02/26 11:20:20 tbox Exp";
 #else
-__RCSID("$NetBSD: res_debug.c,v 1.14 2015/02/24 17:56:20 christos Exp $");
+__RCSID("$NetBSD: res_debug.c,v 1.15 2018/12/13 08:45:29 maya Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -126,12 +126,6 @@ __RCSID("$NetBSD: res_debug.c,v 1.14 201
 
 #include "port_after.h"
 
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) sprintf x
-#endif
-
 extern const char *_res_opcodes[];
 extern const char *_res_sectioncodes[];
 



CVS commit: src/lib/libc/inet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 08:44:11 UTC 2018

Modified Files:
src/lib/libc/inet: inet_net_pton.c

Log Message:
Remove unused macro.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/inet/inet_net_pton.c

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

Modified files:

Index: src/lib/libc/inet/inet_net_pton.c
diff -u src/lib/libc/inet/inet_net_pton.c:1.4 src/lib/libc/inet/inet_net_pton.c:1.5
--- src/lib/libc/inet/inet_net_pton.c:1.4	Tue Mar 20 17:08:13 2012
+++ src/lib/libc/inet/inet_net_pton.c	Thu Dec 13 08:44:11 2018
@@ -20,7 +20,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_net_pton.c,v 1.4.2.1 2002/08/02 02:17:21 marka Exp ";
 #else
-__RCSID("$NetBSD: inet_net_pton.c,v 1.4 2012/03/20 17:08:13 matt Exp $");
+__RCSID("$NetBSD: inet_net_pton.c,v 1.5 2018/12/13 08:44:11 maya Exp $");
 #endif
 #endif
 
@@ -47,13 +47,6 @@ __RCSID("$NetBSD: inet_net_pton.c,v 1.4 
 __weak_alias(inet_net_pton,_inet_net_pton)
 #endif
 
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-
 /*
  * static int
  * inet_net_pton_ipv4(src, dst, size)



CVS commit: src/lib/libc/inet

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 08:42:26 UTC 2018

Modified Files:
src/lib/libc/inet: inet_cidr_pton.c

Log Message:
Remove unused macro.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/inet/inet_cidr_pton.c

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

Modified files:

Index: src/lib/libc/inet/inet_cidr_pton.c
diff -u src/lib/libc/inet/inet_cidr_pton.c:1.8 src/lib/libc/inet/inet_cidr_pton.c:1.9
--- src/lib/libc/inet/inet_cidr_pton.c:1.8	Tue Mar 20 17:08:13 2012
+++ src/lib/libc/inet/inet_cidr_pton.c	Thu Dec 13 08:42:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet_cidr_pton.c,v 1.8 2012/03/20 17:08:13 matt Exp $	*/
+/*	$NetBSD: inet_cidr_pton.c,v 1.9 2018/12/13 08:42:26 maya Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_cidr_pton.c,v 1.6 2005/04/27 04:56:19 sra Exp";
 #else
-__RCSID("$NetBSD: inet_cidr_pton.c,v 1.8 2012/03/20 17:08:13 matt Exp $");
+__RCSID("$NetBSD: inet_cidr_pton.c,v 1.9 2018/12/13 08:42:26 maya Exp $");
 #endif
 #endif
 
@@ -45,12 +45,6 @@ __RCSID("$NetBSD: inet_cidr_pton.c,v 1.8
 
 #include "port_after.h"
 
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
 #ifdef __weak_alias
 __weak_alias(inet_cidr_pton,_inet_cidr_pton)
 #endif



CVS commit: src/lib/libresolv

2018-12-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Dec 13 08:39:34 UTC 2018

Modified Files:
src/lib/libresolv: ns_date.c

Log Message:
Remove unused macro.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libresolv/ns_date.c

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

Modified files:

Index: src/lib/libresolv/ns_date.c
diff -u src/lib/libresolv/ns_date.c:1.1 src/lib/libresolv/ns_date.c:1.2
--- src/lib/libresolv/ns_date.c:1.1	Thu Nov 15 18:48:48 2012
+++ src/lib/libresolv/ns_date.c	Thu Dec 13 08:39:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_date.c,v 1.1 2012/11/15 18:48:48 christos Exp $	*/
+/*	$NetBSD: ns_date.c,v 1.2 2018/12/13 08:39:34 maya Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -21,7 +21,7 @@
 #if 0
 static const char rcsid[] = "Id: ns_date.c,v 1.6 2005/04/27 04:56:39 sra Exp ";
 #else
-__RCSID("$NetBSD: ns_date.c,v 1.1 2012/11/15 18:48:48 christos Exp $");
+__RCSID("$NetBSD: ns_date.c,v 1.2 2018/12/13 08:39:34 maya Exp $");
 #endif
 
 /* Import. */
@@ -38,12 +38,6 @@ __RCSID("$NetBSD: ns_date.c,v 1.1 2012/1
 
 #include "port_after.h"
 
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
 /* Forward. */
 
 static int	datepart(const char *, int, int, int, int *);