CVS commit: src/usr.sbin/makefs/ffs

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Mar 26 04:25:28 UTC 2020

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
Fix the build, use %jd and (intmax_t) cast for big numbers, off_t
and ptrdiff_t aren't always the same size.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/makefs/ffs/mkfs.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/makefs/ffs

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Mar 26 04:25:28 UTC 2020

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
Fix the build, use %jd and (intmax_t) cast for big numbers, off_t
and ptrdiff_t aren't always the same size.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/makefs/ffs/mkfs.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/makefs/ffs/mkfs.c
diff -u src/usr.sbin/makefs/ffs/mkfs.c:1.38 src/usr.sbin/makefs/ffs/mkfs.c:1.39
--- src/usr.sbin/makefs/ffs/mkfs.c:1.38	Wed Mar 25 20:17:48 2020
+++ src/usr.sbin/makefs/ffs/mkfs.c	Thu Mar 26 04:25:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $	*/
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -48,7 +48,7 @@
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
 #ifdef __RCSID
-__RCSID("$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $");
 #endif
 #endif
 #endif /* not lint */
@@ -821,8 +821,8 @@ ffs_wtfs(daddr_t bno, int size, void *bf
 
 	offset = bno * fsopts->sectorsize + fsopts->offset;
 	if (lseek(fsopts->fd, offset, SEEK_SET) == -1)
-		err(EXIT_FAILURE, "%s: seek error @%td for sector %jd",
-		__func__, offset, (intmax_t)bno);
+		err(EXIT_FAILURE, "%s: seek error @%jd for sector %jd",
+		__func__, (intmax_t)offset, (intmax_t)bno);
 	n = write(fsopts->fd, bf, size);
 	if (n == -1)
 		err(EXIT_FAILURE, "%s: write error for sector %jd", __func__,



Re: CVS commit: src/external/gpl3

2020-03-25 Thread Robert Elz
Date:Wed, 25 Mar 2020 20:59:59 -0400
From:Greg Troxel 
Message-ID:  

  | I'll fourth this sentiment.

Me too (5th...)

The idea that /tmp is smaller than /var/tmp (or has less available space)
is based upon historic RAM sizes, my /tmp currently has about 10 times
as much available space as /var/tmp (when empty, the difference is more like
3:1 but /var/tmp (well, /var) has other stuff occupying space) - I run the
latter out from time to time, but never run out of /tmp space.

For current use, anything which is truly temporary shouid be in /tmp,
whatever the gcc upstream believe, their temporary files are just not
important enough to warrant keeping, and their ideas of available space
on modern systems are absurd.

kre



Re: CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Date:Wed, 25 Mar 2020 20:51:25 +
From:David Holland 
Message-ID:  <20200325205125.ga11...@netbsd.org>

  | I don't agree -- because applications shouldn't attempt to modify the
  | result, it should be const.

The only reason apps shouldn't modify the string is in case of porting
the app to an (well, some) ancient implementation.  Because of the NLS
requirements, the message these days (any modern implementation) must be
read from some external file - which means the storage for it must be
writable.   Nothing else (except the calling thread) cares about the content
of the returned message, so there's no actual reason for the app to not
modify it now if for some wacky reason it wants to.

Note that when strerror_l() was created, the opportunity to make that
return const char * existed - const existed in C by then, which it didn't
when strerror() was invented - but wasn't taken, as it was clear by its
very design that strerror_l had to return a pointer to writable memory,
so it was made char * and not const char *.

  | What it points to internally doesn't matter...

True, if the interface had been to return const char *.

The entry that was in BUGS wasn't a bug - what would be a bug would be
if we actually made strerror() return const char * - it wasn't even a 
limitation (which we traditionally include in BUGS, even though they're
generally by design, and not accident, and not really intended to be "fixed")
- what it was was a rant about the original design spec, and what's more,
one which is no longer warranted.

kre

ps: I've never seen, and cannot really imagine, an app that would ever want
to modify the result from strerror(), so none of this really matters anyway.



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Mar 26 01:05:26 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
adjust minor comments


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sociox/if_scx.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/arm/sociox/if_scx.c
diff -u src/sys/arch/arm/sociox/if_scx.c:1.14 src/sys/arch/arm/sociox/if_scx.c:1.15
--- src/sys/arch/arm/sociox/if_scx.c:1.14	Wed Mar 25 20:19:46 2020
+++ src/sys/arch/arm/sociox/if_scx.c	Thu Mar 26 01:05:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_scx.c,v 1.14 2020/03/25 20:19:46 nisimura Exp $	*/
+/*	$NetBSD: if_scx.c,v 1.15 2020/03/26 01:05:26 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.14 2020/03/25 20:19:46 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.15 2020/03/26 01:05:26 nisimura Exp $");
 
 #include 
 #include 
@@ -176,7 +176,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1
 	/*  3   link up detected
 	 *  2:1 resovled speed
 	 *  0 2.5Mhz (10Mbps)
-	 *	1 25Mhz  (100bps)
+	 *	1 25Mhz  (100Mbps)
 	 *	2 125Mhz (1000Mbps)
 	 *  1   full duplex detected */
 
@@ -463,7 +463,6 @@ scx_fdt_attach(device_t parent, device_t
 		goto fail;
 	}
 
-
 	aprint_naive("\n");
 	/* aprint_normal(": Gigabit Ethernet Controller\n"); */
 	aprint_normal_dev(self, "interrupt on %s\n", intrstr);
@@ -475,6 +474,7 @@ scx_fdt_attach(device_t parent, device_t
 	sc->sc_eesh = eebsh;
 	sc->sc_eesz = size[1];
 	sc->sc_dmat = faa->faa_dmat;
+	sc->sc_dmat32 = faa->faa_dmat; /* XXX */
 	sc->sc_phandle = phandle;
 
 	phy_mode = fdtbus_get_string(phandle, "phy-mode");
@@ -583,8 +583,8 @@ scx_acpi_attach(device_t parent, device_
 aprint_normal_dev(self,
 "phy mode %s, phy id %d, freq %ld\n", phy_mode, (int)acpi_phy, acpi_freq);
 	sc->sc_100mii = (phy_mode && strcmp(phy_mode, "rgmii") != 0);
-	sc->sc_freq = acpi_freq;
 	sc->sc_phy_id = (int)acpi_phy;
+	sc->sc_freq = acpi_freq;
 
 	scx_attach_i(sc);
 
@@ -605,13 +605,14 @@ scx_attach_i(struct scx_softc *sc)
 	struct ifnet * const ifp = >sc_ethercom.ec_if;
 	struct mii_data * const mii = >sc_mii;
 	struct ifmedia * const ifm = >mii_media;
-	uint32_t hwver;
+	uint32_t hwver, dwimp;
 	uint8_t enaddr[ETHER_ADDR_LEN];
 	bus_dma_segment_t seg;
 	uint32_t csr;
 	int i, nseg, error = 0;
 
-	hwver = CSR_READ(sc, HWVER1);
+	hwver = CSR_READ(sc, HWVER1);	/* Socionext HW */
+	/* stored in big endian order */
 	csr = bus_space_read_4(sc->sc_st, sc->sc_eesh, 0);
 	enaddr[0] = csr >> 24;
 	enaddr[1] = csr >> 16;
@@ -620,15 +621,15 @@ scx_attach_i(struct scx_softc *sc)
 	csr = bus_space_read_4(sc->sc_st, sc->sc_eesh, 4);
 	enaddr[4] = csr >> 24;
 	enaddr[5] = csr >> 16;
-	csr = mac_read(sc, GMACIMPL);
+	dwimp = mac_read(sc, GMACIMPL);	/* DW EMAC XX.YY */
 
 	aprint_normal_dev(sc->sc_dev,
 	"Socionext NetSec GbE hw %d.%d impl 0x%x\n",
-	hwver >> 16, hwver & 0x, csr);
+	hwver >> 16, hwver & 0x, dwimp);
 	aprint_normal_dev(sc->sc_dev,
 	"Ethernet address %s\n", ether_sprintf(enaddr));
 
-	sc->sc_phy_id = MII_PHY_ANY;
+sc->sc_phy_id = MII_PHY_ANY;
 	sc->sc_mdclk = get_mdioclk(sc->sc_freq); /* 5:2 clk control */
 sc->sc_mdclk = 5; /* XXX */
 aprint_normal_dev(sc->sc_dev, "using %d for mdclk\n", sc->sc_mdclk);
@@ -802,7 +803,7 @@ scx_init(struct ifnet *ifp)
 	/* Reset the chip to a known state. */
 	scx_reset(sc);
 
-	/* set my address in perfect match slot 0 */
+	/* set my address in perfect match slot 0. little endin order */
 	csr = (ea[3] << 24) | (ea[2] << 16) | (ea[1] << 8) |  ea[0];
 	mac_write(sc, GMACMAL0, csr);
 	csr = (ea[5] << 8) | ea[4];
@@ -1077,6 +1078,7 @@ mii_statchg(struct ifnet *ifp)
 	struct scx_softc *sc = ifp->if_softc;
 	struct mii_data *mii = >sc_mii;
 	uint32_t fcr;
+
 #if 1
 	/* decode MIISR register value */
 	uint32_t miisr = mac_read(sc, GMACMIISR);



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Mar 26 01:05:26 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
adjust minor comments


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sociox/if_scx.c

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



Re: CVS commit: src/external/gpl3

2020-03-25 Thread Greg Troxel
Taylor R Campbell  writes:

>> Do we insist on this patch? Can we remove it from local sources?
>
> We should keep the change.  There is no semantic justification for
> putting build-time temporary files in the directory for temporary
> files that are meant to persist across reboot.  These temporary files
> _cannot_ be used if interrupted -- let alone by a reboot.

I'll fourth this sentiment.

Plus, I'll observe that on my main development system /var/tmp has 6.4G
free while /tmp has 12G.  That's of course just arbitrary choices on my
part, and if either is an issue for a compiler there's something wrong
anyway.



Re: CVS commit: src/external/gpl3

2020-03-25 Thread Taylor R Campbell
> Date: Thu, 26 Mar 2020 01:26:05 +0100
> From: Kamil Rytarowski 
> 
> Upstream (GCC) is strongly against this change (even under __NetBSD__
> ifdef) as /var/tmp is typically larger than /tmp:
> 
> > I'd strongly recommend against this as-is.
> >
> > The whole reason we prefer /var/tmp is because it's often dramatically
> larger
> > than a ram-backed /tmp.
> 
> -- by Jeff Law.
> 
> Do we insist on this patch? Can we remove it from local sources?

We should keep the change.  There is no semantic justification for
putting build-time temporary files in the directory for temporary
files that are meant to persist across reboot.  These temporary files
_cannot_ be used if interrupted -- let alone by a reboot.

Going back to /var/tmp would be ridiculous, and a huge performance hit
on systems with tmpfs-backed /tmp, for zero real benefit.  Abusing
/var/tmp has been stupid for over a decade and I'm glad we finally
fixed it.

Users who actually run out of /tmp space -- which is something that
happens noisily, not silently slowing everything down for no apparent
reason, and something that I've never heard of happening on machines
that do builds -- can easily either (a) add more, or (b) set TMPDIR
explicitly.


Re: CVS commit: src/external/gpl3

2020-03-25 Thread Jonathan A. Kollasch
We (to the extent I can assert that as an individual developer) insist
on keeping it.

Jonathan Kollasch

On Thu, Mar 26, 2020 at 01:26:05AM +0100, Kamil Rytarowski wrote:
> Upstream (GCC) is strongly against this change (even under __NetBSD__
> ifdef) as /var/tmp is typically larger than /tmp:
> 
> > I'd strongly recommend against this as-is.
> >
> > The whole reason we prefer /var/tmp is because it's often dramatically
> larger
> > than a ram-backed /tmp.
> 
> -- by Jeff Law.
> 
> Do we insist on this patch? Can we remove it from local sources?
> 
> The same effect can be achieved with env(1) variables: TMP=/tmp
> TEMPDIR=/tmp or TEMP=/tmp.
> 
> On 10.08.2015 17:45, Jonathan A. Kollasch wrote:
> > Module Name:src
> > Committed By:   jakllsch
> > Date:   Mon Aug 10 15:45:40 UTC 2015
> > 
> > Modified Files:
> > src/external/gpl3/binutils/dist/libiberty: make-temp-file.c
> > src/external/gpl3/gcc/dist/libiberty: make-temp-file.c
> > src/external/gpl3/gdb/dist/libiberty: make-temp-file.c
> > 
> > Log Message:
> > Correct temporary directory preference order in libiberty's choose_tmpdir().
> > 
> > Because it is intended to be persistent, /var/tmp is about the worst 
> > possible
> > choice for temporary files for most users of libiberty.  /tmp works better,
> > because the the defined semantics of /tmp allow for a non-persistent tmpfs
> > to be used.  This should improve performance when /tmp is a tmpfs and it is
> > difficult or impossible to have an environment variable or command line 
> > -pipe
> > flag passed to every piece of the toolchain.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.1.1.3 -r1.2 \
> > src/external/gpl3/binutils/dist/libiberty/make-temp-file.c
> > cvs rdiff -u -r1.1.1.2 -r1.2 \
> > src/external/gpl3/gcc/dist/libiberty/make-temp-file.c
> > cvs rdiff -u -r1.1.1.1 -r1.2 \
> > src/external/gpl3/gdb/dist/libiberty/make-temp-file.c
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> > 
> > 
> > Modified files:
> > 
> > Index: src/external/gpl3/binutils/dist/libiberty/make-temp-file.c
> > diff -u src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.1.1.3 
> > src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.2
> > --- src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.1.1.3  
> > Sun Sep 29 13:46:38 2013
> > +++ src/external/gpl3/binutils/dist/libiberty/make-temp-file.c  Mon Aug 
> > 10 15:45:40 2015
> > @@ -130,10 +130,10 @@ choose_tmpdir (void)
> > base = try_dir (P_tmpdir, base);
> >  #endif
> >  
> > -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> > +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> > +  base = try_dir (tmp, base);
> >base = try_dir (vartmp, base);
> >base = try_dir (usrtmp, base);
> > -  base = try_dir (tmp, base);
> >
> >/* If all else fails, use the current directory!  */
> >if (base == 0)
> > 
> > Index: src/external/gpl3/gcc/dist/libiberty/make-temp-file.c
> > diff -u src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.1.1.2 
> > src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.2
> > --- src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.1.1.2   Sat Mar 
> >  1 08:41:40 2014
> > +++ src/external/gpl3/gcc/dist/libiberty/make-temp-file.c   Mon Aug 10 
> > 15:45:40 2015
> > @@ -130,10 +130,10 @@ choose_tmpdir (void)
> > base = try_dir (P_tmpdir, base);
> >  #endif
> >  
> > -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> > +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> > +  base = try_dir (tmp, base);
> >base = try_dir (vartmp, base);
> >base = try_dir (usrtmp, base);
> > -  base = try_dir (tmp, base);
> >
> >/* If all else fails, use the current directory!  */
> >if (base == 0)
> > 
> > Index: src/external/gpl3/gdb/dist/libiberty/make-temp-file.c
> > diff -u src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.1.1.1 
> > src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.2
> > --- src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.1.1.1   Sat Sep 
> > 24 19:49:55 2011
> > +++ src/external/gpl3/gdb/dist/libiberty/make-temp-file.c   Mon Aug 10 
> > 15:45:40 2015
> > @@ -130,10 +130,10 @@ choose_tmpdir (void)
> > base = try_dir (P_tmpdir, base);
> >  #endif
> >  
> > -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> > +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> > +  base = try_dir (tmp, base);
> >base = try_dir (vartmp, base);
> >base = try_dir (usrtmp, base);
> > -  base = try_dir (tmp, base);
> >
> >/* If all else fails, use the current directory!  */
> >if (base == 0)
> > 
> 
> 





Re: CVS commit: src/external/gpl3

2020-03-25 Thread Jason Thorpe


> On Mar 25, 2020, at 5:26 PM, Kamil Rytarowski  wrote:
> 
> Upstream (GCC) is strongly against this change (even under __NetBSD__
> ifdef) as /var/tmp is typically larger than /tmp:
> 
>> I'd strongly recommend against this as-is.
>> 
>> The whole reason we prefer /var/tmp is because it's often dramatically
> larger
>> than a ram-backed /tmp.
> 
> -- by Jeff Law.

That's bonkers.  It needlessly hurts performance and, on modern systems, adds 
needless SSD writes.

-- thorpej



Re: CVS commit: src/external/gpl3

2020-03-25 Thread Kamil Rytarowski
Upstream (GCC) is strongly against this change (even under __NetBSD__
ifdef) as /var/tmp is typically larger than /tmp:

> I'd strongly recommend against this as-is.
>
> The whole reason we prefer /var/tmp is because it's often dramatically
larger
> than a ram-backed /tmp.

-- by Jeff Law.

Do we insist on this patch? Can we remove it from local sources?

The same effect can be achieved with env(1) variables: TMP=/tmp
TEMPDIR=/tmp or TEMP=/tmp.

On 10.08.2015 17:45, Jonathan A. Kollasch wrote:
> Module Name:  src
> Committed By: jakllsch
> Date: Mon Aug 10 15:45:40 UTC 2015
> 
> Modified Files:
>   src/external/gpl3/binutils/dist/libiberty: make-temp-file.c
>   src/external/gpl3/gcc/dist/libiberty: make-temp-file.c
>   src/external/gpl3/gdb/dist/libiberty: make-temp-file.c
> 
> Log Message:
> Correct temporary directory preference order in libiberty's choose_tmpdir().
> 
> Because it is intended to be persistent, /var/tmp is about the worst possible
> choice for temporary files for most users of libiberty.  /tmp works better,
> because the the defined semantics of /tmp allow for a non-persistent tmpfs
> to be used.  This should improve performance when /tmp is a tmpfs and it is
> difficult or impossible to have an environment variable or command line -pipe
> flag passed to every piece of the toolchain.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.1.1.3 -r1.2 \
> src/external/gpl3/binutils/dist/libiberty/make-temp-file.c
> cvs rdiff -u -r1.1.1.2 -r1.2 \
> src/external/gpl3/gcc/dist/libiberty/make-temp-file.c
> cvs rdiff -u -r1.1.1.1 -r1.2 \
> src/external/gpl3/gdb/dist/libiberty/make-temp-file.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> 
> Modified files:
> 
> Index: src/external/gpl3/binutils/dist/libiberty/make-temp-file.c
> diff -u src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.1.1.3 
> src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.2
> --- src/external/gpl3/binutils/dist/libiberty/make-temp-file.c:1.1.1.3
> Sun Sep 29 13:46:38 2013
> +++ src/external/gpl3/binutils/dist/libiberty/make-temp-file.cMon Aug 
> 10 15:45:40 2015
> @@ -130,10 +130,10 @@ choose_tmpdir (void)
>   base = try_dir (P_tmpdir, base);
>  #endif
>  
> -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> +  base = try_dir (tmp, base);
>base = try_dir (vartmp, base);
>base = try_dir (usrtmp, base);
> -  base = try_dir (tmp, base);
>
>/* If all else fails, use the current directory!  */
>if (base == 0)
> 
> Index: src/external/gpl3/gcc/dist/libiberty/make-temp-file.c
> diff -u src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.1.1.2 
> src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.2
> --- src/external/gpl3/gcc/dist/libiberty/make-temp-file.c:1.1.1.2 Sat Mar 
>  1 08:41:40 2014
> +++ src/external/gpl3/gcc/dist/libiberty/make-temp-file.c Mon Aug 10 
> 15:45:40 2015
> @@ -130,10 +130,10 @@ choose_tmpdir (void)
>   base = try_dir (P_tmpdir, base);
>  #endif
>  
> -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> +  base = try_dir (tmp, base);
>base = try_dir (vartmp, base);
>base = try_dir (usrtmp, base);
> -  base = try_dir (tmp, base);
>
>/* If all else fails, use the current directory!  */
>if (base == 0)
> 
> Index: src/external/gpl3/gdb/dist/libiberty/make-temp-file.c
> diff -u src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.1.1.1 
> src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.2
> --- src/external/gpl3/gdb/dist/libiberty/make-temp-file.c:1.1.1.1 Sat Sep 
> 24 19:49:55 2011
> +++ src/external/gpl3/gdb/dist/libiberty/make-temp-file.c Mon Aug 10 
> 15:45:40 2015
> @@ -130,10 +130,10 @@ choose_tmpdir (void)
>   base = try_dir (P_tmpdir, base);
>  #endif
>  
> -  /* Try /var/tmp, /usr/tmp, then /tmp.  */
> +  /* Try /tmp, /var/tmp, then /usr/tmp.  */
> +  base = try_dir (tmp, base);
>base = try_dir (vartmp, base);
>base = try_dir (usrtmp, base);
> -  base = try_dir (tmp, base);
>
>/* If all else fails, use the current directory!  */
>if (base == 0)
> 




signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/dev/fdt

2020-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Mar 26 00:21:28 UTC 2020

Modified Files:
src/sys/dev/fdt: dwc3_fdt.c

Log Message:
Add "snps,dwc3" to the list of compatible strings we match against.
The code already handles "snps,dwc3" not being a subordinate of
an SoC-specific node, but the string was missing from the match
routine.

Necessitated by the sun50i-h6 device tree update on Jan 3 2020, which
elimiated the "allwinner,sun50i-h6-dwc3" node and placed all of the
clocks, resets, etc. directly under the "snps,dwc3" node.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/fdt/dwc3_fdt.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/fdt/dwc3_fdt.c
diff -u src/sys/dev/fdt/dwc3_fdt.c:1.9 src/sys/dev/fdt/dwc3_fdt.c:1.10
--- src/sys/dev/fdt/dwc3_fdt.c:1.9	Wed Jan 15 01:09:57 2020
+++ src/sys/dev/fdt/dwc3_fdt.c	Thu Mar 26 00:21:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc3_fdt.c,v 1.9 2020/01/15 01:09:57 jmcneill Exp $ */
+/* $NetBSD: dwc3_fdt.c,v 1.10 2020/03/26 00:21:27 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.9 2020/01/15 01:09:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.10 2020/03/26 00:21:27 thorpej Exp $");
 
 #include 
 #include 
@@ -212,6 +212,7 @@ dwc3_fdt_match(device_t parent, cfdata_t
 		"rockchip,rk3328-dwc3",
 		"rockchip,rk3399-dwc3",
 		"samsung,exynos5250-dwusb3",
+		"snps,dwc3",
 		NULL
 	};
 	struct fdt_attach_args * const faa = aux;



CVS commit: src/sys/dev/fdt

2020-03-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Mar 26 00:21:28 UTC 2020

Modified Files:
src/sys/dev/fdt: dwc3_fdt.c

Log Message:
Add "snps,dwc3" to the list of compatible strings we match against.
The code already handles "snps,dwc3" not being a subordinate of
an SoC-specific node, but the string was missing from the match
routine.

Necessitated by the sun50i-h6 device tree update on Jan 3 2020, which
elimiated the "allwinner,sun50i-h6-dwc3" node and placed all of the
clocks, resets, etc. directly under the "snps,dwc3" node.


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

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:31:19 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
try to DRT about config messages, redo ...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox/sni_gpio.c
diff -u src/sys/arch/arm/sociox/sni_gpio.c:1.6 src/sys/arch/arm/sociox/sni_gpio.c:1.7
--- src/sys/arch/arm/sociox/sni_gpio.c:1.6	Wed Mar 25 23:29:39 2020
+++ src/sys/arch/arm/sociox/sni_gpio.c	Wed Mar 25 23:31:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_gpio.c,v 1.6 2020/03/25 23:29:39 nisimura Exp $	*/
+/*	$NetBSD: sni_gpio.c,v 1.7 2020/03/25 23:31:19 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.6 2020/03/25 23:29:39 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.7 2020/03/25 23:31:19 nisimura Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ snigpio_fdt_attach(device_t parent, devi
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev("Socionext GPIO controller\n");
+	aprint_normal_dev(self, "Socionext GPIO controller\n");
 	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 	list = fdtbus_get_string(phandle, "gpio-line-names");
 	if (list)



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:31:19 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
try to DRT about config messages, redo ...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:29:39 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_exiu.c sni_gpio.c

Log Message:
try to DRT about config messages


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sociox/sni_exiu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:29:39 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_exiu.c sni_gpio.c

Log Message:
try to DRT about config messages


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sociox/sni_exiu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox/sni_exiu.c
diff -u src/sys/arch/arm/sociox/sni_exiu.c:1.2 src/sys/arch/arm/sociox/sni_exiu.c:1.3
--- src/sys/arch/arm/sociox/sni_exiu.c:1.2	Thu Mar 19 22:17:45 2020
+++ src/sys/arch/arm/sociox/sni_exiu.c	Wed Mar 25 23:29:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_exiu.c,v 1.2 2020/03/19 22:17:45 nisimura Exp $	*/
+/*	$NetBSD: sni_exiu.c,v 1.3 2020/03/25 23:29:39 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_exiu.c,v 1.2 2020/03/19 22:17:45 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_exiu.c,v 1.3 2020/03/25 23:29:39 nisimura Exp $");
 
 #include 
 #include 
@@ -60,8 +60,8 @@ struct sniexiu_softc {
 	bus_space_handle_t	sc_ioh;
 	bus_addr_t		sc_iob;
 	bus_size_t		sc_ios;
-	kmutex_t		sc_lock;
 	void			*sc_ih;
+	kmutex_t		sc_lock;
 	int			sc_phandle;
 };
 
@@ -98,7 +98,6 @@ sniexiu_fdt_attach(device_t parent, devi
 	bus_size_t size;
 	char intrstr[128];
 	_Bool disable;
-	int error;
 
 	prop_dictionary_get_bool(dict, "disable", );
 	if (disable) {
@@ -106,22 +105,25 @@ sniexiu_fdt_attach(device_t parent, devi
 		aprint_normal(": disabled\n");
 		return;
 	}
-	error = fdtbus_get_reg(phandle, 0, , );
-	if (error) {
-		aprint_error(": couldn't get registers\n");
-		return;
-	}
-	error = bus_space_map(faa->faa_bst, addr, size, 0, );
-	if (error) {
+	if (fdtbus_get_reg(phandle, 0, , ) != 0
+	|| bus_space_map(faa->faa_bst, addr, size, 0, ) != 0) {
 		aprint_error(": unable to map device\n");
 		return;
 	}
-	error = fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr));
-	if (error) {
+	if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) {
 		aprint_error(": failed to decode interrupt\n");
-		return;
+		goto fail;
+	}
+	sc->sc_ih = fdtbus_intr_establish(phandle,
+			0, IPL_NET, 0, sniexiu_intr, sc);
+	if (sc->sc_ih == NULL) {
+		aprint_error_dev(self, "couldn't establish interrupt\n");
+		goto fail;
 	}
 
+	aprint_naive("\n");
+	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
+
 	sc->sc_dev = self;
 	sc->sc_phandle = phandle;
 	sc->sc_iot = faa->faa_bst;
@@ -130,13 +132,6 @@ sniexiu_fdt_attach(device_t parent, devi
 	sc->sc_ios = size;
 	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
 
-	sc->sc_ih = fdtbus_intr_establish(phandle,
-			0, IPL_NET, 0, sniexiu_intr, sc);
-	if (sc->sc_ih == NULL) {
-		aprint_error_dev(self, "couldn't establish interrupt\n");
-		goto fail;
-	}
-
 	sniexiu_attach_i(sc);
 	return;
   fail:
@@ -173,30 +168,17 @@ sniexiu_acpi_attach(device_t parent, dev
 	, _resource_parse_ops_default);
 	if (ACPI_FAILURE(rv))
 		return;
-
 	mem = acpi_res_mem(, 0);
 	irq = acpi_res_irq(, 0);
-	if (mem == NULL || irq == NULL) {
+	if (mem == NULL || irq == NULL || mem->ar_length) {
 		aprint_error(": incomplete resources\n");
 		return;
 	}
-	if (mem->ar_length == 0) {
-		aprint_error(": zero length memory resource\n");
-		return;
-	}
 	if (bus_space_map(aa->aa_memt, mem->ar_base, mem->ar_length, 0,
 	)) {
 		aprint_error(": couldn't map registers\n");
 		return;
 	}
-
-	sc->sc_dev = self;
-	sc->sc_iot = aa->aa_memt;
-	sc->sc_ioh = ioh;
-	sc->sc_iob = mem->ar_base;
-	sc->sc_ios = mem->ar_length;
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
-
 	sc->sc_ih = acpi_intr_establish(self,
 	(uint64_t)(uintptr_t)aa->aa_node->ad_handle,
 	IPL_BIO, false, sniexiu_intr, sc, device_xname(self));
@@ -205,20 +187,31 @@ sniexiu_acpi_attach(device_t parent, dev
 		goto fail;
 	}
 
+	aprint_naive("\n");
+
+	sc->sc_dev = self;
+	sc->sc_iot = aa->aa_memt;
+	sc->sc_ioh = ioh;
+	sc->sc_iob = mem->ar_base;
+	sc->sc_ios = mem->ar_length;
+	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
+
 	sniexiu_attach_i(sc);
+
+	acpi_resource_cleanup();
+	return;
  fail:
+	bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
 	acpi_resource_cleanup();
+	return;
 }
 
 static void
 sniexiu_attach_i(struct sniexiu_softc *sc)
 {
-
-	aprint_naive(": External IRQ controller\n");
-	aprint_normal(": External IRQ controller\n");
-
+	
+	aprint_normal_dev(sc->sc_dev, "Socionext External IRQ controller\n");
 	/* AAA */
-
 	return;
 }
 

Index: src/sys/arch/arm/sociox/sni_gpio.c
diff -u src/sys/arch/arm/sociox/sni_gpio.c:1.5 src/sys/arch/arm/sociox/sni_gpio.c:1.6
--- src/sys/arch/arm/sociox/sni_gpio.c:1.5	Wed Mar 25 19:03:44 2020
+++ src/sys/arch/arm/sociox/sni_gpio.c	Wed Mar 25 23:29:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_gpio.c,v 1.5 2020/03/25 19:03:44 nisimura Exp $	*/
+/*	$NetBSD: sni_gpio.c,v 

CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:20:38 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
DRT about config messages


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.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/arm/sociox/sni_emmc.c
diff -u src/sys/arch/arm/sociox/sni_emmc.c:1.5 src/sys/arch/arm/sociox/sni_emmc.c:1.6
--- src/sys/arch/arm/sociox/sni_emmc.c:1.5	Wed Mar 25 22:15:53 2020
+++ src/sys/arch/arm/sociox/sni_emmc.c	Wed Mar 25 23:20:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_emmc.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $	*/
+/*	$NetBSD: sni_emmc.c,v 1.6 2020/03/25 23:20:38 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.6 2020/03/25 23:20:38 nisimura Exp $");
 
 #include 
 #include 
@@ -132,6 +132,7 @@ sniemmc_fdt_attach(device_t parent, devi
 	}
 
 	aprint_naive("\n");
+	aprint_normal_dev(self, "Socionext eMMC controller\n");
 	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
 	sc->sc.sc_dev = self;
@@ -199,6 +200,7 @@ sniemmc_acpi_attach(device_t parent, dev
 	}
 
 	aprint_naive("\n");
+	aprint_normal_dev(self, "Socionext eMMC controller\n");
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_dmat = aa->aa_dmat;
@@ -227,7 +229,7 @@ sniemmc_attach_i(device_t self)
 	sc->sc.sc_flags |= SDHC_FLAG_32BIT_ACCESS;
 	sc->sc.sc_clkbase = 5;	/* Default to 50MHz */
 
-	aprint_normal_dev(sc->sc.sc_dev, "Socionext eMMC controller\n");
+	aprint_normal_dev(sc->sc.sc_dev, "doing sdhc_host() ...\n");
 #if 0
 	error = sdhc_host_found(>sc, sc->sc_iot, sc->sc_ioh, sc->sc_ios);
 #endif
Index: src/sys/arch/arm/sociox/sni_i2c.c
diff -u src/sys/arch/arm/sociox/sni_i2c.c:1.5 src/sys/arch/arm/sociox/sni_i2c.c:1.6
--- src/sys/arch/arm/sociox/sni_i2c.c:1.5	Wed Mar 25 22:15:53 2020
+++ src/sys/arch/arm/sociox/sni_i2c.c	Wed Mar 25 23:20:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_i2c.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $	*/
+/*	$NetBSD: sni_i2c.c,v 1.6 2020/03/25 23:20:38 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.6 2020/03/25 23:20:38 nisimura Exp $");
 
 #include 
 #include 
@@ -61,7 +61,6 @@ static void sniiic_acpi_attach(device_t,
 struct sniiic_softc {
 	device_t		sc_dev;
 	struct i2c_controller	sc_ic;
-	device_t		sc_i2cdev;
 	bus_space_tag_t		sc_iot;
 	bus_space_handle_t	sc_ioh;
 	bus_addr_t		sc_iob;
@@ -70,8 +69,7 @@ struct sniiic_softc {
 	kmutex_t		sc_lock;
 	kmutex_t		sc_mtx;
 	kcondvar_t		sc_cv;
-	int			sc_opflags;
-	bool			sc_busy;
+	volatile bool		sc_busy;
 	int			sc_phandle;
 };
 
@@ -81,6 +79,8 @@ CFATTACH_DECL_NEW(sniiic_fdt, sizeof(str
 CFATTACH_DECL_NEW(sniiic_acpi, sizeof(struct sniiic_softc),
 sniiic_acpi_match, sniiic_acpi_attach, NULL, NULL);
 
+void sni_i2c_common_i(struct sniiic_softc *);
+
 static int sni_i2c_acquire_bus(void *, int);
 static void sni_i2c_release_bus(void *, int);
 static int sni_i2c_exec(void *, i2c_op_t, i2c_addr_t, const void *,
@@ -148,7 +148,6 @@ sniiic_fdt_attach(device_t parent, devic
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev(self, "Socionext I2C controller\n");
 	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
 	sc->sc_dev = self;
@@ -156,15 +155,8 @@ sniiic_fdt_attach(device_t parent, devic
 	sc->sc_ioh = ioh;
 	sc->sc_iob = addr;
 	sc->sc_ios = size;
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
-	mutex_init(>sc_mtx, MUTEX_DEFAULT, IPL_BIO);
-	cv_init(>sc_cv, device_xname(self));
 
-	iic_tag_init(>sc_ic);
-	sc->sc_ic.ic_cookie = sc;
-	sc->sc_ic.ic_acquire_bus = sni_i2c_acquire_bus;
-	sc->sc_ic.ic_release_bus = sni_i2c_release_bus;
-	sc->sc_ic.ic_exec = sni_i2c_exec;
+	sni_i2c_common_i(sc);
 
 	fdtbus_register_i2c_controller(self, phandle, _i2c_funcs);
 #if 0
@@ -226,22 +218,14 @@ sniiic_acpi_attach(device_t parent, devi
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev(self, "Socionext I2C controller\n");
 
 	sc->sc_dev = self;
 	sc->sc_iot = aa->aa_memt;
 	sc->sc_ioh = ioh;
 	sc->sc_iob = mem->ar_base;
 	sc->sc_ios = mem->ar_length;
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
-	mutex_init(>sc_mtx, MUTEX_DEFAULT, IPL_NET);
-	cv_init(>sc_cv, device_xname(self));
 
-	iic_tag_init(>sc_ic);	
-	sc->sc_ic.ic_cookie = sc;
-	sc->sc_ic.ic_acquire_bus = sni_i2c_acquire_bus;
-	sc->sc_ic.ic_release_bus = sni_i2c_release_bus;
-	sc->sc_ic.ic_exec = sni_i2c_exec;
+	sni_i2c_common_i(sc);
 
 	memset(, 0, sizeof(iba));
 	iba.iba_tag = >sc_ic;
@@ -258,6 +242,24 @@ sniiic_acpi_attach(device_t parent, devi
 	

CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 23:20:38 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
DRT about config messages


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 22:15:53 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
better boot messaging, redo


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 22:15:53 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
better boot messaging, redo


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.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/arm/sociox/sni_emmc.c
diff -u src/sys/arch/arm/sociox/sni_emmc.c:1.4 src/sys/arch/arm/sociox/sni_emmc.c:1.5
--- src/sys/arch/arm/sociox/sni_emmc.c:1.4	Wed Mar 25 22:11:00 2020
+++ src/sys/arch/arm/sociox/sni_emmc.c	Wed Mar 25 22:15:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_emmc.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $	*/
+/*	$NetBSD: sni_emmc.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $");
 
 #include 
 #include 
@@ -132,7 +132,7 @@ sniemmc_fdt_attach(device_t parent, devi
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev(self, ": interrupting on %s\n", intrstr);
+	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_dmat = faa->faa_dmat;
Index: src/sys/arch/arm/sociox/sni_i2c.c
diff -u src/sys/arch/arm/sociox/sni_i2c.c:1.4 src/sys/arch/arm/sociox/sni_i2c.c:1.5
--- src/sys/arch/arm/sociox/sni_i2c.c:1.4	Wed Mar 25 22:11:00 2020
+++ src/sys/arch/arm/sociox/sni_i2c.c	Wed Mar 25 22:15:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_i2c.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $	*/
+/*	$NetBSD: sni_i2c.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.5 2020/03/25 22:15:53 nisimura Exp $");
 
 #include 
 #include 
@@ -148,8 +148,8 @@ sniiic_fdt_attach(device_t parent, devic
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev(self, ": Socionext I2C controller\n");
-	aprint_normal_dev(self, ": interrupting on %s\n", intrstr);
+	aprint_normal_dev(self, "Socionext I2C controller\n");
+	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
 	sc->sc_dev = self;
 	sc->sc_iot = faa->faa_bst;
@@ -226,7 +226,7 @@ sniiic_acpi_attach(device_t parent, devi
 	}
 
 	aprint_naive("\n");
-	aprint_normal_dev(self, ": Socionext I2C controller\n");
+	aprint_normal_dev(self, "Socionext I2C controller\n");
 
 	sc->sc_dev = self;
 	sc->sc_iot = aa->aa_memt;



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 22:11:00 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
better boot messaging


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.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/arm/sociox/sni_emmc.c
diff -u src/sys/arch/arm/sociox/sni_emmc.c:1.3 src/sys/arch/arm/sociox/sni_emmc.c:1.4
--- src/sys/arch/arm/sociox/sni_emmc.c:1.3	Wed Mar 18 10:05:24 2020
+++ src/sys/arch/arm/sociox/sni_emmc.c	Wed Mar 25 22:11:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_emmc.c,v 1.3 2020/03/18 10:05:24 nisimura Exp $	*/
+/*	$NetBSD: sni_emmc.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.3 2020/03/18 10:05:24 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.4 2020/03/25 22:11:00 nisimura Exp $");
 
 #include 
 #include 
@@ -66,12 +66,12 @@ struct sniemmc_softc {
 	bus_space_handle_t	sc_ioh;
 	bus_addr_t		sc_iob;
 	bus_size_t		sc_ios;
-	struct sdhc_host	*sc_hosts[1];
 	void			*sc_ih;
-	int			sc_phandle;
+	struct sdhc_host	*sc_hosts[1];
 	bus_dmamap_t		sc_dmamap;
 	bus_dma_segment_t	sc_segs[1];
 	kcondvar_t		sc_cv;
+	int			sc_phandle;
 };
 
 CFATTACH_DECL_NEW(sniemmc_fdt, sizeof(struct sniemmc_softc),
@@ -105,10 +105,8 @@ sniemmc_fdt_attach(device_t parent, devi
 	bus_space_handle_t ioh;
 	bus_addr_t addr;
 	bus_size_t size;
-	void *ih;
 	char intrstr[128];
 	_Bool disable;
-	int error;
 
 	prop_dictionary_get_bool(dict, "disable", );
 	if (disable) {
@@ -116,24 +114,25 @@ sniemmc_fdt_attach(device_t parent, devi
 		aprint_normal(": disabled\n");
 		return;
 	}
-	error = fdtbus_get_reg(phandle, 0, , );
-	if (error) {
-		aprint_error(": couldn't get registers\n");
-		return;
-	}
-	error = bus_space_map(faa->faa_bst, addr, size, 0, );
-	if (error) {
+	if (fdtbus_get_reg(phandle, 0, , ) != 0
+	|| bus_space_map(faa->faa_bst, addr, size, 0, ) != 0) {
 		aprint_error(": unable to map device\n");
 		return;
 	}
-	error = fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr));
-	if (error) {
+	if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) {
 		aprint_error(": failed to decode interrupt\n");
-		return;
+		goto fail;
+	}
+	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SDMMC, 0,
+	sdhc_intr, >sc);
+	if (sc->sc_ih == NULL) {
+		aprint_error_dev(self, "couldn't establish interrupt on %s\n",
+		intrstr);
+		goto fail;
 	}
 
-	aprint_naive(": SDHC controller\n");
-	aprint_normal(": SDHC controller\n");
+	aprint_naive("\n");
+	aprint_normal_dev(self, ": interrupting on %s\n", intrstr);
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_dmat = faa->faa_dmat;
@@ -144,18 +143,7 @@ sniemmc_fdt_attach(device_t parent, devi
 	sc->sc_iob = addr;
 	sc->sc_ios = size;
 
-	ih = fdtbus_intr_establish(phandle, 0, IPL_SDMMC, 0,
-	sdhc_intr, >sc);
-	if (ih == NULL) {
-		aprint_error_dev(self, "couldn't establish interrupt on %s\n",
-		intrstr);
-		goto fail;
-	}
-	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
-	sc->sc_ih = ih;
-
 	config_defer(self, sniemmc_attach_i);
-
 	return;
  fail:
 	bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
@@ -186,31 +174,31 @@ sniemmc_acpi_attach(device_t parent, dev
 	struct acpi_mem *mem;
 	struct acpi_irq *irq;
 	ACPI_STATUS rv;
-	void *ih;
 
 	rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS",
 	, _resource_parse_ops_default);
 	if (ACPI_FAILURE(rv))
 		return;
-
 	mem = acpi_res_mem(, 0);
 	irq = acpi_res_irq(, 0);
-	if (mem == NULL || irq == NULL) {
+	if (mem == NULL || irq == NULL || mem->ar_length == 0) {
 		aprint_error(": incomplete resources\n");
 		return;
 	}
-	if (mem->ar_length == 0) {
-		aprint_error(": zero length memory resource\n");
-		return;
-	}
 	if (bus_space_map(aa->aa_memt, mem->ar_base, mem->ar_length, 0,
 	)) {
 		aprint_error(": couldn't map registers\n");
 		return;
 	}
+	sc->sc_ih = acpi_intr_establish(self,
+	(uint64_t)(uintptr_t)aa->aa_node->ad_handle,
+	IPL_BIO, false, sdhc_intr, >sc, device_xname(self));
+	if (sc->sc_ih == NULL) {
+		aprint_error_dev(self, "couldn't establish interrupt\n");
+		goto fail;
+	}
 
-	aprint_naive(": SDHC controller\n");
-	aprint_normal(": SDHC controller\n");
+	aprint_naive("\n");
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_dmat = aa->aa_dmat;
@@ -219,20 +207,10 @@ sniemmc_acpi_attach(device_t parent, dev
 	sc->sc_ioh = ioh;
 	sc->sc_ios = mem->ar_length;
 
-	ih = acpi_intr_establish(self,
-	(uint64_t)(uintptr_t)aa->aa_node->ad_handle,
-	IPL_BIO, false, sdhc_intr, >sc, device_xname(self));
-	if (ih == NULL) {
-		aprint_error_dev(self, "couldn't establish interrupt\n");
-		goto fail;
-	}
-	sc->sc_ih = ih;
-
 	config_defer(self, sniemmc_attach_i);
 
 	

CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 22:11:00 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_emmc.c sni_i2c.c

Log Message:
better boot messaging


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/sni_emmc.c \
src/sys/arch/arm/sociox/sni_i2c.c

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 25 22:09:48 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcrypt/pw_gensalt.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/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.6 src/lib/libcrypt/pw_gensalt.3:1.7
--- src/lib/libcrypt/pw_gensalt.3:1.6	Wed Mar 25 21:26:12 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 22:09:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.6 2020/03/25 21:26:12 christos Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.7 2020/03/25 22:09:48 wiz Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -56,7 +56,7 @@ using the hash function specified in
 with the function-specific
 .Ar option .
 .Pp
-The new salt types follow the 
+The new salt types follow the
 .Dq Modular Crypt Format
 (MCF) standard and are of the form:
 .Bd -literal -offset indent
@@ -65,7 +65,7 @@ The new salt types follow the 
 .Pp
 The characters allowed in the password salt are alphanumeric and
 include a forward slash and a period (are in the regular expression
-format 
+format
 .Li [A-Za-z0-9/.] ) .
 .Pp
 The following types are available:
@@ -165,8 +165,8 @@ The
 function was written in 1997 by
 .An Niels Provos Aq Mt pro...@physnet.uni-hamburg.de .
 .Pp
-The 
+The
 .Lk https://passlib.readthedocs.io/en/stable/modular_crypt_format.html "Modular Crypt Format (MCF)" .
 .Pp
-The 
+The
 .Lk https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md "Password Hashing Competition (PHC) format" .



CVS commit: src/lib/libcrypt

2020-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 25 22:09:48 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcrypt/pw_gensalt.3

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:26:12 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
new paragraph


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libcrypt/pw_gensalt.3

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:26:12 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
new paragraph


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libcrypt/pw_gensalt.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/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.5 src/lib/libcrypt/pw_gensalt.3:1.6
--- src/lib/libcrypt/pw_gensalt.3:1.5	Wed Mar 25 17:24:08 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 17:26:12 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.5 2020/03/25 21:24:08 christos Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.6 2020/03/25 21:26:12 christos Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -167,5 +167,6 @@ function was written in 1997 by
 .Pp
 The 
 .Lk https://passlib.readthedocs.io/en/stable/modular_crypt_format.html "Modular Crypt Format (MCF)" .
+.Pp
 The 
 .Lk https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md "Password Hashing Competition (PHC) format" .



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:24:08 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
more info


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libcrypt/pw_gensalt.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/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.4 src/lib/libcrypt/pw_gensalt.3:1.5
--- src/lib/libcrypt/pw_gensalt.3:1.4	Wed Mar 25 17:02:26 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 17:24:08 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.4 2020/03/25 21:02:26 christos Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.5 2020/03/25 21:24:08 christos Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -56,13 +56,20 @@ using the hash function specified in
 with the function-specific
 .Ar option .
 .Pp
-The new salt types follow the MCF standard and are of the form:
+The new salt types follow the 
+.Dq Modular Crypt Format
+(MCF) standard and are of the form:
+.Bd -literal -offset indent
 .Li $[$=(,=)*][$[$]]
+.Ed
+.Pp
 The characters allowed in the password salt are alphanumeric and
-include a forward slash and a period.
+include a forward slash and a period (are in the regular expression
+format 
+.Li [A-Za-z0-9/.] ) .
 .Pp
 The following types are available:
-.Bl -tag -width blowfish -compact
+.Bl -tag -width blowfish -offset indent
 .It old
 The original Unix implementation.
 This is of the form
@@ -117,7 +124,7 @@ A salt generated using the
 .Sq blowfish
 algorithm.
 The minimum salt size is
-.Dv 31
+.Dv 30
 and the number of rounds needs to be specified in
 .Ar option .
 This is of the form:
@@ -157,3 +164,8 @@ The
 .Fn pw_gensalt
 function was written in 1997 by
 .An Niels Provos Aq Mt pro...@physnet.uni-hamburg.de .
+.Pp
+The 
+.Lk https://passlib.readthedocs.io/en/stable/modular_crypt_format.html "Modular Crypt Format (MCF)" .
+The 
+.Lk https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md "Password Hashing Competition (PHC) format" .



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:24:08 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
more info


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libcrypt/pw_gensalt.3

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:02:26 UTC 2020

Modified Files:
src/lib/libcrypt: bcrypt.c pw_gensalt.3

Log Message:
Revert putting a $ as the final character for blowfish. It is not required by
MCF and we want to be compatible.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libcrypt/bcrypt.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libcrypt/pw_gensalt.3

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 21:02:26 UTC 2020

Modified Files:
src/lib/libcrypt: bcrypt.c pw_gensalt.3

Log Message:
Revert putting a $ as the final character for blowfish. It is not required by
MCF and we want to be compatible.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libcrypt/bcrypt.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libcrypt/pw_gensalt.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/libcrypt/bcrypt.c
diff -u src/lib/libcrypt/bcrypt.c:1.20 src/lib/libcrypt/bcrypt.c:1.21
--- src/lib/libcrypt/bcrypt.c:1.20	Wed Mar 25 14:36:29 2020
+++ src/lib/libcrypt/bcrypt.c	Wed Mar 25 17:02:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcrypt.c,v 1.20 2020/03/25 18:36:29 christos Exp $	*/
+/*	$NetBSD: bcrypt.c,v 1.21 2020/03/25 21:02:26 christos Exp $	*/
 /*	$OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $	*/
 
 /*
@@ -46,7 +46,7 @@
  *
  */
 #include 
-__RCSID("$NetBSD: bcrypt.c,v 1.20 2020/03/25 18:36:29 christos Exp $");
+__RCSID("$NetBSD: bcrypt.c,v 1.21 2020/03/25 21:02:26 christos Exp $");
 
 #include 
 #include 
@@ -66,12 +66,12 @@ __RCSID("$NetBSD: bcrypt.c,v 1.20 2020/0
 
 #define BCRYPT_VERSION '2'
 #define BCRYPT_MAXSALT 16	/* Precomputation is just so nice */
-#define BCRYPT_MAXSALTLEN 	(7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 2)
+#define BCRYPT_MAXSALTLEN 	(7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 1)
 #define BCRYPT_BLOCKS 6		/* Ciphertext blocks */
 #define BCRYPT_MINROUNDS 16	/* we have log2(rounds) in salt */
 
 static void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
-static u_int8_t *encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
+static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
 static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *);
 
 char *__bcrypt(const char *, const char *);	/* XXX */
@@ -146,9 +146,7 @@ encode_salt(char *salt, u_int8_t *csalt,
 
 	snprintf(salt + 4, 4, "%2.2u$", logr);
 
-	csalt = encode_base64((u_int8_t *) salt + 7, csalt, clen);
-	*csalt++ = '$';
-	*csalt = '\0';
+	encode_base64((u_int8_t *) salt + 7, csalt, clen);
 }
 
 int
@@ -320,7 +318,7 @@ __bcrypt(const char *key, const char *sa
 	return encrypted;
 }
 
-static u_int8_t *
+static void
 encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len)
 {
 	u_int8_t *bp = buffer;
@@ -348,7 +346,6 @@ encode_base64(u_int8_t *buffer, u_int8_t
 		*bp++ = Base64Code[c2 & 0x3f];
 	}
 	*bp = '\0';
-	return bp;
 }
 #if 0
 void

Index: src/lib/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.3 src/lib/libcrypt/pw_gensalt.3:1.4
--- src/lib/libcrypt/pw_gensalt.3:1.3	Wed Mar 25 14:53:50 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 17:02:26 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.3 2020/03/25 18:53:50 wiz Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.4 2020/03/25 21:02:26 christos Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -121,7 +121,7 @@ The minimum salt size is
 and the number of rounds needs to be specified in
 .Ar option .
 This is of the form:
-.Li $2a$nrounds$??$ .
+.Li $2a$nrounds$?? .
 The
 .Li 2
 in the salt string indicates the current blowfish version.



Re: CVS commit: src/lib/libc/string

2020-03-25 Thread David Holland
On Wed, Mar 25, 2020 at 06:50:47PM +, Robert Elz wrote:
 > Modified Files:
 >  src/lib/libc/string: strerror.3
 > 
 > Log Message:
 > Delete the BUGS paragraph about the "missing" const qualifier for the
 > result type of strerror() (and strerror_l()).   While that once should
 > really have been present, when strerror() was invented, there was no
 > "const" qualifier in C to apply, and now the way the code is writtem
 > (really needs to be because of NLS support) the const is no longer
 > really appropriate.
 > 
 > Applications still shouldn't attempt to modify the result however.

I don't agree -- because applications shouldn't attempt to modify the
result, it should be const.

What it points to internally doesn't matter...

-- 
David A. Holland
dholl...@netbsd.org


CVS commit: src

2020-03-25 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Mar 25 18:08:34 UTC 2020

Modified Files:
src/lib/libc/sys: fdatasync.2
src/sys/kern: vfs_syscalls.c

Log Message:
Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/sys/fdatasync.2
cvs rdiff -u -r1.543 -r1.544 src/sys/kern/vfs_syscalls.c

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



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

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 17:13:50 UTC 2020

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

Log Message:
add pw_gensalt


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

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2314 src/distrib/sets/lists/comp/mi:1.2315
--- src/distrib/sets/lists/comp/mi:1.2314	Mon Mar 23 09:37:37 2020
+++ src/distrib/sets/lists/comp/mi	Wed Mar 25 13:13:49 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2314 2020/03/23 13:37:37 roy Exp $
+#	$NetBSD: mi,v 1.2315 2020/03/25 17:13:49 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -9267,6 +9267,7 @@
 ./usr/share/man/cat3/pw_copyx.0			comp-c-catman		.cat
 ./usr/share/man/cat3/pw_edit.0			comp-c-catman		.cat
 ./usr/share/man/cat3/pw_error.0			comp-c-catman		.cat
+./usr/share/man/cat3/pw_gensalt.0		comp-c-catman		.cat
 ./usr/share/man/cat3/pw_getconf.0		comp-c-catman		.cat
 ./usr/share/man/cat3/pw_getprefix.0		comp-c-catman		.cat
 ./usr/share/man/cat3/pw_getpwconf.0		comp-c-catman		.cat
@@ -17291,6 +17292,7 @@
 ./usr/share/man/html3/pw_copyx.html		comp-c-htmlman		html
 ./usr/share/man/html3/pw_edit.html		comp-c-htmlman		html
 ./usr/share/man/html3/pw_error.html		comp-c-htmlman		html
+./usr/share/man/html3/pw_gensalt.html		comp-c-htmlman		html
 ./usr/share/man/html3/pw_getconf.html		comp-c-htmlman		html
 ./usr/share/man/html3/pw_getprefix.html		comp-c-htmlman		html
 ./usr/share/man/html3/pw_getpwconf.html		comp-c-htmlman		html
@@ -25309,6 +25311,7 @@
 ./usr/share/man/man3/pw_copyx.3			comp-c-man		.man
 ./usr/share/man/man3/pw_edit.3			comp-c-man		.man
 ./usr/share/man/man3/pw_error.3			comp-c-man		.man
+./usr/share/man/man3/pw_gensalt.3		comp-c-man		.man
 ./usr/share/man/man3/pw_getconf.3		comp-c-man		.man
 ./usr/share/man/man3/pw_getprefix.3		comp-c-man		.man
 ./usr/share/man/man3/pw_getpwconf.3		comp-c-man		.man



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 20:19:46 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
use dma32 for descriptor store. likely still missing freq designation(s)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sociox/if_scx.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/arm/sociox/if_scx.c
diff -u src/sys/arch/arm/sociox/if_scx.c:1.13 src/sys/arch/arm/sociox/if_scx.c:1.14
--- src/sys/arch/arm/sociox/if_scx.c:1.13	Wed Mar 25 01:39:49 2020
+++ src/sys/arch/arm/sociox/if_scx.c	Wed Mar 25 20:19:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_scx.c,v 1.13 2020/03/25 01:39:49 nisimura Exp $	*/
+/*	$NetBSD: if_scx.c,v 1.14 2020/03/25 20:19:46 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -53,10 +53,11 @@
  *   controls like FDT descriptions. Fortunately, Intel/Altera CycloneV PDFs
  *   describe every detail of "such the instance of" DW EMAC IP and
  *   most of them are likely applicable to SC2A11 GbE.
+ * - DW EMAC implmentation (0x20) is 0x10.0x36
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.13 2020/03/25 01:39:49 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.14 2020/03/25 20:19:46 nisimura Exp $");
 
 #include 
 #include 
@@ -166,7 +167,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1
 #define  FCR_RFE	(1U<<2)		/* accept PAUSE to throttle Tx */
 #define  FCR_TFE	(1U<<1)		/* generate PAUSE to moderate Rx lvl */
 #define GMACVTAG	0x001c		/* VLAN tag control */
-#define GMACIMPL	0x0020		/* implementation number . */
+#define GMACIMPL	0x0020		/* implementation number XX.YY */
 #define GMACMAH0	0x0040		/* MAC address 0 47:32 */
 #define GMACMAL0	0x0044		/* MAC address 0 31:0 */
 #define GMACMAH(i) 	((i)*8+0x40)	/* supplimental MAC addr 1 - 15 */
@@ -174,7 +175,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1
 #define GMACMIISR	0x00d8		/* resolved xMII link status */
 	/*  3   link up detected
 	 *  2:1 resovled speed
-	 *  0 2.5Mhz (10Mbps) 
+	 *  0 2.5Mhz (10Mbps)
 	 *	1 25Mhz  (100bps)
 	 *	2 125Mhz (1000Mbps)
 	 *  1   full duplex detected */
@@ -306,6 +307,7 @@ struct scx_softc {
 	bus_space_handle_t sc_eesh;	/* eeprom section handle */
 	bus_size_t sc_eesz;		/* eeprom map size */
 	bus_dma_tag_t sc_dmat;		/* bus DMA tag */
+	bus_dma_tag_t sc_dmat32;
 	struct ethercom sc_ethercom;	/* Ethernet common data */
 	struct mii_data sc_mii;		/* MII */
 	callout_t sc_tick_ch;		/* PHY monitor callout */
@@ -319,6 +321,7 @@ struct scx_softc {
 	int sc_ucodeloaded;		/* ucode for H2M/M2H/PKT */
 	int sc_100mii;			/* 1 for RMII/MII, 0 for RGMII */
 	int sc_phandle;			/* fdt phandle */
+	uint64_t sc_freq;
 
 	bus_dmamap_t sc_cddmamap;	/* control data DMA map */
 #define sc_cddma	sc_cddmamap->dm_segs[0].ds_addr
@@ -399,12 +402,12 @@ static void txreap(struct scx_softc *);
 static void rxintr(struct scx_softc *);
 static int add_rxbuf(struct scx_softc *, int);
 
-static int get_mdioclk(uint32_t);
 static int spin_waitfor(struct scx_softc *, int, int);
 static int mac_read(struct scx_softc *, int);
 static void mac_write(struct scx_softc *, int, int);
 static void loaducode(struct scx_softc *);
 static void injectucode(struct scx_softc *, int, bus_addr_t, bus_size_t);
+static int get_mdioclk(uint32_t);
 
 #define CSR_READ(sc,off) \
 	bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (off))
@@ -460,14 +463,9 @@ scx_fdt_attach(device_t parent, device_t
 		goto fail;
 	}
 
-	phy_mode = fdtbus_get_string(phandle, "phy-mode");
-	if (phy_mode == NULL) {
-		aprint_error(": missing 'phy-mode' property\n");
-		phy_mode = "rgmii";
-	}
 
 	aprint_naive("\n");
-	aprint_normal(": Gigabit Ethernet Controller\n");
+	/* aprint_normal(": Gigabit Ethernet Controller\n"); */
 	aprint_normal_dev(self, "interrupt on %s\n", intrstr);
 
 	sc->sc_dev = self;
@@ -478,7 +476,15 @@ scx_fdt_attach(device_t parent, device_t
 	sc->sc_eesz = size[1];
 	sc->sc_dmat = faa->faa_dmat;
 	sc->sc_phandle = phandle;
-	sc->sc_100mii = (strcmp(phy_mode, "rgmii") != 0);
+
+	phy_mode = fdtbus_get_string(phandle, "phy-mode");
+	if (phy_mode == NULL)
+		aprint_error(": missing 'phy-mode' property\n");
+	sc->sc_100mii = (phy_mode != NULL && strcmp(phy_mode, "rgmii") != 0);
+sc->sc_phy_id = 7; /* XXX */
+sc->sc_freq = 250 * 1000 * 1000; /* XXX */
+aprint_normal_dev(self,
+"phy mode %s, phy id %d, freq %ld\n", phy_mode, sc->sc_phy_id, sc->sc_freq);
 
 	scx_attach_i(sc);
 	return;
@@ -515,13 +521,14 @@ scx_acpi_attach(device_t parent, device_
 	struct acpi_resources res;
 	struct acpi_mem *mem;
 	struct acpi_irq *irq;
+	char *phy_mode;
+	ACPI_INTEGER acpi_phy, acpi_freq;
 	ACPI_STATUS rv;
 
 	rv = acpi_resource_parse(self, handle, "_CRS",
 	, _resource_parse_ops_default);
 	if (ACPI_FAILURE(rv))
 		return;
-acpi_resource_print(self, );
 	mem = acpi_res_mem(, 0);
 	irq = 

CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 20:19:46 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_scx.c

Log Message:
use dma32 for descriptor store. likely still missing freq designation(s)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sociox/if_scx.c

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



CVS commit: src

2020-03-25 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Mar 25 18:08:34 UTC 2020

Modified Files:
src/lib/libc/sys: fdatasync.2
src/sys/kern: vfs_syscalls.c

Log Message:
Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/sys/fdatasync.2
cvs rdiff -u -r1.543 -r1.544 src/sys/kern/vfs_syscalls.c

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

Modified files:

Index: src/lib/libc/sys/fdatasync.2
diff -u src/lib/libc/sys/fdatasync.2:1.16 src/lib/libc/sys/fdatasync.2:1.17
--- src/lib/libc/sys/fdatasync.2:1.16	Wed Apr 30 13:10:51 2008
+++ src/lib/libc/sys/fdatasync.2	Wed Mar 25 18:08:34 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fdatasync.2,v 1.16 2008/04/30 13:10:51 martin Exp $
+.\"	$NetBSD: fdatasync.2,v 1.17 2020/03/25 18:08:34 gdt Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -68,7 +68,7 @@ function will fail if:
 .It Bq Er EBADF
 The
 .Fa fd
-argument is not a valid file descriptor open for writing.
+argument is not a valid file descriptor.
 .It Bq Er EINVAL
 This implementation does not support synchronized I/O for this file.
 .It Bq Er ENOSYS
@@ -93,4 +93,4 @@ and outstanding I/O operations are not g
 The
 .Fn fdatasync
 function conforms to
-.St -p1003.1b-93 .
+.St -p1003.1-2008 .

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.543 src/sys/kern/vfs_syscalls.c:1.544
--- src/sys/kern/vfs_syscalls.c:1.543	Tue Mar  3 19:55:16 2020
+++ src/sys/kern/vfs_syscalls.c	Wed Mar 25 18:08:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.543 2020/03/03 19:55:16 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.544 2020/03/25 18:08:34 gdt Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.543 2020/03/03 19:55:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.544 2020/03/25 18:08:34 gdt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -4059,8 +4059,7 @@ sys_fsync(struct lwp *l, const struct sy
  * Sync a range of file data.  API modeled after that found in AIX.
  *
  * FDATASYNC indicates that we need only save enough metadata to be able
- * to re-read the written data.  Note we duplicate AIX's requirement that
- * the file be open for writing.
+ * to re-read the written data.
  */
 /* ARGSUSED */
 int
@@ -4141,10 +4140,6 @@ sys_fdatasync(struct lwp *l, const struc
 	/* fd_getvnode() will use the descriptor for us */
 	if ((error = fd_getvnode(SCARG(uap, fd), )) != 0)
 		return (error);
-	if ((fp->f_flag & FWRITE) == 0) {
-		fd_putfile(SCARG(uap, fd));
-		return (EBADF);
-	}
 	vp = fp->f_vnode;
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	error = VOP_FSYNC(vp, fp->f_cred, FSYNC_WAIT|FSYNC_DATAONLY, 0, 0);



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 18:37:09 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
- bump blowfish size, explain version
- add passwd xref


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libcrypt/pw_gensalt.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/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.1 src/lib/libcrypt/pw_gensalt.3:1.2
--- src/lib/libcrypt/pw_gensalt.3:1.1	Wed Mar 25 13:11:06 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 14:37:08 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.1 2020/03/25 17:11:06 christos Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.2 2020/03/25 18:37:08 christos Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -116,11 +116,14 @@ A salt generated using the
 .Sq blowfish
 algorithm.
 The minimum salt size is
-.Dv 30
+.Dv 31
 and the number of rounds needs to be specified in
 .Ar option .
 This is of the form:
 .Li $2a$nrounds$??$ .
+The
+.Li 2
+in the salt string indicates the current blowfish version.
 .\" .It argon2
 .\" .It argon2id
 .\" .It argon2i
@@ -146,6 +149,7 @@ was not large enough to fit the salt for
 .Ar type.
 .El
 .Sh SEE ALSO
+.Xr passwd 1 ,
 .Xr pwhash 1
 .Sh HISTORY
 The



CVS commit: src/usr.sbin/makefs/ffs

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 20:17:48 UTC 2020

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
improve error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/ffs/mkfs.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/makefs/ffs

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 20:17:48 UTC 2020

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
improve error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/ffs/mkfs.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/makefs/ffs/mkfs.c
diff -u src/usr.sbin/makefs/ffs/mkfs.c:1.37 src/usr.sbin/makefs/ffs/mkfs.c:1.38
--- src/usr.sbin/makefs/ffs/mkfs.c:1.37	Wed Feb  8 23:42:53 2017
+++ src/usr.sbin/makefs/ffs/mkfs.c	Wed Mar 25 16:17:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.37 2017/02/09 04:42:53 kre Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $	*/
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -48,7 +48,7 @@
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
 #ifdef __RCSID
-__RCSID("$NetBSD: mkfs.c,v 1.37 2017/02/09 04:42:53 kre Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $");
 #endif
 #endif
 #endif /* not lint */
@@ -821,15 +821,15 @@ ffs_wtfs(daddr_t bno, int size, void *bf
 
 	offset = bno * fsopts->sectorsize + fsopts->offset;
 	if (lseek(fsopts->fd, offset, SEEK_SET) == -1)
-		err(EXIT_FAILURE, "%s: seek error for sector %lld", __func__,
-		(long long)bno);
+		err(EXIT_FAILURE, "%s: seek error @%td for sector %jd",
+		__func__, offset, (intmax_t)bno);
 	n = write(fsopts->fd, bf, size);
 	if (n == -1)
-		err(EXIT_FAILURE, "%s: write error for sector %lld", __func__,
-		(long long)bno);
+		err(EXIT_FAILURE, "%s: write error for sector %jd", __func__,
+		(intmax_t)bno);
 	else if (n != size)
-		errx(EXIT_FAILURE, "%s: short write error for sector %lld",
-		__func__, (long long)bno);
+		errx(EXIT_FAILURE, "%s: short write error for sector %jd",
+		__func__, (intmax_t)bno);
 }
 
 



CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:15:41 UTC 2020

Modified Files:
src/lib/libc/string: strerror_r.c

Log Message:
Arrange that strerror(-1) prints "Unknown error: -1" and not the
unsigned equivalent of -1.

While here, guarantee, even when !NLS, that nothing here (not even
snprintf deciding to complain about EILSEQ or something) can ever
alter errno (ie: always save and restore it, not only in the NLS case).
The functions here must never alter errno, whatever happens.


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

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 18:36:29 UTC 2020

Modified Files:
src/lib/libcrypt: bcrypt.c

Log Message:
Add missing trailing $ for blowfish


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libcrypt/bcrypt.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/libcrypt/bcrypt.c
diff -u src/lib/libcrypt/bcrypt.c:1.19 src/lib/libcrypt/bcrypt.c:1.20
--- src/lib/libcrypt/bcrypt.c:1.19	Wed Aug 28 13:47:07 2013
+++ src/lib/libcrypt/bcrypt.c	Wed Mar 25 14:36:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcrypt.c,v 1.19 2013/08/28 17:47:07 riastradh Exp $	*/
+/*	$NetBSD: bcrypt.c,v 1.20 2020/03/25 18:36:29 christos Exp $	*/
 /*	$OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $	*/
 
 /*
@@ -46,7 +46,7 @@
  *
  */
 #include 
-__RCSID("$NetBSD: bcrypt.c,v 1.19 2013/08/28 17:47:07 riastradh Exp $");
+__RCSID("$NetBSD: bcrypt.c,v 1.20 2020/03/25 18:36:29 christos Exp $");
 
 #include 
 #include 
@@ -66,12 +66,12 @@ __RCSID("$NetBSD: bcrypt.c,v 1.19 2013/0
 
 #define BCRYPT_VERSION '2'
 #define BCRYPT_MAXSALT 16	/* Precomputation is just so nice */
-#define BCRYPT_MAXSALTLEN 	(7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 1)
+#define BCRYPT_MAXSALTLEN 	(7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 2)
 #define BCRYPT_BLOCKS 6		/* Ciphertext blocks */
 #define BCRYPT_MINROUNDS 16	/* we have log2(rounds) in salt */
 
 static void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
-static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
+static u_int8_t *encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
 static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *);
 
 char *__bcrypt(const char *, const char *);	/* XXX */
@@ -146,7 +146,9 @@ encode_salt(char *salt, u_int8_t *csalt,
 
 	snprintf(salt + 4, 4, "%2.2u$", logr);
 
-	encode_base64((u_int8_t *) salt + 7, csalt, clen);
+	csalt = encode_base64((u_int8_t *) salt + 7, csalt, clen);
+	*csalt++ = '$';
+	*csalt = '\0';
 }
 
 int
@@ -318,7 +320,7 @@ __bcrypt(const char *key, const char *sa
 	return encrypted;
 }
 
-static void
+static u_int8_t *
 encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len)
 {
 	u_int8_t *bp = buffer;
@@ -346,6 +348,7 @@ encode_base64(u_int8_t *buffer, u_int8_t
 		*bp++ = Base64Code[c2 & 0x3f];
 	}
 	*bp = '\0';
+	return bp;
 }
 #if 0
 void



CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:15:41 UTC 2020

Modified Files:
src/lib/libc/string: strerror_r.c

Log Message:
Arrange that strerror(-1) prints "Unknown error: -1" and not the
unsigned equivalent of -1.

While here, guarantee, even when !NLS, that nothing here (not even
snprintf deciding to complain about EILSEQ or something) can ever
alter errno (ie: always save and restore it, not only in the NLS case).
The functions here must never alter errno, whatever happens.


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

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

Modified files:

Index: src/lib/libc/string/strerror_r.c
diff -u src/lib/libc/string/strerror_r.c:1.4 src/lib/libc/string/strerror_r.c:1.5
--- src/lib/libc/string/strerror_r.c:1.4	Tue Jan 10 20:25:48 2017
+++ src/lib/libc/string/strerror_r.c	Wed Mar 25 16:15:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: strerror_r.c,v 1.4 2017/01/10 20:25:48 christos Exp $	*/
+/*	$NetBSD: strerror_r.c,v 1.5 2020/03/25 16:15:41 kre Exp $	*/
 
 /*
  * Copyright (c) 1988 Regents of the University of California.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: strerror_r.c,v 1.4 2017/01/10 20:25:48 christos Exp $");
+__RCSID("$NetBSD: strerror_r.c,v 1.5 2020/03/25 16:15:41 kre Exp $");
 
 #include "namespace.h"
 #include 
@@ -53,12 +53,12 @@ __weak_alias(strerror_r, _strerror_r)
 int
 _strerror_lr(int num, char *buf, size_t buflen, locale_t loc)
 {
-#define	UPREFIX	"Unknown error: %u"
+#define	UPREFIX	"Unknown error: %d"
 	unsigned int errnum = num;
 	int retval = 0;
 	size_t slen;
-#ifdef NLS
 	int saved_errno = errno;
+#ifdef NLS
 	nl_catd catd;
 	catd = catopen_l("libc", NL_CAT_LOCALE, loc);
 #endif
@@ -66,7 +66,7 @@ _strerror_lr(int num, char *buf, size_t 
 
 	if (errnum < (unsigned int) sys_nerr) {
 #ifdef NLS
-		slen = strlcpy(buf, catgets(catd, 1, (int)errnum,
+		slen = strlcpy(buf, catgets(catd, 1, num,
 		sys_errlist[errnum]), buflen); 
 #else
 		slen = strlcpy(buf, sys_errlist[errnum], buflen); 
@@ -74,9 +74,9 @@ _strerror_lr(int num, char *buf, size_t 
 	} else {
 #ifdef NLS
 		slen = snprintf_l(buf, buflen, loc,
-		catgets(catd, 1, 0x, UPREFIX), errnum);
+		catgets(catd, 1, 0x, UPREFIX), num);
 #else
-		slen = snprintf(buf, buflen, UPREFIX, errnum);
+		slen = snprintf(buf, buflen, UPREFIX, num);
 #endif
 		retval = EINVAL;
 	}
@@ -86,8 +86,8 @@ _strerror_lr(int num, char *buf, size_t 
 
 #ifdef NLS
 	catclose(catd);
-	errno = saved_errno;
 #endif
+	errno = saved_errno;
 
 	return retval;
 }



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

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 17:13:50 UTC 2020

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

Log Message:
add pw_gensalt


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

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 18:37:09 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
- bump blowfish size, explain version
- add passwd xref


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libcrypt/pw_gensalt.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/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:10:17 UTC 2020

Modified Files:
src/lib/libc/string: strerror.c

Log Message:
Protect against malloc failure corrupting errno, which is not
permitted of these functions.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/string/strerror.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 18:42:17 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
try to decode _DSD ACPI resource


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/sni_gpio.c

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



CVS commit: src

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:45:42 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/string: Makefile.inc strerror.3

Log Message:
Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr().   To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


To generate a diff of this commit:
cvs rdiff -u -r1.2315 -r1.2316 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.83 -r1.84 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/string/strerror.3

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



CVS commit: src

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:45:42 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/string: Makefile.inc strerror.3

Log Message:
Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr().   To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


To generate a diff of this commit:
cvs rdiff -u -r1.2315 -r1.2316 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.83 -r1.84 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/string/strerror.3

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2315 src/distrib/sets/lists/comp/mi:1.2316
--- src/distrib/sets/lists/comp/mi:1.2315	Wed Mar 25 17:13:49 2020
+++ src/distrib/sets/lists/comp/mi	Wed Mar 25 18:45:42 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2315 2020/03/25 17:13:49 christos Exp $
+#	$NetBSD: mi,v 1.2316 2020/03/25 18:45:42 kre Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -9989,6 +9989,7 @@
 ./usr/share/man/cat3/strcspn.0			comp-c-catman		.cat
 ./usr/share/man/cat3/strdup.0			comp-c-catman		.cat
 ./usr/share/man/cat3/strerror.0			comp-c-catman		.cat
+./usr/share/man/cat3/strerror_l.0		comp-c-catman		.cat
 ./usr/share/man/cat3/strerror_r.0		comp-c-catman		.cat
 ./usr/share/man/cat3/stresep.0			comp-c-catman		.cat
 ./usr/share/man/cat3/strfmon.0			comp-c-catman		.cat
@@ -17993,6 +17994,7 @@
 ./usr/share/man/html3/strcspn.html		comp-c-htmlman		html
 ./usr/share/man/html3/strdup.html		comp-c-htmlman		html
 ./usr/share/man/html3/strerror.html		comp-c-htmlman		html
+./usr/share/man/html3/strerror_l.html		comp-c-htmlman		html
 ./usr/share/man/html3/strerror_r.html		comp-c-htmlman		html
 ./usr/share/man/html3/stresep.html		comp-c-htmlman		html
 ./usr/share/man/html3/strfmon.html		comp-c-htmlman		html
@@ -26029,6 +26031,7 @@
 ./usr/share/man/man3/strcspn.3			comp-c-man		.man
 ./usr/share/man/man3/strdup.3			comp-c-man		.man
 ./usr/share/man/man3/strerror.3			comp-c-man		.man
+./usr/share/man/man3/strerror_l.3		comp-c-man		.man
 ./usr/share/man/man3/strerror_r.3		comp-c-man		.man
 ./usr/share/man/man3/stresep.3			comp-c-man		.man
 ./usr/share/man/man3/strfmon.3			comp-c-man		.man

Index: src/lib/libc/string/Makefile.inc
diff -u src/lib/libc/string/Makefile.inc:1.83 src/lib/libc/string/Makefile.inc:1.84
--- src/lib/libc/string/Makefile.inc:1.83	Thu Jan 12 00:35:38 2017
+++ src/lib/libc/string/Makefile.inc	Wed Mar 25 18:45:42 2020
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile.inc	8.1 (Berkeley) 6/4/93
-#	$NetBSD: Makefile.inc,v 1.83 2017/01/12 00:35:38 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.84 2020/03/25 18:45:42 kre Exp $
 
 # string sources
 .PATH: ${ARCHDIR}/string ${.CURDIR}/string
@@ -63,6 +63,7 @@ MLINKS+=strchr.3 strchrnul.3
 MLINKS+=memchr.3 memrchr.3
 MLINKS+=strtok.3 strtok_r.3
 MLINKS+=strerror.3 strerror_r.3 strerror.3 perror.3 \
+	strerror.3 strerror_l.3 \
 	strerror.3 sys_errlist.3 strerror.3 sys_nerr.3
 MLINKS+=strdup.3 strndup.3
 MLINKS+=strsep.3 stresep.3

Index: src/lib/libc/string/strerror.3
diff -u src/lib/libc/string/strerror.3:1.19 src/lib/libc/string/strerror.3:1.20
--- src/lib/libc/string/strerror.3:1.19	Mon Jul  3 21:32:50 2017
+++ src/lib/libc/string/strerror.3	Wed Mar 25 18:45:42 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: strerror.3,v 1.19 2017/07/03 21:32:50 wiz Exp $
+.\" $NetBSD: strerror.3,v 1.20 2020/03/25 18:45:42 kre Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,12 +32,14 @@
 .\" SUCH DAMAGE.
 .\"
 .\" @(#)strerror.3	8.1 (Berkeley) 6/9/93
-.Dd May 9, 2015
+.Dd March 24, 2020
 .Dt STRERROR 3
 .Os
 .Sh NAME
 .Nm perror ,
 .Nm strerror ,
+.Nm strerror_l ,
+.\" .Nm strerror_lr ,
 .Nm strerror_r ,
 .Nm sys_errlist ,
 .Nm sys_nerr
@@ -56,9 +58,15 @@
 .Fn strerror "int errnum"
 .Ft int
 .Fn strerror_r "int errnum" "char *strerrbuf" "size_t buflen"
+.Ft "char *"
+.Fn strerror_l "int errnum" "locale_t loc"
+.\".Ft int
+.\".Fn strerror_lr "int errnum" "char *strerrbuf" "size_t buflen" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strerror ,
+.Fn strerror_l ,
+.\".Fn strerror_lr ,
 .Fn strerror_r ,
 and
 .Fn perror
@@ -71,6 +79,8 @@ function accepts an error number argumen
 .Fa errnum
 and returns a pointer to the corresponding
 message string.
+The application should not attempt to 

CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:10:17 UTC 2020

Modified Files:
src/lib/libc/string: strerror.c

Log Message:
Protect against malloc failure corrupting errno, which is not
permitted of these functions.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/string/strerror.c

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

Modified files:

Index: src/lib/libc/string/strerror.c
diff -u src/lib/libc/string/strerror.c:1.17 src/lib/libc/string/strerror.c:1.18
--- src/lib/libc/string/strerror.c:1.17	Tue Jan 20 18:31:25 2015
+++ src/lib/libc/string/strerror.c	Wed Mar 25 16:10:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: strerror.c,v 1.17 2015/01/20 18:31:25 christos Exp $	*/
+/*	$NetBSD: strerror.c,v 1.18 2020/03/25 16:10:17 kre Exp $	*/
 
 /*
  * Copyright (c) 1988 Regents of the University of California.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: strerror.c,v 1.17 2015/01/20 18:31:25 christos Exp $");
+__RCSID("$NetBSD: strerror.c,v 1.18 2020/03/25 16:10:17 kre Exp $");
 
 #define __SETLOCALE_SOURCE__
 
@@ -78,7 +78,9 @@ strerror_l(int num, locale_t loc)
 	thr_once(_once, strerror_setup);
 	buf = thr_getspecific(strerror_key);
 	if (buf == NULL) {
+		error = errno;
 		buf = malloc(NL_TEXTMAX);
+		errno = error;
 		if (buf == NULL) {
 			static char fallback_buf[NL_TEXTMAX];
 			buf = fallback_buf;



CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:50:47 UTC 2020

Modified Files:
src/lib/libc/string: strerror.3

Log Message:
Delete the BUGS paragraph about the "missing" const qualifier for the
result type of strerror() (and strerror_l()).   While that once should
really have been present, when strerror() was invented, there was no
"const" qualifier in C to apply, and now the way the code is writtem
(really needs to be because of NLS support) the const is no longer
really appropriate.

Applications still shouldn't attempt to modify the result however.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/string/strerror.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/string/strerror.3
diff -u src/lib/libc/string/strerror.3:1.20 src/lib/libc/string/strerror.3:1.21
--- src/lib/libc/string/strerror.3:1.20	Wed Mar 25 18:45:42 2020
+++ src/lib/libc/string/strerror.3	Wed Mar 25 18:50:47 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: strerror.3,v 1.20 2020/03/25 18:45:42 kre Exp $
+.\" $NetBSD: strerror.3,v 1.21 2020/03/25 18:50:47 kre Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -271,22 +271,6 @@ and
 .Fn strerror_l
 use the same thread local storage, a call to either will destroy
 the result from an earlier call by the same thread of either of them.
-.\"
-.\" Is this following para really true any more?   All the strerror()
-.\" family of functions return the result in a malloc'd array (or if
-.\" ! _REENTRANT a static buffer in the function) or in a buffer
-.\" provided by the caller - nothing actually returns a pointer into
-.\" sys_errlist[] any more (strerror_ss() excepted, but we ignore that).
-.\" The POSIX (and historic) functions had no "const" qualifier.
-.\" POSIX does say that callers must not (attempt to) modify the result,
-.\" but for our implementation I see no defect that can cause.
-.Pp
-The return types for
-.Fn strerror
-and
-.Fn strerror_l
-are both missing a type-qualifier; it should actually be
-.Vt const char * .
 .Pp
 Programs that use the deprecated
 .Va sys_errlist



CVS commit: src/sys/arch/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 19:03:44 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
describe DeveloperBox pin assignment correctly


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/sni_gpio.c

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 25 18:53:50 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
Fix typos. Use more markup. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libcrypt/pw_gensalt.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 19:03:44 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
describe DeveloperBox pin assignment correctly


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox/sni_gpio.c
diff -u src/sys/arch/arm/sociox/sni_gpio.c:1.4 src/sys/arch/arm/sociox/sni_gpio.c:1.5
--- src/sys/arch/arm/sociox/sni_gpio.c:1.4	Wed Mar 25 18:42:16 2020
+++ src/sys/arch/arm/sociox/sni_gpio.c	Wed Mar 25 19:03:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_gpio.c,v 1.4 2020/03/25 18:42:16 nisimura Exp $	*/
+/*	$NetBSD: sni_gpio.c,v 1.5 2020/03/25 19:03:44 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.4 2020/03/25 18:42:16 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.5 2020/03/25 19:03:44 nisimura Exp $");
 
 #include 
 #include 
@@ -82,21 +82,21 @@ CFATTACH_DECL_NEW(snigpio_acpi, sizeof(s
  * "DevelopmentBox" implementation
  *DSW3-PIN1,  DSW3-PIN2,  DSW3-PIN3,DSW3-PIN4,
  *DSW3-PIN5,  DSW3-PIN6,  DSW3-PIN7,DSW3-PIN8,
- *PEC-PD8,PEC-PD9,PEC-PD10, PEC-PD11,
- *NC, NC, PCIE1EXTINT,  PCIE0EXTINT,
- *PHY_P2_2,   PHY_P1_2,   NC,   NC,
- *NC, NC, NC,   NC,
- *NC, NC, PEC-PD26, PEC-PD27,
- *PEC-PD28,   PEC-PD29,   PEC-PD30, PEC-PD31;
+ *PSIN#,  PWROFF#,GPIO-A,   GPIO-B,
+ *GPIO-C, GPIO-D, PCIE1EXTINT,  PCIE0EXTINT,
+ *PHY2-INT#,  PHY1-INT#,  GPIO-E,   GPIO-F,
+ *GPIO-G, GPIO-H, GPIO-I,   GPIO-J,
+ *GPIO-K, GPIO-L, PEC-PD26, PEC-PD27,
+ *PEC-PD28,   PEC-PD29,   PEC-PD30, PEC-PD31
  *
- *PD/PC/PB/PA 0-7 in this order.
  *DSW3-PIN1 -- what's "varstore" really this
  *DSW3-PIN3 -- tweek PCIe bus implementation error toggle
+ *PowerButton (PWROFF#) can be detectable.
  *
  *  96board mezzanine
  *i2c  "/i2c@51221000"
  *spi  "/spi@5481"
- *gpio "/gpio@5100" pinA-L (10-25) level? sensitive
+ *gpio "/gpio@5100" pinA-L (10-25) down edge sensitive
  */
 static void snigpio_attach_i(struct snigpio_softc *);
 static int snigpio_intr(void *);
@@ -225,15 +225,13 @@ snigpio_acpi_attach(device_t parent, dev
 	sc->sc_ioh = ioh;
 	sc->sc_ios = mem->ar_length;
 
+	snigpio_attach_i(sc);
+
 	/* dig _DSD property to show 32 of GPIO line usage */
 	rv = acpi_dsd_string(handle, "gpio-line-names", );
-	if (ACPI_FAILURE(rv))
-		list = NULL;
-	else
+	if (ACPI_SUCCESS(rv))
 		aprint_normal_dev(self, "%s\n", list);
 
-	snigpio_attach_i(sc);
-
 	acpi_resource_cleanup();
 	return;
  fail:



CVS commit: src/sys/arch

2020-03-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Mar 25 17:06:20 UTC 2020

Modified Files:
src/sys/arch/acorn32/conf: NC
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/amd64/conf: ALL MODULAR
src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in
src/sys/arch/amigappc/conf: GENERIC NULL
src/sys/arch/bebox/conf: GENERIC
src/sys/arch/cobalt/conf: GENERIC
src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 CUBOX CUBOX-I DUOVERO
GUMSTIX HDL_G HPT5325 IMX6UL-STARTER IYONIX MARVELL_NAS
MMNET_GENERIC MPCSA_GENERIC MV2120 OPENBLOCKS_A6 OPENBLOCKS_AX3
PEPPER SHEEVAPLUG
src/sys/arch/evbmips/conf: CPMBR1400 LINKITSMART7688 ZYXELKX
src/sys/arch/evbppc/conf: EXPLORA451
src/sys/arch/ews4800mips/conf: GENERIC
src/sys/arch/hpcsh/conf: GENERIC
src/sys/arch/i386/conf: ALL MODULAR XEN3PAE_DOM0 XEN3PAE_DOMU
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/macppc/conf: GENERIC_601
src/sys/arch/sandpoint/conf: GENERIC
src/sys/arch/sparc64/conf: MODULAR
src/sys/arch/zaurus/conf: GENERIC

Log Message:
remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/acorn32/conf/NC
cvs rdiff -u -r1.400 -r1.401 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amd64/conf/MODULAR
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.325 -r1.326 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amigappc/conf/GENERIC
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amigappc/conf/NULL
cvs rdiff -u -r1.161 -r1.162 src/sys/arch/bebox/conf/GENERIC
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/cobalt/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/CUBOX \
src/sys/arch/evbarm/conf/DUOVERO
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/conf/CUBOX-I
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/evbarm/conf/GUMSTIX
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/HPT5325
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/IMX6UL-STARTER
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/IYONIX
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbarm/conf/MARVELL_NAS
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/conf/MV2120
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/conf/OPENBLOCKS_A6
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/OPENBLOCKS_AX3
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/PEPPER
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/SHEEVAPLUG
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbmips/conf/CPMBR1400
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbmips/conf/LINKITSMART7688
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbmips/conf/ZYXELKX
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/evbppc/conf/EXPLORA451
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/ews4800mips/conf/GENERIC
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hpcsh/conf/GENERIC
cvs rdiff -u -r1.489 -r1.490 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/conf/MODULAR
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/conf/XEN3PAE_DOM0
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/conf/XEN3PAE_DOMU
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/macppc/conf/GENERIC_601
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/sandpoint/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc64/conf/MODULAR
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/zaurus/conf/GENERIC

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 18:36:29 UTC 2020

Modified Files:
src/lib/libcrypt: bcrypt.c

Log Message:
Add missing trailing $ for blowfish


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libcrypt/bcrypt.c

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 17:11:06 UTC 2020

Modified Files:
src/lib/libcrypt: Makefile
Added Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
PR/55095: David A. Holland: pw_gensalt(3) undocumented


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libcrypt/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libcrypt/pw_gensalt.3

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



CVS commit: src/lib/libcrypt

2020-03-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 25 18:53:50 UTC 2020

Modified Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
Fix typos. Use more markup. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libcrypt/pw_gensalt.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/libcrypt/pw_gensalt.3
diff -u src/lib/libcrypt/pw_gensalt.3:1.2 src/lib/libcrypt/pw_gensalt.3:1.3
--- src/lib/libcrypt/pw_gensalt.3:1.2	Wed Mar 25 18:37:08 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 18:53:50 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pw_gensalt.3,v 1.2 2020/03/25 18:37:08 christos Exp $
+.\"	$NetBSD: pw_gensalt.3,v 1.3 2020/03/25 18:53:50 wiz Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .Dt PW_GENSALT 3
 .Os
 .Sh NAME
-.Nm pw_gensalt 
+.Nm pw_gensalt
 .Nd passwd salt generation function
 .Sh LIBRARY
 .Lb libcrypt
@@ -42,32 +42,33 @@
 .Fn pw_gensalt "char *salt" "size_t saltlen" "const char *type" "const char *option"
 .Sh DESCRIPTION
 The
-.Fn pw_gensalt 
+.Fn pw_gensalt
 function generates a
 .Dq salt
 to be added to a password hashing function to guarantee uniqueness and
-slow down dictionary and brute force attacks. The function places a
-random array of
-.Ar saltlen bytes in
+slow down dictionary and brute force attacks.
+The function places a random array of
+.Ar saltlen
+bytes in
 .Ar salt
 using the hash function specified in
 .Ar type
 with the function-specific
 .Ar option .
-.Ph
+.Pp
 The new salt types follow the MCF standard and are of the form:
 .Li $[$=(,=)*][$[$]]
 The characters allowed in the password salt are alphanumeric and
 include a forward slash and a period.
 .Pp
-.The following types are available:
-.Bl -tag -width blowfish compact
-.It old 
+The following types are available:
+.Bl -tag -width blowfish -compact
+.It old
 The original Unix implementation.
-This is of the form 
+This is of the form
 .Li _Gl/. ,
 where
-.Li ?
+.Li \&?
 denotes a random alphanumeric character.
 The minimum salt size is
 .Dv 3 .
@@ -90,7 +91,7 @@ An alias for
 A salt generated using the
 .Xr md5 1
 algorithm.
-This is of the form 
+This is of the form
 .Li $1$$ .
 The minimum salt size is
 .Dv 13 .
@@ -98,14 +99,14 @@ The minimum salt size is
 A salt generated using the
 .Xr sha1 1
 algorithm.
-This is of the form 
+This is of the form
 .Li $sha1$nrounds$$ ,
 where
 .Ar nrounds
 is the number of rounds to be used.
 The number of rounds can be specified in
 .Ar option ,
-and defaults to random if 
+and defaults to random if
 .Dv NULL .
 The minimum salt size is
 .Dv 8
@@ -146,7 +147,7 @@ is not specified or has an illegal value
 The
 .Ar saltlen
 was not large enough to fit the salt for the specified
-.Ar type.
+.Ar type .
 .El
 .Sh SEE ALSO
 .Xr passwd 1 ,
@@ -154,4 +155,5 @@ was not large enough to fit the salt for
 .Sh HISTORY
 The
 .Fn pw_gensalt
-function was written in 1997 Niels Provos .
+function was written in 1997 by
+.An Niels Provos Aq Mt pro...@physnet.uni-hamburg.de .



CVS commit: src/sys/arch

2020-03-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Mar 25 17:06:20 UTC 2020

Modified Files:
src/sys/arch/acorn32/conf: NC
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/amd64/conf: ALL MODULAR
src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in
src/sys/arch/amigappc/conf: GENERIC NULL
src/sys/arch/bebox/conf: GENERIC
src/sys/arch/cobalt/conf: GENERIC
src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 CUBOX CUBOX-I DUOVERO
GUMSTIX HDL_G HPT5325 IMX6UL-STARTER IYONIX MARVELL_NAS
MMNET_GENERIC MPCSA_GENERIC MV2120 OPENBLOCKS_A6 OPENBLOCKS_AX3
PEPPER SHEEVAPLUG
src/sys/arch/evbmips/conf: CPMBR1400 LINKITSMART7688 ZYXELKX
src/sys/arch/evbppc/conf: EXPLORA451
src/sys/arch/ews4800mips/conf: GENERIC
src/sys/arch/hpcsh/conf: GENERIC
src/sys/arch/i386/conf: ALL MODULAR XEN3PAE_DOM0 XEN3PAE_DOMU
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/macppc/conf: GENERIC_601
src/sys/arch/sandpoint/conf: GENERIC
src/sys/arch/sparc64/conf: MODULAR
src/sys/arch/zaurus/conf: GENERIC

Log Message:
remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/acorn32/conf/NC
cvs rdiff -u -r1.400 -r1.401 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amd64/conf/MODULAR
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.325 -r1.326 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amigappc/conf/GENERIC
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amigappc/conf/NULL
cvs rdiff -u -r1.161 -r1.162 src/sys/arch/bebox/conf/GENERIC
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/cobalt/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/CUBOX \
src/sys/arch/evbarm/conf/DUOVERO
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/conf/CUBOX-I
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/evbarm/conf/GUMSTIX
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/HPT5325
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/IMX6UL-STARTER
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/IYONIX
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbarm/conf/MARVELL_NAS
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/conf/MV2120
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/conf/OPENBLOCKS_A6
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/OPENBLOCKS_AX3
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/PEPPER
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/SHEEVAPLUG
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbmips/conf/CPMBR1400
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbmips/conf/LINKITSMART7688
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbmips/conf/ZYXELKX
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/evbppc/conf/EXPLORA451
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/ews4800mips/conf/GENERIC
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hpcsh/conf/GENERIC
cvs rdiff -u -r1.489 -r1.490 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/conf/MODULAR
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/conf/XEN3PAE_DOM0
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/conf/XEN3PAE_DOMU
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/macppc/conf/GENERIC_601
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/sandpoint/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc64/conf/MODULAR
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/zaurus/conf/GENERIC

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/acorn32/conf/NC
diff -u src/sys/arch/acorn32/conf/NC:1.76 src/sys/arch/acorn32/conf/NC:1.77
--- src/sys/arch/acorn32/conf/NC:1.76	Sun Jan 19 01:25:03 2020
+++ src/sys/arch/acorn32/conf/NC	Wed Mar 25 17:06:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: NC,v 1.76 2020/01/19 01:25:03 thorpej Exp $
+#	$NetBSD: NC,v 1.77 2020/03/25 17:06:17 jdolecek Exp $
 #
 #	NC - with wscons
 #
@@ -40,7 +40,6 @@ file-system	KERNFS		# /kern
 file-system	PROCFS		# /proc
 #file-system	UMAPFS		# NULLFS + uid and gid remapping
 #file-system	UNION		# union file system
-#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
 file-system	PTYFS		# /dev/pts/N support
 
 # File system options
@@ -258,9 +257,6 @@ pseudo-device	md			# Ramdisk driver
 pseudo-device	clockctl		# user control of clock subsystem
 

CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:50:47 UTC 2020

Modified Files:
src/lib/libc/string: strerror.3

Log Message:
Delete the BUGS paragraph about the "missing" const qualifier for the
result type of strerror() (and strerror_l()).   While that once should
really have been present, when strerror() was invented, there was no
"const" qualifier in C to apply, and now the way the code is writtem
(really needs to be because of NLS support) the const is no longer
really appropriate.

Applications still shouldn't attempt to modify the result however.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/string/strerror.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/arm/sociox

2020-03-25 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Mar 25 18:42:17 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: sni_gpio.c

Log Message:
try to decode _DSD ACPI resource


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/sni_gpio.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/arm/sociox/sni_gpio.c
diff -u src/sys/arch/arm/sociox/sni_gpio.c:1.3 src/sys/arch/arm/sociox/sni_gpio.c:1.4
--- src/sys/arch/arm/sociox/sni_gpio.c:1.3	Tue Mar 24 11:40:08 2020
+++ src/sys/arch/arm/sociox/sni_gpio.c	Wed Mar 25 18:42:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sni_gpio.c,v 1.3 2020/03/24 11:40:08 nisimura Exp $	*/
+/*	$NetBSD: sni_gpio.c,v 1.4 2020/03/25 18:42:16 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.3 2020/03/24 11:40:08 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_gpio.c,v 1.4 2020/03/25 18:42:16 nisimura Exp $");
 
 #include 
 #include 
@@ -88,6 +88,15 @@ CFATTACH_DECL_NEW(snigpio_acpi, sizeof(s
  *NC, NC, NC,   NC,
  *NC, NC, PEC-PD26, PEC-PD27,
  *PEC-PD28,   PEC-PD29,   PEC-PD30, PEC-PD31;
+ *
+ *PD/PC/PB/PA 0-7 in this order.
+ *DSW3-PIN1 -- what's "varstore" really this
+ *DSW3-PIN3 -- tweek PCIe bus implementation error toggle
+ *
+ *  96board mezzanine
+ *i2c  "/i2c@51221000"
+ *spi  "/spi@5481"
+ *gpio "/gpio@5100" pinA-L (10-25) level? sensitive
  */
 static void snigpio_attach_i(struct snigpio_softc *);
 static int snigpio_intr(void *);
@@ -154,7 +163,6 @@ snigpio_fdt_attach(device_t parent, devi
 	snigpio_attach_i(sc);
 
 /* dig FDT description to show 32 of GPIO line usage */
-/* DIPSW3 1-8 usage remain unclear */
 
 	return;
  fail:
@@ -181,11 +189,13 @@ snigpio_acpi_attach(device_t parent, dev
 {
 	struct snigpio_softc * const sc = device_private(self);
 	struct acpi_attach_args *aa = aux;
+	ACPI_HANDLE handle = aa->aa_node->ad_handle;
 	bus_space_handle_t ioh;
 	struct acpi_resources res;
 	struct acpi_mem *mem;
 	struct acpi_irq *irq;
 	ACPI_STATUS rv;
+	char *list;
 
 	rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS",
 	, _resource_parse_ops_default);
@@ -215,10 +225,14 @@ snigpio_acpi_attach(device_t parent, dev
 	sc->sc_ioh = ioh;
 	sc->sc_ios = mem->ar_length;
 
-	snigpio_attach_i(sc);
+	/* dig _DSD property to show 32 of GPIO line usage */
+	rv = acpi_dsd_string(handle, "gpio-line-names", );
+	if (ACPI_FAILURE(rv))
+		list = NULL;
+	else
+		aprint_normal_dev(self, "%s\n", list);
 
-/* dig _DSD property to show 32 of GPIO line usage */
-/* DIPSW3 1-8 usage remain unclear */
+	snigpio_attach_i(sc);
 
 	acpi_resource_cleanup();
 	return;



CVS commit: src/lib/libcrypt

2020-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 25 17:11:06 UTC 2020

Modified Files:
src/lib/libcrypt: Makefile
Added Files:
src/lib/libcrypt: pw_gensalt.3

Log Message:
PR/55095: David A. Holland: pw_gensalt(3) undocumented


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libcrypt/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libcrypt/pw_gensalt.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/libcrypt/Makefile
diff -u src/lib/libcrypt/Makefile:1.26 src/lib/libcrypt/Makefile:1.27
--- src/lib/libcrypt/Makefile:1.26	Sun Oct 20 22:36:48 2019
+++ src/lib/libcrypt/Makefile	Wed Mar 25 13:11:06 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2019/10/21 02:36:48 jhigh Exp $
+#	$NetBSD: Makefile,v 1.27 2020/03/25 17:11:06 christos Exp $
 
 .include 
 
@@ -21,7 +21,7 @@ LDADD+=		-largon2 
 
 WARNS?=	5
 
-MAN=	crypt.3
+MAN=	crypt.3 pw_gensalt.3
 MLINKS= crypt.3 encrypt.3 crypt.3 setkey.3
 
 

Added files:

Index: src/lib/libcrypt/pw_gensalt.3
diff -u /dev/null src/lib/libcrypt/pw_gensalt.3:1.1
--- /dev/null	Wed Mar 25 13:11:06 2020
+++ src/lib/libcrypt/pw_gensalt.3	Wed Mar 25 13:11:06 2020
@@ -0,0 +1,153 @@
+.\"	$NetBSD: pw_gensalt.3,v 1.1 2020/03/25 17:11:06 christos Exp $
+.\"
+.\" Copyright (c) 2020 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Christos Zoulas.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.Dd March 25, 2020
+.Dt PW_GENSALT 3
+.Os
+.Sh NAME
+.Nm pw_gensalt 
+.Nd passwd salt generation function
+.Sh LIBRARY
+.Lb libcrypt
+.Sh SYNOPSIS
+.In pwd.h
+.Ft int
+.Fn pw_gensalt "char *salt" "size_t saltlen" "const char *type" "const char *option"
+.Sh DESCRIPTION
+The
+.Fn pw_gensalt 
+function generates a
+.Dq salt
+to be added to a password hashing function to guarantee uniqueness and
+slow down dictionary and brute force attacks. The function places a
+random array of
+.Ar saltlen bytes in
+.Ar salt
+using the hash function specified in
+.Ar type
+with the function-specific
+.Ar option .
+.Ph
+The new salt types follow the MCF standard and are of the form:
+.Li $[$=(,=)*][$[$]]
+The characters allowed in the password salt are alphanumeric and
+include a forward slash and a period.
+.Pp
+.The following types are available:
+.Bl -tag -width blowfish compact
+.It old 
+The original Unix implementation.
+This is of the form 
+.Li _Gl/. ,
+where
+.Li ?
+denotes a random alphanumeric character.
+The minimum salt size is
+.Dv 3 .
+.It new
+The Seventh Edition Unix 12 bit salt.
+This has the same form as the
+.Sq old .
+The minimum salt size is
+.Dv 10 .
+The number of rounds can be specified in
+.Ar option
+and is enforced to be between
+.Dv 7250
+and
+.Dv 16777215 .
+.It newsalt
+An alias for
+.Sq new .
+.It md5
+A salt generated using the
+.Xr md5 1
+algorithm.
+This is of the form 
+.Li $1$$ .
+The minimum salt size is
+.Dv 13 .
+.It sha1
+A salt generated using the
+.Xr sha1 1
+algorithm.
+This is of the form 
+.Li $sha1$nrounds$$ ,
+where
+.Ar nrounds
+is the number of rounds to be used.
+The number of rounds can be specified in
+.Ar option ,
+and defaults to random if 
+.Dv NULL .
+The minimum salt size is
+.Dv 8
+and the maximum is
+.Dv 64 .
+.It blowfish
+A salt generated using the
+.Sq blowfish
+algorithm.
+The minimum salt size is
+.Dv 30
+and the number of rounds needs to be specified in
+.Ar option .
+This is of the form:
+.Li $2a$nrounds$??$ .
+.\" .It argon2
+.\" .It argon2id
+.\" .It argon2i
+.\" .It argon2
+.El
+.Sh 

CVS commit: src/tests/dev/audio

2020-03-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Mar 25 13:07:04 UTC 2020

Modified Files:
src/tests/dev/audio: audiotest.c t_audio.awk

Log Message:
Use exact match to search testname.
This didn't affect test results.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/dev/audio/audiotest.c
cvs rdiff -u -r1.1 -r1.2 src/tests/dev/audio/t_audio.awk

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



CVS commit: src/tests/dev/audio

2020-03-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Mar 25 13:07:04 UTC 2020

Modified Files:
src/tests/dev/audio: audiotest.c t_audio.awk

Log Message:
Use exact match to search testname.
This didn't affect test results.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/dev/audio/audiotest.c
cvs rdiff -u -r1.1 -r1.2 src/tests/dev/audio/t_audio.awk

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

Modified files:

Index: src/tests/dev/audio/audiotest.c
diff -u src/tests/dev/audio/audiotest.c:1.7 src/tests/dev/audio/audiotest.c:1.8
--- src/tests/dev/audio/audiotest.c:1.7	Wed Mar  4 14:20:44 2020
+++ src/tests/dev/audio/audiotest.c	Wed Mar 25 13:07:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiotest.c,v 1.7 2020/03/04 14:20:44 isaki Exp $	*/
+/*	$NetBSD: audiotest.c,v 1.8 2020/03/25 13:07:04 isaki Exp $	*/
 
 /*
  * Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: audiotest.c,v 1.7 2020/03/04 14:20:44 isaki Exp $");
+__RCSID("$NetBSD: audiotest.c,v 1.8 2020/03/25 13:07:04 isaki Exp $");
 
 #include 
 #include 
@@ -75,6 +75,7 @@ struct testentry {
 void usage(void) __dead;
 void xp_err(int, int, const char *, ...) __printflike(3, 4) __dead;
 void xp_errx(int, int, const char *, ...) __printflike(3, 4) __dead;
+bool match(const char *, const char *);
 void xxx_close_wait(void);
 int mixer_get_outputs_master(int);
 void do_test(int);
@@ -168,6 +169,7 @@ int skipcount;
 int unit;
 bool use_rump;
 bool use_pad;
+bool exact_match;
 int padfd;
 int maxfd;
 pthread_t th;
@@ -186,6 +188,8 @@ usage(void)
 	fprintf(stderr, "\t-A: make output suitable for ATF\n");
 	fprintf(stderr, "\t-a: Test all\n");
 	fprintf(stderr, "\t-d: Increase debug level\n");
+	fprintf(stderr, "\t-e: Use exact match for testnames "
+	"(default is forward match)\n");
 	fprintf(stderr, "\t-l: List all tests\n");
 	fprintf(stderr, "\t-p: Open pad\n");
 #if !defined(NO_RUMP)
@@ -246,8 +250,9 @@ main(int argc, char *argv[])
 	cmd = CMD_TEST;
 	use_pad = false;
 	padfd = -1;
+	exact_match = false;
 
-	while ((c = getopt(argc, argv, "AadlpRu:")) != -1) {
+	while ((c = getopt(argc, argv, "AadelpRu:")) != -1) {
 		switch (c) {
 		case 'A':
 			opt_atf = true;
@@ -258,6 +263,9 @@ main(int argc, char *argv[])
 		case 'd':
 			debug++;
 			break;
+		case 'e':
+			exact_match = true;
+			break;
 		case 'l':
 			cmd = CMD_LIST;
 			break;
@@ -305,8 +313,7 @@ main(int argc, char *argv[])
 		found = false;
 		for (j = 0; j < argc; j++) {
 			for (i = 0; testtable[i].name != NULL; i++) {
-if (strncmp(argv[j], testtable[i].name,
-strlen(argv[j])) == 0) {
+if (match(argv[j], testtable[i].name)) {
 	do_test(i);
 	found = true;
 }
@@ -337,6 +344,21 @@ main(int argc, char *argv[])
 	return 0;
 }
 
+bool
+match(const char *arg, const char *name)
+{
+	if (exact_match) {
+		/* Exact match */
+		if (strcmp(arg, name) == 0)
+			return true;
+	} else {
+		/* Forward match */
+		if (strncmp(arg, name, strlen(arg)) == 0)
+			return true;
+	}
+	return false;
+}
+
 /*
  * XXX
  * Some hardware drivers (e.g. hdafg(4)) require a little "rest" between

Index: src/tests/dev/audio/t_audio.awk
diff -u src/tests/dev/audio/t_audio.awk:1.1 src/tests/dev/audio/t_audio.awk:1.2
--- src/tests/dev/audio/t_audio.awk:1.1	Tue Feb 11 07:03:16 2020
+++ src/tests/dev/audio/t_audio.awk	Wed Mar 25 13:07:04 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: t_audio.awk,v 1.1 2020/02/11 07:03:16 isaki Exp $
+#	$NetBSD: t_audio.awk,v 1.2 2020/03/25 13:07:04 isaki Exp $
 #
 # Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
 #
@@ -34,7 +34,7 @@ BEGIN {
 	print "h_audio() {"
 	print "	local testname=$1"
 	print "	local outfile=/tmp/t_audio_$testname.$$"
-	print "	$(atf_get_srcdir)/audiotest -AR $testname > $outfile"
+	print "	$(atf_get_srcdir)/audiotest -ARe $testname > $outfile"
 	print "	local retval=$?"
 	print "	# Discard rump outputs..."
 	print "	outmsg=`cat $outfile | grep -v '^\\['`"



CVS commit: src/sys/arch/arm/arm32

2020-03-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 25 06:17:23 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: db_machdep.c

Log Message:
Simplify #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/arm32/db_machdep.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/arm/arm32

2020-03-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 25 06:17:23 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: db_machdep.c

Log Message:
Simplify #ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/arm32/db_machdep.c

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

Modified files:

Index: src/sys/arch/arm/arm32/db_machdep.c
diff -u src/sys/arch/arm/arm32/db_machdep.c:1.26 src/sys/arch/arm/arm32/db_machdep.c:1.27
--- src/sys/arch/arm/arm32/db_machdep.c:1.26	Wed Mar 25 06:02:09 2020
+++ src/sys/arch/arm/arm32/db_machdep.c	Wed Mar 25 06:17:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.26 2020/03/25 06:02:09 skrll Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.27 2020/03/25 06:17:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.26 2020/03/25 06:02:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.27 2020/03/25 06:17:23 skrll Exp $");
 
 #include 
 #include 
@@ -117,17 +117,17 @@ const struct db_command db_machine_comma
 	{ DDB_ADD_CMD("fault",	db_show_fault_cmd,	0,
 			"Displays the fault registers",
 		 	NULL,NULL) },
-#endif
-#if defined(_KERNEL) && (defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7))
+#if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA7)
 	{ DDB_ADD_CMD("tlb",	db_show_tlb_cmd,	0,
 			"Displays the TLB",
 		 	NULL,NULL) },
 #endif
-#if defined(_KERNEL) && defined(MULTIPROCESSOR)
+#if defined(MULTIPROCESSOR)
 	{ DDB_ADD_CMD("cpu",	db_switch_cpu_cmd,	0,
 			"switch to a different cpu",
 		 	NULL,NULL) },
 #endif
+#endif /* _KERNEL */
 
 #ifdef ARM32_DB_COMMANDS
 	ARM32_DB_COMMANDS,
@@ -135,6 +135,31 @@ const struct db_command db_machine_comma
 	{ DDB_ADD_CMD(NULL, NULL,   0,NULL,NULL,NULL) }
 };
 
+void
+db_show_frame_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
+{
+	struct trapframe *frame;
+
+	if (!have_addr) {
+		db_printf("frame address must be specified\n");
+		return;
+	}
+
+	frame = (struct trapframe *)addr;
+
+	db_printf("frame address = %08x  ", (u_int)frame);
+	db_printf("spsr=%08x\n", frame->tf_spsr);
+	db_printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n",
+	frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
+	db_printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n",
+	frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
+	db_printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n",
+	frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
+	db_printf("r12=%08x r13=%08x r14=%08x r15=%08x\n",
+	frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
+	db_printf("slr=%08x ssp=%08x\n", frame->tf_svc_lr, frame->tf_svc_sp);
+}
+
 #ifdef _KERNEL
 int
 db_access_und_sp(const struct db_variable *vp, db_expr_t *valp, int rw)
@@ -423,35 +448,8 @@ db_show_tlb_cmd(db_expr_t addr, bool hav
 	db_printf("%zu TLB valid entries found\n", n);
 }
 #endif /* CPU_CORTEXA5 || CPU_CORTEXA7 */
-#endif /* _KERNEL */
-
-
-void
-db_show_frame_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
-{
-	struct trapframe *frame;
-
-	if (!have_addr) {
-		db_printf("frame address must be specified\n");
-		return;
-	}
-
-	frame = (struct trapframe *)addr;
 
-	db_printf("frame address = %08x  ", (u_int)frame);
-	db_printf("spsr=%08x\n", frame->tf_spsr);
-	db_printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n",
-	frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
-	db_printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n",
-	frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
-	db_printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n",
-	frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
-	db_printf("r12=%08x r13=%08x r14=%08x r15=%08x\n",
-	frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
-	db_printf("slr=%08x ssp=%08x\n", frame->tf_svc_lr, frame->tf_svc_sp);
-}
-
-#if defined(_KERNEL) && defined(MULTIPROCESSOR)
+#if defined(MULTIPROCESSOR)
 void
 db_switch_cpu_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
 {
@@ -473,3 +471,4 @@ db_switch_cpu_cmd(db_expr_t addr, bool h
 	db_continue_cmd(0, false, 0, "");
 }
 #endif
+#endif /* _KERNEL */



Re: CVS commit: src/lib/librumpuser

2020-03-25 Thread Robert Elz
Date:Tue, 24 Mar 2020 19:37:02 +0100
From:Kamil Rytarowski 
Message-ID:  <57a7e062-9af0-0be9-cb24-e155c5f83...@gmx.com>

  | ASan detects not a hypothetical, but factual momory corruption.

Yes, I know that - and I believed you from the start that there was a
buffer overrun there.

The issue is whether the offending line was useful for anything or not.

I am currently running ATF tests with that line simply deleted (actually,
replaced by a check that there is a \0 in the buffer somewhere already,
and abort() if not).

I'm expecting, for our ATF tests, that this is going to work fine (not abort),
which is why your "fix" looked correct - it certainly avoided the buffer
overrun, and was simply writing a \0 either on top of one that already was
present in the same byte (I am going to do another check to see if this was
the case next, but your asan output from this message suggests probably not)
or after an earlier \0 somewhere previously in the buffer (ie: in empty
unused space beyond the end of the string (which the asan output suggests
is the more likely case)).

Note that knowing that this is true of our tests, while useful info, proves
nothing - different data might stress the code in different ways, hence I
am going to find where (everywhere) the data is first constructed, and check
that it always guarantees \0 termination.   If there is, then the total
fix for the ASAN problem is to delete the offending line.   If not, the
correct fix is to make sure that the data is always correctly \0 terminated
-- and then delete the offending line.That's what I mean about "wait for
the real problem" - we need to find out whether the line that wrote beyond
the buffer end was there merely as a "I am going to treat this data like a
string, and bad things will happen if it isn't \0 terminated somehow, so
I will just stick a \0 after the buffer, just in case" type protection
mechanism, that was never really needed in the first place (a security
blanket), or whether there is some case where the code, given appropriate
data (say an exec that is MAXPATHLEN long, or something ... this is just
wild speculation of course) where it might currently be possible that no \0
is present, in which case that \0 added was saving things. and your fix was 
corrupting the data, and the correct fix is to make the buffer 1 byte bigger
so the \0 will fit (where the data is originally constructed).

We just don't know yet - and no amount of random testing will tell us (except
by fluke, and even that would just indicate that there is a real problem,
by managing to use data that triggers it, but probably not where in the code
is the base cause), it needs careful code reading.

This is why when the sanitisers find a problem, and it isn't obvious what
is the real cause (as opposed to the actual line that causes the problem)
you should avoid making random "fixes" to make the sanitiser report go away
(by no longer doing whatever it is complaining about - but not necessarily
implementing the original algorithm, whatever it was, correctly either).

This is an example of a case like that.   On the other hand, the other change
you committed at about the same time (the one with the iov where there was
an a && b test, where logically both have to be true for the code to be
executed, so it shouldn't matter which order, so programmers tend to put the
more likely to be false first, to save testing the less likely one when the
other is false - but in the case in questionb, when "b" was false, testing
"a" was accessing beyond the end of the memory.   Ie: the test should have
been b && a - and that's what you changted it to.   For that one, the cause
of the issue was obvious, and the fix correct - when you see ones that are
that simple, by all means, just fix them, as you did that time.

But if in doubt, file a PR - sanitiser detected bugs, while (at least often)
real bugs (ubsan not quite so much...) are rarely, if ever, critical fix
type - they have usually been present for years, harming no-one, so taking
a few extra days/weeks/months to arrive at the correct fix isn't really
doing much harm, usually.

kre



CVS commit: src/sys/arch/arm/arm32

2020-03-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 25 06:02:09 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: db_machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/arm32/db_machdep.c

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

Modified files:

Index: src/sys/arch/arm/arm32/db_machdep.c
diff -u src/sys/arch/arm/arm32/db_machdep.c:1.25 src/sys/arch/arm/arm32/db_machdep.c:1.26
--- src/sys/arch/arm/arm32/db_machdep.c:1.25	Wed Aug 15 06:00:02 2018
+++ src/sys/arch/arm/arm32/db_machdep.c	Wed Mar 25 06:02:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.c,v 1.25 2018/08/15 06:00:02 skrll Exp $	*/
+/*	$NetBSD: db_machdep.c,v 1.26 2020/03/25 06:02:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.25 2018/08/15 06:00:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.26 2020/03/25 06:02:09 skrll Exp $");
 
 #include 
 #include 
@@ -208,7 +208,7 @@ struct db_tlbinfo {
 	vaddr_t (*dti_decode_vpn)(size_t, uint32_t, uint32_t);
 	void (*dti_print_header)(void);
 	void (*dti_print_entry)(size_t, size_t, uint32_t, uint32_t);
-	u_int dti_index; 
+	u_int dti_index;
 };
 
 #if defined(CPU_CORTEXA5)



CVS commit: src/sys/arch/arm/arm32

2020-03-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 25 06:02:09 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: db_machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/arm32/db_machdep.c

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