CVS commit: src/usr.bin/audio/play

2024-03-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  4 06:29:35 UTC 2024

Modified Files:
src/usr.bin/audio/play: audioplay.1 play.c

Log Message:
audioplay: add -n flag that doesn't write audio data.

this will be used in an upcoming testsuite for the wav parser.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/audio/play/audioplay.1
cvs rdiff -u -r1.63 -r1.64 src/usr.bin/audio/play/play.c

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

Modified files:

Index: src/usr.bin/audio/play/audioplay.1
diff -u src/usr.bin/audio/play/audioplay.1:1.33 src/usr.bin/audio/play/audioplay.1:1.34
--- src/usr.bin/audio/play/audioplay.1:1.33	Sun Feb  4 05:43:07 2024
+++ src/usr.bin/audio/play/audioplay.1	Mon Mar  4 06:29:35 2024
@@ -1,6 +1,6 @@
-.\"	$NetBSD: audioplay.1,v 1.33 2024/02/04 05:43:07 mrg Exp $
+.\"	$NetBSD: audioplay.1,v 1.34 2024/03/04 06:29:35 mrg Exp $
 .\"
-.\" Copyright (c) 1998, 1999, 2002, 2010, 2019 Matthew R. Green
+.\" Copyright (c) 1998, 1999, 2002, 2010, 2019, 2024 Matthew R. Green
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 10, 2020
+.Dd March 3, 2024
 .Dt AUDIOPLAY 1
 .Os
 .Sh NAME
@@ -32,7 +32,7 @@
 .Nd play audio files
 .Sh SYNOPSIS
 .Nm
-.Op Fl hiqV
+.Op Fl hinqV
 .Op Fl B Ar buffersize
 .Op Fl b Ar balance
 .Op Fl d Ar device
@@ -118,6 +118,8 @@ sample rate.
 Print a help message.
 .It Fl i
 If the audio device cannot be opened, exit now rather than wait for it.
+.It Fl n
+Do not write audio data, only parse files for sanity.
 .It Fl P
 When combined with the
 .Fl f

Index: src/usr.bin/audio/play/play.c
diff -u src/usr.bin/audio/play/play.c:1.63 src/usr.bin/audio/play/play.c:1.64
--- src/usr.bin/audio/play/play.c:1.63	Sat Apr 15 16:54:39 2023
+++ src/usr.bin/audio/play/play.c	Mon Mar  4 06:29:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: play.c,v 1.63 2023/04/15 16:54:39 mlelstv Exp $	*/
+/*	$NetBSD: play.c,v 1.64 2024/03/04 06:29:35 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001, 2002, 2010, 2015, 2019, 2021 Matthew R. Green
@@ -28,7 +28,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: play.c,v 1.63 2023/04/15 16:54:39 mlelstv Exp $");
+__RCSID("$NetBSD: play.c,v 1.64 2024/03/04 06:29:35 mrg Exp $");
 #endif
 
 #include 
@@ -65,6 +65,7 @@ static int	volume;
 static int	balance;
 static int	port;
 static int	fflag;
+static int	nflag;
 static int	qflag;
 int	verbose;
 static int	sample_rate;
@@ -75,7 +76,7 @@ static int	channels;
 
 static char	const *play_errstring = NULL;
 static size_t	bufsize;
-static int	audiofd;
+static int	audiofd = -1;
 static int	exitstatus = EXIT_SUCCESS;
 
 int
@@ -87,7 +88,7 @@ main(int argc, char *argv[])
 	const char *defdevice = _PATH_SOUND;
 	const char *device = NULL;
 
-	while ((ch = getopt(argc, argv, "b:B:C:c:d:e:fhip:P:qs:Vv:")) != -1) {
+	while ((ch = getopt(argc, argv, "b:B:C:c:d:e:fhinp:P:qs:Vv:")) != -1) {
 		switch (ch) {
 		case 'b':
 			decode_int(optarg, );
@@ -118,6 +119,9 @@ main(int argc, char *argv[])
 		case 'i':
 			iflag++;
 			break;
+		case 'n':
+			nflag++;
+			break;
 		case 'q':
 			qflag++;
 			break;
@@ -173,22 +177,22 @@ main(int argc, char *argv[])
 	(device = getenv("AUDIODEV")) == NULL) /* Sun compatibility */
 		device = defdevice;
 
