Re: CVS commit: src/bin/echo
Date:Wed, 15 May 2024 02:33:23 +0300 From:Valery Ushakov Message-ID: | I vaguely remember I read somewhere that printf(1) was specifically | conceived to take no options, but that can be planted memories. May | be it's indeed induced by the old state of affairs in our version. POSIX printf(1) has no options (it says in its page "OPTIONS: None") and our printf has no options, but implementations are allowed to extend the standard, and add some, POSIX says (XCU 1.4) that when it says "OPTIONS: None" what it means is: Default Behavior: When this section is listed as ``None.'', it means that the implementation need not support any options. Standard utilities that do not accept options, but that do accept operands, shall recognize "--" as a first argument to be discarded. That is more or less what we do, but for backwards compat reasons, not always. The requirement for recognizing "--" is because conforming applications need a way to shield their operands from any arbitrary options that the implementation may provide as an extension. For example, if the standard utility foo is listed as taking no options, and the application needed to give it a pathname with a leading , it could safely do it as: foo -- -myfile and avoid any problems with -m used as an extension. Other versions of printf(1) do have options, or at least, an option. bash, ksh93 & zsh all have a "-v var" option to cause the output from (the builtin) printf to be stored in var, rather than written to stdout. It might be time to adjust our ptintf to be fully POSIX, and always handle the "--" end of options option (it doesn't seem useful as a printf format, and if needed, can always be written as printf -- --) rather than only doing it sometimes. Currently our printf used as "printf --" writes "--" to stdout. It really shouldn't. When there is just 1 arg, and it contains no %, it is also treated as a format, even if it starts with a '-'. So, as you demonstrated, in our printf, printf -V prints "-V", but if you try 'printf -V A B C' what you get is: sh: unknown option -- V Usage: printf format [arg ...] (It would do the same if given a script with one of the -v var options used in it). The comments at the start of main() in our printf(1) source are nonsense (though for backwards compat, we should just check for "--" rather than using getopt() to do that for us, as we currently do, when we do it.) kre ps: I do appreciate that some of the mess that is there now is my doing, but back when I did that I didn't understand POSIX as well as I do now.
CVS commit: src
Module Name:src Committed By: riastradh Date: Wed May 15 00:02:57 UTC 2024 Modified Files: src/lib/libm/src: s_modfl.c src/tests/lib/libm: t_fe_round.c t_modf.c Log Message: modfl(3): Fix conversion from FreeBSD. LDBL_MANL_SIZE is spelled EXT_FRACLBITS -- and not EXT_FRACHBITS. PR lib/58237: modfl returns wrong answers on ld128 architectures To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_modfl.c cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libm/t_fe_round.c cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_modf.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/libm/src/s_modfl.c diff -u src/lib/libm/src/s_modfl.c:1.1 src/lib/libm/src/s_modfl.c:1.2 --- src/lib/libm/src/s_modfl.c:1.1 Mon Jun 16 12:54:43 2014 +++ src/lib/libm/src/s_modfl.c Wed May 15 00:02:56 2024 @@ -36,7 +36,7 @@ * $FreeBSD: head/lib/msun/src/s_modfl.c 165855 2007-01-07 07:54:21Z das $ */ #include -__RCSID("$NetBSD: s_modfl.c,v 1.1 2014/06/16 12:54:43 joerg Exp $"); +__RCSID("$NetBSD: s_modfl.c,v 1.2 2024/05/15 00:02:56 riastradh Exp $"); #include "namespace.h" @@ -51,7 +51,7 @@ __RCSID("$NetBSD: s_modfl.c,v 1.1 2014/0 __weak_alias(modfl, _modfl) #endif -#if LDBL_MANL_SIZE > 32 +#if EXT_FRACLBITS > 32 #define MASK ((uint64_t)-1) #else #define MASK ((uint32_t)-1) @@ -59,7 +59,7 @@ __weak_alias(modfl, _modfl) /* Return the last n bits of a word, representing the fractional part. */ #define GETFRAC(bits, n) ((bits) & ~(MASK << (n))) /* The number of fraction bits in manh, not counting the integer bit */ -#define HIBITS (LDBL_MANT_DIG - EXT_FRACHBITS) +#define HIBITS (LDBL_MANT_DIG - EXT_FRACLBITS) static const long double zero[] = { 0.0L, -0.0L }; Index: src/tests/lib/libm/t_fe_round.c diff -u src/tests/lib/libm/t_fe_round.c:1.19 src/tests/lib/libm/t_fe_round.c:1.20 --- src/tests/lib/libm/t_fe_round.c:1.19 Thu May 9 12:18:28 2024 +++ src/tests/lib/libm/t_fe_round.c Wed May 15 00:02:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $ */ +/* $NetBSD: t_fe_round.c,v 1.20 2024/05/15 00:02:57 riastradh Exp $ */ /* * Written by Maya Rashish @@ -8,7 +8,7 @@ */ #include -__RCSID("$NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $"); +__RCSID("$NetBSD: t_fe_round.c,v 1.20 2024/05/15 00:02:57 riastradh Exp $"); #include #include @@ -400,12 +400,6 @@ ATF_TC_BODY(fe_nearbyintl_rintl, tc) fnname[fn], valuesl[i].input); } -#if __HAVE_LONG_DOUBLE + 0 == 128 - atf_tc_expect_fail("PR lib/58237:" - " modfl returns wrong answers" - " on ld128 architectures"); -#endif - /* * Verify the fractional part of the result is * zero -- the result of rounding to an integer Index: src/tests/lib/libm/t_modf.c diff -u src/tests/lib/libm/t_modf.c:1.5 src/tests/lib/libm/t_modf.c:1.6 --- src/tests/lib/libm/t_modf.c:1.5 Wed May 8 22:57:37 2024 +++ src/tests/lib/libm/t_modf.c Wed May 15 00:02:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_modf.c,v 1.5 2024/05/08 22:57:37 riastradh Exp $ */ +/* $NetBSD: t_modf.c,v 1.6 2024/05/15 00:02:57 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: t_modf.c,v 1.5 2024/05/08 22:57:37 riastradh Exp $"); +__RCSID("$NetBSD: t_modf.c,v 1.6 2024/05/15 00:02:57 riastradh Exp $"); #include #include @@ -289,11 +289,6 @@ ATF_TC_BODY(modfl, tc) { unsigned n; -#if __HAVE_LONG_DOUBLE + 0 == 128 - atf_tc_expect_fail("PR lib/58237:" - " modfl returns wrong answers on ld128 architectures"); -#endif - for (n = 0; n < __arraycount(casesf); n++) { long double x, i, f;
CVS commit: src
Module Name:src Committed By: riastradh Date: Wed May 15 00:02:57 UTC 2024 Modified Files: src/lib/libm/src: s_modfl.c src/tests/lib/libm: t_fe_round.c t_modf.c Log Message: modfl(3): Fix conversion from FreeBSD. LDBL_MANL_SIZE is spelled EXT_FRACLBITS -- and not EXT_FRACHBITS. PR lib/58237: modfl returns wrong answers on ld128 architectures To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_modfl.c cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libm/t_fe_round.c cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_modf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/bin/echo
On Wed, May 15, 2024 at 05:22:25 +0700, Robert Elz wrote: > | Unfortunately that advice is not true without further caveats. > > That you have to actually write a valid printf(1) command, and not > simply s/echo/printf/ ? Does that really need saying? > > > | netbsd$ sh -c "printf '-V\n'" > > printf -- -V\\n > > and it will work anywhere - our printf is specially hacked as once > upon a time it took no options, and this kind of thing would work. > Format strings starting with a '-' don't work in general however, > the '--' should be included if the format might begin with a '-'. > > Even better would be > > printf -- %s\\n -V > > (where the -- is optional here). I vaguely remember I read somewhere that printf(1) was specifically conceived to take no options, but that can be planted memories. May be it's indeed induced by the old state of affairs in our version. -uwe
Re: CVS commit: src/bin/echo
Date:Tue, 14 May 2024 12:41:51 +0300 From:Valery Ushakov Message-ID: | Unfortunately that advice is not true without further caveats. That you have to actually write a valid printf(1) command, and not simply s/echo/printf/ ? Does that really need saying? | netbsd$ sh -c "printf '-V\n'" printf -- -V\\n and it will work anywhere - our printf is specially hacked as once upon a time it took no options, and this kind of thing would work. Format strings starting with a '-' don't work in general however, the '--' should be included if the format might begin with a '-'. Even better would be printf -- %s\\n -V (where the -- is optional here). kre aside: I'd use '-V\n' inside "" as well. But as a sh -c command string I'd use: sh -c 'printf -- -V\\n'
CVS commit: src
Module Name:src Committed By: andvar Date: Tue May 14 19:00:45 UTC 2024 Modified Files: src/lib/libc/db/recno: rec_utils.c src/share/examples/emul/ultrix/etc: svc.conf src/sys/arch/arc/include: vmparam.h src/sys/arch/hp300/DOC: HPMMU.notes src/sys/arch/hppa/dev: viper.h src/sys/arch/luna68k/include: vmparam.h src/sys/arch/xen/x86: xen_bus_dma.c src/sys/coda: coda_vnops.c src/sys/dev/ic: hd64570reg.h src/sys/dev/usb: if_atu.c src/sys/fs/ntfs: TODO src/sys/kern: kern_fork.c src/sys/netinet: tcp_congctl.c src/sys/ufs/ext2fs: ext2fs_alloc.c Log Message: fix recently committed typos by msaitoh in few more places, as well as few more. mainly s/contigous/contiguous/ and s/miliseconds/milliseconds/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/recno/rec_utils.c cvs rdiff -u -r1.1 -r1.2 src/share/examples/emul/ultrix/etc/svc.conf cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/include/vmparam.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp300/DOC/HPMMU.notes cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/viper.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/luna68k/include/vmparam.h cvs rdiff -u -r1.33 -r1.34 src/sys/arch/xen/x86/xen_bus_dma.c cvs rdiff -u -r1.118 -r1.119 src/sys/coda/coda_vnops.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/hd64570reg.h cvs rdiff -u -r1.75 -r1.76 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.4 -r1.5 src/sys/fs/ntfs/TODO cvs rdiff -u -r1.230 -r1.231 src/sys/kern/kern_fork.c cvs rdiff -u -r1.28 -r1.29 src/sys/netinet/tcp_congctl.c cvs rdiff -u -r1.57 -r1.58 src/sys/ufs/ext2fs/ext2fs_alloc.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/db/recno/rec_utils.c diff -u src/lib/libc/db/recno/rec_utils.c:1.14 src/lib/libc/db/recno/rec_utils.c:1.15 --- src/lib/libc/db/recno/rec_utils.c:1.14 Sat Dec 14 18:04:56 2013 +++ src/lib/libc/db/recno/rec_utils.c Tue May 14 19:00:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: rec_utils.c,v 1.14 2013/12/14 18:04:56 christos Exp $ */ +/* $NetBSD: rec_utils.c,v 1.15 2024/05/14 19:00:43 andvar Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #endif #include -__RCSID("$NetBSD: rec_utils.c,v 1.14 2013/12/14 18:04:56 christos Exp $"); +__RCSID("$NetBSD: rec_utils.c,v 1.15 2024/05/14 19:00:43 andvar Exp $"); #include @@ -86,7 +86,7 @@ dataonly: return (RET_SUCCESS); /* - * We must copy big keys/data to make them contigous. Otherwise, + * We must copy big keys/data to make them contiguous. Otherwise, * leave the page pinned and don't copy unless the user specified * concurrent access. */ Index: src/share/examples/emul/ultrix/etc/svc.conf diff -u src/share/examples/emul/ultrix/etc/svc.conf:1.1 src/share/examples/emul/ultrix/etc/svc.conf:1.2 --- src/share/examples/emul/ultrix/etc/svc.conf:1.1 Thu Nov 13 03:02:08 1997 +++ src/share/examples/emul/ultrix/etc/svc.conf Tue May 14 19:00:43 2024 @@ -1,4 +1,4 @@ -# $NetBSD: svc.conf,v 1.1 1997/11/13 03:02:08 thorpej Exp $ +# $NetBSD: svc.conf,v 1.2 2024/05/14 19:00:43 andvar Exp $ # # Ultrix-compatible svc.conf file. # Each line below binds a particular database to one or more resolver @@ -8,7 +8,7 @@ # bind - DNS # # Multiple services can be specified by a comma-separated list. -# Order is signficant. Whitespace not allowed except after comments or commas. +# Order is significant. Whitespace not allowed except after comments or commas. # aliases=local # sendmail /etc/aliases: just run native senmamil. auth=local Index: src/sys/arch/arc/include/vmparam.h diff -u src/sys/arch/arc/include/vmparam.h:1.11 src/sys/arch/arc/include/vmparam.h:1.12 --- src/sys/arch/arc/include/vmparam.h:1.11 Thu Mar 28 08:28:16 2019 +++ src/sys/arch/arc/include/vmparam.h Tue May 14 19:00:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.11 2019/03/28 08:28:16 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.12 2024/05/14 19:00:43 andvar Exp $ */ /* $OpenBSD: vmparam.h,v 1.3 1997/04/19 17:19:59 pefo Exp $ */ /* NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp */ @@ -12,7 +12,7 @@ #define VM_MAX_WIRED_MAP_ADDRESS ((vaddr_t)0xC000) /* - * Maximum number of contigous physical memory segment. + * Maximum number of contiguous physical memory segment. */ #undef VM_PHYSSEG_MAX #define VM_PHYSSEG_MAX 16 Index: src/sys/arch/hp300/DOC/HPMMU.notes diff -u src/sys/arch/hp300/DOC/HPMMU.notes:1.6 src/sys/arch/hp300/DOC/HPMMU.notes:1.7 --- src/sys/arch/hp300/DOC/HPMMU.notes:1.6 Fri Sep 8 18:51:19 2023 +++ src/sys/arch/hp300/DOC/HPMMU.notes Tue May 14 19:00:43 2024 @@ -1,4 +1,4 @@ -$NetBSD: HPMMU.notes,v 1.6 2023/09/08 18:51:19 andvar Exp $ +$NetBSD: HPMMU.notes,v 1.7 2024/05/14 19:00:43 andvar Exp $ Overview: @@ -28,7 +28,7 @@ Overview: is used with 16 Kbytes of cache on 320 systems and 32 Kbytes on 350 systems.
CVS commit: src
Module Name:src Committed By: andvar Date: Tue May 14 19:00:45 UTC 2024 Modified Files: src/lib/libc/db/recno: rec_utils.c src/share/examples/emul/ultrix/etc: svc.conf src/sys/arch/arc/include: vmparam.h src/sys/arch/hp300/DOC: HPMMU.notes src/sys/arch/hppa/dev: viper.h src/sys/arch/luna68k/include: vmparam.h src/sys/arch/xen/x86: xen_bus_dma.c src/sys/coda: coda_vnops.c src/sys/dev/ic: hd64570reg.h src/sys/dev/usb: if_atu.c src/sys/fs/ntfs: TODO src/sys/kern: kern_fork.c src/sys/netinet: tcp_congctl.c src/sys/ufs/ext2fs: ext2fs_alloc.c Log Message: fix recently committed typos by msaitoh in few more places, as well as few more. mainly s/contigous/contiguous/ and s/miliseconds/milliseconds/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/recno/rec_utils.c cvs rdiff -u -r1.1 -r1.2 src/share/examples/emul/ultrix/etc/svc.conf cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/include/vmparam.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp300/DOC/HPMMU.notes cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/viper.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/luna68k/include/vmparam.h cvs rdiff -u -r1.33 -r1.34 src/sys/arch/xen/x86/xen_bus_dma.c cvs rdiff -u -r1.118 -r1.119 src/sys/coda/coda_vnops.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/hd64570reg.h cvs rdiff -u -r1.75 -r1.76 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.4 -r1.5 src/sys/fs/ntfs/TODO cvs rdiff -u -r1.230 -r1.231 src/sys/kern/kern_fork.c cvs rdiff -u -r1.28 -r1.29 src/sys/netinet/tcp_congctl.c cvs rdiff -u -r1.57 -r1.58 src/sys/ufs/ext2fs/ext2fs_alloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: christos Date: Tue May 14 17:17:13 UTC 2024 Modified Files: src/distrib/common: Makefile.bootcd Log Message: check if the ${MACHINE} directory exists To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.bootcd diff -u src/distrib/common/Makefile.bootcd:1.53 src/distrib/common/Makefile.bootcd:1.54 --- src/distrib/common/Makefile.bootcd:1.53 Tue May 14 10:58:05 2024 +++ src/distrib/common/Makefile.bootcd Tue May 14 13:17:13 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootcd,v 1.53 2024/05/14 14:58:05 christos Exp $ +# $NetBSD: Makefile.bootcd,v 1.54 2024/05/14 17:17:13 christos Exp $ # # Makefile snipped to create a CD/DVD ISO # @@ -324,7 +324,7 @@ image: .endif if [ ! -s ${WORKSPEC} ]; then \ ${MAKESPEC} -d cdrom . > ${WORKSPEC}; \ - else \ + elif [ -d cdrom/${MACHINE} ]; then \ ${MAKESPEC} -d cdrom ${MACHINE} >> ${WORKSPEC}; \ fi ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 -F ${WORKSPEC} -xx \
CVS commit: src/distrib/common
Module Name:src Committed By: christos Date: Tue May 14 17:17:13 UTC 2024 Modified Files: src/distrib/common: Makefile.bootcd Log Message: check if the ${MACHINE} directory exists To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/i386/cdroms
Module Name:src Committed By: christos Date: Tue May 14 17:15:13 UTC 2024 Modified Files: src/distrib/i386/cdroms: Makefile.cdrom Added Files: src/distrib/i386/cdroms: spec.in Log Message: Add the same extra stuff from amd64 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/distrib/i386/cdroms/Makefile.cdrom cvs rdiff -u -r0 -r1.1 src/distrib/i386/cdroms/spec.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/i386/cdroms/Makefile.cdrom diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.43 src/distrib/i386/cdroms/Makefile.cdrom:1.44 --- src/distrib/i386/cdroms/Makefile.cdrom:1.43 Fri Apr 26 13:36:32 2024 +++ src/distrib/i386/cdroms/Makefile.cdrom Tue May 14 13:15:13 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.43 2024/04/26 17:36:32 nia Exp $ +# $NetBSD: Makefile.cdrom,v 1.44 2024/05/14 17:15:13 christos Exp $ .include @@ -12,6 +12,8 @@ CDKERNELS= netbsd-GENERIC.gz netbs CDRELEASE_NOISOS= true CD_SETS+= base etc gpufw +SPEC_EXTRA:=${.PARSEDIR}/spec.in + image_md_pre: ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc cdrom/install.sh ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab Added files: Index: src/distrib/i386/cdroms/spec.in diff -u /dev/null src/distrib/i386/cdroms/spec.in:1.1 --- /dev/null Tue May 14 13:15:13 2024 +++ src/distrib/i386/cdroms/spec.in Tue May 14 13:15:13 2024 @@ -0,0 +1,6 @@ +./boot type=file uname=root gname=wheel mode=644 +./install.sh type=file uname=root gname=wheel mode=755 +./mnt2 type=dir uname=root gname=wheel mode=755 +./netbsd type=file uname=root gname=wheel mode=644 +./targetroot type=dir uname=root gname=wheel mode=755 +./etc/gettytab type=link uname=root gname=wheel mode=755
CVS commit: src/distrib/i386/cdroms
Module Name:src Committed By: christos Date: Tue May 14 17:15:13 UTC 2024 Modified Files: src/distrib/i386/cdroms: Makefile.cdrom Added Files: src/distrib/i386/cdroms: spec.in Log Message: Add the same extra stuff from amd64 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/distrib/i386/cdroms/Makefile.cdrom cvs rdiff -u -r0 -r1.1 src/distrib/i386/cdroms/spec.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: riastradh Date: Tue May 14 16:10:54 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo: Use volatile to prevent optimization. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/tests/lib/libc/gen/t_siginfo.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/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.50 src/tests/lib/libc/gen/t_siginfo.c:1.51 --- src/tests/lib/libc/gen/t_siginfo.c:1.50 Tue May 14 16:10:14 2024 +++ src/tests/lib/libc/gen/t_siginfo.c Tue May 14 16:10:54 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.50 2024/05/14 16:10:14 riastradh Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.51 2024/05/14 16:10:54 riastradh Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -386,7 +386,7 @@ ATF_TC_BODY(sigfpe_int, tc) * Do not use constant 1 here. GCC >= 12 optimizes * (1 / i) to (abs(i) == 1 ? i : 0), even for -O0. */ - long unity = strtol("1", NULL, 10), + volatile long unity = strtol("1", NULL, 10), zero = strtol("0", NULL, 10); printf("%ld\n", unity / zero); }
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: riastradh Date: Tue May 14 16:10:54 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo: Use volatile to prevent optimization. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/tests/lib/libc/gen/t_siginfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: riastradh Date: Tue May 14 16:10:15 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo: No SIGFPE on RISC-V. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/tests/lib/libc/gen/t_siginfo.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/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.49 src/tests/lib/libc/gen/t_siginfo.c:1.50 --- src/tests/lib/libc/gen/t_siginfo.c:1.49 Fri Aug 4 03:31:13 2023 +++ src/tests/lib/libc/gen/t_siginfo.c Tue May 14 16:10:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.49 2023/08/04 03:31:13 rin Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.50 2024/05/14 16:10:14 riastradh Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -318,6 +318,8 @@ ATF_TC_BODY(sigfpe_flt, tc) */ if (0 == fpsetmask(fpsetmask(FP_X_INV))) atf_tc_skip("FPU does not implement traps on FP exceptions"); +#elif defined __riscv__ + atf_tc_skip("RISC-V does not support floating-point exception traps"); #endif if (sigsetjmp(sigfpe_flt_env, 0) == 0) { sa.sa_flags = SA_SIGINFO; @@ -366,7 +368,8 @@ ATF_TC_BODY(sigfpe_int, tc) { struct sigaction sa; -#if defined(__aarch64__) || defined(__powerpc__) || defined(__sh3__) +#if defined(__aarch64__) || defined(__powerpc__) || defined(__sh3__) || \ +defined(__riscv__) atf_tc_skip("Integer division by zero doesn't trap"); #endif if (sigsetjmp(sigfpe_int_env, 0) == 0) {
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: riastradh Date: Tue May 14 16:10:15 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo: No SIGFPE on RISC-V. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/tests/lib/libc/gen/t_siginfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: riastradh Date: Tue May 14 16:06:20 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: t_ptrace_wait: No FPU exception traps on RISC-V. This macro is not named correctly -- RISC-V does implement floating-point exceptions, but only via sticky status bits, not via machine traps. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.35 src/tests/lib/libc/sys/t_ptrace_wait.h:1.36 --- src/tests/lib/libc/sys/t_ptrace_wait.h:1.35 Tue May 14 16:04:17 2024 +++ src/tests/lib/libc/sys/t_ptrace_wait.h Tue May 14 16:06:20 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.h,v 1.35 2024/05/14 16:04:17 riastradh Exp $ */ +/* $NetBSD: t_ptrace_wait.h,v 1.36 2024/05/14 16:06:20 riastradh Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -673,6 +673,8 @@ are_fpu_exceptions_supported(void) return false; return true; } +#elif defined __riscv__ +#define are_fpu_exceptions_supported() 0 #else #define are_fpu_exceptions_supported() 1 #endif
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: riastradh Date: Tue May 14 16:06:20 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: t_ptrace_wait: No FPU exception traps on RISC-V. This macro is not named correctly -- RISC-V does implement floating-point exceptions, but only via sticky status bits, not via machine traps. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: riastradh Date: Tue May 14 16:04:18 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: t_ptrace_wait: Force result by write to volatile, not call to usleep. This is causing each FPE-related test to time out because it's actually passinga large number to usleep, which now respects large numbers. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.34 src/tests/lib/libc/sys/t_ptrace_wait.h:1.35 --- src/tests/lib/libc/sys/t_ptrace_wait.h:1.34 Tue May 24 20:08:38 2022 +++ src/tests/lib/libc/sys/t_ptrace_wait.h Tue May 14 16:04:17 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.h,v 1.34 2022/05/24 20:08:38 andvar Exp $ */ +/* $NetBSD: t_ptrace_wait.h,v 1.35 2024/05/14 16:04:17 riastradh Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -677,6 +677,8 @@ are_fpu_exceptions_supported(void) #define are_fpu_exceptions_supported() 1 #endif +volatile double ignore_result; + static void __used trigger_fpe(void) { @@ -701,7 +703,7 @@ trigger_fpe(void) #endif /* Division by zero causes CPU trap, translated to SIGFPE */ - usleep((int)(a / b)); + ignore_result = (int)(a / b); } static void __used
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: riastradh Date: Tue May 14 16:04:18 UTC 2024 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.h Log Message: t_ptrace_wait: Force result by write to volatile, not call to usleep. This is causing each FPE-related test to time out because it's actually passinga large number to usleep, which now respects large numbers. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libc/sys/t_ptrace_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/kernel
Module Name:src Committed By: riastradh Date: Tue May 14 15:54:16 UTC 2024 Modified Files: src/tests/kernel: h_segv.c Log Message: tests/kernel/h_segv: Disable SIGFPE test on RISC-V. No floating-point exception traps on RISC-V. Also don't pass the result of divide-by-zero converted to integer to usleep. Although the floating-point result of divide-by-zero is well-defined by IEEE 754 (+/-infinity), the outcome of C conversion to integer is not. And while on some architectures this might return zero, on RISC-V it looks like it'll return all bits set. And as of PR 58184, usleep now honours sleeps longer than 1sec, which means this will be waiting at least two billion microseconds, or about half an hour... So instead, just write the result to a volatile variable. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/kernel/h_segv.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/kernel/h_segv.c diff -u src/tests/kernel/h_segv.c:1.14 src/tests/kernel/h_segv.c:1.15 --- src/tests/kernel/h_segv.c:1.14 Thu Apr 25 19:37:09 2019 +++ src/tests/kernel/h_segv.c Tue May 14 15:54:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: h_segv.c,v 1.14 2019/04/25 19:37:09 kamil Exp $ */ +/* $NetBSD: h_segv.c,v 1.15 2024/05/14 15:54:16 riastradh Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: h_segv.c,v 1.14 2019/04/25 19:37:09 kamil Exp $"); +__RCSID("$NetBSD: h_segv.c,v 1.15 2024/05/14 15:54:16 riastradh Exp $"); #define __TEST_FENV @@ -121,10 +121,15 @@ check_fpe(void) printf("FPU does not implement traps on FP exceptions\n"); exit(EXIT_FAILURE); } +#elif defined __riscv__ + printf("RISC-V does not support floating-point exception traps\n"); + exit(EXIT_FAILURE); #endif exit(EXIT_SUCCESS); } +volatile int ignore_result; + static void trigger_fpe(void) { @@ -135,7 +140,13 @@ trigger_fpe(void) feenableexcept(FE_ALL_EXCEPT); #endif - usleep((int)(a/b)); + /* + * Try to trigger SIGFPE either by dividing by zero (which is + * defined to raise FE_DIVBYZERO, but may just return infinity + * without trapping the exception) or by converting infinity to + * integer. + */ + ignore_result = (int)(a/b); } static void
CVS commit: src/tests/kernel
Module Name:src Committed By: riastradh Date: Tue May 14 15:54:16 UTC 2024 Modified Files: src/tests/kernel: h_segv.c Log Message: tests/kernel/h_segv: Disable SIGFPE test on RISC-V. No floating-point exception traps on RISC-V. Also don't pass the result of divide-by-zero converted to integer to usleep. Although the floating-point result of divide-by-zero is well-defined by IEEE 754 (+/-infinity), the outcome of C conversion to integer is not. And while on some architectures this might return zero, on RISC-V it looks like it'll return all bits set. And as of PR 58184, usleep now honours sleeps longer than 1sec, which means this will be waiting at least two billion microseconds, or about half an hour... So instead, just write the result to a volatile variable. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/kernel/h_segv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: riastradh Date: Tue May 14 15:31:42 UTC 2024 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: t_ilogb: Nix spurious line break in ATF_CHECK_MSG. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libm/t_ilogb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: riastradh Date: Tue May 14 15:31:42 UTC 2024 Modified Files: src/tests/lib/libm: t_ilogb.c Log Message: t_ilogb: Nix spurious line break in ATF_CHECK_MSG. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libm/t_ilogb.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/lib/libm/t_ilogb.c diff -u src/tests/lib/libm/t_ilogb.c:1.10 src/tests/lib/libm/t_ilogb.c:1.11 --- src/tests/lib/libm/t_ilogb.c:1.10 Thu May 9 12:23:21 2024 +++ src/tests/lib/libm/t_ilogb.c Tue May 14 15:31:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ilogb.c,v 1.10 2024/05/09 12:23:21 riastradh Exp $ */ +/* $NetBSD: t_ilogb.c,v 1.11 2024/05/14 15:31:42 riastradh Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: t_ilogb.c,v 1.10 2024/05/09 12:23:21 riastradh Exp $"); +__RCSID("$NetBSD: t_ilogb.c,v 1.11 2024/05/14 15:31:42 riastradh Exp $"); #include #include @@ -50,14 +50,14 @@ __RCSID("$NetBSD: t_ilogb.c,v 1.10 2024/ # define ATF_CHECK_RAISED_INVALID do { \ int r = fetestexcept(FE_ALL_EXCEPT); \ ATF_CHECK_MSG((r & FE_INVALID) != 0, \ - "r & FE_INVALID == 0 (r=%#x, FE_INVALID=%#x)\n", \ + "r & FE_INVALID == 0 (r=%#x, FE_INVALID=%#x)", \ r, FE_INVALID); \ (void)feclearexcept(FE_ALL_EXCEPT); \ } while (/*CONSTCOND*/0) # define ATF_CHECK_RAISED_NOTHING do { \ int r = fetestexcept(FE_ALL_EXCEPT); \ - ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \ + ATF_CHECK_MSG(r == 0, "r=%#x != 0", r); \ (void)feclearexcept(FE_ALL_EXCEPT); \ } while (/*CONSTCOND*/0)
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: riastradh Date: Tue May 14 15:17:57 UTC 2024 Modified Files: src/sys/arch/riscv/include: sysreg.h Log Message: riscv: No volatile needed on asm to _read_ rounding mode, exceptions. These instructions can be omitted if the return values are unused. In contrast, _writes_ to the rounding mode or exceptions must not be omitted (even if we ignore the return value, which is the old value of the field). I think "memory" is the wrong clobber on these asm blocks too; they can't be reordered around _floating-point_ instructions, while reordering around loads and stores is fine. But I don't know how to spell the right thing in gcclish. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/riscv/include/sysreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/include/sysreg.h diff -u src/sys/arch/riscv/include/sysreg.h:1.32 src/sys/arch/riscv/include/sysreg.h:1.33 --- src/sys/arch/riscv/include/sysreg.h:1.32 Tue May 14 15:16:51 2024 +++ src/sys/arch/riscv/include/sysreg.h Tue May 14 15:17:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sysreg.h,v 1.32 2024/05/14 15:16:51 riastradh Exp $ */ +/* $NetBSD: sysreg.h,v 1.33 2024/05/14 15:17:57 riastradh Exp $ */ /* * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ static inline uint32_t fcsr_read(void) { uint32_t __fcsr; - asm volatile("frcsr %0" : "=r"(__fcsr) :: "memory"); + asm("frcsr %0" : "=r"(__fcsr) :: "memory"); return __fcsr; } @@ -73,7 +73,7 @@ static inline uint32_t fcsr_fflags_read(void) { uint32_t __old; - asm volatile("frflags %0" : "=r"(__old) :: "memory"); + asm("frflags %0" : "=r"(__old) :: "memory"); return __old; } @@ -89,7 +89,7 @@ static inline uint32_t fcsr_frm_read(void) { uint32_t __old; - asm volatile("frrm\t%0" : "=r"(__old) :: "memory"); + asm("frrm\t%0" : "=r"(__old) :: "memory"); return __old; }
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: riastradh Date: Tue May 14 15:17:57 UTC 2024 Modified Files: src/sys/arch/riscv/include: sysreg.h Log Message: riscv: No volatile needed on asm to _read_ rounding mode, exceptions. These instructions can be omitted if the return values are unused. In contrast, _writes_ to the rounding mode or exceptions must not be omitted (even if we ignore the return value, which is the old value of the field). I think "memory" is the wrong clobber on these asm blocks too; they can't be reordered around _floating-point_ instructions, while reordering around loads and stores is fine. But I don't know how to spell the right thing in gcclish. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/riscv/include/sysreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: riastradh Date: Tue May 14 15:16:51 UTC 2024 Modified Files: src/sys/arch/riscv/include: sysreg.h Log Message: riscv: Fix reading and writing frm and fflags. The FRRM/FSRM and FRFLAGS/FSFLAGS instructions do all the masking and shifting needed -- __SHIFTIN/__SHIFTOUT is wrong. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/riscv/include/sysreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/include/sysreg.h diff -u src/sys/arch/riscv/include/sysreg.h:1.31 src/sys/arch/riscv/include/sysreg.h:1.32 --- src/sys/arch/riscv/include/sysreg.h:1.31 Mon Feb 5 21:46:05 2024 +++ src/sys/arch/riscv/include/sysreg.h Tue May 14 15:16:51 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sysreg.h,v 1.31 2024/02/05 21:46:05 andvar Exp $ */ +/* $NetBSD: sysreg.h,v 1.32 2024/05/14 15:16:51 riastradh Exp $ */ /* * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -61,7 +61,6 @@ fcsr_read(void) return __fcsr; } - static inline uint32_t fcsr_write(uint32_t __new) { @@ -75,16 +74,15 @@ fcsr_fflags_read(void) { uint32_t __old; asm volatile("frflags %0" : "=r"(__old) :: "memory"); - return __SHIFTOUT(__old, FCSR_FFLAGS); + return __old; } static inline uint32_t fcsr_fflags_write(uint32_t __new) { uint32_t __old; - __new = __SHIFTIN(__new, FCSR_FFLAGS); asm volatile("fsflags %0, %1" : "=r"(__old) : "r"(__new) : "memory"); - return __SHIFTOUT(__old, FCSR_FFLAGS); + return __old; } static inline uint32_t @@ -92,19 +90,17 @@ fcsr_frm_read(void) { uint32_t __old; asm volatile("frrm\t%0" : "=r"(__old) :: "memory"); - return __SHIFTOUT(__old, FCSR_FRM); + return __old; } static inline uint32_t fcsr_frm_write(uint32_t __new) { uint32_t __old; - __new = __SHIFTIN(__new, FCSR_FRM); asm volatile("fsrm\t%0, %1" : "=r"(__old) : "r"(__new) : "memory"); - return __SHIFTOUT(__old, FCSR_FRM); + return __old; } - #define RISCVREG_READ_INLINE(regname) \ static inline uintptr_t \ csr_##regname##_read(void) \
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: riastradh Date: Tue May 14 15:16:51 UTC 2024 Modified Files: src/sys/arch/riscv/include: sysreg.h Log Message: riscv: Fix reading and writing frm and fflags. The FRRM/FSRM and FRFLAGS/FSFLAGS instructions do all the masking and shifting needed -- __SHIFTIN/__SHIFTOUT is wrong. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/riscv/include/sysreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/amd64/cdroms
Module Name:src Committed By: christos Date: Tue May 14 14:58:41 UTC 2024 Modified Files: src/distrib/amd64/cdroms: Makefile.cdrom Added Files: src/distrib/amd64/cdroms: spec.in Log Message: Add the extra spec for the amd64 cdroms To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/distrib/amd64/cdroms/Makefile.cdrom cvs rdiff -u -r0 -r1.1 src/distrib/amd64/cdroms/spec.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/cdroms/Makefile.cdrom diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.28 src/distrib/amd64/cdroms/Makefile.cdrom:1.29 --- src/distrib/amd64/cdroms/Makefile.cdrom:1.28 Fri Apr 26 13:36:32 2024 +++ src/distrib/amd64/cdroms/Makefile.cdrom Tue May 14 10:58:41 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.28 2024/04/26 17:36:32 nia Exp $ +# $NetBSD: Makefile.cdrom,v 1.29 2024/05/14 14:58:41 christos Exp $ .include .include @@ -22,6 +22,8 @@ CD_SETS+= base etc gpufw CD_SETS+= modules .endif +SPEC_EXTRA:=${.PARSEDIR}/spec.in + ${EFIBOOTIMG}: ${DESTDIR}/usr/mdec/bootx64.efi ${DESTDIR}/usr/mdec/bootia32.efi ${RM} -f ${EFIBOOTIMG} ${RM} -rf efiboot/EFI/boot Added files: Index: src/distrib/amd64/cdroms/spec.in diff -u /dev/null src/distrib/amd64/cdroms/spec.in:1.1 --- /dev/null Tue May 14 10:58:41 2024 +++ src/distrib/amd64/cdroms/spec.in Tue May 14 10:58:41 2024 @@ -0,0 +1,6 @@ +./boot type=file uname=root gname=wheel mode=644 +./install.sh type=file uname=root gname=wheel mode=755 +./mnt2 type=dir uname=root gname=wheel mode=755 +./netbsd type=file uname=root gname=wheel mode=644 +./targetroot type=dir uname=root gname=wheel mode=755 +./etc/gettytab type=link uname=root gname=wheel mode=755
CVS commit: src/distrib/amd64/cdroms
Module Name:src Committed By: christos Date: Tue May 14 14:58:41 UTC 2024 Modified Files: src/distrib/amd64/cdroms: Makefile.cdrom Added Files: src/distrib/amd64/cdroms: spec.in Log Message: Add the extra spec for the amd64 cdroms To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/distrib/amd64/cdroms/Makefile.cdrom cvs rdiff -u -r0 -r1.1 src/distrib/amd64/cdroms/spec.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: christos Date: Tue May 14 14:58:05 UTC 2024 Modified Files: src/distrib/common: Makefile.bootcd Log Message: Put back -xx (this will break some archs but we'll fix them) and automatically generate the spec for the machine-specific portions of the cdrom. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/common
Module Name:src Committed By: christos Date: Tue May 14 14:58:05 UTC 2024 Modified Files: src/distrib/common: Makefile.bootcd Log Message: Put back -xx (this will break some archs but we'll fix them) and automatically generate the spec for the machine-specific portions of the cdrom. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.bootcd diff -u src/distrib/common/Makefile.bootcd:1.52 src/distrib/common/Makefile.bootcd:1.53 --- src/distrib/common/Makefile.bootcd:1.52 Thu May 9 12:09:03 2024 +++ src/distrib/common/Makefile.bootcd Tue May 14 10:58:05 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootcd,v 1.52 2024/05/09 16:09:03 christos Exp $ +# $NetBSD: Makefile.bootcd,v 1.53 2024/05/14 14:58:05 christos Exp $ # # Makefile snipped to create a CD/DVD ISO # @@ -285,7 +285,7 @@ copy-releasedir: fi;\ ${CDSETSCMD} ./maketars -i "${CUROBJDIR}/cdrom" \ ${CD_METALOG.unpriv} ${mtunpriv} -N ${NETBSDSRCDIR}/etc \ - -F "${CUROBJDIR}/cdrom/etc/mtree" \ + -xx -F "${CUROBJDIR}/cdrom/etc/mtree" \ -d "${DESTDIR:S,^$,/,}" ${set} .endfor if [ -d "${CUROBJDIR}/cdrom/var/spool/ftp/hidden" ]; then \ @@ -322,8 +322,12 @@ image: .if defined(SPEC_EXTRA) cat ${SPEC_EXTRA} >> ${WORKSPEC} .endif - if [ ! -s ${WORKSPEC} ]; then ${MAKESPEC} cdrom > ${WORKSPEC}; fi - ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 -F ${WORKSPEC} \ + if [ ! -s ${WORKSPEC} ]; then \ + ${MAKESPEC} -d cdrom . > ${WORKSPEC}; \ + else \ + ${MAKESPEC} -d cdrom ${MACHINE} >> ${WORKSPEC}; \ + fi + ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 -F ${WORKSPEC} -xx \ ${MAKEFS_TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} \ ${CDIMAGE} cdrom
CVS commit: src/etc
Module Name:src Committed By: christos Date: Tue May 14 14:57:09 UTC 2024 Modified Files: src/etc: makespec Log Message: Allow specific subdirectories to be added to the list To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/makespec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/makespec diff -u src/etc/makespec:1.1 src/etc/makespec:1.2 --- src/etc/makespec:1.1 Tue May 7 16:30:33 2024 +++ src/etc/makespec Tue May 14 10:57:08 2024 @@ -55,17 +55,40 @@ gettype() { esac } -if [ -z "$1" ]; then - echo "Usage: $0 " 1>&2 +usage() { + echo "Usage: $0 -d ..." 1>&2 exit 1 +} + + +while getopts "d:" i; do + case $i in + d) + DIR="$OPTARG";; + *) + usage;; + esac +done + +shift $((OPTIND - 1)) + +if [ -z "$DIR" ] || [ -z "$1" ]; then + usage fi -cd "$1" -for i in $TYPES; do +cd "$DIR" + +for d; do + case $d in + .);; + *) d="./$d";; + esac + for i in $TYPES; do - t=$(gettype $i) - m=$(getmode $i) - find . -type $i -exec \ - printf "%s type=$t uname=root gname=wheel mode=$m\n" {} \; + t=$(gettype $i) + m=$(getmode $i) + find $d -type $i -exec \ + printf "%s type=$t uname=root gname=wheel mode=$m\n" {} \; + done done | sort
CVS commit: src/etc
Module Name:src Committed By: christos Date: Tue May 14 14:57:09 UTC 2024 Modified Files: src/etc: makespec Log Message: Allow specific subdirectories to be added to the list To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/makespec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib
Module Name:src Committed By: riastradh Date: Tue May 14 14:55:44 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c src/tests/lib/libm: t_fenv.c Log Message: t_fpsetmask, t_fenv: Skip fp exception trap tests on RISC-V. No architectural support for fp exception traps. While here, make the macros behave a little better as C statements. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libc/gen/t_fpsetmask.c cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_fenv.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/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.21 src/tests/lib/libc/gen/t_fpsetmask.c:1.22 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.21 Sun Aug 23 11:04:58 2020 +++ src/tests/lib/libc/gen/t_fpsetmask.c Tue May 14 14:55:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.21 2020/08/23 11:04:58 gson Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.22 2024/05/14 14:55:43 riastradh Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -61,16 +61,25 @@ ATF_TC_BODY(no_test, tc) #if (__arm__ && !__SOFTFP__) || __aarch64__ /* * Some NEON fpus do not trap on IEEE 754 FP exceptions. - * skip these tests if running on them and compiled for + * Skip these tests if running on them and compiled for * hard float. */ -#define FPU_PREREQ() \ - if (0 == fpsetmask(fpsetmask(FP_X_INV))) \ - atf_tc_skip("FPU does not implement traps on FP exceptions"); +#define FPU_PREREQ() do \ +{ \ + if (0 == fpsetmask(fpsetmask(FP_X_INV))) \ + atf_tc_skip("FPU does not implement traps on FP exceptions"); \ +} while (0) +#endif + +#ifdef __riscv__ +#ifdef __riscv__ +#define FPU_PREREQ() \ + atf_tc_skip("RISC-V does not support floating-point exception traps") +#endif #endif #ifndef FPU_PREREQ -#define FPU_PREREQ() /* nothing */ +#define FPU_PREREQ() __nothing #endif void sigfpe(int, siginfo_t *, void *); Index: src/tests/lib/libm/t_fenv.c diff -u src/tests/lib/libm/t_fenv.c:1.17 src/tests/lib/libm/t_fenv.c:1.18 --- src/tests/lib/libm/t_fenv.c:1.17 Sun May 12 21:53:26 2024 +++ src/tests/lib/libm/t_fenv.c Tue May 14 14:55:44 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fenv.c,v 1.17 2024/05/12 21:53:26 riastradh Exp $ */ +/* $NetBSD: t_fenv.c,v 1.18 2024/05/14 14:55:44 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fenv.c,v 1.17 2024/05/12 21:53:26 riastradh Exp $"); +__RCSID("$NetBSD: t_fenv.c,v 1.18 2024/05/14 14:55:44 riastradh Exp $"); #include @@ -52,28 +52,37 @@ __RCSID("$NetBSD: t_fenv.c,v 1.17 2024/0 #if (__arm__ && !__SOFTFP__) || __aarch64__ /* - * Some NEON fpus do not trap on IEEE 754 FP exceptions. + * Some NEON fpus do not trap on IEEE 754 FP exceptions. * Skip these tests if running on them and compiled for * hard float. */ -#define FPU_EXC_PREREQ() \ - if (0 == fpsetmask(fpsetmask(FP_X_INV))) \ - atf_tc_skip("FPU does not implement traps on FP exceptions"); +#define FPU_EXC_PREREQ() do \ +{ \ + if (0 == fpsetmask(fpsetmask(FP_X_INV))) \ + atf_tc_skip("FPU does not implement traps on FP exceptions"); \ +} while (0) /* * Same as above: some don't allow configuring the rounding mode. */ -#define FPU_RND_PREREQ() \ - if (0 == fpsetround(fpsetround(FP_RZ)))\ - atf_tc_skip("FPU does not implement configurable " \ - "rounding modes"); +#define FPU_RND_PREREQ() do \ +{ \ + if (0 == fpsetround(fpsetround(FP_RZ))) \ + atf_tc_skip("FPU does not implement configurable " \ + "rounding modes"); \ +} while (0) +#endif + +#ifdef __riscv__ +#define FPU_EXC_PREREQ() \ + atf_tc_skip("RISC-V does not support floating-point exception traps") #endif #ifndef FPU_EXC_PREREQ -#define FPU_EXC_PREREQ() /* nothing */ +#define FPU_EXC_PREREQ() __nothing #endif #ifndef FPU_RND_PREREQ -#define FPU_RND_PREREQ() /* nothing */ +#define FPU_RND_PREREQ() __nothing #endif
CVS commit: src/tests/lib
Module Name:src Committed By: riastradh Date: Tue May 14 14:55:44 UTC 2024 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c src/tests/lib/libm: t_fenv.c Log Message: t_fpsetmask, t_fenv: Skip fp exception trap tests on RISC-V. No architectural support for fp exception traps. While here, make the macros behave a little better as C statements. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libc/gen/t_fpsetmask.c cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm
Module Name:src Committed By: riastradh Date: Tue May 14 14:34:35 UTC 2024 Modified Files: src/lib/libm: Makefile Added Files: src/lib/libm: m.powerpc64.expsym Log Message: libm: Fix powerpc64 build. - Include fenv.c and fma(3) symbols (which just use the FMADD instruction). - Note the .FN symbols in libm for the asm functions. The FN symbols point at the function _descriptors_; the .FN symbols point at the first instruction of the function. XXX Unclear why we have the .FN symbols for asm functions but not for C functions. I'm not sure we should be exporting them. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/lib/libm/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libm/m.powerpc64.expsym Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.234 src/lib/libm/Makefile:1.235 --- src/lib/libm/Makefile:1.234 Thu May 9 14:42:09 2024 +++ src/lib/libm/Makefile Tue May 14 14:34:35 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.234 2024/05/09 14:42:09 riastradh Exp $ +# $NetBSD: Makefile,v 1.235 2024/05/14 14:34:35 riastradh Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -194,7 +194,7 @@ ARCH_SRCS += s_fmax.S s_fmaxf.S ARCH_SRCS += s_fmin.S s_fminf.S .endif -.elif (${LIBC_MACHINE_ARCH} == "powerpc") +.elif (${LIBC_MACHINE_CPU} == "powerpc") .PATH: ${.CURDIR}/arch/powerpc .if ${MKSOFTFLOAT} == "no" COMMON_SRCS += fenv.c Added files: Index: src/lib/libm/m.powerpc64.expsym diff -u /dev/null src/lib/libm/m.powerpc64.expsym:1.1 --- /dev/null Tue May 14 14:34:35 2024 +++ src/lib/libm/m.powerpc64.expsym Tue May 14 14:34:35 2024 @@ -0,0 +1,479 @@ +._fini +._init +.fma +.fmaf +__c99_cabs +__c99_cabsf +__c99_cabsl +__divdc3 +__divsc3 +__divtc3 +__exp__D +__fe_dfl_env +__ieee754_acos +__ieee754_acosf +__ieee754_acosh +__ieee754_acoshf +__ieee754_asin +__ieee754_asinf +__ieee754_atan2 +__ieee754_atan2f +__ieee754_atanh +__ieee754_atanhf +__ieee754_cosh +__ieee754_coshf +__ieee754_exp +__ieee754_expf +__ieee754_fmod +__ieee754_fmodf +__ieee754_fmodl +__ieee754_hypot +__ieee754_hypotf +__ieee754_j0 +__ieee754_j0f +__ieee754_j1 +__ieee754_j1f +__ieee754_jn +__ieee754_jnf +__ieee754_lgamma_r +__ieee754_lgammaf_r +__ieee754_log +__ieee754_log10 +__ieee754_log10f +__ieee754_log2 +__ieee754_log2f +__ieee754_logf +__ieee754_pow +__ieee754_powf +__ieee754_rem_pio2 +__ieee754_rem_pio2f +__ieee754_remainder +__ieee754_remainderf +__ieee754_scalb +__ieee754_scalbf +__ieee754_sinh +__ieee754_sinhf +__ieee754_sqrt +__ieee754_sqrtf +__ieee754_y0 +__ieee754_y0f +__ieee754_y1 +__ieee754_y1f +__ieee754_yn +__ieee754_ynf +__kernel_cos +__kernel_cosf +__kernel_rem_pio2 +__kernel_rem_pio2f +__kernel_sin +__kernel_sinf +__kernel_standard +__kernel_tan +__kernel_tanf +__log__D +__muldc3 +__mulsc3 +__multc3 +_acoshl +_acosl +_asin +_asinf +_asinhl +_asinl +_atan2 +_atan2f +_atan2l +_atanhl +_atanl +_casin +_casinf +_casinl +_catan +_catanf +_catanl +_cbrtl +_cchsh +_cchshf +_cchshl +_ceill +_copysignl +_cos +_cosf +_cosh +_coshf +_coshl +_cosl +_cospi +_cospif +_cospil +_ctans +_ctansf +_ctansl +_end +_erfcl +_erfl +_exp +_exp2l +_expf +_expl +_expm1l +_fdlib_version +_feclearexcept +_fedisableexcept +_feenableexcept +_fegetenv +_fegetexcept +_fegetexceptflag +_fegetround +_feholdexcept +_feraiseexcept +_fesetenv +_fesetexceptflag +_fesetround +_fetestexcept +_feupdateenv +_fini +_finite +_finitef +_floorl +_fmodl +_hypot +_hypotf +_hypotl +_init +_lgammal +_lgammal_r +_log +_log10l +_log1pl +_log2l +_logf +_logl +_modfl +_powl +_redupi +_redupif +_redupil +_remquo +_remquof +_remquol +_roundl +_scalbln +_scalblnf +_scalblnl +_scalbn +_scalbnf +_scalbnl +_sin +_sincos +_sincosf +_sincosl +_sinf +_sinh +_sinhf +_sinhl +_sinl +_sinpi +_sinpif +_sinpil +_sqrtl +_tan +_tanf +_tanhl +_tanl +_tanpi +_tanpif +_tanpil +_tgammal +_truncl +acos +acosf +acosh +acoshf +acoshl +acosl +asin +asinf +asinh +asinhf +asinhl +asinl +atan +atan2 +atan2f +atan2l +atanf +atanh +atanhf +atanhl +atanl +cabs +cabsf +cacos +cacosf +cacosh +cacoshf +cacoshl +cacosl +carg +cargf +cargl +casin +casinf +casinh +casinhf +casinhl +casinl +catan +catanf +catanh +catanhf +catanhl +catanl +cbrt +cbrtf +cbrtl +ccos +ccosf +ccosh +ccoshf +ccoshl +ccosl +ceil +ceilf +ceill +cexp +cexpf +cexpl +cimag +cimagf +cimagl +clog +clogf +clogl +conj +conjf +conjl +copysign +copysignf +copysignl +cos +cosf +cosh +coshf +coshl +cosl +cospi +cospif +cospil +cpow +cpowf +cpowl +cproj +cprojf +cprojl +creal +crealf +creall +csin +csinf +csinh +csinhf +csinhl +csinl +csqrt +csqrtf +csqrtl +ctan +ctanf +ctanh +ctanhf +ctanhl +ctanl +drem +dremf +erf +erfc +erfcf +erfcl +erff +erfl +exp +exp2 +exp2f +exp2l +expf +expl +expm1 +expm1f +expm1l +fabsf +fdim +fdimf +fdiml +feclearexcept +fedisableexcept +feenableexcept +fegetenv +fegetexcept +fegetexceptflag +fegetround +feholdexcept +feraiseexcept
CVS commit: src/lib/libm
Module Name:src Committed By: riastradh Date: Tue May 14 14:34:35 UTC 2024 Modified Files: src/lib/libm: Makefile Added Files: src/lib/libm: m.powerpc64.expsym Log Message: libm: Fix powerpc64 build. - Include fenv.c and fma(3) symbols (which just use the FMADD instruction). - Note the .FN symbols in libm for the asm functions. The FN symbols point at the function _descriptors_; the .FN symbols point at the first instruction of the function. XXX Unclear why we have the .FN symbols for asm functions but not for C functions. I'm not sure we should be exporting them. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/lib/libm/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libm/m.powerpc64.expsym 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
Module Name:src Committed By: riastradh Date: Tue May 14 13:41:15 UTC 2024 Modified Files: src/sys/dev/ic: tpm.c Log Message: tpm(4): device_printf needs \n. Observed in PR 58255. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/tpm.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/tpm.c diff -u src/sys/dev/ic/tpm.c:1.28 src/sys/dev/ic/tpm.c:1.29 --- src/sys/dev/ic/tpm.c:1.28 Tue Jul 4 01:02:26 2023 +++ src/sys/dev/ic/tpm.c Tue May 14 13:41:15 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.28 2023/07/04 01:02:26 riastradh Exp $ */ +/* $NetBSD: tpm.c,v 1.29 2024/05/14 13:41:15 riastradh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.28 2023/07/04 01:02:26 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.29 2024/05/14 13:41:15 riastradh Exp $"); #include #include @@ -150,7 +150,7 @@ tpm12_suspend(struct tpm_softc *sc) */ error = (*sc->sc_intf->start)(sc, UIO_WRITE); if (error) { - device_printf(sc->sc_dev, "start write failed: %d", error); + device_printf(sc->sc_dev, "start write failed: %d\n", error); goto out; } @@ -158,8 +158,8 @@ tpm12_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->write)(sc, , sizeof(command)); if (error) { - device_printf(sc->sc_dev, "write TPM_ORD_SaveState failed: %d", - error); + device_printf(sc->sc_dev, "write TPM_ORD_SaveState failed:" + " %d\n", error); goto out; } @@ -167,7 +167,7 @@ tpm12_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->end)(sc, UIO_WRITE, 0); if (error) { - device_printf(sc->sc_dev, "end write failed: %d", error); + device_printf(sc->sc_dev, "end write failed: %d\n", error); goto out; } @@ -177,7 +177,7 @@ tpm12_suspend(struct tpm_softc *sc) */ error = (*sc->sc_intf->start)(sc, UIO_READ); if (error) { - device_printf(sc->sc_dev, "start read failed: %d", error); + device_printf(sc->sc_dev, "start read failed: %d\n", error); goto out; } @@ -186,11 +186,11 @@ tpm12_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->read)(sc, , sizeof(response), , 0); if (error) { - device_printf(sc->sc_dev, "read failed: %d", error); + device_printf(sc->sc_dev, "read failed: %d\n", error); goto out; } if (nread != sizeof(response)) { - device_printf(sc->sc_dev, "short header read: %zu", nread); + device_printf(sc->sc_dev, "short header read: %zu\n", nread); goto out; } @@ -198,7 +198,7 @@ tpm12_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->end)(sc, UIO_READ, 0); if (error) { - device_printf(sc->sc_dev, "end read failed: %d", error); + device_printf(sc->sc_dev, "end read failed: %d\n", error); goto out; } @@ -209,7 +209,8 @@ tpm12_suspend(struct tpm_softc *sc) be32toh(response.length) != sizeof(response) || be32toh(response.code) != 0) { device_printf(sc->sc_dev, - "TPM_ORD_SaveState failed: tag=0x%x length=0x%x code=0x%x", + "TPM_ORD_SaveState failed:" + " tag=0x%x length=0x%x code=0x%x\n", be16toh(response.tag), be32toh(response.length), be32toh(response.code)); @@ -248,7 +249,7 @@ tpm20_suspend(struct tpm_softc *sc) */ error = (*sc->sc_intf->start)(sc, UIO_WRITE); if (error) { - device_printf(sc->sc_dev, "start write failed: %d", error); + device_printf(sc->sc_dev, "start write failed: %d\n", error); goto out; } @@ -256,8 +257,8 @@ tpm20_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->write)(sc, , sizeof(command)); if (error) { - device_printf(sc->sc_dev, "write TPM_ORD_SaveState failed: %d", - error); + device_printf(sc->sc_dev, "write TPM_ORD_SaveState failed:" + " %d\n", error); goto out; } @@ -265,7 +266,7 @@ tpm20_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->end)(sc, UIO_WRITE, 0); if (error) { - device_printf(sc->sc_dev, "end write failed: %d", error); + device_printf(sc->sc_dev, "end write failed: %d\n", error); goto out; } @@ -275,7 +276,7 @@ tpm20_suspend(struct tpm_softc *sc) */ error = (*sc->sc_intf->start)(sc, UIO_READ); if (error) { - device_printf(sc->sc_dev, "start read failed: %d", error); + device_printf(sc->sc_dev, "start read failed: %d\n", error); goto out; } @@ -284,11 +285,11 @@ tpm20_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->read)(sc, , sizeof(response), , 0); if (error) { - device_printf(sc->sc_dev, "read failed: %d", error); + device_printf(sc->sc_dev, "read failed: %d\n", error); goto out; } if (nread != sizeof(response)) { - device_printf(sc->sc_dev, "short header read: %zu", nread); + device_printf(sc->sc_dev, "short header read: %zu\n", nread); goto out; } @@ -296,7 +297,7 @@ tpm20_suspend(struct tpm_softc *sc) error = (*sc->sc_intf->end)(sc, UIO_READ, 0); if (error) { -
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Tue May 14 13:41:15 UTC 2024 Modified Files: src/sys/dev/ic: tpm.c Log Message: tpm(4): device_printf needs \n. Observed in PR 58255. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/tpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:40:41 UTC 2024 Modified Files: src/lib/libcurses: curses_input.3 Log Message: curses_input(3): bump date for define_key() change To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/curses_input.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/libcurses/curses_input.3 diff -u src/lib/libcurses/curses_input.3:1.31 src/lib/libcurses/curses_input.3:1.32 --- src/lib/libcurses/curses_input.3:1.31 Tue May 14 10:22:48 2024 +++ src/lib/libcurses/curses_input.3 Tue May 14 10:40:41 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_input.3,v 1.31 2024/05/14 10:22:48 uwe Exp $ +.\" $NetBSD: curses_input.3,v 1.32 2024/05/14 10:40:41 uwe Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd May 16, 2022 +.Dd May 14, 2024 .Dt CURSES_INPUT 3 .Os .Sh NAME
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:40:41 UTC 2024 Modified Files: src/lib/libcurses: curses_input.3 Log Message: curses_input(3): bump date for define_key() change To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/curses_input.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:38:16 UTC 2024 Modified Files: src/lib/libcurses: curses_termcap.3 Log Message: curses_termcap(3): fullname() termbuf argument is const To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_termcap.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/libcurses/curses_termcap.3 diff -u src/lib/libcurses/curses_termcap.3:1.6 src/lib/libcurses/curses_termcap.3:1.7 --- src/lib/libcurses/curses_termcap.3:1.6 Sat Apr 21 12:27:28 2012 +++ src/lib/libcurses/curses_termcap.3 Tue May 14 10:38:16 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_termcap.3,v 1.6 2012/04/21 12:27:28 roy Exp $ +.\" $NetBSD: curses_termcap.3,v 1.7 2024/05/14 10:38:16 uwe Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd October 4, 2011 +.Dd May 14, 2024 .Dt CURSES_TERMCAP 3 .Os .Sh NAME @@ -42,7 +42,7 @@ .Sh SYNOPSIS .In curses.h .Ft char * -.Fn fullname "char *termbuf" "char *name" +.Fn fullname "const char *termbuf" "char *name" .Sh DESCRIPTION The .Fn fullname
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:38:16 UTC 2024 Modified Files: src/lib/libcurses: curses_termcap.3 Log Message: curses_termcap(3): fullname() termbuf argument is const To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_termcap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:22:48 UTC 2024 Modified Files: src/lib/libcurses: curses.h curses_input.3 getch.c Log Message: curse: constify define_key() argument define_key() is ncurses extension and ncurses defines its first argument as "const char *". Follow suit. PR lib/58254 To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/lib/libcurses/curses.h cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/curses_input.3 cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/getch.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/libcurses/curses.h diff -u src/lib/libcurses/curses.h:1.130 src/lib/libcurses/curses.h:1.131 --- src/lib/libcurses/curses.h:1.130 Sat Feb 13 10:37:00 2021 +++ src/lib/libcurses/curses.h Tue May 14 10:22:48 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.130 2021/02/13 10:37:00 rillig Exp $ */ +/* $NetBSD: curses.h,v 1.131 2024/05/14 10:22:48 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -652,7 +652,7 @@ int copywin(const WINDOW *, WINDOW *, i int curs_set(int); int def_prog_mode(void); int def_shell_mode(void); -int define_key(char *, int); +int define_key(const char *, int); int delay_output(int); void delscreen(SCREEN *); int delwin(WINDOW *); Index: src/lib/libcurses/curses_input.3 diff -u src/lib/libcurses/curses_input.3:1.30 src/lib/libcurses/curses_input.3:1.31 --- src/lib/libcurses/curses_input.3:1.30 Sat May 21 12:34:44 2022 +++ src/lib/libcurses/curses_input.3 Tue May 14 10:22:48 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_input.3,v 1.30 2022/05/21 12:34:44 uwe Exp $ +.\" $NetBSD: curses_input.3,v 1.31 2024/05/14 10:22:48 uwe Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au) @@ -76,7 +76,7 @@ .Ft int .Fn has_key "int key_symbol" .Ft int -.Fn define_key "char *sequence" "int key_symbol" +.Fn define_key "const char *sequence" "int key_symbol" .Ft int .Fn getnstr "char *str" "int limit" .Ft int Index: src/lib/libcurses/getch.c diff -u src/lib/libcurses/getch.c:1.78 src/lib/libcurses/getch.c:1.79 --- src/lib/libcurses/getch.c:1.78 Tue Oct 19 06:37:29 2021 +++ src/lib/libcurses/getch.c Tue May 14 10:22:48 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $ */ +/* $NetBSD: getch.c,v 1.79 2024/05/14 10:22:48 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $"); +__RCSID("$NetBSD: getch.c,v 1.79 2024/05/14 10:22:48 uwe Exp $"); #endif #endif /* not lint */ @@ -211,7 +211,7 @@ static wchar_t inbuf[INBUF_SZ]; static int start, end, working; /* pointers for manipulating inbuf data */ /* prototypes for private functions */ -static void add_key_sequence(SCREEN *screen, char *sequence, int key_type); +static void add_key_sequence(SCREEN *screen, const char *sequence, int key_type); static key_entry_t *add_new_key(keymap_t *current, char ch, int key_type, int symbol); static void delete_key_sequence(keymap_t *current, int key_type); @@ -370,7 +370,7 @@ delete_key_sequence(keymap_t *current, i * for the given key symbol. */ static void -add_key_sequence(SCREEN *screen, char *sequence, int key_type) +add_key_sequence(SCREEN *screen, const char *sequence, int key_type) { key_entry_t *tmp_key; keymap_t *current; @@ -762,7 +762,7 @@ do_keyok(keymap_t *current, int key_type * */ int -define_key(char *sequence, int symbol) +define_key(const char *sequence, int symbol) { if (symbol <= 0 || _cursesi_screen == NULL)
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Tue May 14 10:22:48 UTC 2024 Modified Files: src/lib/libcurses: curses.h curses_input.3 getch.c Log Message: curse: constify define_key() argument define_key() is ncurses extension and ncurses defines its first argument as "const char *". Follow suit. PR lib/58254 To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/lib/libcurses/curses.h cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/curses_input.3 cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/getch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/bin/echo
On Tue, May 14, 2024 at 01:32:25 +, David H. Gutteridge wrote: > Log Message: > echo.1: borrow advice about printf(1) from the OpenBSD man page Unfortunately that advice is not true without further caveats. netbsd$ sh -c "printf '-V\n'" -V $ busybox sh -c "printf '-V\n'" -V ubuntu$ $ dash -c "printf '-V\n'" dash: 1: printf: Illegal option -V $ bash -c "printf '-V\n'" bash: line 1: printf: -V: invalid option printf: usage: printf [-v var] format [arguments] -uwe