CVS commit: [netbsd-8] src

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 31 05:08:40 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2 LAST_MINUTE
src/external/gpl2/groff/tmac [netbsd-8]: mdoc.local
src/sys/sys [netbsd-8]: param.h

Log Message:
Welcome to 8.2


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.114 -r1.1.2.115 src/doc/CHANGES-8.2
cvs rdiff -u -r1.2.60.2 -r1.2.60.3 src/doc/LAST_MINUTE
cvs rdiff -u -r1.2.4.5 -r1.2.4.6 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.542.2.8 -r1.542.2.9 src/sys/sys/param.h

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.114 src/doc/CHANGES-8.2:1.1.2.115
--- src/doc/CHANGES-8.2:1.1.2.114	Sun Mar 29 12:48:22 2020
+++ src/doc/CHANGES-8.2	Tue Mar 31 05:08:40 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.114 2020/03/29 12:48:22 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.115 2020/03/31 05:08:40 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -2203,3 +2203,9 @@ sys/kern/subr_disk.c1.130
 	Keep errors silent if no medium is loaded.
 	[mlelstv, ticket #1527]
 
+external/gpl2/groff/tmac/mdoc.local		(manually edited)
+sys/sys/param.h	(manually edited)
+doc/LAST_MINUTE	(manually edited)
+
+	Welcome to 8.2
+	[martin]

Index: src/doc/LAST_MINUTE
diff -u src/doc/LAST_MINUTE:1.2.60.2 src/doc/LAST_MINUTE:1.2.60.3
--- src/doc/LAST_MINUTE:1.2.60.2	Tue May 14 17:21:59 2019
+++ src/doc/LAST_MINUTE	Tue Mar 31 05:08:40 2020
@@ -1,6 +1,6 @@
-#	$NetBSD: LAST_MINUTE,v 1.2.60.2 2019/05/14 17:21:59 martin Exp $
+#	$NetBSD: LAST_MINUTE,v 1.2.60.3 2020/03/31 05:08:40 martin Exp $
 
-This file contains important information on the NetBSD 8.1 release that
+This file contains important information on the NetBSD 8.2 release that
 did not make it into the main documentation.
 
 [all]

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.2.4.5 src/external/gpl2/groff/tmac/mdoc.local:1.2.4.6
--- src/external/gpl2/groff/tmac/mdoc.local:1.2.4.5	Sun Jun  2 08:27:40 2019
+++ src/external/gpl2/groff/tmac/mdoc.local	Tue Mar 31 05:08:39 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.2.4.5 2019/06/02 08:27:40 martin Exp $
+.\" $NetBSD: mdoc.local,v 1.2.4.6 2020/03/31 05:08:39 martin Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~8.1_STABLE
+.ds doc-operating-system NetBSD\~8.2
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~8.1_STABLE
+.ds doc-default-operating-system NetBSD\~8.2
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3
@@ -64,6 +64,7 @@
 .ds doc-operating-system-NetBSD-7.17.1
 .ds doc-operating-system-NetBSD-8.08.0
 .ds doc-operating-system-NetBSD-8.18.1
+.ds doc-operating-system-NetBSD-8.28.2
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-5.4   5.4
 .ds doc-operating-system-FreeBSD-5.5   5.5

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.542.2.8 src/sys/sys/param.h:1.542.2.9
--- src/sys/sys/param.h:1.542.2.8	Sun Jun  2 08:25:25 2019
+++ src/sys/sys/param.h	Tue Mar 31 05:08:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.542.2.8 2019/06/02 08:25:25 martin Exp $	*/
+/*	$NetBSD: param.h,v 1.542.2.9 2020/03/31 05:08:39 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	80100	/* NetBSD 8.1_STABLE */
+#define	__NetBSD_Version__	80200	/* NetBSD 8.2 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-8] src

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar 31 05:08:40 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2 LAST_MINUTE
src/external/gpl2/groff/tmac [netbsd-8]: mdoc.local
src/sys/sys [netbsd-8]: param.h

Log Message:
Welcome to 8.2


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.114 -r1.1.2.115 src/doc/CHANGES-8.2
cvs rdiff -u -r1.2.60.2 -r1.2.60.3 src/doc/LAST_MINUTE
cvs rdiff -u -r1.2.4.5 -r1.2.4.6 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.542.2.8 -r1.542.2.9 src/sys/sys/param.h

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



CVS commit: src/sys/conf

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 03:42:10 UTC 2020

Modified Files:
src/sys/conf: files

Log Message:
dme needs mii


To generate a diff of this commit:
cvs rdiff -u -r1.1261 -r1.1262 src/sys/conf/files

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



CVS commit: src/sys/conf

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 03:42:10 UTC 2020

Modified Files:
src/sys/conf: files

Log Message:
dme needs mii


To generate a diff of this commit:
cvs rdiff -u -r1.1261 -r1.1262 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1261 src/sys/conf/files:1.1262
--- src/sys/conf/files:1.1261	Sun Mar  8 00:18:41 2020
+++ src/sys/conf/files	Tue Mar 31 03:42:10 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1261 2020/03/08 00:18:41 christos Exp $
+#	$NetBSD: files,v 1.1262 2020/03/31 03:42:10 nisimura Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -1366,7 +1366,7 @@ file	dev/ic/bwi.c			bwi
 
 # DM9000 Ethernet controllers
 #
-device	dme: arp, ether, ifnet
+device	dme: arp, ether, ifnet, mii
 file	dev/ic/dm9000.c			dme
 
 # NVM Express Controller



CVS commit: src/sys/dev/ic

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 02:47:35 UTC 2020

Modified Files:
src/sys/dev/ic: dm9000.c

Log Message:
add comment to clearify hw nature


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/dm9000.c

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

Modified files:

Index: src/sys/dev/ic/dm9000.c
diff -u src/sys/dev/ic/dm9000.c:1.24 src/sys/dev/ic/dm9000.c:1.25
--- src/sys/dev/ic/dm9000.c:1.24	Tue Mar 31 02:32:25 2020
+++ src/sys/dev/ic/dm9000.c	Tue Mar 31 02:47:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dm9000.c,v 1.24 2020/03/31 02:32:25 nisimura Exp $	*/
+/*	$NetBSD: dm9000.c,v 1.25 2020/03/31 02:47:34 nisimura Exp $	*/
 
 /*
  * Copyright (c) 2009 Paul Fleischer
@@ -253,10 +253,11 @@ dme_attach(struct dme_softc *sc, const u
 	mii->mii_writereg = mii_writereg;
 	mii->mii_statchg = mii_statchg;
 
+	/* assume davicom PHY at 1. ext PHY could be hooked but only at 0-3 */
 	sc->sc_ethercom.ec_mii = mii;
 	ifmedia_init(ifm, 0, ether_mediachange, ether_mediastatus);
-	mii_attach(sc->sc_dev, mii, 0x,
-		1 /* PHY 1 */, MII_OFFSET_ANY, 0);
+	mii_attach(sc->sc_dev, mii, 0x, 1 /* PHY 1 */,
+		MII_OFFSET_ANY, 0);
 	if (LIST_FIRST(>mii_phys) == NULL) {
 		ifmedia_add(ifm, IFM_ETHER | IFM_NONE, 0, NULL);
 		ifmedia_set(ifm, IFM_ETHER | IFM_NONE);
@@ -289,6 +290,7 @@ dme_attach(struct dme_softc *sc, const u
 	io_mode = (dme_read(sc, DM9000_ISR) &
 	DM9000_IOMODE_MASK) >> DM9000_IOMODE_SHIFT;
 
+	/* frame body read/write ops in 2 byte quantity or byte-wise. */
 	DPRINTF(("DM9000 Operation Mode: "));
 	switch (io_mode) {
 	case DM9000_MODE_8BIT:



CVS commit: src/sys/dev/ic

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 02:47:35 UTC 2020

Modified Files:
src/sys/dev/ic: dm9000.c

Log Message:
add comment to clearify hw nature


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/dm9000.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/ic

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 02:32:25 UTC 2020

Modified Files:
src/sys/dev/ic: dm9000.c dm9000reg.h dm9000var.h

Log Message:
- reorgazine the entire structure to utilise ifmedia(4)/mii(4) and
  redefine starting point of debug.
- nuke duplicated standard MII register definition.  Davicom PHY extension
  is defined in dev/mii/dmphyreg.h


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/dm9000.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/dm9000reg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/dm9000var.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/ic/dm9000.c
diff -u src/sys/dev/ic/dm9000.c:1.23 src/sys/dev/ic/dm9000.c:1.24
--- src/sys/dev/ic/dm9000.c:1.23	Sun Mar 29 23:16:52 2020
+++ src/sys/dev/ic/dm9000.c	Tue Mar 31 02:32:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dm9000.c,v 1.23 2020/03/29 23:16:52 nisimura Exp $	*/
+/*	$NetBSD: dm9000.c,v 1.24 2020/03/31 02:32:25 nisimura Exp $	*/
 
 /*
  * Copyright (c) 2009 Paul Fleischer
@@ -89,29 +89,26 @@
 #include 
 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
+#include 
 #include 
+#include 
+#include 
 #include 
-#include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
-#ifdef INET
-#include 
-#include 
-#endif
-
-#include 
-#include 
-
 #include 
 #include 
 
@@ -159,561 +156,424 @@
 #define TX_DATA_DPRINTF(s) do {} while (/*CONSTCOND*/0)
 #endif
 
-/*** Internal PHY functions ***/
-uint16_t dme_phy_read(struct dme_softc *, int );
-void	dme_phy_write(struct dme_softc *, int, uint16_t);
-void	dme_phy_init(struct dme_softc *);
-void	dme_phy_reset(struct dme_softc *);
-void	dme_phy_update_media(struct dme_softc *);
-void	dme_phy_check_link(void *);
-
-/*** Methods registered in struct ifnet ***/
-void	dme_start_output(struct ifnet *);
-int	dme_init(struct ifnet *);
-int	dme_ioctl(struct ifnet *, u_long, void *);
-void	dme_stop(struct ifnet *, int);
-
-int	dme_mediachange(struct ifnet *);
-void	dme_mediastatus(struct ifnet *, struct ifmediareq *);
-
-/*** Internal methods ***/
-
-/* Prepare data to be transmitted (i.e. dequeue and load it into the DM9000) */
-void	dme_prepare(struct dme_softc *, struct ifnet *);
-
-/* Transmit prepared data */
-void	dme_transmit(struct dme_softc *);
-
-/* Receive data */
-void	dme_receive(struct dme_softc *, struct ifnet *);
-
-/* Software Initialize/Reset of the DM9000 */
-void	dme_reset(struct dme_softc *);
-
-/* Configure multicast filter */
-void	dme_set_addr_filter(struct dme_softc *);
-
-/* Set media */
-int	dme_set_media(struct dme_softc *, int );
-
-/* Read/write packet data from/to DM9000 IC in various transfer sizes */
-int	dme_pkt_read_2(struct dme_softc *, struct ifnet *, struct mbuf **);
-int	dme_pkt_write_2(struct dme_softc *, struct mbuf *);
-int	dme_pkt_read_1(struct dme_softc *, struct ifnet *, struct mbuf **);
-int	dme_pkt_write_1(struct dme_softc *, struct mbuf *);
-/* TODO: Implement 32 bit read/write functions */
-
-uint16_t
-dme_phy_read(struct dme_softc *sc, int reg)
-{
-	uint16_t val;
-	/* Select Register to read*/
-	dme_write(sc, DM9000_EPAR, DM9000_EPAR_INT_PHY +
-	(reg & DM9000_EPAR_EROA_MASK));
-	/* Select read operation (DM9000_EPCR_ERPRR) from the PHY */
-	dme_write(sc, DM9000_EPCR, DM9000_EPCR_ERPRR + DM9000_EPCR_EPOS_PHY);
-
-	/* Wait until access to PHY has completed */
-	while (dme_read(sc, DM9000_EPCR) & DM9000_EPCR_ERRE)
-		;
-
-	/* Reset ERPRR-bit */
-	dme_write(sc, DM9000_EPCR, DM9000_EPCR_EPOS_PHY);
-
-	val = dme_read(sc, DM9000_EPDRL);
-	val += dme_read(sc, DM9000_EPDRH) << 8;
-
-	return val;
-}
-
-void
-dme_phy_write(struct dme_softc *sc, int reg, uint16_t value)
-{
-	/* Select Register to write*/
-	dme_write(sc, DM9000_EPAR, DM9000_EPAR_INT_PHY +
-	(reg & DM9000_EPAR_EROA_MASK));
-
-	/* Write data to the two data registers */
-	dme_write(sc, DM9000_EPDRL, value & 0xFF);
-	dme_write(sc, DM9000_EPDRH, (value >> 8) & 0xFF);
-
-	/* Select write operation (DM9000_EPCR_ERPRW) from the PHY */
-	dme_write(sc, DM9000_EPCR, DM9000_EPCR_ERPRW + DM9000_EPCR_EPOS_PHY);
-
-	/* Wait until access to PHY has completed */
-	while (dme_read(sc, DM9000_EPCR) & DM9000_EPCR_ERRE)
-		;
-
-	/* Reset ERPRR-bit */
-	dme_write(sc, DM9000_EPCR, DM9000_EPCR_EPOS_PHY);
-}
-
-void
-dme_phy_init(struct dme_softc *sc)
-{
-	u_int ifm_media = sc->sc_media.ifm_media;
-	uint32_t bmcr, anar;
-
-	bmcr = dme_phy_read(sc, DM9000_PHY_BMCR);
-	anar = dme_phy_read(sc, DM9000_PHY_ANAR);
-
-	anar = anar & ~DM9000_PHY_ANAR_10_HDX
-		& ~DM9000_PHY_ANAR_10_FDX
-		& ~DM9000_PHY_ANAR_TX_HDX
-		& ~DM9000_PHY_ANAR_TX_FDX;
-
-	switch (IFM_SUBTYPE(ifm_media)) {
-	case IFM_AUTO:
-		bmcr |= DM9000_PHY_BMCR_AUTO_NEG_EN;
-		anar |= DM9000_PHY_ANAR_10_HDX |
-			DM9000_PHY_ANAR_10_FDX |
-			DM9000_PHY_ANAR_TX_HDX |
-			DM9000_PHY_ANAR_TX_FDX;
-		

CVS commit: src/sys/dev/ic

2020-03-30 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Mar 31 02:32:25 UTC 2020

Modified Files:
src/sys/dev/ic: dm9000.c dm9000reg.h dm9000var.h

Log Message:
- reorgazine the entire structure to utilise ifmedia(4)/mii(4) and
  redefine starting point of debug.
- nuke duplicated standard MII register definition.  Davicom PHY extension
  is defined in dev/mii/dmphyreg.h


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/dm9000.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/dm9000reg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/dm9000var.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/atf/dist/tools

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 31 01:02:18 UTC 2020

Modified Files:
src/external/bsd/atf/dist/tools: env.cpp

Log Message:
Allow env - atf-run to work by setting a default minimal path.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/env.cpp

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/atf/dist/tools/env.cpp
diff -u src/external/bsd/atf/dist/tools/env.cpp:1.2 src/external/bsd/atf/dist/tools/env.cpp:1.3
--- src/external/bsd/atf/dist/tools/env.cpp:1.2	Tue Feb 11 12:28:20 2014
+++ src/external/bsd/atf/dist/tools/env.cpp	Mon Mar 30 21:02:18 2020
@@ -48,9 +48,16 @@ namespace impl = tools::env;
 std::string
 impl::get(const std::string& name)
 {
-const char* val = getenv(name.c_str());
-assert(val != NULL);
-return val;
+const char *n =name.c_str();
+const char* val = getenv(n);
+if (val != NULL)
+	return val;
+if (strcmp(n, "PATH") == 0)
+	return "/bin:/usr/bin";
+	
+throw tools::system_error(IMPL_NAME "::set",
+			"Cannot get environment variable '" + name +
+			"'", errno);
 }
 
 bool



CVS commit: src/external/bsd/atf/dist/tools

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 31 01:02:18 UTC 2020

Modified Files:
src/external/bsd/atf/dist/tools: env.cpp

Log Message:
Allow env - atf-run to work by setting a default minimal path.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/env.cpp

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



CVS commit: src/lib/libc/gen

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 22:14:48 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
Add comma in enumeration.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gen/nlist.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/gen/nlist.3
diff -u src/lib/libc/gen/nlist.3:1.13 src/lib/libc/gen/nlist.3:1.14
--- src/lib/libc/gen/nlist.3:1.13	Mon Mar 30 20:37:03 2020
+++ src/lib/libc/gen/nlist.3	Mon Mar 30 22:14:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nlist.3,v 1.13 2020/03/30 20:37:03 maya Exp $
+.\"	$NetBSD: nlist.3,v 1.14 2020/03/30 22:14:48 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -71,7 +71,7 @@ if the file
 .Fa filename
 does not exist or is not executable, the returned value is \-1.
 .Sh SEE ALSO
-.Xr a.out 5
+.Xr a.out 5 ,
 .Xr elf 5
 .Sh HISTORY
 A



CVS commit: src/lib/libc/gen

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 22:14:48 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
Add comma in enumeration.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gen/nlist.3

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

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:47:57 UTC 2020

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

Log Message:
Don't mention a.out support, which does not exist in ddb any more.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/share/man/man4/ddb.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/ddb.4
diff -u src/share/man/man4/ddb.4:1.188 src/share/man/man4/ddb.4:1.189
--- src/share/man/man4/ddb.4:1.188	Sun Dec 15 20:29:08 2019
+++ src/share/man/man4/ddb.4	Mon Mar 30 20:47:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ddb.4,v 1.188 2019/12/15 20:29:08 joerg Exp $
+.\"	$NetBSD: ddb.4,v 1.189 2020/03/30 20:47:57 maya Exp $
 .\"
 .\" Copyright (c) 1997 - 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -56,7 +56,7 @@
 .\" any improvements or extensions that they make and grant Carnegie Mellon
 .\" the rights to redistribute these changes.
 .\"
-.Dd December 15, 2019
+.Dd March 30, 2020
 .Dt DDB 4
 .Os
 .Sh NAME
@@ -834,21 +834,7 @@ If
 is specified, a character is displayed immediately after each symbol
 name indicating the type of symbol.
 .Pp
-For
-.Xr a.out 5 Ns -format
-symbol tables,
-absolute symbols display
-.Sy @ ,
-text segment symbols display
-.Sy * ,
-data segment symbols display
-.Sy + ,
-BSS segment symbols display
-.Sy - ,
-and filename symbols display
-.Sy / .
-For ELF-format symbol tables,
-object symbols display
+Object symbols display
 .Sy + ,
 function symbols display
 .Sy * ,



CVS commit: src/share/man/man4

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:47:57 UTC 2020

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

Log Message:
Don't mention a.out support, which does not exist in ddb any more.


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

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



CVS commit: src/sys/ddb

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:45:59 UTC 2020

Modified Files:
src/sys/ddb: db_sym.c

Log Message:
Remove a.out leftovers (unused)


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/ddb/db_sym.c

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



CVS commit: src/sys/ddb

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:45:59 UTC 2020

Modified Files:
src/sys/ddb: db_sym.c

Log Message:
Remove a.out leftovers (unused)


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/ddb/db_sym.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/ddb/db_sym.c
diff -u src/sys/ddb/db_sym.c:1.65 src/sys/ddb/db_sym.c:1.66
--- src/sys/ddb/db_sym.c:1.65	Fri Nov  3 09:59:07 2017
+++ src/sys/ddb/db_sym.c	Mon Mar 30 20:45:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_sym.c,v 1.65 2017/11/03 09:59:07 maxv Exp $	*/
+/*	$NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.65 2017/11/03 09:59:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -50,7 +50,6 @@ static void		db_symsplit(char *, char **
 
 const db_symformat_t *db_symformat;
 static db_forall_func_t db_sift;
-extern db_symformat_t db_symformat_aout;
 extern db_symformat_t db_symformat_elf;
 #endif
 



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:37:04 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
Mention elf rather than a.out some more.

(Also, inspired by freebsd, which removed the non-elf support)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/nlist.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/gen/nlist.3
diff -u src/lib/libc/gen/nlist.3:1.12 src/lib/libc/gen/nlist.3:1.13
--- src/lib/libc/gen/nlist.3:1.12	Mon Mar 30 20:35:12 2020
+++ src/lib/libc/gen/nlist.3	Mon Mar 30 20:37:03 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nlist.3,v 1.12 2020/03/30 20:35:12 maya Exp $
+.\"	$NetBSD: nlist.3,v 1.13 2020/03/30 20:37:03 maya Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -48,7 +48,7 @@ function
 retrieves name list entries from the symbol table of an
 executable file.
 (See
-.Xr a.out 5 . )
+.Xr elf 5 . )
 The argument
 .Fa \
 is set to reference the



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:37:04 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
Mention elf rather than a.out some more.

(Also, inspired by freebsd, which removed the non-elf support)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/nlist.3

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



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:35:12 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
xref elf(5).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/nlist.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/gen/nlist.3
diff -u src/lib/libc/gen/nlist.3:1.11 src/lib/libc/gen/nlist.3:1.12
--- src/lib/libc/gen/nlist.3:1.11	Thu Aug  7 16:42:53 2003
+++ src/lib/libc/gen/nlist.3	Mon Mar 30 20:35:12 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nlist.3,v 1.11 2003/08/07 16:42:53 agc Exp $
+.\"	$NetBSD: nlist.3,v 1.12 2020/03/30 20:35:12 maya Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)nlist.3	8.3 (Berkeley) 4/19/94
 .\"
-.Dd April 19, 1994
+.Dd March 30, 2020
 .Dt NLIST 3
 .Os
 .Sh NAME
@@ -72,6 +72,7 @@ if the file
 does not exist or is not executable, the returned value is \-1.
 .Sh SEE ALSO
 .Xr a.out 5
+.Xr elf 5
 .Sh HISTORY
 A
 .Fn nlist



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:35:12 UTC 2020

Modified Files:
src/lib/libc/gen: nlist.3

Log Message:
xref elf(5).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/nlist.3

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



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:34:11 UTC 2020

Modified Files:
src/lib/libc/gen: nlist_private.h

Log Message:
Be less of a minefield for new architectures. They're not going to be a.out.
Remove sh5, long gone.
(Hopefully nothing hits the #else case)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/gen/nlist_private.h

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/gen/nlist_private.h
diff -u src/lib/libc/gen/nlist_private.h:1.25 src/lib/libc/gen/nlist_private.h:1.26
--- src/lib/libc/gen/nlist_private.h:1.25	Fri Jan 29 21:38:35 2016
+++ src/lib/libc/gen/nlist_private.h	Mon Mar 30 20:34:11 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_private.h,v 1.25 2016/01/29 21:38:35 christos Exp $ */
+/* $NetBSD: nlist_private.h,v 1.26 2020/03/30 20:34:11 maya Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -54,9 +54,6 @@
 #  define	NLIST_AOUT
 #  define	NLIST_ELF32
 #  define	NLIST_ELF64
-#elif defined(__SH5__)
-#  define	NLIST_ELF32
-#  define	NLIST_ELF64
 #elif defined(__sh__)
 #  define	NLIST_COFF
 #  define	NLIST_ELF32
@@ -74,10 +71,7 @@
 #elif defined(__or1k__)
 #  define	NLIST_ELF32
 #else
-#  define	NLIST_AOUT
-/* #define	NLIST_ECOFF */
-/* #define	NLIST_ELF32 */
-/* #define	NLIST_ELF64 */
+#  error	"Add your architecture here"
 #endif
 
 #define	ISLAST(p)	(N_NAME(p) == 0 || N_NAME(p)[0] == 0)



CVS commit: src/lib/libc/gen

2020-03-30 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar 30 20:34:11 UTC 2020

Modified Files:
src/lib/libc/gen: nlist_private.h

Log Message:
Be less of a minefield for new architectures. They're not going to be a.out.
Remove sh5, long gone.
(Hopefully nothing hits the #else case)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/gen/nlist_private.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

2020-03-30 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Mar 30 20:17:42 UTC 2020

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

Log Message:
Expose F_DUPFD_CLOEXEC to POSIX >= 200809


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/sys/fcntl.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/fcntl.h
diff -u src/sys/sys/fcntl.h:1.53 src/sys/sys/fcntl.h:1.54
--- src/sys/sys/fcntl.h:1.53	Sun Sep 15 23:55:22 2019
+++ src/sys/sys/fcntl.h	Mon Mar 30 20:17:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fcntl.h,v 1.53 2019/09/15 23:55:22 christos Exp $	*/
+/*	$NetBSD: fcntl.h,v 1.54 2020/03/30 20:17:42 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1990, 1993
@@ -192,7 +192,11 @@
 #if defined(_NETBSD_SOURCE)
 #define	F_CLOSEM	10		/* close all fds >= to the one given */
 #define	F_MAXFD		11		/* return the max open fd */
+#endif
+#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
 #define	F_DUPFD_CLOEXEC	12		/* close on exec duplicated fd */
+#endif
+#if defined(_NETBSD_SOURCE)
 #define	F_GETNOSIGPIPE	13		/* get SIGPIPE disposition */
 #define	F_SETNOSIGPIPE	14		/* set SIGPIPE disposition */
 #define	F_GETPATH	15		/* get pathname associated with fd */



CVS commit: src/sys/sys

2020-03-30 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Mar 30 20:17:42 UTC 2020

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

Log Message:
Expose F_DUPFD_CLOEXEC to POSIX >= 200809


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/sys/fcntl.h

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



CVS commit: src/sys/kern

2020-03-30 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon Mar 30 19:15:28 UTC 2020

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

Log Message:
cache_lookup(): fix a use-after-free.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/kern/vfs_cache.c

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

Modified files:

Index: src/sys/kern/vfs_cache.c
diff -u src/sys/kern/vfs_cache.c:1.135 src/sys/kern/vfs_cache.c:1.136
--- src/sys/kern/vfs_cache.c:1.135	Fri Mar 27 00:14:25 2020
+++ src/sys/kern/vfs_cache.c	Mon Mar 30 19:15:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_cache.c,v 1.135 2020/03/27 00:14:25 ad Exp $	*/
+/*	$NetBSD: vfs_cache.c,v 1.136 2020/03/30 19:15:28 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.135 2020/03/27 00:14:25 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.136 2020/03/30 19:15:28 ad Exp $");
 
 #define __NAMECACHE_PRIVATE
 #ifdef _KERNEL_OPT
@@ -554,6 +554,14 @@ cache_lookup(struct vnode *dvp, const ch
 		return false;
 	}
 	if (ncp->nc_vp == NULL) {
+		if (iswht_ret != NULL) {
+			/*
+			 * Restore the ISWHITEOUT flag saved earlier.
+			 */
+			*iswht_ret = ncp->nc_whiteout;
+		} else {
+			KASSERT(!ncp->nc_whiteout);
+		}
 		if (nameiop == CREATE && (cnflags & ISLASTCN) != 0) {
 			/*
 			 * Last component and we are preparing to create
@@ -570,14 +578,6 @@ cache_lookup(struct vnode *dvp, const ch
 			/* found neg entry; vn is already null from above */
 			hit = true;
 		}
-		if (iswht_ret != NULL) {
-			/*
-			 * Restore the ISWHITEOUT flag saved earlier.
-			 */
-			*iswht_ret = ncp->nc_whiteout;
-		} else {
-			KASSERT(!ncp->nc_whiteout);
-		}
 		rw_exit(>vi_nc_lock);
 		return hit;
 	}



CVS commit: src/sys/kern

2020-03-30 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Mon Mar 30 19:15:28 UTC 2020

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

Log Message:
cache_lookup(): fix a use-after-free.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/kern/vfs_cache.c

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



CVS commit: src/sys/arch/xen/xen

2020-03-30 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Mar 30 19:07:32 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
don't check for IFF_OACTIVE, nothing sets it


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.89 src/sys/arch/xen/xen/xennetback_xenbus.c:1.90
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.89	Mon Mar 30 15:31:52 2020
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Mon Mar 30 19:07:32 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.89 2020/03/30 15:31:52 jdolecek Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.90 2020/03/30 19:07:32 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.89 2020/03/30 15:31:52 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.90 2020/03/30 19:07:32 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -600,7 +600,7 @@ xennetback_frontend_changed(void *arg, X
 
 	case XenbusStateClosing:
 		xneti->xni_status = DISCONNECTING;
-		xneti->xni_if.if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+		xneti->xni_if.if_flags &= ~IFF_RUNNING;
 		xneti->xni_if.if_timer = 0;
 		xenbus_switch_state(xbusd, NULL, XenbusStateClosing);
 		break;
@@ -960,8 +960,7 @@ xennetback_ifsoftstart_transfer(struct x
 
 	XENPRINTF(("xennetback_ifsoftstart_transfer "));
 	int s = splnet();
-	if (__predict_false(
-	(ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)) {
+	if (__predict_false((ifp->if_flags & IFF_RUNNING) == 0)) {
 		splx(s);
 		return;
 	}
@@ -1270,8 +1269,7 @@ xennetback_ifsoftstart_copy(struct xnetb
 
 	XENPRINTF(("xennetback_ifsoftstart_copy "));
 	int s = splnet();
-	if (__predict_false(
-	(ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)) {
+	if (__predict_false((ifp->if_flags & IFF_RUNNING) == 0)) {
 		splx(s);
 		return;
 	}
@@ -1467,7 +1465,7 @@ xennetback_ifstop(struct ifnet *ifp, int
 	struct xnetback_instance *xneti = ifp->if_softc;
 	int s = splnet();
 
-	ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+	ifp->if_flags &= ~IFF_RUNNING;
 	ifp->if_timer = 0;
 	if (xneti->xni_status == CONNECTED) {
 		XENPRINTF(("%s: req_prod 0x%x resp_prod 0x%x req_cons 0x%x "



CVS commit: src/sys/arch/xen/xen

2020-03-30 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Mar 30 19:07:32 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
don't check for IFF_OACTIVE, nothing sets it


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/xen/xennetback_xenbus.c

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



CVS commit: [netbsd-9] src/doc

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:58:35 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #809 - #811


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-9.1

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

Modified files:

Index: src/doc/CHANGES-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.26 src/doc/CHANGES-9.1:1.1.2.27
--- src/doc/CHANGES-9.1:1.1.2.26	Mon Mar 30 18:36:47 2020
+++ src/doc/CHANGES-9.1	Mon Mar 30 18:58:35 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.26 2020/03/30 18:36:47 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.27 2020/03/30 18:58:35 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -741,3 +741,20 @@ share/man/man9/cprng.91.11
 	Fix cprng_fast64 return type to match code.
 	[skrll, ticket #805]
 
+share/man/man4/pms.41.35,1.36
+sys/dev/pckbport/synaptics.c			1.55,1.56
+
+	synaptics: Make up_down_emulation useful for single-button clickpads.
+	Set up_down_emulation=3 by default.
+	[nia, ticket #809]
+
+sys/dev/pckbport/synaptics.c			1.57,1.58
+
+	synaptics: Allow the max_speed sysctls to be set.
+	[nia, ticket #810]
+
+include/stdio.h	1.98
+
+	Move P_tmpdir from "/var/tmp/" to "/tmp/".
+	[mrg, ticket #811]
+



CVS commit: [netbsd-9] src/doc

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:58:35 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #809 - #811


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-9.1

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



CVS commit: [netbsd-9] src/include

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:54:56 UTC 2020

Modified Files:
src/include [netbsd-9]: stdio.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #811):

include/stdio.h: revision 1.98

move P_tmpdir from "/var/tmp/" to "/tmp/".

the main effect of this is to make GCC and other libiberty using
tools use /tmp instead of /var/tmp for compiler temp files,
which can be a bottleneck on larger systems.

a survey of other platforms shows only OSX also uses /var/tmp,
everyone else has switched to /tmp long ago.

cons:  some smaller systems may have a smaller /tmp than /var/tmp,
and this may cause builds to fail with out of space earlier.
point the build to /var/tmp using TMPDIR in this case.

one can argue that setting TMPDIR would work around this, but we
want to have the effect for all users without having special setup.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.97.18.1 src/include/stdio.h

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

Modified files:

Index: src/include/stdio.h
diff -u src/include/stdio.h:1.97 src/include/stdio.h:1.97.18.1
--- src/include/stdio.h:1.97	Thu Mar 17 00:42:49 2016
+++ src/include/stdio.h	Mon Mar 30 18:54:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.97 2016/03/17 00:42:49 christos Exp $	*/
+/*	$NetBSD: stdio.h,v 1.97.18.1 2020/03/30 18:54:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -193,7 +193,7 @@ __END_DECLS
 
 /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
-#define	P_tmpdir	"/var/tmp/"
+#define	P_tmpdir	"/tmp/"
 #endif
 #define	L_tmpnam	1024	/* XXX must be == PATH_MAX */
 /* Always ensure that this is consistent with  */



CVS commit: [netbsd-9] src/include

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:54:56 UTC 2020

Modified Files:
src/include [netbsd-9]: stdio.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #811):

include/stdio.h: revision 1.98

move P_tmpdir from "/var/tmp/" to "/tmp/".

the main effect of this is to make GCC and other libiberty using
tools use /tmp instead of /var/tmp for compiler temp files,
which can be a bottleneck on larger systems.

a survey of other platforms shows only OSX also uses /var/tmp,
everyone else has switched to /tmp long ago.

cons:  some smaller systems may have a smaller /tmp than /var/tmp,
and this may cause builds to fail with out of space earlier.
point the build to /var/tmp using TMPDIR in this case.

one can argue that setting TMPDIR would work around this, but we
want to have the effect for all users without having special setup.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.97.18.1 src/include/stdio.h

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



CVS commit: [netbsd-9] src/sys/dev/pckbport

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:47:33 UTC 2020

Modified Files:
src/sys/dev/pckbport [netbsd-9]: synaptics.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #810):

sys/dev/pckbport/synaptics.c: revision 1.57
sys/dev/pckbport/synaptics.c: revision 1.58

synaptics: Allow the max_speed sysctls to be set
synaptics: fix syntax


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.1 -r1.50.2.2 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.50.2.1 src/sys/dev/pckbport/synaptics.c:1.50.2.2
--- src/sys/dev/pckbport/synaptics.c:1.50.2.1	Mon Mar 30 18:45:16 2020
+++ src/sys/dev/pckbport/synaptics.c	Mon Mar 30 18:47:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.50.2.1 2020/03/30 18:45:16 martin Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.50.2.2 2020/03/30 18:47:33 martin Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.1 2020/03/30 18:45:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.2 2020/03/30 18:47:33 martin Exp $");
 
 #include 
 #include 
@@ -862,7 +862,10 @@ pms_sysctl_synaptics_verify(SYSCTLFN_ARG
 	} else
 	if (node.sysctl_num == synaptics_gesture_length_nodenum ||
 	node.sysctl_num == synaptics_edge_motion_delta_nodenum ||
-	node.sysctl_num == synaptics_up_down_motion_delta_nodenum) {
+	node.sysctl_num == synaptics_up_down_motion_delta_nodenum ||
+	node.sysctl_num == synaptics_max_speed_x_nodenum ||
+	node.sysctl_num == synaptics_max_speed_y_nodenum ||
+	node.sysctl_num == synaptics_max_speed_z_nodenum) {
 		if (t < 0)
 			return (EINVAL);
 	} else



CVS commit: [netbsd-9] src/sys/dev/pckbport

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:47:33 UTC 2020

Modified Files:
src/sys/dev/pckbport [netbsd-9]: synaptics.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #810):

sys/dev/pckbport/synaptics.c: revision 1.57
sys/dev/pckbport/synaptics.c: revision 1.58

synaptics: Allow the max_speed sysctls to be set
synaptics: fix syntax


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.1 -r1.50.2.2 src/sys/dev/pckbport/synaptics.c

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



CVS commit: [netbsd-9] src

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:45:16 UTC 2020

Modified Files:
src/share/man/man4 [netbsd-9]: pms.4
src/sys/dev/pckbport [netbsd-9]: synaptics.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #809):

sys/dev/pckbport/synaptics.c: revision 1.55
sys/dev/pckbport/synaptics.c: revision 1.56
share/man/man4/pms.4: revision 1.35
share/man/man4/pms.4: revision 1.36

synaptics: Make up_down_emulation useful for single-button clickpads

On devices such as the Thinkpad X250, the clickpad can be pressed
to generate mouse button events 1 and 2. There are also additional
physical buttons which the pms(4) driver recognizes as "up/down" buttons
(mouse buttons 3 and 4). Allow these to be remapped to buttons 1 and 2
and used like normal touchpad buttons with the following sysctl:

While here, adjust the existing "middle button emulation"
(hw.synaptics.up_down_emulation=1) so it works with single-button
clickpads.

XXX: 3 may be a more useful default than the current default,
depending on hardware availability of touchpads with "up/down buttons".

Update the documentation accordingly.

synaptics: Set up_down_emulation=3 by default.

It's a less surprising default for modern hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.2.1 src/share/man/man4/pms.4
cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/dev/pckbport/synaptics.c

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



CVS commit: [netbsd-9] src

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:45:16 UTC 2020

Modified Files:
src/share/man/man4 [netbsd-9]: pms.4
src/sys/dev/pckbport [netbsd-9]: synaptics.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #809):

sys/dev/pckbport/synaptics.c: revision 1.55
sys/dev/pckbport/synaptics.c: revision 1.56
share/man/man4/pms.4: revision 1.35
share/man/man4/pms.4: revision 1.36

synaptics: Make up_down_emulation useful for single-button clickpads

On devices such as the Thinkpad X250, the clickpad can be pressed
to generate mouse button events 1 and 2. There are also additional
physical buttons which the pms(4) driver recognizes as "up/down" buttons
(mouse buttons 3 and 4). Allow these to be remapped to buttons 1 and 2
and used like normal touchpad buttons with the following sysctl:

While here, adjust the existing "middle button emulation"
(hw.synaptics.up_down_emulation=1) so it works with single-button
clickpads.

XXX: 3 may be a more useful default than the current default,
depending on hardware availability of touchpads with "up/down buttons".

Update the documentation accordingly.

synaptics: Set up_down_emulation=3 by default.

It's a less surprising default for modern hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.2.1 src/share/man/man4/pms.4
cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/dev/pckbport/synaptics.c

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/pms.4
diff -u src/share/man/man4/pms.4:1.32 src/share/man/man4/pms.4:1.32.2.1
--- src/share/man/man4/pms.4:1.32	Tue Nov  6 09:14:08 2018
+++ src/share/man/man4/pms.4	Mon Mar 30 18:45:16 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: pms.4,v 1.32 2018/11/06 09:14:08 blymn Exp $
+.\" $NetBSD: pms.4,v 1.32.2.1 2020/03/30 18:45:16 martin Exp $
 .\"
 .\" Copyright (c) 1993 Christopher G. Demetriou
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" <>
 .\"
-.Dd February 4, 2018
+.Dd March 30, 2020
 .Dt PMS 4
 .Os
 .Sh NAME
@@ -102,13 +102,22 @@ The following
 variables control behavior of Synaptics touchpads:
 .Bl -tag -width 8n
 .It Dv hw.synaptics.up_down_emulation
-If the touchpad reports the existence of Up/Down buttons, this value
-determines if they should be reported as button 4 and 5 events or if
-they should be used to emulate some other event.
-When set to 0, report Up/Down events as buttons 4 and 5.
-When set to 1, the Up and Down buttons are both mapped to the middle button.
-When set to 2 (default), the Up and Down buttons are used for Z-axis
-emulation, which more closely resembles how mouse wheels operate.
+If the touchpad reports the existence of extra ("Up/Down") buttons, this
+value determines what kind of mouse events they should generate.
+On certain clickpads, the Up/Down buttons may be physical buttons that
+can be used instead of pressing the pad down, or used as additional
+buttons.
+.Bl -bullet
+.It
+If set to 0, Up/Down events generate button 4 and 5 clicks.
+.It
+If set to 1, Up/Down events generate middle button clicks.
+.It
+If set to 2, the Up and Down buttons are used for Z-axis emulation,
+which more closely resembles how mouse wheels operate.
+.It
+If set to 3 (default), Up/Down events generate left/right clicks.
+.El
 .It Dv hw.synaptics.up_down_motion_delta
 When the Up/Down buttons are used for Z-axis emulation, this value specifies
 the emulated delta-Z value per click.
@@ -139,9 +148,14 @@ reported pressure drops below this value
 More recent touchpads can report the presence of more than one finger
 on the pad.
 This value determines how such events are used.
+.Bl -bullet
+.It
 If set to 0 (default), two-finger events are ignored.
+.It
 If set to 1, two-finger events generate a right button click.
+.It
 If set to 2, two-finger events generate a middle button click.
+.El
 .It Dv hw.synaptics.scale_x
 .It Dv hw.synaptics.scale_y
 .It Dv hw.synaptics.scale_z

Index: src/sys/dev/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.50 src/sys/dev/pckbport/synaptics.c:1.50.2.1
--- src/sys/dev/pckbport/synaptics.c:1.50	Fri Jul  5 05:09:24 2019
+++ src/sys/dev/pckbport/synaptics.c	Mon Mar 30 18:45:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.50 2019/07/05 05:09:24 mlelstv Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.50.2.1 2020/03/30 18:45:16 martin Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50 2019/07/05 05:09:24 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.1 2020/03/30 18:45:16 martin Exp $");
 
 #include 
 #include 
@@ -98,7 +98,7 @@ static void pms_sysctl_synaptics(struct 
 static int pms_sysctl_synaptics_verify(SYSCTLFN_ARGS);
 
 /* Controlled by sysctl. */
-static int synaptics_up_down_emul = 2;
+static int synaptics_up_down_emul = 3;
 static int 

CVS commit: [netbsd-9] src/doc

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:36:48 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #803 - #805


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.1

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

Modified files:

Index: src/doc/CHANGES-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.25 src/doc/CHANGES-9.1:1.1.2.26
--- src/doc/CHANGES-9.1:1.1.2.25	Fri Mar 27 08:51:59 2020
+++ src/doc/CHANGES-9.1	Mon Mar 30 18:36:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.25 2020/03/27 08:51:59 sborrill Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.26 2020/03/30 18:36:47 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -725,3 +725,19 @@ etc/named.conf	1.8
 	which no longer serves any useful purpose).
 	[christos, ticket #806]
 
+share/locale/locale.alias			1.13
+
+	Add C.UTF-8 locale.
+	[kim, ticket #803]
+
+share/locale/Makefile.common			1.2
+share/locale/monetary/converted/fi_FI.ISO8859-1.src 1.2
+
+	Fix the currency symbol for fi_FI.ISO8859-1.
+	[kim, ticket #804]
+
+share/man/man9/cprng.91.11
+
+	Fix cprng_fast64 return type to match code.
+	[skrll, ticket #805]
+



CVS commit: [netbsd-9] src/doc

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:36:48 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #803 - #805


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.1

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



CVS commit: [netbsd-9] src/share/man/man9

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:31:03 UTC 2020

Modified Files:
src/share/man/man9 [netbsd-9]: cprng.9

Log Message:
Pull up following revision(s) (requested by skrll in ticket #805):

share/man/man9/cprng.9: revision 1.11

Fix cprng_fast64 return type to match code


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.18.1 src/share/man/man9/cprng.9

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/man9/cprng.9
diff -u src/share/man/man9/cprng.9:1.10 src/share/man/man9/cprng.9:1.10.18.1
--- src/share/man/man9/cprng.9:1.10	Thu Feb 19 15:38:30 2015
+++ src/share/man/man9/cprng.9	Mon Mar 30 18:31:03 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cprng.9,v 1.10 2015/02/19 15:38:30 riastradh Exp $
+.\"	$NetBSD: cprng.9,v 1.10.18.1 2020/03/30 18:31:03 martin Exp $
 .\"
 .\" Copyright (c) 2011-2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 19, 2015
+.Dd March 24, 2020
 .Dt CPRNG 9
 .Os
 .Sh NAME
@@ -57,7 +57,7 @@
 .Fn cprng_fast "void *buf" "size_t len"
 .Ft uint32_t
 .Fn cprng_fast32 "void"
-.Ft uint32_t
+.Ft uint64_t
 .Fn cprng_fast64 "void"
 .Bd -literal
 #define CPRNG_MAX_LEN   524288



CVS commit: [netbsd-9] src/share/man/man9

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:31:03 UTC 2020

Modified Files:
src/share/man/man9 [netbsd-9]: cprng.9

Log Message:
Pull up following revision(s) (requested by skrll in ticket #805):

share/man/man9/cprng.9: revision 1.11

Fix cprng_fast64 return type to match code


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.18.1 src/share/man/man9/cprng.9

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



CVS commit: [netbsd-9] src/share/locale

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:29:39 UTC 2020

Modified Files:
src/share/locale [netbsd-9]: Makefile.common
src/share/locale/monetary/converted [netbsd-9]: fi_FI.ISO8859-1.src

Log Message:
Pull up following revision(s) (requested by kim in ticket #804):

share/locale/monetary/converted/fi_FI.ISO8859-1.src: revision 1.2
share/locale/Makefile.common: revision 1.2

Fix the currency symbol for fi_FI.ISO8859-1

In the Finnish language, the recommended symbol for euro is the euro sign
where it is available, and the lowercase letter e otherwise.

The use of the ISO currency code EUR is not an abbreviation of the word
euro in the Finnish language, just like FIM is not an abbreviation of
the word markka.

Reference:
https://www.kielikello.fi/-/euro-;>https://www.kielikello.fi/-/euro-
Euro
Kielikello 3/1998
Kotimaisten kielten keskus
Institute for the Languages of Finland
[Last retrieved 2020-03-23]


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.32.1 src/share/locale/Makefile.common
cvs rdiff -u -r1.1 -r1.1.32.1 \
src/share/locale/monetary/converted/fi_FI.ISO8859-1.src

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



CVS commit: [netbsd-9] src/share/locale

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:29:39 UTC 2020

Modified Files:
src/share/locale [netbsd-9]: Makefile.common
src/share/locale/monetary/converted [netbsd-9]: fi_FI.ISO8859-1.src

Log Message:
Pull up following revision(s) (requested by kim in ticket #804):

share/locale/monetary/converted/fi_FI.ISO8859-1.src: revision 1.2
share/locale/Makefile.common: revision 1.2

Fix the currency symbol for fi_FI.ISO8859-1

In the Finnish language, the recommended symbol for euro is the euro sign
where it is available, and the lowercase letter e otherwise.

The use of the ISO currency code EUR is not an abbreviation of the word
euro in the Finnish language, just like FIM is not an abbreviation of
the word markka.

Reference:
https://www.kielikello.fi/-/euro-;>https://www.kielikello.fi/-/euro-
Euro
Kielikello 3/1998
Kotimaisten kielten keskus
Institute for the Languages of Finland
[Last retrieved 2020-03-23]


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.32.1 src/share/locale/Makefile.common
cvs rdiff -u -r1.1 -r1.1.32.1 \
src/share/locale/monetary/converted/fi_FI.ISO8859-1.src

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

Modified files:

Index: src/share/locale/Makefile.common
diff -u src/share/locale/Makefile.common:1.1 src/share/locale/Makefile.common:1.1.32.1
--- src/share/locale/Makefile.common:1.1	Sun Aug 11 22:09:40 2013
+++ src/share/locale/Makefile.common	Mon Mar 30 18:29:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2013/08/11 22:09:40 joerg Exp $
+# $NetBSD: Makefile.common,v 1.1.32.1 2020/03/30 18:29:39 martin Exp $
 
 all:		${LOCALES:S/$/.out/g}
 realall:	${LOCALES:S/$/.out/g}
@@ -37,6 +37,7 @@ update-converted:
 	@echo Generating character set ${charset} of ${locale_name}...
 	@rm -f ${.CURDIR}/converted/${locale}.src
 	@set -e; cat < ${.CURDIR}/${locale_name}.UTF-8.src \
+	| (case ${locale}  in fi_FI.ISO8859-1) sed 's,€,e,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859-[125]) sed 's,€,EUR,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859-9) sed 's,₺,L,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859*) sed 's,−,-,g';; *) cat ;; esac) \

Index: src/share/locale/monetary/converted/fi_FI.ISO8859-1.src
diff -u src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.1 src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.1.32.1
--- src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.1	Sun Aug 11 22:09:41 2013
+++ src/share/locale/monetary/converted/fi_FI.ISO8859-1.src	Mon Mar 30 18:29:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: fi_FI.ISO8859-1.src,v 1.1 2013/08/11 22:09:41 joerg Exp $
+# $NetBSD: fi_FI.ISO8859-1.src,v 1.1.32.1 2020/03/30 18:29:39 martin Exp $
 #
 # Locale: fi_FI
 # Character set: ISO8859-1
@@ -33,7 +33,7 @@ EUR 
 #
 # Currency Symbol (currency_symbol)
 #
-EUR
+e
 #
 # Monetary Decimal Point (mon_decimal_point)
 #



CVS commit: [netbsd-9] src/share/locale

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:25:43 UTC 2020

Modified Files:
src/share/locale [netbsd-9]: locale.alias

Log Message:
Pull up following revision(s) (requested by kim in ticket #803):

share/locale/locale.alias: revision 1.13

Add C.UTF-8


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.28.1 src/share/locale/locale.alias

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

Modified files:

Index: src/share/locale/locale.alias
diff -u src/share/locale/locale.alias:1.12 src/share/locale/locale.alias:1.12.28.1
--- src/share/locale/locale.alias:1.12	Sun Aug 11 22:09:40 2013
+++ src/share/locale/locale.alias	Mon Mar 30 18:25:43 2020
@@ -1,9 +1,13 @@
-# $NetBSD: locale.alias,v 1.12 2013/08/11 22:09:40 joerg Exp $
+# $NetBSD: locale.alias,v 1.12.28.1 2020/03/30 18:25:43 martin Exp $
 
 #
 # Locale aliases
 #
 
+# C.UTF-8
+C.UTF-8/LC_CTYPE		en_US.UTF-8
+C.UTF-8C
+
 # Pig locale
 Pig/LC_MESSAGES			/FORCE
 



CVS commit: [netbsd-9] src/share/locale

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 18:25:43 UTC 2020

Modified Files:
src/share/locale [netbsd-9]: locale.alias

Log Message:
Pull up following revision(s) (requested by kim in ticket #803):

share/locale/locale.alias: revision 1.13

Add C.UTF-8


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.28.1 src/share/locale/locale.alias

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



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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 17:32:22 UTC 2020

Modified Files:
src/external/bsd/blacklist/lib: libblacklist.3

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/blacklist/lib/libblacklist.3

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/lib/libblacklist.3
diff -u src/external/bsd/blacklist/lib/libblacklist.3:1.10 src/external/bsd/blacklist/lib/libblacklist.3:1.11
--- src/external/bsd/blacklist/lib/libblacklist.3:1.10	Mon Mar 30 15:47:15 2020
+++ src/external/bsd/blacklist/lib/libblacklist.3	Mon Mar 30 17:32:22 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: libblacklist.3,v 1.10 2020/03/30 15:47:15 christos Exp $
+.\" $NetBSD: libblacklist.3,v 1.11 2020/03/30 17:32:22 wiz Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -96,11 +96,13 @@ There was an unsuccessful authentication
 A user successfully authenticated.
 .It Va BLACKLIST_ABUSIVE_BEHAVIOR
 The sending daemon has detected abusive behavior
-from the remote system.  The remote address should
+from the remote system.
+The remote address should
 be blocked as soon as possible.
 .It Va BLACKLIST_BAD_USER
 The sending daemon has determined the username
-presented for authentication is invalid.  The
+presented for authentication is invalid.
+The
 .Xr blacklistd 8
 daemon compares the username to a configured list of forbidden
 usernames and



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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 17:32:22 UTC 2020

Modified Files:
src/external/bsd/blacklist/lib: libblacklist.3

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/blacklist/lib/libblacklist.3

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



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

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 15:47:15 UTC 2020

Modified Files:
src/external/bsd/blacklist/lib: libblacklist.3

Log Message:
Clarify that we always need a valid socket


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/blacklist/lib/libblacklist.3

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/lib/libblacklist.3
diff -u src/external/bsd/blacklist/lib/libblacklist.3:1.9 src/external/bsd/blacklist/lib/libblacklist.3:1.10
--- src/external/bsd/blacklist/lib/libblacklist.3:1.9	Wed Nov  6 15:50:01 2019
+++ src/external/bsd/blacklist/lib/libblacklist.3	Mon Mar 30 11:47:15 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: libblacklist.3,v 1.9 2019/11/06 20:50:01 christos Exp $
+.\" $NetBSD: libblacklist.3,v 1.10 2020/03/30 15:47:15 christos Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 5, 2017
+.Dd March 30, 2020
 .Dt LIBBLACKLIST 3
 .Os
 .Sh NAME
@@ -122,6 +122,14 @@ functions can be used with unconnected s
 .Xr getpeername 2
 will not work, the server will pass the peer name in the message.
 .Pp
+In all cases the file descriptor passed in the
+.Fa fd
+argument must be pointing to a valid socket so that
+.Xr blacklistd 8
+can establish ownership of the local endpoint
+using
+.Xr getsockname 2 .
+.Pp
 By default,
 .Xr syslogd 8
 is used for message logging.



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

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 15:47:15 UTC 2020

Modified Files:
src/external/bsd/blacklist/lib: libblacklist.3

Log Message:
Clarify that we always need a valid socket


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/blacklist/lib/libblacklist.3

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



CVS commit: src/sys/arch/xen/xen

2020-03-30 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Mar 30 15:31:52 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
batch the GNTTABOP_copy hypervisor calls in xvif(4) when processing
DomU requests in xennetback_evthandler()

some 25% speed increase observed over the single-copy version


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/xen/xen/xennetback_xenbus.c

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



CVS commit: src/sys/arch/xen/xen

2020-03-30 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Mar 30 15:31:52 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
batch the GNTTABOP_copy hypervisor calls in xvif(4) when processing
DomU requests in xennetback_evthandler()

some 25% speed increase observed over the single-copy version


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.88 src/sys/arch/xen/xen/xennetback_xenbus.c:1.89
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.88	Sun Mar 29 15:38:29 2020
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Mon Mar 30 15:31:52 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.88 2020/03/29 15:38:29 jdolecek Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.89 2020/03/30 15:31:52 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.88 2020/03/29 15:38:29 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.89 2020/03/30 15:31:52 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -178,6 +178,10 @@ static struct _pages_pool_free {
 	vaddr_t va;
 	paddr_t pa;
 } pages_pool_free[NB_XMIT_PAGES_BATCH];
+static struct _req_info {
+	int id;
+	int flags;
+} xstart_req[NB_XMIT_PAGES_BATCH];
 
 
 void
@@ -718,6 +722,71 @@ xennetback_tx_check_packet(const netif_t
 	return NULL;
 }
 
+static void
+xennetback_tx_copy_process(struct ifnet *ifp, struct xnetback_instance *xneti,
+	int queued)
+{
+	int i = 0;
+	gnttab_copy_t *gop;
+	struct mbuf *m;
+	struct _req_info *req;
+
+	/*
+	 * Copy the data and ack it. Delaying it until the mbuf is
+	 * freed will stall transmit.
+	 */
+	if (HYPERVISOR_grant_table_op(GNTTABOP_copy, xstart_gop_copy, queued)
+	!= 0) {
+		printf("%s: GNTTABOP_copy failed", ifp->if_xname);
+		goto abort;
+	}
+
+	for (; i < queued; i++) {
+		gop = _gop_copy[i];
+		m = mbufs_sent[i];
+		req = _req[i];
+
+		if (gop->status != GNTST_okay) {
+			printf("%s GNTTABOP_copy[%d] %d\n",
+			ifp->if_xname, i, gop->status);
+			goto abort;
+		}
+
+		xennetback_tx_response(xneti, req->id, NETIF_RSP_OKAY);
+
+		if ((ifp->if_flags & IFF_PROMISC) == 0) {
+			struct ether_header *eh =
+			mtod(m, struct ether_header *);
+			if (ETHER_IS_MULTICAST(eh->ether_dhost) == 0 &&
+			memcmp(CLLADDR(ifp->if_sadl), eh->ether_dhost,
+			ETHER_ADDR_LEN) != 0) {
+m_freem(m);
+continue; /* packet is not for us */
+			}
+		}
+
+		if (req->flags & NETTXF_csum_blank)
+			xennet_checksum_fill(ifp, m);
+		else if (req->flags & NETTXF_data_validated)
+			m->m_pkthdr.csum_flags = XN_M_CSUM_SUPPORTED;
+		m_set_rcvif(m, ifp);
+
+		if_percpuq_enqueue(ifp->if_percpuq, m);
+	}
+
+	return;
+
+abort:
+	for (; i < queued; i++) {
+		m = mbufs_sent[i];
+		req = _req[i];
+
+		m_freem(m);
+		xennetback_tx_response(xneti, req->id, NETIF_RSP_ERROR);
+		if_statinc(ifp, if_ierrors);
+	}
+}
+
 static int
 xennetback_evthandler(void *arg)
 {
@@ -727,9 +796,9 @@ xennetback_evthandler(void *arg)
 	struct mbuf *m;
 	int receive_pending;
 	RING_IDX req_cons;
-	gnttab_copy_t gop;
+	gnttab_copy_t *gop;
 	paddr_t pa;
-	int offset;
+	int offset, queued = 0;
 
 	XENPRINTF(("xennetback_evthandler "));
 	req_cons = xneti->xni_txring.req_cons;
@@ -796,68 +865,38 @@ xennetback_evthandler(void *arg)
 		xneti->xni_if.if_xname, txreq.offset,
 		txreq.size, txreq.id, MASK_NETIF_TX_IDX(req_cons)));
 
-		/*
-		 * Copy the data and ack it. Delaying it until the mbuf is
-		 * freed will stall transmit.
-		 */
 		xennetback_mbuf_addr(m, , );
-		memset(, 0, sizeof(gop));
-		gop.flags = GNTCOPY_source_gref;
-		gop.len = txreq.size;
-
-		gop.source.u.ref = txreq.gref;
-		gop.source.offset = txreq.offset;
-		gop.source.domid = xneti->xni_domid;
-
-		gop.dest.offset = offset;
-		gop.dest.domid = DOMID_SELF;
-		gop.dest.u.gmfn = xpmap_ptom(pa) >> PAGE_SHIFT;
-
-		if (HYPERVISOR_grant_table_op(GNTTABOP_copy,
-		, 1) != 0) {
-			printf("%s: GNTTABOP_copy failed",
-			ifp->if_xname);
-			m_freem(m);
-			xennetback_tx_response(xneti, txreq.id,
-			NETIF_RSP_ERROR);
-			if_statinc(ifp, if_ierrors);
-			continue;
-		}
-		if (gop.status != GNTST_okay) {
-			printf("%s GNTTABOP_copy %d\n",
-			ifp->if_xname, gop.status);
-			m_freem(m);
-			xennetback_tx_response(xneti, txreq.id,
-			NETIF_RSP_ERROR);
-			if_statinc(ifp, if_ierrors);
-			continue;
-		}
 
-		if ((ifp->if_flags & IFF_PROMISC) == 0) {
-			struct ether_header *eh =
-			mtod(m, struct ether_header *);
-			if (ETHER_IS_MULTICAST(eh->ether_dhost) == 0 &&
-			memcmp(CLLADDR(ifp->if_sadl), eh->ether_dhost,
-			ETHER_ADDR_LEN) != 0) {
-m_freem(m);
-xennetback_tx_response(xneti, txreq.id,
-

CVS commit: src/tests/net

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 13:01:39 UTC 2020

Modified Files:
src/tests/net: net_common.sh

Log Message:
Some interfaces (gif) don't have a mac address...


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tests/net/net_common.sh

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



CVS commit: src/tests/net

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 13:01:39 UTC 2020

Modified Files:
src/tests/net: net_common.sh

Log Message:
Some interfaces (gif) don't have a mac address...


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tests/net/net_common.sh

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

Modified files:

Index: src/tests/net/net_common.sh
diff -u src/tests/net/net_common.sh:1.39 src/tests/net/net_common.sh:1.40
--- src/tests/net/net_common.sh:1.39	Thu Feb 20 03:02:26 2020
+++ src/tests/net/net_common.sh	Mon Mar 30 09:01:39 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: net_common.sh,v 1.39 2020/02/20 08:02:26 ozaki-r Exp $
+#	$NetBSD: net_common.sh,v 1.40 2020/03/30 13:01:39 christos Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -326,13 +326,17 @@ rump_server_add_iface()
 	if [ -n "$bus" ]; then
 		atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus
 	fi
-	macaddr=$(get_macaddr $sock $ifname)
-	export RUMP_SERVER=$backup
 
-	if [ -f $_rump_server_macaddrs ]; then
-		atf_check -s not-exit:0 grep -q $macaddr $_rump_server_macaddrs
+	macaddr=$(get_macaddr $sock $ifname)
+	if [ -n "$macaddr" ]; then
+		if [ -f $_rump_server_macaddrs ]; then
+			atf_check -s not-exit:0 \
+			grep -q $macaddr $_rump_server_macaddrs
+		fi
+		echo $macaddr >> $_rump_server_macaddrs
 	fi
-	echo $macaddr >> $_rump_server_macaddrs
+
+	export RUMP_SERVER=$backup
 
 	echo $sock $ifname >> $_rump_server_ifaces
 	$DEBUG && cat $_rump_server_ifaces



CVS commit: src/usr.sbin/sysinst

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 12:19:28 UTC 2020

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

Log Message:
Ooops, fix previous (PT_* enum values here are not DKW_PTYPE_* values)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/gpt.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/sysinst

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 12:19:28 UTC 2020

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

Log Message:
Ooops, fix previous (PT_* enum values here are not DKW_PTYPE_* values)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/gpt.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/gpt.c
diff -u src/usr.sbin/sysinst/gpt.c:1.17 src/usr.sbin/sysinst/gpt.c:1.18
--- src/usr.sbin/sysinst/gpt.c:1.17	Mon Mar 30 10:42:49 2020
+++ src/usr.sbin/sysinst/gpt.c	Mon Mar 30 12:19:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt.c,v 1.17 2020/03/30 10:42:49 martin Exp $	*/
+/*	$NetBSD: gpt.c,v 1.18 2020/03/30 12:19:28 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -113,7 +113,7 @@ struct {
 	{ .name = "vmcore",	.fstype = FS_VMKCORE,	.ptype = PT_unknown },
 	{ .name = "vmfs",	.fstype = FS_VMFS,	.ptype = PT_unknown },
 	{ .name = "vmresered",	.fstype = FS_VMWRESV,	.ptype = PT_unknown },
-	{ .name = "zfs",	.fstype = FS_ZFS,	.ptype = PT_ZFS },
+	{ .name = "zfs",	.fstype = FS_ZFS,	.ptype = PT_root },
 };
 
 static size_t gpt_ptype_cnt = 0, gpt_ptype_alloc = 0;



CVS commit: src/sys/net

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 11:57:50 UTC 2020

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

Log Message:
On detach, destroy the mutex attach created, otherwise we crash with LOCKDEBUG.
XXX: other interface drivers have this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/net/if_gif.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/if_gif.c
diff -u src/sys/net/if_gif.c:1.152 src/sys/net/if_gif.c:1.153
--- src/sys/net/if_gif.c:1.152	Fri Jan 31 21:57:45 2020
+++ src/sys/net/if_gif.c	Mon Mar 30 07:57:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.152 2020/02/01 02:57:45 riastradh Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.153 2020/03/30 11:57:50 christos Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.152 2020/02/01 02:57:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.153 2020/03/30 11:57:50 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -324,22 +324,20 @@ gifinit(void)
 static int
 gifdetach(void)
 {
-	int error = 0;
 
 	mutex_enter(_softcs.lock);
 	if (!LIST_EMPTY(_softcs.list)) {
 		mutex_exit(_softcs.lock);
-		error = EBUSY;
+		return EBUSY;
 	}
 
-	if (error == 0) {
-		psref_class_destroy(gv_psref_class);
-
-		if_clone_detach(_cloner);
-		sysctl_teardown(_sysctl);
-	}
+	psref_class_destroy(gv_psref_class);
 
-	return error;
+	if_clone_detach(_cloner);
+	sysctl_teardown(_sysctl);
+	mutex_exit(_softcs.lock);
+	mutex_destroy(_softcs.lock);
+	return 0;
 }
 
 static int



CVS commit: src/sys/net

2020-03-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 30 11:57:50 UTC 2020

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

Log Message:
On detach, destroy the mutex attach created, otherwise we crash with LOCKDEBUG.
XXX: other interface drivers have this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/net/if_gif.c

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



CVS commit: src/sys

2020-03-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Mar 30 11:38:29 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/aarch64/include: armreg.h
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Enable the cycle counter when a CPU hatches and store an estimate of the
frequency in ci_data.cpu_cc_freq.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/aarch64/include/armreg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/tprof/tprof_armv8.c

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



CVS commit: src/sys

2020-03-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Mar 30 11:38:29 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/aarch64/include: armreg.h
src/sys/dev/tprof: tprof_armv8.c

Log Message:
Enable the cycle counter when a CPU hatches and store an estimate of the
frequency in ci_data.cpu_cc_freq.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/aarch64/include/armreg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/tprof/tprof_armv8.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/aarch64/aarch64/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.41 src/sys/arch/aarch64/aarch64/cpu.c:1.42
--- src/sys/arch/aarch64/aarch64/cpu.c:1.41	Sat Feb 15 08:16:10 2020
+++ src/sys/arch/aarch64/aarch64/cpu.c	Mon Mar 30 11:38:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.41 2020/02/15 08:16:10 skrll Exp $ */
+/* $NetBSD: cpu.c,v 1.42 2020/03/30 11:38:29 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.41 2020/02/15 08:16:10 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.42 2020/03/30 11:38:29 jmcneill Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -46,6 +46,7 @@ __KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.41
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -64,6 +65,7 @@ static void identify_aarch64_model(uint3
 static void cpu_identify(device_t self, struct cpu_info *);
 static void cpu_identify1(device_t self, struct cpu_info *);
 static void cpu_identify2(device_t self, struct cpu_info *);
+static void cpu_init_counter(struct cpu_info *);
 static void cpu_setup_id(struct cpu_info *);
 static void cpu_setup_sysctl(device_t, struct cpu_info *);
 
@@ -107,8 +109,6 @@ cpu_attach(device_t dv, cpuid_t id)
 
 		ci->ci_cpl = IPL_HIGH;
 		ci->ci_cpuid = id;
-		// XXX big.LITTLE
-		ci->ci_data.cpu_cc_freq = cpu_info_store[0].ci_data.cpu_cc_freq;
 		/* ci_id is stored by own cpus when hatching */
 
 		cpu_info[ncpu] = ci;
@@ -150,6 +150,8 @@ cpu_attach(device_t dv, cpuid_t id)
 	aarch64_printcacheinfo(dv);
 	cpu_identify2(dv, ci);
 
+	cpu_init_counter(ci);
+
 	cpu_setup_sysctl(dv, ci);
 }
 
@@ -423,6 +425,21 @@ cpu_identify2(device_t self, struct cpu_
 }
 
 /*
+ * Enable the performance counter, then estimate frequency for
+ * the current PE and store the result in cpu_cc_freq.
+ */
+static void
+cpu_init_counter(struct cpu_info *ci)
+{
+	reg_pmcr_el0_write(PMCR_E | PMCR_C);
+	reg_pmcntenset_el0_write(PMCNTEN_C);
+
+	const uint32_t prev = cpu_counter32();
+	delay(10);
+	ci->ci_data.cpu_cc_freq = (cpu_counter32() - prev) * 10;
+}
+
+/*
  * Fill in this CPUs id data.  Must be called from hatched cpus.
  */
 static void
@@ -500,6 +517,8 @@ cpu_hatch(struct cpu_info *ci)
 
 	mutex_exit(_hatch_lock);
 
+	cpu_init_counter(ci);
+
 	intr_cpu_init(ci);
 
 #ifdef FDT

Index: src/sys/arch/aarch64/include/armreg.h
diff -u src/sys/arch/aarch64/include/armreg.h:1.38 src/sys/arch/aarch64/include/armreg.h:1.39
--- src/sys/arch/aarch64/include/armreg.h:1.38	Fri Mar  6 20:28:26 2020
+++ src/sys/arch/aarch64/include/armreg.h	Mon Mar 30 11:38:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: armreg.h,v 1.38 2020/03/06 20:28:26 ryo Exp $ */
+/* $NetBSD: armreg.h,v 1.39 2020/03/30 11:38:29 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -1121,6 +1121,9 @@ AARCH64REG_READ_INLINE(pmceid1_el0)
 AARCH64REG_WRITE_INLINE(pmcntenclr_el0)
 AARCH64REG_WRITE_INLINE(pmcntenset_el0)
 
+#define	PMCNTEN_C		__BIT(31)	// Enable the cycle counter
+#define	PMCNTEN_P		__BITS(30,0)	// Enable event counter bits
+
 AARCH64REG_READ_INLINE(pmcr_el0)
 AARCH64REG_WRITE_INLINE(pmcr_el0)
 

Index: src/sys/dev/tprof/tprof_armv8.c
diff -u src/sys/dev/tprof/tprof_armv8.c:1.4 src/sys/dev/tprof/tprof_armv8.c:1.5
--- src/sys/dev/tprof/tprof_armv8.c:1.4	Tue Jul 17 00:42:48 2018
+++ src/sys/dev/tprof/tprof_armv8.c	Mon Mar 30 11:38:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv8.c,v 1.4 2018/07/17 00:42:48 christos Exp $ */
+/* $NetBSD: tprof_armv8.c,v 1.5 2020/03/30 11:38:29 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.4 2018/07/17 00:42:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv8.c,v 1.5 2020/03/30 11:38:29 jmcneill Exp $");
 
 #include 
 #include 
@@ -86,12 +86,7 @@ static void
 armv8_pmu_start_cpu(void *arg1, void *arg2)
 {
 	const uint32_t counter_mask = __BIT(armv8_pmu_counter);
-	uint64_t pmcr, pmevtyper;
-
-	/* Enable performance monitor */
-	pmcr = reg_pmcr_el0_read();
-	pmcr |= PMCR_E;
-	reg_pmcr_el0_write(pmcr);
+	uint64_t pmevtyper;
 
 	/* Disable event counter */
 	reg_pmcntenclr_el0_write(counter_mask);
@@ -122,18 +117,12 @@ static void
 armv8_pmu_stop_cpu(void 

CVS commit: src/usr.sbin/sysinst

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 10:42:49 UTC 2020

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

Log Message:
Support partition type ZFS


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/gpt.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/gpt.c
diff -u src/usr.sbin/sysinst/gpt.c:1.16 src/usr.sbin/sysinst/gpt.c:1.17
--- src/usr.sbin/sysinst/gpt.c:1.16	Mon Jan 27 21:21:22 2020
+++ src/usr.sbin/sysinst/gpt.c	Mon Mar 30 10:42:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt.c,v 1.16 2020/01/27 21:21:22 martin Exp $	*/
+/*	$NetBSD: gpt.c,v 1.17 2020/03/30 10:42:49 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -112,7 +112,8 @@ struct {
 	{ .name = "raid",	.fstype = FS_RAID,	.ptype = PT_root },
 	{ .name = "vmcore",	.fstype = FS_VMKCORE,	.ptype = PT_unknown },
 	{ .name = "vmfs",	.fstype = FS_VMFS,	.ptype = PT_unknown },
-	{ .name = "vmresered",	.fstype = FS_VMWRESV,	.ptype = PT_unknown }
+	{ .name = "vmresered",	.fstype = FS_VMWRESV,	.ptype = PT_unknown },
+	{ .name = "zfs",	.fstype = FS_ZFS,	.ptype = PT_ZFS },
 };
 
 static size_t gpt_ptype_cnt = 0, gpt_ptype_alloc = 0;



CVS commit: src/usr.sbin/sysinst

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 10:42:49 UTC 2020

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

Log Message:
Support partition type ZFS


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/gpt.c

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



CVS commit: src/sbin/gpt

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 10:41:53 UTC 2020

Modified Files:
src/sbin/gpt: gpt_uuid.c

Log Message:
Now that we use the same UUID for ZFS as FreeBSD, drop the FreeBSD marker
from the description.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/gpt/gpt_uuid.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/gpt/gpt_uuid.c
diff -u src/sbin/gpt/gpt_uuid.c:1.18 src/sbin/gpt/gpt_uuid.c:1.19
--- src/sbin/gpt/gpt_uuid.c:1.18	Tue Jun 25 04:25:11 2019
+++ src/sbin/gpt/gpt_uuid.c	Mon Mar 30 10:41:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt_uuid.c,v 1.18 2019/06/25 04:25:11 jnemeth Exp $	*/
+/*	$NetBSD: gpt_uuid.c,v 1.19 2020/03/30 10:41:53 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt_uuid.c,v 1.18 2019/06/25 04:25:11 jnemeth Exp $");
+__RCSID("$NetBSD: gpt_uuid.c,v 1.19 2020/03/30 10:41:53 martin Exp $");
 #endif
 
 #include 
@@ -73,7 +73,7 @@ static const struct {
 	{ GPT_ENT_TYPE_FREEBSD_SWAP, "fbsd-swap", "FreeBSD swap" },
 	{ GPT_ENT_TYPE_FREEBSD_UFS, "fbsd-ufs", "FreeBSD UFS/UFS2" },
 	{ GPT_ENT_TYPE_FREEBSD_VINUM, "fbsd-vinum", "FreeBSD vinum" },
-	{ GPT_ENT_TYPE_FREEBSD_ZFS, "fbsd-zfs", "FreeBSD ZFS" },
+	{ GPT_ENT_TYPE_FREEBSD_ZFS, "zfs", "ZFS" },
 	{ GPT_ENT_TYPE_LINUX_DATA, "linux-data", "Linux data" },
 	{ GPT_ENT_TYPE_LINUX_RAID, "linux-raid", "Linux RAID" },
 	{ GPT_ENT_TYPE_LINUX_SWAP, "linux-swap", "Linux swap" },



CVS commit: src/sbin/gpt

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 10:41:53 UTC 2020

Modified Files:
src/sbin/gpt: gpt_uuid.c

Log Message:
Now that we use the same UUID for ZFS as FreeBSD, drop the FreeBSD marker
from the description.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/gpt/gpt_uuid.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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 09:32:46 UTC 2020

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

Log Message:
Match indentation of previous entries.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/sys/disklabel.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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 09:32:46 UTC 2020

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

Log Message:
Match indentation of previous entries.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/sys/disklabel.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/disklabel.h
diff -u src/sys/sys/disklabel.h:1.123 src/sys/sys/disklabel.h:1.124
--- src/sys/sys/disklabel.h:1.123	Mon Mar 30 09:19:06 2020
+++ src/sys/sys/disklabel.h	Mon Mar 30 09:32:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.123 2020/03/30 09:19:06 martin Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.124 2020/03/30 09:32:46 wiz Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -399,7 +399,7 @@ x(MINIXFS3,29, "MINIX FSv3", NULL,   NUL
 x(VMKCORE, 30, "VMware vmkcore", NULL, NULL)  /* VMware vmkcore */ \
 x(VMFS,31, "VMware VMFS", NULL,  NULL)/* VMware VMFS */ \
 x(VMWRESV, 32, "VMware Reserved", NULL, NULL) /* VMware reserved */ \
-x(ZFS,	   33, "ZFS", NULL, NULL)	  /* ZFS */
+x(ZFS, 33, "ZFS",NULL,   NULL)/* ZFS */
 
 
 #ifndef _LOCORE



CVS commit: src/sys/sys

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 09:19:06 UTC 2020

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

Log Message:
Now that we have a partition type for it, also add FS_ZFS.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/sys/disklabel.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

2020-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Mar 30 09:19:06 UTC 2020

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

Log Message:
Now that we have a partition type for it, also add FS_ZFS.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/sys/disklabel.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/disklabel.h
diff -u src/sys/sys/disklabel.h:1.122 src/sys/sys/disklabel.h:1.123
--- src/sys/sys/disklabel.h:1.122	Sat Nov  9 16:46:09 2019
+++ src/sys/sys/disklabel.h	Mon Mar 30 09:19:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.122 2019/11/09 16:46:09 pgoyette Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.123 2020/03/30 09:19:06 martin Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -398,7 +398,8 @@ x(CGD, 28, "cgd",	 NULL,   NULL)
 x(MINIXFS3,29, "MINIX FSv3", NULL,   NULL)/* MINIX file system v3 */ \
 x(VMKCORE, 30, "VMware vmkcore", NULL, NULL)  /* VMware vmkcore */ \
 x(VMFS,31, "VMware VMFS", NULL,  NULL)/* VMware VMFS */ \
-x(VMWRESV, 32, "VMware Reserved", NULL, NULL) /* VMware reserved */
+x(VMWRESV, 32, "VMware Reserved", NULL, NULL) /* VMware reserved */ \
+x(ZFS,	   33, "ZFS", NULL, NULL)	  /* ZFS */
 
 
 #ifndef _LOCORE



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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 08:45:09 UTC 2020

Modified Files:
src/external/bsd/blacklist/bin: blacklistd.8

Log Message:
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/blacklist/bin/blacklistd.8

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/blacklistd.8
diff -u src/external/bsd/blacklist/bin/blacklistd.8:1.21 src/external/bsd/blacklist/bin/blacklistd.8:1.22
--- src/external/bsd/blacklist/bin/blacklistd.8:1.21	Mon Mar 30 03:02:41 2020
+++ src/external/bsd/blacklist/bin/blacklistd.8	Mon Mar 30 08:45:09 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: blacklistd.8,v 1.21 2020/03/30 03:02:41 christos Exp $
+.\" $NetBSD: blacklistd.8,v 1.22 2020/03/30 08:45:09 wiz Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -68,7 +68,7 @@ Each entry contains a number of tries li
 The way
 .Nm
 does configuration entry matching is by having the client side pass the
-file dscriptor associated with the connection the client wants to blacklist
+file descriptor associated with the connection the client wants to blacklist
 as well as passing socket credentials.
 .Pp
 The file descriptor is used to retrieve information (address and port)
@@ -85,17 +85,17 @@ the port.
 By examining the optional address portion on the local side, it can match
 interfaces.
 By examining the remote address, it can match specific allow or deny rules.
-.Pp 
+.Pp
 Finally
 .Nm
 can examine the socket credentials to match the user in the configuration file.
 .Pp
 While this works well for TCP sockets, it cannot be relied on for unbound
-UDP sockets. 
+UDP sockets.
 It is also less meaningful when it comes to connections using non-privileged
 ports.
-On the other hand, if we receive a request that has a local endpoind indicating
-UDP privileged port, we can presume that the client was privileged to be
+On the other hand, if we receive a request that has a local endpoint indicating
+a UDP privileged port, we can presume that the client was privileged to be
 able to acquire that port.
 .Pp
 Once an entry is matched



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

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 08:45:09 UTC 2020

Modified Files:
src/external/bsd/blacklist/bin: blacklistd.8

Log Message:
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/blacklist/bin/blacklistd.8

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



CVS commit: src

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 08:36:09 UTC 2020

Modified Files:
src/common/lib/libutil: getfstypename.c
src/sbin/dkctl: dkctl.8
src/sys/dev/dkwedge: dkwedge_gpt.c
src/sys/sys: disk.h

Log Message:
Teach dk(4) about ZFS.

"looks ok" mlelstv


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libutil/getfstypename.c
cvs rdiff -u -r1.28 -r1.29 src/sbin/dkctl/dkctl.8
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.75 -r1.76 src/sys/sys/disk.h

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

Modified files:

Index: src/common/lib/libutil/getfstypename.c
diff -u src/common/lib/libutil/getfstypename.c:1.9 src/common/lib/libutil/getfstypename.c:1.10
--- src/common/lib/libutil/getfstypename.c:1.9	Tue Nov  6 04:04:33 2018
+++ src/common/lib/libutil/getfstypename.c	Mon Mar 30 08:36:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $	*/
+/*	$NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -39,10 +39,10 @@
 # include 
 # ifndef _KERNEL
 #  if !defined(lint)
-__RCSID("$NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $");
+__RCSID("$NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $");
 #  endif
 # else
-__KERNEL_RCSID(0, "$NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $");
 # endif /* _KERNEL */
 
 # define FSTYPE_ENUMNAME fstype_enum
@@ -129,6 +129,8 @@ getfstypename(int fstype)
 		return DKW_PTYPE_VMFS;
 	case FS_VMWRESV:
 		return DKW_PTYPE_VMWRESV;
+	case FS_ZFS:
+		return DKW_PTYPE_ZFS;
 	}
 	/* Stupid gcc, should know it is impossible to get here */
 	/*NOTREACHED*/

Index: src/sbin/dkctl/dkctl.8
diff -u src/sbin/dkctl/dkctl.8:1.28 src/sbin/dkctl/dkctl.8:1.29
--- src/sbin/dkctl/dkctl.8:1.28	Sun Jan  7 18:11:35 2018
+++ src/sbin/dkctl/dkctl.8	Mon Mar 30 08:36:09 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dkctl.8,v 1.28 2018/01/07 18:11:35 wiz Exp $
+.\"	$NetBSD: dkctl.8,v 1.29 2020/03/30 08:36:09 wiz Exp $
 .\"
 .\" Copyright 2002 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 7, 2018
+.Dd March 29, 2020
 .Dt DKCTL 8
 .Os
 .Sh NAME
@@ -94,8 +94,9 @@ Valid choices for ptype would be
 .Ar ccd ,
 .Ar appleufs ,
 .Ar ntfs ,
+.Ar cgd ,
 and
-.Ar cgd .
+.Ar zfs .
 .Pp
 The device name of the virtual block device assigned to the wedge will be
 displayed after the wedge has been successfully created.

Index: src/sys/dev/dkwedge/dkwedge_gpt.c
diff -u src/sys/dev/dkwedge/dkwedge_gpt.c:1.24 src/sys/dev/dkwedge/dkwedge_gpt.c:1.25
--- src/sys/dev/dkwedge/dkwedge_gpt.c:1.24	Tue Jul  9 17:06:46 2019
+++ src/sys/dev/dkwedge/dkwedge_gpt.c	Mon Mar 30 08:36:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $	*/
+/*	$NetBSD: dkwedge_gpt.c,v 1.25 2020/03/30 08:36:09 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.25 2020/03/30 08:36:09 wiz Exp $");
 
 #include 
 #include 
@@ -78,6 +78,7 @@ static const struct {
 	{ GPT_ENT_TYPE_VMWARE_RESERVED,		DKW_PTYPE_VMWRESV },
 	{ GPT_ENT_TYPE_MS_BASIC_DATA,		DKW_PTYPE_NTFS },
 	{ GPT_ENT_TYPE_LINUX_DATA,		DKW_PTYPE_EXT2FS },
+	{ GPT_ENT_TYPE_FREEBSD_ZFS,		DKW_PTYPE_ZFS },
 };
 
 static const char *

Index: src/sys/sys/disk.h
diff -u src/sys/sys/disk.h:1.75 src/sys/sys/disk.h:1.76
--- src/sys/sys/disk.h:1.75	Mon Mar  2 16:01:56 2020
+++ src/sys/sys/disk.h	Mon Mar 30 08:36:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.h,v 1.75 2020/03/02 16:01:56 riastradh Exp $	*/
+/*	$NetBSD: disk.h,v 1.76 2020/03/30 08:36:09 wiz Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -211,6 +211,7 @@ struct dkwedge_list {
 #define	DKW_PTYPE_VMKCORE	"vmkcore"
 #define	DKW_PTYPE_VMFS		"vmfs"
 #define	DKW_PTYPE_VMWRESV	"vmwresv"
+#define	DKW_PTYPE_ZFS		"zfs"
 
 /*
  * Ensure each symbol used in FSTYPE_DEFN in 



CVS commit: src

2020-03-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar 30 08:36:09 UTC 2020

Modified Files:
src/common/lib/libutil: getfstypename.c
src/sbin/dkctl: dkctl.8
src/sys/dev/dkwedge: dkwedge_gpt.c
src/sys/sys: disk.h

Log Message:
Teach dk(4) about ZFS.

"looks ok" mlelstv


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libutil/getfstypename.c
cvs rdiff -u -r1.28 -r1.29 src/sbin/dkctl/dkctl.8
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.75 -r1.76 src/sys/sys/disk.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

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 08:34:38 UTC 2020

Modified Files:
src/lib/libwrap: hosts_access.c

Log Message:
PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without 
scope-id


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

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



CVS commit: src/lib/libwrap

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 08:34:38 UTC 2020

Modified Files:
src/lib/libwrap: hosts_access.c

Log Message:
PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without 
scope-id


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libwrap/hosts_access.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/libwrap/hosts_access.c
diff -u src/lib/libwrap/hosts_access.c:1.21 src/lib/libwrap/hosts_access.c:1.22
--- src/lib/libwrap/hosts_access.c:1.21	Wed Feb 17 19:52:20 2016
+++ src/lib/libwrap/hosts_access.c	Mon Mar 30 08:34:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hosts_access.c,v 1.21 2016/02/17 19:52:20 christos Exp $	*/
+/*	$NetBSD: hosts_access.c,v 1.22 2020/03/30 08:34:38 ryo Exp $	*/
 
  /*
   * This module implements a simple access control language that is based on
@@ -24,7 +24,7 @@
 #if 0
 static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
 #else
-__RCSID("$NetBSD: hosts_access.c,v 1.21 2016/02/17 19:52:20 christos Exp $");
+__RCSID("$NetBSD: hosts_access.c,v 1.22 2020/03/30 08:34:38 ryo Exp $");
 #endif
 #endif
 
@@ -561,7 +561,7 @@ masked_match6(char *net_tok, char *mask_
 for (i = 0; i < alen; i++)
 	ap[i] &= mp[i];
 
-if (addr.sa.sa_family == AF_INET6 && addr.sin6.sin6_scope_id &&
+if (addr.sa.sa_family == AF_INET6 && net.sin6.sin6_scope_id &&
 addr.sin6.sin6_scope_id != net.sin6.sin6_scope_id)
 	return NO;
 return (memcmp(ap, np, alen) == 0);



CVS commit: src/lib/libutil

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 08:24:36 UTC 2020

Modified Files:
src/lib/libutil: pidlock.c

Log Message:
fail to create a pidfile if hostname contains '/'


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libutil/pidlock.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/libutil/pidlock.c
diff -u src/lib/libutil/pidlock.c:1.16 src/lib/libutil/pidlock.c:1.17
--- src/lib/libutil/pidlock.c:1.16	Sat Apr  7 16:17:17 2012
+++ src/lib/libutil/pidlock.c	Mon Mar 30 08:24:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pidlock.c,v 1.16 2012/04/07 16:17:17 christos Exp $ */
+/*	$NetBSD: pidlock.c,v 1.17 2020/03/30 08:24:36 ryo Exp $ */
 
 /*
  * Copyright 1996, 1997 by Curt Sampson .
@@ -24,7 +24,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: pidlock.c,v 1.16 2012/04/07 16:17:17 christos Exp $");
+__RCSID("$NetBSD: pidlock.c,v 1.17 2020/03/30 08:24:36 ryo Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -67,6 +67,12 @@ pidlock(const char *lockfile, int flags,
 		return -1;
 	hostname[sizeof(hostname) - 1] = '\0';
 
+	/* avoid '/' in hostname, as it may contain arbitrary characters */
+	for (p = hostname; *p != '\0'; p++) {
+		if (*p == '/')
+			*p = '_';
+	}
+
 	/*
 	 * Build a path to the temporary file.
 	 * We use the path with the PID and hostname appended.



CVS commit: src/lib/libutil

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 08:24:36 UTC 2020

Modified Files:
src/lib/libutil: pidlock.c

Log Message:
fail to create a pidfile if hostname contains '/'


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libutil/pidlock.c

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



CVS commit: src/lib/libedit

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 06:56:38 UTC 2020

Modified Files:
src/lib/libedit: search.c

Log Message:
patbuf must be updated if the length of patbuf is greater than or equal to 0. 
(that is always)
fix of r1.7 was incorrect.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libedit/search.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/libedit/search.c
diff -u src/lib/libedit/search.c:1.50 src/lib/libedit/search.c:1.51
--- src/lib/libedit/search.c:1.50	Mon Mar 30 06:54:37 2020
+++ src/lib/libedit/search.c	Mon Mar 30 06:56:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.50 2020/03/30 06:54:37 ryo Exp $	*/
+/*	$NetBSD: search.c,v 1.51 2020/03/30 06:56:38 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)search.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: search.c,v 1.50 2020/03/30 06:54:37 ryo Exp $");
+__RCSID("$NetBSD: search.c,v 1.51 2020/03/30 06:56:38 ryo Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -182,12 +182,9 @@ c_setpat(EditLine *el)
 		(size_t)(EL_CURSOR(el) - el->el_line.buffer);
 		if (el->el_search.patlen >= EL_BUFSIZ)
 			el->el_search.patlen = EL_BUFSIZ - 1;
-		if (el->el_search.patlen != 0) {
-			(void) wcsncpy(el->el_search.patbuf, el->el_line.buffer,
-			el->el_search.patlen);
-			el->el_search.patbuf[el->el_search.patlen] = '\0';
-		} else
-			el->el_search.patlen = wcslen(el->el_search.patbuf);
+		(void) wcsncpy(el->el_search.patbuf, el->el_line.buffer,
+		el->el_search.patlen);
+		el->el_search.patbuf[el->el_search.patlen] = '\0';
 	}
 #ifdef SDEBUG
 	(void) fprintf(el->el_errfile, "\neventno = %d\n",



CVS commit: src/lib/libedit

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 06:56:38 UTC 2020

Modified Files:
src/lib/libedit: search.c

Log Message:
patbuf must be updated if the length of patbuf is greater than or equal to 0. 
(that is always)
fix of r1.7 was incorrect.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libedit/search.c

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



CVS commit: src/lib/libedit

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 06:54:37 UTC 2020

Modified Files:
src/lib/libedit: common.c map.c refresh.c search.c

Log Message:
fix build error with SDEBUG, MAP_DEBUG, DEBUG_REFRESH


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libedit/common.c
cvs rdiff -u -r1.52 -r1.53 src/lib/libedit/map.c
cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/refresh.c
cvs rdiff -u -r1.49 -r1.50 src/lib/libedit/search.c

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



CVS commit: src/lib/libedit

2020-03-30 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Mar 30 06:54:37 UTC 2020

Modified Files:
src/lib/libedit: common.c map.c refresh.c search.c

Log Message:
fix build error with SDEBUG, MAP_DEBUG, DEBUG_REFRESH


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libedit/common.c
cvs rdiff -u -r1.52 -r1.53 src/lib/libedit/map.c
cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/refresh.c
cvs rdiff -u -r1.49 -r1.50 src/lib/libedit/search.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/libedit/common.c
diff -u src/lib/libedit/common.c:1.48 src/lib/libedit/common.c:1.49
--- src/lib/libedit/common.c:1.48	Mon Feb 26 17:36:14 2018
+++ src/lib/libedit/common.c	Mon Mar 30 06:54:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.48 2018/02/26 17:36:14 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.49 2020/03/30 06:54:37 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: common.c,v 1.48 2018/02/26 17:36:14 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.49 2020/03/30 06:54:37 ryo Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -658,7 +658,7 @@ ed_search_prev_history(EditLine *el, win
 
 	while (hp != NULL) {
 #ifdef SDEBUG
-		(void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
+		(void) fprintf(el->el_errfile, "Comparing with \"%ls\"\n", hp);
 #endif
 		if ((wcsncmp(hp, el->el_line.buffer, (size_t)
 			(el->el_line.lastchar - el->el_line.buffer)) ||
@@ -713,7 +713,7 @@ ed_search_next_history(EditLine *el, win
 
 	for (h = 1; h < el->el_history.eventno && hp; h++) {
 #ifdef SDEBUG
-		(void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
+		(void) fprintf(el->el_errfile, "Comparing with \"%ls\"\n", hp);
 #endif
 		if ((wcsncmp(hp, el->el_line.buffer, (size_t)
 			(el->el_line.lastchar - el->el_line.buffer)) ||

Index: src/lib/libedit/map.c
diff -u src/lib/libedit/map.c:1.52 src/lib/libedit/map.c:1.53
--- src/lib/libedit/map.c:1.52	Tue Jul 23 10:18:52 2019
+++ src/lib/libedit/map.c	Mon Mar 30 06:54:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: map.c,v 1.52 2019/07/23 10:18:52 christos Exp $	*/
+/*	$NetBSD: map.c,v 1.53 2020/03/30 06:54:37 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)map.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: map.c,v 1.52 2019/07/23 10:18:52 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.53 2020/03/30 06:54:37 ryo Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -906,11 +906,11 @@ map_init(EditLine *el)
  */
 #ifdef MAP_DEBUG
 	if (sizeof(el_map_emacs) != N_KEYS * sizeof(el_action_t))
-		EL_ABORT((el->errfile, "Emacs map incorrect\n"));
+		EL_ABORT((el->el_errfile, "Emacs map incorrect\n"));
 	if (sizeof(el_map_vi_command) != N_KEYS * sizeof(el_action_t))
-		EL_ABORT((el->errfile, "Vi command map incorrect\n"));
+		EL_ABORT((el->el_errfile, "Vi command map incorrect\n"));
 	if (sizeof(el_map_vi_insert) != N_KEYS * sizeof(el_action_t))
-		EL_ABORT((el->errfile, "Vi insert map incorrect\n"));
+		EL_ABORT((el->el_errfile, "Vi insert map incorrect\n"));
 #endif
 
 	el->el_map.alt = el_calloc(N_KEYS, sizeof(*el->el_map.alt));

Index: src/lib/libedit/refresh.c
diff -u src/lib/libedit/refresh.c:1.56 src/lib/libedit/refresh.c:1.57
--- src/lib/libedit/refresh.c:1.56	Fri Jan  4 03:03:44 2019
+++ src/lib/libedit/refresh.c	Mon Mar 30 06:54:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: refresh.c,v 1.56 2019/01/04 03:03:44 uwe Exp $	*/
+/*	$NetBSD: refresh.c,v 1.57 2020/03/30 06:54:37 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.56 2019/01/04 03:03:44 uwe Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.57 2020/03/30 06:54:37 ryo Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,6 +45,7 @@ __RCSID("$NetBSD: refresh.c,v 1.56 2019/
  * refresh.c: Lower level screen refreshing functions
  */
 #include 
+#include 
 #include 
 #include 
 

Index: src/lib/libedit/search.c
diff -u src/lib/libedit/search.c:1.49 src/lib/libedit/search.c:1.50
--- src/lib/libedit/search.c:1.49	Tue Jul 23 10:18:52 2019
+++ src/lib/libedit/search.c	Mon Mar 30 06:54:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.49 2019/07/23 10:18:52 christos Exp $	*/
+/*	$NetBSD: search.c,v 1.50 2020/03/30 06:54:37 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)search.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: search.c,v 1.49 2019/07/23 10:18:52 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1.50 2020/03/30 06:54:37 ryo Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -162,7 +162,7 @@ libedit_private int
 c_hmatch(EditLine *el, const wchar_t *str)
 {
 #ifdef SDEBUG
-	(void) fprintf(el->el_errfile, "match