-	audiofd = open(device, O_WRONLY);
-	if (audiofd < 0 && device == defdevice) {
-		device = _PATH_SOUND0;
+	if (!nflag) {
 		audiofd = open(device, O_WRONLY);
-	}
-
-	if (audiofd < 0)
-		err(1, "failed to open %s", device);
+		if (audiofd < 0 && device == defdevice) {
+			device = _PATH_SOUND0;
+			audiofd = open(device, O_WRONLY);
+		}
+		if (audiofd < 0)
+			err(1, "failed to open %s", device);
 
-	if (ioctl(audiofd, AUDIO_GETINFO, ) < 0)
-		err(1, "failed to get audio info");
-	if (bufsize == 0) {
-		bufsize = info.play.buffer_size;
-		if (bufsize < 32 * 1024)
-			bufsize = 32 * 1024;
+		if (ioctl(audiofd, AUDIO_GETINFO, ) < 0)
+			err(1, "failed to get audio info");
+		if (bufsize == 0)
+			bufsize = info.play.buffer_size;
 	}
+	if (bufsize == 0)
+		bufsize = 32 * 1024;
 
 	signal(SIGINT, cleanup);
 	signal(SIGTERM, cleanup);
@@ -208,9 +212,12 @@ static void
 cleanup(int signo)
 {
 
-	(void)ioctl(audiofd, AUDIO_FLUSH, NULL);
-	(void)ioctl(audiofd, AUDIO_SETINFO, );
-	close(audiofd);
+	if (audiofd != -1) {
+		(void)ioctl(audiofd, AUDIO_FLUSH, NULL);
+		(void)ioctl(audiofd, AUDIO_SETINFO, );
+		close(audiofd);
+		audiofd = -1;
+	}
 	if (signo != 0) {
 		(void)raise_default_signal(signo);
 	}
@@ -283,6 +290,9 @@ audio_write(int fd, void *buf, size_t le
 	static void *convert_buffer;
 	static size_t convert_buffer_size;
 
+	if (nflag)
+		return len;
+
 	if (conv == NULL)
 		return write(fd, buf, len);
 
@@ -317,8 +327,7 @@ play(char *file)
 
 	fd = open(file, O_RDONLY);
 	if (fd < 0) {
-		if (!qflag)
-	

CVS commit: src/usr.bin/audio/play

2024-03-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Mar  4 06:29:35 UTC 2024

Modified Files:
src/usr.bin/audio/play: audioplay.1 play.c

Log Message:
audioplay: add -n flag that doesn't write audio data.

this will be used in an upcoming testsuite for the wav parser.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/audio/play/audioplay.1
cvs rdiff -u -r1.63 -r1.64 src/usr.bin/audio/play/play.c

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



CVS commit: src/doc

2024-03-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Mar  3 21:05:48 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-14.2 is out


To generate a diff of this commit:
cvs rdiff -u -r1.1995 -r1.1996 src/doc/3RDPARTY

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



CVS commit: src/doc

2024-03-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Mar  3 21:05:48 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
gdb-14.2 is out


To generate a diff of this commit:
cvs rdiff -u -r1.1995 -r1.1996 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1995 src/doc/3RDPARTY:1.1996
--- src/doc/3RDPARTY:1.1995	Sun Mar  3 17:43:32 2024
+++ src/doc/3RDPARTY	Sun Mar  3 21:05:47 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1995 2024/03/03 17:43:32 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1996 2024/03/03 21:05:47 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -482,11 +482,11 @@ Before importing a new version of extern
 
 Package:	gdb
 Version:	13.2
-Current Vers:	14.1
+Current Vers:	14.2
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gdb/
 Home Page:	http://www.gnu.org/software/gdb/
-Date:		2023-08-11
+Date:		2024-03-03
 Mailing List:	bug-...@gnu.org
 Responsible:	christos
 License:	GPLv3, LGPLv3.1



CVS commit: src/sys/arch/alpha/alpha

2024-03-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  3 19:56:30 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: prom.c

Log Message:
prom_uses_prom_console() needs to consider ST_DEC_7000, as well.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/prom.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/alpha/alpha

2024-03-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  3 19:56:30 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: prom.c

Log Message:
prom_uses_prom_console() needs to consider ST_DEC_7000, as well.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/prom.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/alpha/alpha/prom.c
diff -u src/sys/arch/alpha/alpha/prom.c:1.58 src/sys/arch/alpha/alpha/prom.c:1.59
--- src/sys/arch/alpha/alpha/prom.c:1.58	Sat Oct  3 17:31:46 2020
+++ src/sys/arch/alpha/alpha/prom.c	Sun Mar  3 19:56:29 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.c,v 1.58 2020/10/03 17:31:46 thorpej Exp $ */
+/* $NetBSD: prom.c,v 1.59 2024/03/03 19:56:29 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@@ -27,7 +27,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.58 2020/10/03 17:31:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.59 2024/03/03 19:56:29 thorpej Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -89,7 +89,7 @@ bool
 prom_uses_prom_console(void)
 {
 #ifdef _PROM_MAY_USE_PROM_CONSOLE
-	return (cputype == ST_DEC_21000);
+	return (cputype == ST_DEC_7000 || cputype == ST_DEC_21000);
 #else
 	return false;
 #endif



CVS commit: src/external/bsd/elftoolchain/lib/libelf

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 19:13:59 UTC 2024

Modified Files:
src/external/bsd/elftoolchain/lib/libelf: Makefile

Log Message:
add one more source file


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/lib/libelf/Makefile

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

Modified files:

Index: src/external/bsd/elftoolchain/lib/libelf/Makefile
diff -u src/external/bsd/elftoolchain/lib/libelf/Makefile:1.3 src/external/bsd/elftoolchain/lib/libelf/Makefile:1.4
--- src/external/bsd/elftoolchain/lib/libelf/Makefile:1.3	Fri Feb 19 21:44:02 2016
+++ src/external/bsd/elftoolchain/lib/libelf/Makefile	Sun Mar  3 14:13:59 2024
@@ -55,6 +55,7 @@ SRCS=	elf.c			\
 	libelf_checksum.c	\
 	libelf_data.c		\
 	libelf_ehdr.c		\
+	libelf_elfmachine.c	\
 	libelf_extended.c	\
 	libelf_memory.c		\
 	libelf_open.c		\



CVS commit: src/external/bsd/elftoolchain/lib/libelf

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 19:13:59 UTC 2024

Modified Files:
src/external/bsd/elftoolchain/lib/libelf: Makefile

Log Message:
add one more source file


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/lib/libelf/Makefile

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



CVS commit: src/doc

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:43:32 UTC 2024

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new elftoolchain


To generate a diff of this commit:
cvs rdiff -u -r1.1994 -r1.1995 src/doc/3RDPARTY
cvs rdiff -u -r1.3042 -r1.3043 src/doc/CHANGES

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



CVS commit: src/doc

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:43:32 UTC 2024

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new elftoolchain


To generate a diff of this commit:
cvs rdiff -u -r1.1994 -r1.1995 src/doc/3RDPARTY
cvs rdiff -u -r1.3042 -r1.3043 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1994 src/doc/3RDPARTY:1.1995
--- src/doc/3RDPARTY:1.1994	Sat Mar  2 23:35:44 2024
+++ src/doc/3RDPARTY	Sun Mar  3 12:43:32 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1994 2024/03/03 04:35:44 riastradh Exp $
+#	$NetBSD: 3RDPARTY,v 1.1995 2024/03/03 17:43:32 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1635,17 +1635,18 @@ Notes:
 		Need to feed back local changes
 
 Package:	elftoolchain (libelf/libdwarf)
-Version:	FreeBSD-2016-02-19-r295822
+Version:	r4037
 Current Vers:	0.7.1
 Maintainer:	Joseph Koshi 
 Archive Site:	none
 Home Page:	http://elftoolchain.sourceforge.net
+Date:		2024-03-03
 Mailing List:	none
 Responsible:	christos
 License:	BSD-like (2-clause)
 Location:	sys/external/bsd/elftoolchain/dist
 Notes:
-		Run prepare-import.sh; next time use svn id.
+		See README we use the svn id as the tag.
 
 Package:	timeout
 Version:	FreeBSD-2014-07-16 r268763

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3042 src/doc/CHANGES:1.3043
--- src/doc/CHANGES:1.3042	Fri Mar  1 10:49:41 2024
+++ src/doc/CHANGES	Sun Mar  3 12:43:32 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3042 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3043 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -284,3 +284,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	unbound(8): Import 1.19.1. [christos 20240217]
 	bind: Import 9.18.24 [christos 20240221]
 	sqlite3(1): Import 3.45.1. [christos 20240301]
+	elftoolchain: Import svn r4037. [christos 20240303]



CVS commit: src/external/bsd/elftoolchain

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:41:49 UTC 2024

Added Files:
src/external/bsd/elftoolchain: README
Removed Files:
src/external/bsd/elftoolchain: addrcsid prepare-import.sh

Log Message:
Use README to import


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/README
cvs rdiff -u -r1.1 -r0 src/external/bsd/elftoolchain/addrcsid \
src/external/bsd/elftoolchain/prepare-import.sh

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

Added files:

Index: src/external/bsd/elftoolchain/README
diff -u /dev/null src/external/bsd/elftoolchain/README:1.1
--- /dev/null	Sun Mar  3 12:41:49 2024
+++ src/external/bsd/elftoolchain/README	Sun Mar  3 12:41:48 2024
@@ -0,0 +1,6 @@
+#!/bin/sh
+$ svn checkout https://svn.code.sf.net/p/elftoolchain/code/trunk elftoolchain-code
+$ mkdir dist.new
+$ dist/tools/netbsd-base-system-import.sh -m common -m libdwarf -m libelf -s elftoolchain-code -d dist.new
+$ cd dist.new
+cvs -d cvs.netbsd.org import src/external/bsd/elftoolchain FreeBSD r



CVS commit: src/external/bsd/elftoolchain

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:41:49 UTC 2024

Added Files:
src/external/bsd/elftoolchain: README
Removed Files:
src/external/bsd/elftoolchain: addrcsid prepare-import.sh

Log Message:
Use README to import


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/README
cvs rdiff -u -r1.1 -r0 src/external/bsd/elftoolchain/addrcsid \
src/external/bsd/elftoolchain/prepare-import.sh

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



CVS commit: src/tools/elftoolchain

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:37:58 UTC 2024

Modified Files:
src/tools/elftoolchain/libdwarf: Makefile
src/tools/elftoolchain/libelf: Makefile

Log Message:
changes for r4037


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/elftoolchain/libdwarf/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/elftoolchain/libelf/Makefile

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

Modified files:

Index: src/tools/elftoolchain/libdwarf/Makefile
diff -u src/tools/elftoolchain/libdwarf/Makefile:1.2 src/tools/elftoolchain/libdwarf/Makefile:1.3
--- src/tools/elftoolchain/libdwarf/Makefile:1.2	Sun May  1 13:25:19 2022
+++ src/tools/elftoolchain/libdwarf/Makefile	Sun Mar  3 12:37:58 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2022/05/01 17:25:19 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.3 2024/03/03 17:37:58 christos Exp $
 
 HOSTLIB=dwarf
 
@@ -73,6 +73,7 @@ COMPATLIB_NO_LIB= yes # only the include
 
 LIBDWARF_OBJDIR!= cd ${.CURDIR} && ${PRINTOBJDIR}
 
+CPPFLAGS+=	-DBUILTIN_ELF_HEADERS
 CPPFLAGS+=	-I${.CURDIR}/../../compat
 CPPFLAGS+=	-I${.CURDIR}/../../common
 CPPFLAGS+=	-I${LIBDWARF_OBJDIR}/../common

Index: src/tools/elftoolchain/libelf/Makefile
diff -u src/tools/elftoolchain/libelf/Makefile:1.1 src/tools/elftoolchain/libelf/Makefile:1.2
--- src/tools/elftoolchain/libelf/Makefile:1.1	Mon Apr 18 10:11:44 2022
+++ src/tools/elftoolchain/libelf/Makefile	Sun Mar  3 12:37:58 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2022/04/18 14:11:44 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.2 2024/03/03 17:37:58 christos Exp $
 
 HOSTLIB=	elf
 
@@ -37,6 +37,7 @@ SRCS=		elf_begin.c		\
 		libelf_checksum.c	\
 		libelf_data.c		\
 		libelf_ehdr.c libelf_extended.c\
+		libelf_elfmachine.c 	\
 		libelf_memory.c		\
 		libelf_open.c		\
 		libelf_phdr.c		\



CVS commit: src/tools/elftoolchain

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:37:58 UTC 2024

Modified Files:
src/tools/elftoolchain/libdwarf: Makefile
src/tools/elftoolchain/libelf: Makefile

Log Message:
changes for r4037


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/elftoolchain/libdwarf/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/elftoolchain/libelf/Makefile

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



CVS commit: src/external/bsd/elftoolchain

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 17:37:35 UTC 2024

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h elfdefinitions.h
utarray.h uthash.h
src/external/bsd/elftoolchain/dist/common/sys: elfconstants.m4
elfdefinitions.m4
src/external/bsd/elftoolchain/dist/libdwarf: _libdwarf.h dwarf.3
dwarf.h dwarf_abbrev.c dwarf_add_AT_comp_dir.3
dwarf_add_AT_const_value_string.3 dwarf_add_AT_dataref.3
dwarf_add_AT_flag.3 dwarf_add_AT_location_expr.3
dwarf_add_AT_name.3 dwarf_add_AT_producer.3
dwarf_add_AT_ref_address.3 dwarf_add_AT_reference.3
dwarf_add_AT_signed_const.3 dwarf_add_AT_string.3
dwarf_add_AT_targ_address.3 dwarf_add_arange.3
dwarf_add_die_to_debug.3 dwarf_add_directory_decl.3
dwarf_add_expr_addr.3 dwarf_add_expr_gen.3 dwarf_add_fde_inst.3
dwarf_add_file_decl.3 dwarf_add_frame_cie.3 dwarf_add_frame_fde.3
dwarf_add_funcname.3 dwarf_add_line_entry.3 dwarf_add_pubname.3
dwarf_add_typename.3 dwarf_add_varname.3 dwarf_add_weakname.3
dwarf_arange.c dwarf_attr.3 dwarf_attr.c dwarf_attrlist.3
dwarf_attroffset.3 dwarf_attrval.c dwarf_attrval_signed.3
dwarf_child.3 dwarf_cu.c dwarf_dealloc.3 dwarf_dealloc.c
dwarf_def_macro.3 dwarf_die.c dwarf_die_abbrev_code.3
dwarf_die_link.3 dwarf_diename.3 dwarf_dieoffset.3 dwarf_dump.c
dwarf_end_macro_file.3 dwarf_errmsg.3 dwarf_errmsg.c dwarf_errno.3
dwarf_expand_frame_instructions.3 dwarf_expr_current_offset.3
dwarf_expr_into_block.3 dwarf_fde_cfa_offset.3
dwarf_find_macro_value_start.3 dwarf_finish.3 dwarf_finish.c
dwarf_form.c dwarf_formaddr.3 dwarf_formblock.3 dwarf_formexprloc.3
dwarf_formflag.3 dwarf_formref.3 dwarf_formsig8.3
dwarf_formstring.3 dwarf_formudata.3 dwarf_frame.c dwarf_funcs.m4
dwarf_get_AT_name.3 dwarf_get_abbrev.3
dwarf_get_abbrev_children_flag.3 dwarf_get_abbrev_code.3
dwarf_get_abbrev_entry.3 dwarf_get_abbrev_tag.3
dwarf_get_address_size.3 dwarf_get_arange.3 dwarf_get_arange_info.3
dwarf_get_aranges.3 dwarf_get_cie_index.3 dwarf_get_cie_info.3
dwarf_get_cie_of_fde.3 dwarf_get_cu_die_offset.3
dwarf_get_die_infotypes_flag.3 dwarf_get_elf.3
dwarf_get_fde_at_pc.3 dwarf_get_fde_info_for_all_regs.3
dwarf_get_fde_info_for_all_regs3.3
dwarf_get_fde_info_for_cfa_reg3.3 dwarf_get_fde_info_for_reg.3
dwarf_get_fde_info_for_reg3.3 dwarf_get_fde_instr_bytes.3
dwarf_get_fde_list.3 dwarf_get_fde_n.3 dwarf_get_fde_range.3
dwarf_get_form_class.3 dwarf_get_funcs.3 dwarf_get_globals.3
dwarf_get_loclist_entry.3 dwarf_get_macro_details.3
dwarf_get_pubtypes.3 dwarf_get_ranges.3 dwarf_get_relocation_info.3
dwarf_get_relocation_info_count.3 dwarf_get_section_bytes.3
dwarf_get_section_max_offsets.3 dwarf_get_str.3 dwarf_get_types.3
dwarf_get_vars.3 dwarf_get_weaks.3 dwarf_hasattr.3 dwarf_hasform.3
dwarf_highpc.3 dwarf_init.3 dwarf_init.c dwarf_lineno.3
dwarf_lineno.c dwarf_lne_end_sequence.3 dwarf_lne_set_address.3
dwarf_loclist.3 dwarf_loclist.c dwarf_loclist_from_expr.3
dwarf_macinfo.c dwarf_nametbl.m4 dwarf_new_die.3 dwarf_new_expr.3
dwarf_new_fde.3 dwarf_next_cu_header.3 dwarf_next_types_section.3
dwarf_object_init.3 dwarf_pro_arange.c dwarf_pro_attr.c
dwarf_pro_die.c dwarf_pro_expr.c dwarf_pro_finish.c
dwarf_pro_frame.c dwarf_pro_funcs.m4 dwarf_pro_init.c
dwarf_pro_lineno.c dwarf_pro_macinfo.c dwarf_pro_nametbl.m4
dwarf_pro_pubnames.m4 dwarf_pro_reloc.c dwarf_pro_sections.c
dwarf_pro_types.m4 dwarf_pro_vars.m4 dwarf_pro_weaks.m4
dwarf_producer_init.3 dwarf_producer_set_isa.3 dwarf_pubnames.m4
dwarf_pubtypes.m4 dwarf_ranges.c dwarf_reloc.c
dwarf_reset_section_bytes.3 dwarf_sections.c
dwarf_set_frame_cfa_value.3 dwarf_set_reloc_application.3
dwarf_seterrarg.3 dwarf_seterror.c dwarf_srcfiles.3
dwarf_srclines.3 dwarf_start_macro_file.3 dwarf_str.c dwarf_tag.3
dwarf_transform_to_disk_form.3 dwarf_types.m4 dwarf_undef_macro.3
dwarf_vars.m4 dwarf_vendor_ext.3 dwarf_weaks.m4 dwarf_whatattr.3
libdwarf.c libdwarf.h libdwarf_abbrev.c libdwarf_arange.c
libdwarf_attr.c libdwarf_die.c libdwarf_elf_access.c
libdwarf_elf_init.c libdwarf_error.c libdwarf_frame.c
libdwarf_info.c libdwarf_init.c libdwarf_lineno.c libdwarf_loc.c
libdwarf_loclist.c libdwarf_macinfo.c libdwarf_nametbl.c
libdwarf_ranges.c 

CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 16:09:01 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_363.c
src/usr.bin/xlint/lint1: ckgetopt.c cksnprintb.c emit1.c init.c lex.c
lint1.h tree.c

Log Message:
lint: clean up string parsing and snprintb check


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_363.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/xlint/lint1/ckgetopt.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/xlint/lint1/emit1.c
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.221 -r1.222 src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.608 -r1.609 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 16:09:01 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_363.c
src/usr.bin/xlint/lint1: ckgetopt.c cksnprintb.c emit1.c init.c lex.c
lint1.h tree.c

Log Message:
lint: clean up string parsing and snprintb check


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_363.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/xlint/lint1/ckgetopt.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/xlint/lint1/emit1.c
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.221 -r1.222 src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.608 -r1.609 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_363.c
diff -u src/tests/usr.bin/xlint/lint1/msg_363.c:1.3 src/tests/usr.bin/xlint/lint1/msg_363.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_363.c:1.3	Sun Mar  3 13:09:23 2024
+++ src/tests/usr.bin/xlint/lint1/msg_363.c	Sun Mar  3 16:09:01 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_363.c,v 1.3 2024/03/03 13:09:23 rillig Exp $	*/
+/*	$NetBSD: msg_363.c,v 1.4 2024/03/03 16:09:01 rillig Exp $	*/
 # 3 "msg_363.c"
 
 // Test for message: non-printing character '%.*s' in description '%.*s' [363]
@@ -29,6 +29,18 @@ old_style_description(unsigned u32)
 	"\001non\tprint\nable\377",
 	u32);
 
+	/* expect+10: warning: non-printing character '\177' in description '\177' [363] */
+	/* expect+9: warning: non-printing character '\177' in description 'aa\177' [363] */
+	/* expect+8: warning: non-printing character '\177' in description 'bb""\177' [363] */
+	/* expect+7: warning: non-printing character '\177' in description 'cc\177' [363] */
+	snprintb(buf, sizeof(buf),
+	"\020"
+	"\002""\177"
+	"\003aa\177"
+	"\004""bb""\177"
+	"\005cc\177",
+	u32);
+
 	/* expect+6: warning: bit position '\000' (0) in '\000print' out of range 1..32 [371] */
 	/* expect+5: warning: bit position '\n' in '\nable' should be escaped as octal or hex [369] */
 	/* expect+4: warning: redundant '\0' at the end of the format [377] */

Index: src/usr.bin/xlint/lint1/ckgetopt.c
diff -u src/usr.bin/xlint/lint1/ckgetopt.c:1.24 src/usr.bin/xlint/lint1/ckgetopt.c:1.25
--- src/usr.bin/xlint/lint1/ckgetopt.c:1.24	Fri Mar  1 21:52:48 2024
+++ src/usr.bin/xlint/lint1/ckgetopt.c	Sun Mar  3 16:09:01 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ckgetopt.c,v 1.24 2024/03/01 21:52:48 rillig Exp $ */
+/* $NetBSD: ckgetopt.c,v 1.25 2024/03/03 16:09:01 rillig Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: ckgetopt.c,v 1.24 2024/03/01 21:52:48 rillig Exp $");
+__RCSID("$NetBSD: ckgetopt.c,v 1.25 2024/03/03 16:09:01 rillig Exp $");
 #endif
 
 #include 
@@ -105,7 +105,7 @@ is_getopt_condition(const tnode_t *tn, c
 	&& (str = last_arg->tn_left->tn_left->tn_string)->data != NULL) {
 		buffer buf;
 		buf_init();
-		quoted_iterator it = { .i = 0 };
+		quoted_iterator it = { .end = 0 };
 		while (quoted_next(str, ))
 			buf_add_char(, (char)it.value);
 		*out_options = buf.data;

Index: src/usr.bin/xlint/lint1/cksnprintb.c
diff -u src/usr.bin/xlint/lint1/cksnprintb.c:1.6 src/usr.bin/xlint/lint1/cksnprintb.c:1.7
--- src/usr.bin/xlint/lint1/cksnprintb.c:1.6	Sun Mar  3 13:09:22 2024
+++ src/usr.bin/xlint/lint1/cksnprintb.c	Sun Mar  3 16:09:01 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cksnprintb.c,v 1.6 2024/03/03 13:09:22 rillig Exp $	*/
+/*	$NetBSD: cksnprintb.c,v 1.7 2024/03/03 16:09:01 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cksnprintb.c,v 1.6 2024/03/03 13:09:22 rillig Exp $");
+__RCSID("$NetBSD: cksnprintb.c,v 1.7 2024/03/03 16:09:01 rillig Exp $");
 #endif
 
 #include 
@@ -90,13 +90,13 @@ match_snprintb_call(const function_call 
 static int
 len(quoted_iterator it)
 {
-	return (int)(it.i - it.start);
+	return (int)(it.end - it.start);
 }
 
 static int
 range(quoted_iterator start, quoted_iterator end)
 {
-	return (int)(end.i - start.start);
+	return (int)(end.end - start.start);
 }
 
 static const char *
@@ -117,7 +117,7 @@ check_hex_escape(const buffer *buf, quot
 	if (it.hex_digits > 1) {
 		bool upper = false;
 		bool lower = false;
-		for (size_t i = it.start + 2; i < it.i; i++) {
+		for (size_t i = it.start + 2; i < it.end; i++) {
 			if (isupper((unsigned char)buf->data[i]))
 upper = true;
 			if (islower((unsigned char)buf->data[i]))
@@ -181,31 +181,28 @@ check_reachable(checker *ck, uint64_t di
 		warning(378, (int)(end - start), ck->fmt->data + start);
 }
 
-static void
-parse_description(checker *ck, bool *seen_null, bool *descr_empty)

CVS commit: src/usr.sbin/certctl

2024-03-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  3 15:53:55 UTC 2024

Modified Files:
src/usr.sbin/certctl: certctl.sh

Log Message:
certctl(8): Avoid basename(1).

Saves some time running subprocesses.  Since this is only used for
non-directories (i.e., there's never trailing / on the inputs), it
suffices to delete the longest prefix matching glob `*/' with shell
parameter expansion -- much cheaper than spawning a subprocess.

Shaves off about 1/3 of the time spent in `certctl list' on an
aarch64 VM in qemu.

PR bin/57993


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/certctl/certctl.sh

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/certctl/certctl.sh
diff -u src/usr.sbin/certctl/certctl.sh:1.5 src/usr.sbin/certctl/certctl.sh:1.6
--- src/usr.sbin/certctl/certctl.sh:1.5	Tue Sep  5 12:32:30 2023
+++ src/usr.sbin/certctl/certctl.sh	Sun Mar  3 15:53:55 2024
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#	$NetBSD: certctl.sh,v 1.5 2023/09/05 12:32:30 riastradh Exp $
+#	$NetBSD: certctl.sh,v 1.6 2024/03/03 15:53:55 riastradh Exp $
 #
 # Copyright (c) 2023 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -30,7 +30,7 @@
 set -o pipefail
 set -Ceu
 
-progname=$(basename -- "$0")
+progname=${0##*/}
 
 ### Options and arguments
 
@@ -276,8 +276,7 @@ list_default_trusted()
 
 			# Print the vis-encoded absolute path to the
 			# certificate and base name on a single line.
-			vbase=$(basename -- "$vcert.")
-			vbase=${vbase%.}
+			vbase=${vcert##*/}
 			printf '%s %s\n' "$vcert" "$vbase"
 		done
 	done
@@ -339,8 +338,7 @@ list_distrusted()
 		# Print the vis-encoded absolute path to the
 		# certificate and base name on a single line.
 		vcert=$(printf '%s' "$cert" | vis -M)
-		vbase=$(basename -- "$vcert.")
-		vbase=${vbase%.}
+		vbase=${vcert##*/}
 		printf '%s %s\n' "$vcert" "$vbase"
 	done
 
@@ -562,8 +560,7 @@ cmd_trust()
 	fi
 
 	# Verify we currently distrust a certificate by this base name.
-	certbase=$(basename -- "$cert.")
-	certbase=${certbase%.}
+	certbase=${cert##*/}
 	if [ ! -h "$distrustdir/$certbase" ]; then
 		error "not currently distrusted: $vcert"
 		return 1
@@ -574,7 +571,7 @@ cmd_trust()
 	target=$(readlink -n -- "$distrustdir/$certbase" && printf .)
 	target=${target%.}
 	if [ "$cert" != "$target" ]; then
-		vcertbase=$(basename -- "$vcert")
+		vcertbase=${vcert##*/}
 		error "distrusted $vcertbase does not point to $vcert"
 		return 1
 	fi
@@ -617,8 +614,7 @@ cmd_untrust()
 	# Check whether this certificate is already distrusted.
 	# - If the same base name points to the same path, stop here.
 	# - Otherwise, fail noisily.
-	certbase=$(basename "$cert.")
-	certbase=${certbase%.}
+	certbase=${cert##*/}
 	if [ -h "$distrustdir/$certbase" ]; then
 		target=$(readlink -n -- "$distrustdir/$certbase" && printf .)
 		target=${target%.}



CVS commit: src/usr.sbin/certctl

2024-03-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Mar  3 15:53:55 UTC 2024

Modified Files:
src/usr.sbin/certctl: certctl.sh

Log Message:
certctl(8): Avoid basename(1).

Saves some time running subprocesses.  Since this is only used for
non-directories (i.e., there's never trailing / on the inputs), it
suffices to delete the longest prefix matching glob `*/' with shell
parameter expansion -- much cheaper than spawning a subprocess.

Shaves off about 1/3 of the time spent in `certctl list' on an
aarch64 VM in qemu.

PR bin/57993


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/certctl/certctl.sh

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



CVS import: src/external/bsd/elftoolchain/dist

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 14:42:06 UTC 2024

Update of /cvsroot/src/external/bsd/elftoolchain/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv2637

Log Message:
Import new elftoolchain at SVN-r4037

Status:

Vendor Tag: FreeBSD
Release Tags:   elftoolchain-r4037

C src/external/bsd/elftoolchain/dist/libelf/elf_begin.c
C src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.c
C src/external/bsd/elftoolchain/dist/libelf/elf_cntl.c
C src/external/bsd/elftoolchain/dist/libelf/elf_errno.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.c
C src/external/bsd/elftoolchain/dist/libelf/elf_hash.c
N src/external/bsd/elftoolchain/dist/libelf/elf_getversion.c
C src/external/bsd/elftoolchain/dist/libelf/elf_next.c
C src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.c
C src/external/bsd/elftoolchain/dist/libelf/elf_strptr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_open.c
C src/external/bsd/elftoolchain/dist/libelf/elf_scn.c
C src/external/bsd/elftoolchain/dist/libelf/elf_update.c
C src/external/bsd/elftoolchain/dist/libelf/elf.c
C src/external/bsd/elftoolchain/dist/libelf/elf_end.c
C src/external/bsd/elftoolchain/dist/libelf/elf_flag.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getident.c
C src/external/bsd/elftoolchain/dist/libelf/elf_memory.c
C src/external/bsd/elftoolchain/dist/libelf/elf_rand.c
C src/external/bsd/elftoolchain/dist/libelf/elf_shstrndx.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_cap.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_rel.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_syminfo.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_rela.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_symshndx.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_dyn.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_move.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_shdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_xlate.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ar.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_data.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_allocate.c
C src/external/bsd/elftoolchain/dist/libelf/libelf.h
C src/external/bsd/elftoolchain/dist/libelf/elf_data.c
C src/external/bsd/elftoolchain/dist/libelf/elf_fill.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getbase.c
C src/external/bsd/elftoolchain/dist/libelf/elf_kind.c
C src/external/bsd/elftoolchain/dist/libelf/elf_phnum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_shnum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_version.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_ehdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ar_util.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ehdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_memory.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_shdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_convert.m4
C src/external/bsd/elftoolchain/dist/libelf/libelf_extended.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_open.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_fsize.m4
C src/external/bsd/elftoolchain/dist/libelf/libelf_phdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3
C src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h
C src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3
C src/external/bsd/elftoolchain/dist/libelf/elf_kind.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3
C src/external/bsd/elftoolchain/dist/libelf/elf_memory.3
C src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getident.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3
C src/external/bsd/elftoolchain/dist/libelf/elf_rand.3
C src/external/bsd/elftoolchain/dist/libelf/elf_version.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3
C src/external/bsd/elftoolchain/dist/libelf/elf_hash.3
C src/external/bsd/elftoolchain/dist/libelf/elf_open.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_phdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_sym.c
C 

CVS import: src/external/bsd/elftoolchain/dist

2024-03-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar  3 14:42:06 UTC 2024

Update of /cvsroot/src/external/bsd/elftoolchain/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv2637

Log Message:
Import new elftoolchain at SVN-r4037

Status:

Vendor Tag: FreeBSD
Release Tags:   elftoolchain-r4037

C src/external/bsd/elftoolchain/dist/libelf/elf_begin.c
C src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.c
C src/external/bsd/elftoolchain/dist/libelf/elf_cntl.c
C src/external/bsd/elftoolchain/dist/libelf/elf_errno.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.c
C src/external/bsd/elftoolchain/dist/libelf/elf_hash.c
N src/external/bsd/elftoolchain/dist/libelf/elf_getversion.c
C src/external/bsd/elftoolchain/dist/libelf/elf_next.c
C src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.c
C src/external/bsd/elftoolchain/dist/libelf/elf_strptr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_open.c
C src/external/bsd/elftoolchain/dist/libelf/elf_scn.c
C src/external/bsd/elftoolchain/dist/libelf/elf_update.c
C src/external/bsd/elftoolchain/dist/libelf/elf.c
C src/external/bsd/elftoolchain/dist/libelf/elf_end.c
C src/external/bsd/elftoolchain/dist/libelf/elf_flag.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getident.c
C src/external/bsd/elftoolchain/dist/libelf/elf_memory.c
C src/external/bsd/elftoolchain/dist/libelf/elf_rand.c
C src/external/bsd/elftoolchain/dist/libelf/elf_shstrndx.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_cap.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_rel.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_syminfo.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_rela.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_symshndx.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_dyn.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_move.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_shdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_xlate.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ar.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_data.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_allocate.c
C src/external/bsd/elftoolchain/dist/libelf/libelf.h
C src/external/bsd/elftoolchain/dist/libelf/elf_data.c
C src/external/bsd/elftoolchain/dist/libelf/elf_fill.c
C src/external/bsd/elftoolchain/dist/libelf/elf_getbase.c
C src/external/bsd/elftoolchain/dist/libelf/elf_kind.c
C src/external/bsd/elftoolchain/dist/libelf/elf_phnum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_shnum.c
C src/external/bsd/elftoolchain/dist/libelf/elf_version.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_ehdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ar_util.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_ehdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_memory.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_shdr.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_convert.m4
C src/external/bsd/elftoolchain/dist/libelf/libelf_extended.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_open.c
C src/external/bsd/elftoolchain/dist/libelf/libelf_fsize.m4
C src/external/bsd/elftoolchain/dist/libelf/libelf_phdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3
C src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h
C src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3
C src/external/bsd/elftoolchain/dist/libelf/elf_kind.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3
C src/external/bsd/elftoolchain/dist/libelf/elf_memory.3
C src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getident.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3
C src/external/bsd/elftoolchain/dist/libelf/elf_rand.3
C src/external/bsd/elftoolchain/dist/libelf/elf_version.3
C src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3
C src/external/bsd/elftoolchain/dist/libelf/elf_hash.3
C src/external/bsd/elftoolchain/dist/libelf/elf_open.3
C src/external/bsd/elftoolchain/dist/libelf/gelf_phdr.c
C src/external/bsd/elftoolchain/dist/libelf/gelf_sym.c
C 

CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 13:09:23 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_358.c msg_362.c msg_363.c msg_372.c
msg_373.c msg_374.c msg_377.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_358.c \
src/tests/usr.bin/xlint/lint1/msg_362.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_363.c \
src/tests/usr.bin/xlint/lint1/msg_372.c \
src/tests/usr.bin/xlint/lint1/msg_373.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.230 -r1.231 src/usr.bin/xlint/lint1/err.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_358.c
diff -u src/tests/usr.bin/xlint/lint1/msg_358.c:1.1 src/tests/usr.bin/xlint/lint1/msg_358.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_358.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_358.c	Sun Mar  3 13:09:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_358.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_358.c,v 1.2 2024/03/03 13:09:23 rillig Exp $	*/
 # 3 "msg_358.c"
 
 // Test for message: hex escape '%.*s' has more than 2 digits [358]
@@ -49,4 +49,13 @@ examples(unsigned u32, uint64_t u64)
 	snprintb(buf, sizeof(buf),
 	"\177\020f\x00\x02bit\0",
 	u64);
+
+	// In this example from the snprintb manual page, the descriptions
+	// that start with a hexadecimal digit must be separated from the
+	// hexadecimal escape sequence for the bit position.
+	snprintb(buf, sizeof(buf),
+	"\20\x10NOTBOOT\x0f" "FPP\x0eSDVMA\x0cVIDEO"
+	"\x0bLORES\x0a" "FPA\x09" "DIAG\x07" "CACHE"
+	"\x06IOCACHE\x05LOOPBACK\x04" "DBGCACHE",
+	u32);
 }
Index: src/tests/usr.bin/xlint/lint1/msg_362.c
diff -u src/tests/usr.bin/xlint/lint1/msg_362.c:1.1 src/tests/usr.bin/xlint/lint1/msg_362.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_362.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_362.c	Sun Mar  3 13:09:23 2024
@@ -1,11 +1,11 @@
-/*	$NetBSD: msg_362.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_362.c,v 1.2 2024/03/03 13:09:23 rillig Exp $	*/
 # 3 "msg_362.c"
 
-// Test for message: old-style format contains '\0' [362]
+// Test for message: directive '%.*s' should not be escaped [362]
 
 /*
- * The old-style format uses 1-based bit positions, from 1 up to 32.
- * A null character would prematurely end the format argument.
+ * Since the characters used for the directive type are chosen to be easily
+ * readable, it doesn't make sense to obfuscate them.
  */
 
 /* lint1-extra-flags: -X 351 */
@@ -20,9 +20,14 @@ example(unsigned u32)
 {
 	char buf[64];
 
-	/* expect+1: warning: bit position '\000' (0) in '\000lsb' out of range 1..32 [371] */
-	snprintb(buf, sizeof(buf), "\020\000lsb\037msb", u32);
-	/* expect+2: warning: old-style format contains '\0' [362] */
-	/* expect+1: warning: bit position '\000' (0) in '\000lsb' out of range 1..32 [371] */
-	snprintb(buf, sizeof(buf), "\020\037msb\000lsb", u32);
+	/* expect+9: warning: directive '\142' should not be escaped [362] */
+	/* expect+8: warning: bit position 'o' in '\142old-style-lsb\0' should be escaped as octal or hex [369] */
+	/* expect+7: warning: bit position 'o' (111) in '\142old-style-lsb\0' out of range 0..63 [371] */
+	/* expect+6: warning: unknown directive '\001', must be one of 'bfF=:*' [374] */
+	snprintb(buf, sizeof(buf),
+	"\177\020"
+	"\142old-style-lsb\0"
+	"\001old-style-lsb\0"
+	"\142\000old-style-lsb\0",
+	u32);
 }

Index: src/tests/usr.bin/xlint/lint1/msg_363.c
diff -u src/tests/usr.bin/xlint/lint1/msg_363.c:1.2 src/tests/usr.bin/xlint/lint1/msg_363.c:1.3
--- src/tests/usr.bin/xlint/lint1/msg_363.c:1.2	Sun Mar  3 10:27:18 2024
+++ src/tests/usr.bin/xlint/lint1/msg_363.c	Sun Mar  3 13:09:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_363.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
+/*	$NetBSD: msg_363.c,v 1.3 2024/03/03 13:09:23 rillig Exp $	*/
 # 3 "msg_363.c"
 
 // Test for message: non-printing character '%.*s' in description '%.*s' [363]
@@ -29,9 +29,7 @@ old_style_description(unsigned u32)
 	"\001non\tprint\nable\377",
 	u32);
 
-	/* expect+8: warning: old-style format contains '\0' [362] */
-	/* expect+7: warning: bit position '\000' (0) in '\000print' out of range 1..32 [371] */
-	/* expect+6: warning: old-style format contains '\0' [362] */
+	/* expect+6: warning: bit position '\000' (0) in '\000print' out of range 1..32 

CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 13:09:23 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_358.c msg_362.c msg_363.c msg_372.c
msg_373.c msg_374.c msg_377.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_358.c \
src/tests/usr.bin/xlint/lint1/msg_362.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_363.c \
src/tests/usr.bin/xlint/lint1/msg_372.c \
src/tests/usr.bin/xlint/lint1/msg_373.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.230 -r1.231 src/usr.bin/xlint/lint1/err.c

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



CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 10:27:18 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_363.c msg_364.c msg_365.c msg_366.c
msg_367.c msg_374.c msg_377.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: fix warning about "empty" single-letter snprintb descriptions


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_363.c \
src/tests/usr.bin/xlint/lint1/msg_364.c \
src/tests/usr.bin/xlint/lint1/msg_365.c \
src/tests/usr.bin/xlint/lint1/msg_367.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_366.c \
src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.229 -r1.230 src/usr.bin/xlint/lint1/err.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_363.c
diff -u src/tests/usr.bin/xlint/lint1/msg_363.c:1.1 src/tests/usr.bin/xlint/lint1/msg_363.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_363.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_363.c	Sun Mar  3 10:27:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_363.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_363.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
 # 3 "msg_363.c"
 
 // Test for message: non-printing character '%.*s' in description '%.*s' [363]
@@ -33,7 +33,7 @@ old_style_description(unsigned u32)
 	/* expect+7: warning: bit position '\000' (0) in '\000print' out of range 1..32 [371] */
 	/* expect+6: warning: old-style format contains '\0' [362] */
 	/* expect+5: warning: bit position '\n' in '\nable' should be escaped as octal or hex [369] */
-	/* expect+4: warning: empty description in '\0' [367] */
+	/* expect+4: warning: redundant '\0' at the end of the format [377] */
 	snprintb(buf, sizeof(buf),
 	"\020"
 	"\001non\000print\nable\0",
Index: src/tests/usr.bin/xlint/lint1/msg_364.c
diff -u src/tests/usr.bin/xlint/lint1/msg_364.c:1.1 src/tests/usr.bin/xlint/lint1/msg_364.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_364.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_364.c	Sun Mar  3 10:27:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_364.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_364.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
 # 3 "msg_364.c"
 
 // Test for message: missing bit position after '%.*s' [364]
@@ -26,6 +26,7 @@ example(unsigned u32)
 	"b",
 	u32);
 
+	/* expect+5: warning: empty description in 'b\007' [367] */
 	/* expect+4: warning: missing '\0' at the end of 'b\007' [366] */
 	snprintb(buf, sizeof(buf),
 	"\177\020"
Index: src/tests/usr.bin/xlint/lint1/msg_365.c
diff -u src/tests/usr.bin/xlint/lint1/msg_365.c:1.1 src/tests/usr.bin/xlint/lint1/msg_365.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_365.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_365.c	Sun Mar  3 10:27:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_365.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_365.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
 # 3 "msg_365.c"
 
 // Test for message: missing field width after '%.*s' [365]
@@ -25,6 +25,7 @@ example(unsigned u32)
 	"f\000",
 	u32);
 
+	/* expect+5: warning: empty description in 'f\007\010' [367] */
 	/* expect+4: warning: missing '\0' at the end of 'f\007\010' [366] */
 	snprintb(buf, sizeof(buf),
 	"\177\020"
Index: src/tests/usr.bin/xlint/lint1/msg_367.c
diff -u src/tests/usr.bin/xlint/lint1/msg_367.c:1.1 src/tests/usr.bin/xlint/lint1/msg_367.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_367.c:1.1	Fri Mar  1 19:39:28 2024
+++ src/tests/usr.bin/xlint/lint1/msg_367.c	Sun Mar  3 10:27:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_367.c,v 1.1 2024/03/01 19:39:28 rillig Exp $	*/
+/*	$NetBSD: msg_367.c,v 1.2 2024/03/03 10:27:18 rillig Exp $	*/
 # 3 "msg_367.c"
 
 // Test for message: empty description in '%.*s' [367]
@@ -18,7 +18,46 @@ typedef unsigned long long uint64_t;
 int snprintb(char*, size_t, const char*, uint64_t);
 
 void
-example(unsigned u32)
+old_style(unsigned u32)
+{
+	char buf[64];
+
+	/* expect+10: warning: empty description in '\001' [367] */
+	/* expect+9: warning: empty description in '\002' [367] */
+	/* expect+8: warning: empty description in '\003' [367] */
+	/* expect+7: warning: empty description in '\004' [367] */
+	snprintb(buf, sizeof(buf),
+	"\020"
+	"\001"
+	"\002"
+	"\003"
+	"\004",
+	u32);
+
+	/* expect+10: warning: empty description in '\001' [367] */
+	/* expect+9: warning: empty description in '\002' [367] */
+	/* expect+8: warning: empty description in '\003' [367] */
+	/* expect+7: warning: empty description in '\004' [367] */
+	snprintb(buf, sizeof(buf),
+	"\020"
+	"\001" "" ""
+	"\002" "" ""
+	"\003" "" ""
+	"\004" "" "",
+	u32);
+
+	// 

CVS commit: src

2024-03-03 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar  3 10:27:18 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_363.c msg_364.c msg_365.c msg_366.c
msg_367.c msg_374.c msg_377.c
src/usr.bin/xlint/lint1: cksnprintb.c err.c

Log Message:
lint: fix warning about "empty" single-letter snprintb descriptions


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_363.c \
src/tests/usr.bin/xlint/lint1/msg_364.c \
src/tests/usr.bin/xlint/lint1/msg_365.c \
src/tests/usr.bin/xlint/lint1/msg_367.c \
src/tests/usr.bin/xlint/lint1/msg_377.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_366.c \
src/tests/usr.bin/xlint/lint1/msg_374.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/cksnprintb.c
cvs rdiff -u -r1.229 -r1.230 src/usr.bin/xlint/lint1/err.c

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



CVS commit: src/sys/dev/ic

2024-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar  3 10:09:42 UTC 2024

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

Log Message:
Reorder the bus_dmamap_sync sync operations

 BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD to
 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE

for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/ic/dwc_gmac.c

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

Modified files:

Index: src/sys/dev/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.84 src/sys/dev/ic/dwc_gmac.c:1.85
--- src/sys/dev/ic/dwc_gmac.c:1.84	Sun Mar  3 10:02:11 2024
+++ src/sys/dev/ic/dwc_gmac.c	Sun Mar  3 10:09:42 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.84 2024/03/03 10:02:11 skrll Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.85 2024/03/03 10:09:42 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.84 2024/03/03 10:02:11 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.85 2024/03/03 10:09:42 skrll Exp $");
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -540,7 +540,7 @@ dwc_gmac_alloc_rx_ring(struct dwc_gmac_s
 
 	bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map, 0,
 	AWGE_RX_RING_COUNT * sizeof(struct dwc_gmac_dev_dmadesc),
-	BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
+	BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_DMA_RX_ADDR,
 	ring->r_physaddr);
 



CVS commit: src/sys/dev/ic

2024-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar  3 10:09:42 UTC 2024

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

Log Message:
Reorder the bus_dmamap_sync sync operations

 BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD to
 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE

for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/ic/dwc_gmac.c

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



CVS commit: src/sys/dev/ic

2024-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar  3 10:02:11 UTC 2024

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

Log Message:
More KNF (whitespace around binary operators)


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/ic/dwc_gmac.c

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

Modified files:

Index: src/sys/dev/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.83 src/sys/dev/ic/dwc_gmac.c:1.84
--- src/sys/dev/ic/dwc_gmac.c:1.83	Tue Feb 27 08:28:56 2024
+++ src/sys/dev/ic/dwc_gmac.c	Sun Mar  3 10:02:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.83 2024/02/27 08:28:56 skrll Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.84 2024/03/03 10:02:11 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.83 2024/02/27 08:28:56 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.84 2024/03/03 10:02:11 skrll Exp $");
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -718,20 +718,20 @@ dwc_gmac_txdesc_sync(struct dwc_gmac_sof
 	if (end > start) {
 		bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
 		TX_DESC_OFFSET(start),
-		TX_DESC_OFFSET(end)-TX_DESC_OFFSET(start),
+		TX_DESC_OFFSET(end) - TX_DESC_OFFSET(start),
 		ops);
 		return;
 	}
 	/* sync from 'start' to end of ring */
 	bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
 	TX_DESC_OFFSET(start),
-	TX_DESC_OFFSET(AWGE_TX_RING_COUNT)-TX_DESC_OFFSET(start),
+	TX_DESC_OFFSET(AWGE_TX_RING_COUNT) - TX_DESC_OFFSET(start),
 	ops);
 	if (TX_DESC_OFFSET(end) - TX_DESC_OFFSET(0) > 0) {
 		/* sync from start of ring to 'end' */
 		bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
 		TX_DESC_OFFSET(0),
-		TX_DESC_OFFSET(end)-TX_DESC_OFFSET(0),
+		TX_DESC_OFFSET(end) - TX_DESC_OFFSET(0),
 		ops);
 	}
 }



CVS commit: src/sys/dev/ic

2024-03-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Mar  3 10:02:11 UTC 2024

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

Log Message:
More KNF (whitespace around binary operators)


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/ic/dwc_gmac.c

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