CVS commit: src
Module Name:src Committed By: tsutsui Date: Sun Jun 12 03:51:13 UTC 2022 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/man: mi src/etc/mtree: NetBSD.dist.base src/share/man/man4: Makefile Added Files: src/share/man/man4/man4.luna68k: Makefile autoconf.4 intro.4 lcd.4 mem.4 xp.4 Log Message: Add luna68k specific section 4 man pages. Taken from mostly OpenBSD/luna88k and partially NetBSD/hp300. To generate a diff of this commit: cvs rdiff -u -r1.1309 -r1.1310 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1748 -r1.1749 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.245 -r1.246 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.723 -r1.724 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.luna68k/Makefile \ src/share/man/man4/man4.luna68k/autoconf.4 \ src/share/man/man4/man4.luna68k/intro.4 \ src/share/man/man4/man4.luna68k/lcd.4 \ src/share/man/man4/man4.luna68k/mem.4 \ src/share/man/man4/man4.luna68k/xp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sun Jun 12 03:51:13 UTC 2022 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/man: mi src/etc/mtree: NetBSD.dist.base src/share/man/man4: Makefile Added Files: src/share/man/man4/man4.luna68k: Makefile autoconf.4 intro.4 lcd.4 mem.4 xp.4 Log Message: Add luna68k specific section 4 man pages. Taken from mostly OpenBSD/luna88k and partially NetBSD/hp300. To generate a diff of this commit: cvs rdiff -u -r1.1309 -r1.1310 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1748 -r1.1749 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.245 -r1.246 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.723 -r1.724 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.luna68k/Makefile \ src/share/man/man4/man4.luna68k/autoconf.4 \ src/share/man/man4/man4.luna68k/intro.4 \ src/share/man/man4/man4.luna68k/lcd.4 \ src/share/man/man4/man4.luna68k/mem.4 \ src/share/man/man4/man4.luna68k/xp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1309 src/distrib/sets/lists/base/mi:1.1310 --- src/distrib/sets/lists/base/mi:1.1309 Wed Jun 8 19:27:37 2022 +++ src/distrib/sets/lists/base/mi Sun Jun 12 03:51:13 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1309 2022/06/08 19:27:37 uwe Exp $ +# $NetBSD: mi,v 1.1310 2022/06/12 03:51:13 tsutsui Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -4206,6 +4206,7 @@ ./usr/share/man/cat4/hpcsh base-man-share ./usr/share/man/cat4/hppa base-man-share ./usr/share/man/cat4/i386 base-man-share +./usr/share/man/cat4/luna68k base-man-share ./usr/share/man/cat4/mac68k base-man-share ./usr/share/man/cat4/macppc base-man-share ./usr/share/man/cat4/mvme68k base-man-share @@ -4336,6 +4337,7 @@ ./usr/share/man/html4/hpcsh base-man-share ./usr/share/man/html4/hppa base-man-share ./usr/share/man/html4/i386 base-man-share +./usr/share/man/html4/luna68k base-man-share ./usr/share/man/html4/mac68k base-man-share ./usr/share/man/html4/macppc base-man-share ./usr/share/man/html4/mvme68k base-man-share @@ -4467,6 +4469,7 @@ ./usr/share/man/man4/hpcsh base-man-share ./usr/share/man/man4/hppa base-man-share ./usr/share/man/man4/i386 base-man-share +./usr/share/man/man4/luna68k base-man-share ./usr/share/man/man4/mac68k base-man-share ./usr/share/man/man4/macppc base-man-share ./usr/share/man/man4/mvme68k base-man-share Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1748 src/distrib/sets/lists/man/mi:1.1749 --- src/distrib/sets/lists/man/mi:1.1748 Mon Jun 6 10:56:27 2022 +++ src/distrib/sets/lists/man/mi Sun Jun 12 03:51:13 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1748 2022/06/06 10:56:27 nia Exp $ +# $NetBSD: mi,v 1.1749 2022/06/12 03:51:13 tsutsui Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1432,6 +1432,12 @@ ./usr/share/man/cat4/lo.0 man-sys-catman .cat ./usr/share/man/cat4/lsu.0 man-obsolete obsolete ./usr/share/man/cat4/lua.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/autoconf.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/intro.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/kmem.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/lcd.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/mem.0 man-sys-catman .cat +./usr/share/man/cat4/luna68k/xp.0 man-sys-catman .cat ./usr/share/man/cat4/lxtphy.0 man-sys-catman .cat ./usr/share/man/cat4/m25p.0 man-sys-catman .cat ./usr/share/man/cat4/mac68k/adb.0 man-obsolete obsolete @@ -4654,6 +4660,12 @@ ./usr/share/man/html4/lmtemp.html man-sys-htmlman html ./usr/share/man/html4/lo.html man-sys-htmlman html ./usr/share/man/html4/lua.html man-sys-htmlman html +./usr/share/man/html4/luna68k/autoconf.html man-sys-htmlman html +./usr/share/man/html4/luna68k/intro.html man-sys-htmlman html +./usr/share/man/html4/luna68k/kmem.html man-sys-htmlman html +./usr/share/man/html4/luna68k/lcd.html man-sys-htmlman html +./usr/share/man/html4/luna68k/mem.html man-sys-htmlman html +./usr/share/man/html4/luna68k/xp.html man-sys-htmlman html ./usr/share/man/html4/lxtphy.html man-sys-htmlman html ./usr/share/man/html4/m25p.html man-sys-htmlman html ./usr/share/man/html4/mac68k/ae.html man-sys-htmlman html @@ -7718,6 +7730,12 @@ ./usr/share/man/man4/lo.4 man-sys-man .man ./usr/share/man/man4/lsu.4 man-obsolete obsolete ./usr/share/man/man4/lua.4 man-sys-man .man +./usr/share/man/man4/luna68k/autoconf.4 man-sys-man .man +./usr/share/man/man4/luna68k/intro.4 man-sys-man .man +./usr/share/man/man4/luna68k/kmem.4 man-sys-man .man +./usr/share/man/man4/luna68k/lcd.4
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Sat Jun 11 19:23:26 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistctl.c Log Message: fix usage for ctl too (Jose Luis Duran) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/blocklistctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Sat Jun 11 19:23:26 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistctl.c Log Message: fix usage for ctl too (Jose Luis Duran) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/blocklistctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blocklist/bin/blocklistctl.c diff -u src/external/bsd/blocklist/bin/blocklistctl.c:1.1.1.1 src/external/bsd/blocklist/bin/blocklistctl.c:1.2 --- src/external/bsd/blocklist/bin/blocklistctl.c:1.1.1.1 Sun Jun 14 21:52:53 2020 +++ src/external/bsd/blocklist/bin/blocklistctl.c Sat Jun 11 15:23:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: blocklistctl.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */ +/* $NetBSD: blocklistctl.c,v 1.2 2022/06/11 19:23:26 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: blocklistctl.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $"); +__RCSID("$NetBSD: blocklistctl.c,v 1.2 2022/06/11 19:23:26 christos Exp $"); #include #include @@ -61,7 +61,7 @@ usage(int c) { if (c == 0) warnx("Missing/unknown command"); - else + else if (c != '?') warnx("Unknown option `%c'", (char)c); fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); exit(EXIT_FAILURE); @@ -123,7 +123,6 @@ main(int argc, char *argv[]) break; default: usage(o); - break; } db = state_open(dbname, O_RDONLY, 0);
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Sat Jun 11 19:15:58 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistd.c Log Message: fix usage error (Jose Luis Duran) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/blocklistd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Sat Jun 11 19:15:58 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistd.c Log Message: fix usage error (Jose Luis Duran) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/blocklistd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blocklist/bin/blocklistd.c diff -u src/external/bsd/blocklist/bin/blocklistd.c:1.1.1.1 src/external/bsd/blocklist/bin/blocklistd.c:1.2 --- src/external/bsd/blocklist/bin/blocklistd.c:1.1.1.1 Sun Jun 14 21:52:53 2020 +++ src/external/bsd/blocklist/bin/blocklistd.c Sat Jun 11 15:15:58 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: blocklistd.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blocklistd.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $"); +__RCSID("$NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $"); #include #include @@ -105,7 +105,7 @@ sigdone(int n __unused) static __dead void usage(int c) { - if (c) + if (c != '?') warnx("Unknown option `%c'", (char)c); fprintf(stderr, "Usage: %s [-vdfr] [-c ] [-R ] " "[-P ] [-C ] [-D ] " @@ -474,7 +474,7 @@ main(int argc, char *argv[]) argc -= optind; if (argc) - usage(0); + usage('?'); signal(SIGHUP, sighup); signal(SIGINT, sigdone);
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 18:30:02 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl Log Message: Slightly improved error handling when converion from one partition table format to another is not lossless. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/msg.mi.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.82 src/usr.sbin/sysinst/disks.c:1.83 --- src/usr.sbin/sysinst/disks.c:1.82 Thu Jun 9 18:26:06 2022 +++ src/usr.sbin/sysinst/disks.c Sat Jun 11 18:30:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.82 2022/06/09 18:26:06 martin Exp $ */ +/* $NetBSD: disks.c,v 1.83 2022/06/11 18:30:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -779,12 +779,13 @@ delete_scheme(struct pm_devs *p) } -static void +static bool convert_copy(struct disk_partitions *old_parts, struct disk_partitions *new_parts) { struct disk_part_info oinfo, ninfo; part_id i; + bool err = false; for (i = 0; i < old_parts->num_part; i++) { if (!old_parts->pscheme->get_part_info(old_parts, i, )) @@ -799,17 +800,23 @@ convert_copy(struct disk_partitions *old old_parts->pscheme-> secondary_partitions( old_parts, oinfo.start, false); -if (sec_part) - convert_copy(sec_part, new_parts); +if (sec_part && !convert_copy(sec_part, +new_parts)) + err = true; } continue; } if (!new_parts->pscheme->adapt_foreign_part_info(new_parts, - , old_parts->pscheme, )) + , old_parts->pscheme, )) { + err = true; continue; - new_parts->pscheme->add_partition(new_parts, , NULL); + } + if (!new_parts->pscheme->add_partition(new_parts, , + NULL)) + err = true; } + return !err; } bool @@ -838,10 +845,10 @@ convert_scheme(struct pm_devs *p, bool i return false; } - convert_copy(old_parts, new_parts); - - if (new_parts->num_part == 0 && old_parts->num_part != 0) { + if (!convert_copy(old_parts, new_parts)) { /* need to cleanup */ + if (err_msg) + *err_msg = MSG_cvtscheme_error; new_parts->pscheme->free(new_parts); return false; } Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.39 src/usr.sbin/sysinst/msg.mi.de:1.40 --- src/usr.sbin/sysinst/msg.mi.de:1.39 Thu Jun 9 18:26:06 2022 +++ src/usr.sbin/sysinst/msg.mi.de Sat Jun 11 18:30:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.39 2022/06/09 18:26:06 martin Exp $ */ +/* $NetBSD: msg.mi.de,v 1.40 2022/06/11 18:30:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -305,6 +305,8 @@ message cvtscheme_keep {beibehalten (nu message cvtscheme_delete {löschen (alle Daten gehen verloren!)} message cvtscheme_convert {in ein anderes Schema konvertieren} message cvtscheme_abort {abbrechen} +message cvtscheme_error +{Nicht alle Partitionen konnten übernommen werden} /* Called with:Example * $0 = device name wd0 Index: src/usr.sbin/sysinst/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.42 src/usr.sbin/sysinst/msg.mi.en:1.43 --- src/usr.sbin/sysinst/msg.mi.en:1.42 Thu Jun 9 18:26:06 2022 +++ src/usr.sbin/sysinst/msg.mi.en Sat Jun 11 18:30:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.42 2022/06/09 18:26:06 martin Exp $ */ +/* $NetBSD: msg.mi.en,v 1.43 2022/06/11 18:30:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -292,6 +292,8 @@ message cvtscheme_keep {keep (use only message cvtscheme_delete {delete (all data will be lost!)} message cvtscheme_convert {convert to another partitioning method} message cvtscheme_abort {abort} +message cvtscheme_error +{Could not convert all partitions} /* Called with:Example * $0 = device name wd0 Index: src/usr.sbin/sysinst/msg.mi.es diff -u src/usr.sbin/sysinst/msg.mi.es:1.35 src/usr.sbin/sysinst/msg.mi.es:1.36 --- src/usr.sbin/sysinst/msg.mi.es:1.35 Thu Jun 9 18:26:06 2022 +++ src/usr.sbin/sysinst/msg.mi.es Sat Jun 11 18:30:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.es,v 1.35 2022/06/09 18:26:06 martin Exp $ */ +/* $NetBSD: msg.mi.es,v 1.36 2022/06/11 18:30:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -299,6 +299,8 @@ message cvtscheme_keep {keep (use only message cvtscheme_delete {delete (all data will be lost!)} message cvtscheme_convert {convert to another partitioning method} message cvtscheme_abort {abort} +message cvtscheme_error +{Could not
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 18:30:02 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl Log Message: Slightly improved error handling when converion from one partition table format to another is not lossless. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/msg.mi.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 18:27:22 UTC 2022 Modified Files: src/usr.sbin/sysinst: label.c Log Message: Avoid integer arithmetic overflow when checking a partition table without any partitions. Fix some comments. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/label.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.35 src/usr.sbin/sysinst/label.c:1.36 --- src/usr.sbin/sysinst/label.c:1.35 Sat Jun 11 15:41:19 2022 +++ src/usr.sbin/sysinst/label.c Sat Jun 11 18:27:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $ */ +/* $NetBSD: label.c,v 1.36 2022/06/11 18:27:22 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.36 2022/06/11 18:27:22 martin Exp $"); #endif #include @@ -101,7 +101,7 @@ real_partition(const struct partition_us /* * Check partitioning for overlapping partitions. - * Returns 0 if no overlapping partition found, nonzero otherwise. + * Returns true if no overlapping partition found. * Sets reference arguments ovly1 and ovly2 to the indices of * overlapping partitions if any are found. */ @@ -114,6 +114,9 @@ checklabel(struct disk_partitions *parts daddr_t istart, iend, jstart, jend; unsigned int fs_type, fs_sub_type; + if (parts->num_part == 0) + return true; + for (i = 0; i < parts->num_part - 1; i ++ ) { if (!parts->pscheme->get_part_info(parts, i, )) continue;
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 18:27:22 UTC 2022 Modified Files: src/usr.sbin/sysinst: label.c Log Message: Avoid integer arithmetic overflow when checking a partition table without any partitions. Fix some comments. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/label.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/dkwedge
Module Name:src Committed By: martin Date: Sat Jun 11 18:17:00 UTC 2022 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Since rev 1.101 DIOCAWEDGE could return success without filling in the wedge device name - which is quite confusing for userland. Always fill the name if we return success. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.111 src/sys/dev/dkwedge/dk.c:1.112 --- src/sys/dev/dkwedge/dk.c:1.111 Sat Apr 23 16:22:23 2022 +++ src/sys/dev/dkwedge/dk.c Sat Jun 11 18:17:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.111 2022/04/23 16:22:23 hannken Exp $ */ +/* $NetBSD: dk.c,v 1.112 2022/06/11 18:17:00 martin Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.111 2022/04/23 16:22:23 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.112 2022/06/11 18:17:00 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -483,10 +483,6 @@ dkwedge_add(struct dkwedge_info *dkw) return (ENOMEM); } - /* Return the devname to the caller. */ - strlcpy(dkw->dkw_devname, device_xname(sc->sc_dev), - sizeof(dkw->dkw_devname)); - /* * XXX Really ought to make the disk_attach() and the changing * of state to RUNNING atomic. @@ -508,6 +504,10 @@ announce: sc->sc_size, sc->sc_offset, sc->sc_ptype[0] == '\0' ? "" : sc->sc_ptype); + /* Return the devname to the caller. */ + strlcpy(dkw->dkw_devname, device_xname(sc->sc_dev), + sizeof(dkw->dkw_devname)); + return (0); }
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: martin Date: Sat Jun 11 18:17:00 UTC 2022 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Since rev 1.101 DIOCAWEDGE could return success without filling in the wedge device name - which is quite confusing for userland. Always fill the name if we return success. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/dkwedge/dk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 17:58:15 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: fix memory leak in wildcard targets and sources $ cat <<'EOF' > glob-leak.mk all: @pid=; \ ppid=$$(ps -o ppid -p "$$pid" | sed 1d); \ ps -o vsz,rsz -p $$ppid | sed 1d .for _ in ${:U:${:Urange=$n}} bin/*: source .endfor EOF $ make.before -r -f glob-leak.mk n=1 19424 5280 $ make.before -r -f glob-leak.mk n=10 24220 10208 $ make.before -r -f glob-leak.mk n=100 71280 58504 $ make.before -r -f glob-leak.mk n=1000 556356 541620 $ make.after -r -f glob-leak.mk n=1 19208 5040 $ make.after -r -f glob-leak.mk n=10 22132 8092 $ make.after -r -f glob-leak.mk n=100 49040 35940 $ make.after -r -f glob-leak.mk n=1000 324160 314400 That's a saving of 40% already. The remaining 60% are suspicious as well since after the first iteration of the .for loop, make's internal state doesn't change conceptually, so there's no need to throw more memory at it. To generate a diff of this commit: cvs rdiff -u -r1.678 -r1.679 src/usr.bin/make/parse.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/make/parse.c diff -u src/usr.bin/make/parse.c:1.678 src/usr.bin/make/parse.c:1.679 --- src/usr.bin/make/parse.c:1.678 Sat Jun 11 17:41:35 2022 +++ src/usr.bin/make/parse.c Sat Jun 11 17:58:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.678 2022/06/11 17:41:35 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.679 2022/06/11 17:58:15 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -105,7 +105,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.678 2022/06/11 17:41:35 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.679 2022/06/11 17:58:15 rillig Exp $"); /* * A file being read. @@ -1045,7 +1045,7 @@ HandleDependencyTargetMundane(const char while (!Lst_IsEmpty()) { char *targName = Lst_Dequeue(); HandleSingleDependencyTargetMundane(targName); - /* TODO: free targName */ + free(targName); } } else HandleSingleDependencyTargetMundane(targetName);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 17:58:15 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: fix memory leak in wildcard targets and sources $ cat <<'EOF' > glob-leak.mk all: @pid=; \ ppid=$$(ps -o ppid -p "$$pid" | sed 1d); \ ps -o vsz,rsz -p $$ppid | sed 1d .for _ in ${:U:${:Urange=$n}} bin/*: source .endfor EOF $ make.before -r -f glob-leak.mk n=1 19424 5280 $ make.before -r -f glob-leak.mk n=10 24220 10208 $ make.before -r -f glob-leak.mk n=100 71280 58504 $ make.before -r -f glob-leak.mk n=1000 556356 541620 $ make.after -r -f glob-leak.mk n=1 19208 5040 $ make.after -r -f glob-leak.mk n=10 22132 8092 $ make.after -r -f glob-leak.mk n=100 49040 35940 $ make.after -r -f glob-leak.mk n=1000 324160 314400 That's a saving of 40% already. The remaining 60% are suspicious as well since after the first iteration of the .for loop, make's internal state doesn't change conceptually, so there's no need to throw more memory at it. To generate a diff of this commit: cvs rdiff -u -r1.678 -r1.679 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 17:41:36 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: separate cases in HandleDependencyTargetMundane Most targets do not use wildcards, so there is no need to put the single item into a list. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.677 -r1.678 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 16:47:24 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: extract HandleSingleDependencyTargetMundane No functional change. To generate a diff of this commit: cvs rdiff -u -r1.676 -r1.677 src/usr.bin/make/parse.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/make/parse.c diff -u src/usr.bin/make/parse.c:1.676 src/usr.bin/make/parse.c:1.677 --- src/usr.bin/make/parse.c:1.676 Sat Jun 11 16:43:16 2022 +++ src/usr.bin/make/parse.c Sat Jun 11 16:47:24 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.676 2022/06/11 16:43:16 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.677 2022/06/11 16:47:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -105,7 +105,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.676 2022/06/11 16:43:16 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.677 2022/06/11 16:47:24 rillig Exp $"); /* * A file being read. @@ -1021,6 +1021,18 @@ HandleDependencyTarget(const char *targe } static void +HandleSingleDependencyTargetMundane(const char *name) +{ + GNode *gn = Suff_IsTransform(name) + ? Suff_AddTransform(name) + : Targ_GetNode(name); + if (doing_depend) + RememberLocation(gn); + + Lst_Append(targets, gn); +} + +static void HandleDependencyTargetMundane(char *targetName) { StringList targetNames = LST_INIT; @@ -1034,13 +1046,7 @@ HandleDependencyTargetMundane(char *targ while (!Lst_IsEmpty()) { char *targName = Lst_Dequeue(); - GNode *gn = Suff_IsTransform(targName) - ? Suff_AddTransform(targName) - : Targ_GetNode(targName); - if (doing_depend) - RememberLocation(gn); - - Lst_Append(targets, gn); + HandleSingleDependencyTargetMundane(targName); } }
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 16:47:24 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: extract HandleSingleDependencyTargetMundane No functional change. To generate a diff of this commit: cvs rdiff -u -r1.676 -r1.677 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 16:43:16 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: remove redundant include for stdint.h No functional change. To generate a diff of this commit: cvs rdiff -u -r1.675 -r1.676 src/usr.bin/make/parse.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/make/parse.c diff -u src/usr.bin/make/parse.c:1.675 src/usr.bin/make/parse.c:1.676 --- src/usr.bin/make/parse.c:1.675 Fri Jun 10 22:42:47 2022 +++ src/usr.bin/make/parse.c Sat Jun 11 16:43:16 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.675 2022/06/10 22:42:47 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.676 2022/06/11 16:43:16 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -98,7 +98,6 @@ #include #include #include -#include #include "make.h" #include "dir.h" @@ -106,7 +105,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.675 2022/06/10 22:42:47 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.676 2022/06/11 16:43:16 rillig Exp $"); /* * A file being read.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 16:43:16 UTC 2022 Modified Files: src/usr.bin/make: parse.c Log Message: make: remove redundant include for stdint.h No functional change. To generate a diff of this commit: cvs rdiff -u -r1.675 -r1.676 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:41:56 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/atari: Makefile src/usr.sbin/sysinst/arch/hp300: Makefile src/usr.sbin/sysinst/arch/luna68k: Makefile src/usr.sbin/sysinst/arch/news68k: Makefile src/usr.sbin/sysinst/arch/newsmips: Makefile src/usr.sbin/sysinst/arch/x68k: Makefile Log Message: Pull SMALLPROG stuff to disable unnecessary partitioning methods etc. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/atari/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/hp300/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/luna68k/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/news68k/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/newsmips/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/x68k/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/atari/Makefile diff -u src/usr.sbin/sysinst/arch/atari/Makefile:1.5 src/usr.sbin/sysinst/arch/atari/Makefile:1.6 --- src/usr.sbin/sysinst/arch/atari/Makefile:1.5 Wed Nov 4 14:29:40 2020 +++ src/usr.sbin/sysinst/arch/atari/Makefile Sat Jun 11 16:41:55 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2020/11/04 14:29:40 martin Exp $ +# $NetBSD: Makefile,v 1.6 2022/06/11 16:41:55 tsutsui Exp $ # # Makefile for atari # @@ -12,6 +12,8 @@ CPPFLAGS+= -DSUPPORT_8_3_SOURCE_FILESYST CHECK_ENTROPY= no # do not check entropy/offer adding NOPARTMAN= yes NO_GPT= yes +NO_MBR= yes +NO_CLONES= yes .endif .include "../../Makefile.inc" Index: src/usr.sbin/sysinst/arch/hp300/Makefile diff -u src/usr.sbin/sysinst/arch/hp300/Makefile:1.1 src/usr.sbin/sysinst/arch/hp300/Makefile:1.2 --- src/usr.sbin/sysinst/arch/hp300/Makefile:1.1 Sat Jul 26 19:30:45 2014 +++ src/usr.sbin/sysinst/arch/hp300/Makefile Sat Jun 11 16:41:55 2022 @@ -1,8 +1,16 @@ -# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:45 dholland Exp $ +# $NetBSD: Makefile,v 1.2 2022/06/11 16:41:55 tsutsui Exp $ # # Makefile for hp300 # LANGUAGES= # no translations +.ifdef SMALLPROG +CHECK_ENTROPY= no # do not check entropy/offer adding +NOPARTMAN= yes +NO_GPT= yes +NO_MBR= yes +NO_CLONES= yes +.endif + .include "../../Makefile.inc" Index: src/usr.sbin/sysinst/arch/luna68k/Makefile diff -u src/usr.sbin/sysinst/arch/luna68k/Makefile:1.1 src/usr.sbin/sysinst/arch/luna68k/Makefile:1.2 --- src/usr.sbin/sysinst/arch/luna68k/Makefile:1.1 Sat Jul 26 19:30:46 2014 +++ src/usr.sbin/sysinst/arch/luna68k/Makefile Sat Jun 11 16:41:55 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:46 dholland Exp $ +# $NetBSD: Makefile,v 1.2 2022/06/11 16:41:55 tsutsui Exp $ # # Makefile for luna68k # @@ -7,4 +7,12 @@ MD_OPTIONS= AOUT2ELF # Who will update f LANGUAGES= # won't bother to prepare translations +.ifdef SMALLPROG +CHECK_ENTROPY= no # do not check entropy/offer adding +NOPARTMAN= yes +NO_GPT= yes +NO_MBR= yes +NO_CLONES= yes +.endif + .include "../../Makefile.inc" Index: src/usr.sbin/sysinst/arch/news68k/Makefile diff -u src/usr.sbin/sysinst/arch/news68k/Makefile:1.1 src/usr.sbin/sysinst/arch/news68k/Makefile:1.2 --- src/usr.sbin/sysinst/arch/news68k/Makefile:1.1 Sat Jul 26 19:30:46 2014 +++ src/usr.sbin/sysinst/arch/news68k/Makefile Sat Jun 11 16:41:55 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:46 dholland Exp $ +# $NetBSD: Makefile,v 1.2 2022/06/11 16:41:55 tsutsui Exp $ # # Makefile for news68k # @@ -7,4 +7,12 @@ MD_OPTIONS= AOUT2ELF LANGUAGES= # no translations +.ifdef SMALLPROG +CHECK_ENTROPY= no # do not check entropy/offer adding +NOPARTMAN= yes +NO_GPT= yes +NO_MBR= yes +NO_CLONES= yes +.endif + .include "../../Makefile.inc" Index: src/usr.sbin/sysinst/arch/newsmips/Makefile diff -u src/usr.sbin/sysinst/arch/newsmips/Makefile:1.1 src/usr.sbin/sysinst/arch/newsmips/Makefile:1.2 --- src/usr.sbin/sysinst/arch/newsmips/Makefile:1.1 Sat Jul 26 19:30:46 2014 +++ src/usr.sbin/sysinst/arch/newsmips/Makefile Sat Jun 11 16:41:55 2022 @@ -1,6 +1,14 @@ -# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:46 dholland Exp $ +# $NetBSD: Makefile,v 1.2 2022/06/11 16:41:55 tsutsui Exp $ # # Makefile for newsmips # +.ifdef SMALLPROG +CHECK_ENTROPY= no # do not check entropy/offer adding +NOPARTMAN= yes +NO_GPT= yes +NO_MBR= yes +NO_CLONES= yes +.endif + .include "../../Makefile.inc" Index: src/usr.sbin/sysinst/arch/x68k/Makefile diff -u src/usr.sbin/sysinst/arch/x68k/Makefile:1.1 src/usr.sbin/sysinst/arch/x68k/Makefile:1.2 --- src/usr.sbin/sysinst/arch/x68k/Makefile:1.1 Sat Jul 26 19:30:47 2014 +++ src/usr.sbin/sysinst/arch/x68k/Makefile Sat Jun 11 16:41:56 2022 @@ -1,8 +1,16 @@ -# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:47 dholland Exp $ +# $NetBSD: Makefile,v 1.2 2022/06/11 16:41:56 tsutsui Exp $ # # Makefile for x68k # LANGUAGES= #
CVS commit: src/usr.sbin/sysinst/arch
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:41:56 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/atari: Makefile src/usr.sbin/sysinst/arch/hp300: Makefile src/usr.sbin/sysinst/arch/luna68k: Makefile src/usr.sbin/sysinst/arch/news68k: Makefile src/usr.sbin/sysinst/arch/newsmips: Makefile src/usr.sbin/sysinst/arch/x68k: Makefile Log Message: Pull SMALLPROG stuff to disable unnecessary partitioning methods etc. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/atari/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/hp300/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/luna68k/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/news68k/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/newsmips/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/x68k/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/ews4800mips
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:38:51 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/ews4800mips: md.h Log Message: Add explicit PART_BOOT_MOUNT for ews4800mips. XXX: FS_SYSVBFS stuff for the MD boot partition is untested. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/ews4800mips
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:38:51 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/ews4800mips: md.h Log Message: Add explicit PART_BOOT_MOUNT for ews4800mips. XXX: FS_SYSVBFS stuff for the MD boot partition is untested. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/ews4800mips/md.h diff -u src/usr.sbin/sysinst/arch/ews4800mips/md.h:1.4 src/usr.sbin/sysinst/arch/ews4800mips/md.h:1.5 --- src/usr.sbin/sysinst/arch/ews4800mips/md.h:1.4 Wed Aug 7 10:08:04 2019 +++ src/usr.sbin/sysinst/arch/ews4800mips/md.h Sat Jun 11 16:38:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.4 2019/08/07 10:08:04 martin Exp $ */ +/* $NetBSD: md.h,v 1.5 2022/06/11 16:38:51 tsutsui Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -40,6 +40,7 @@ #define PART_BOOT (8*MEG) #define PART_BOOT_TYPE FS_SYSVBFS +#define PART_BOOT_MOUNT "/boot" #define DEFROOTSIZE 200 /* Default root size */ #define XNEEDMB 250 /* Extra megs for full X installation */
CVS commit: src/usr.sbin/sysinst/arch/cobalt
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:25:24 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/cobalt: md.c Log Message: Use proper part_type for the boot partition (while it looks unused). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/arch/cobalt/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/cobalt/md.c diff -u src/usr.sbin/sysinst/arch/cobalt/md.c:1.15 src/usr.sbin/sysinst/arch/cobalt/md.c:1.16 --- src/usr.sbin/sysinst/arch/cobalt/md.c:1.15 Sat Jan 29 16:01:17 2022 +++ src/usr.sbin/sysinst/arch/cobalt/md.c Sat Jun 11 16:25:23 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.15 2022/01/29 16:01:17 martin Exp $ */ +/* $NetBSD: md.c,v 1.16 2022/06/11 16:25:23 tsutsui Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -296,7 +296,7 @@ md_parts_use_wholedisk(struct disk_parti }; boot_part.nat_type = parts->pscheme->get_fs_part_type( - PT_root, boot_part.fs_type, boot_part.fs_sub_type); + PT_EXT2, boot_part.fs_type, boot_part.fs_sub_type); return parts_use_wholedisk(parts, 1, _part); }
CVS commit: src/usr.sbin/sysinst/arch/cobalt
Module Name:src Committed By: tsutsui Date: Sat Jun 11 16:25:24 UTC 2022 Modified Files: src/usr.sbin/sysinst/arch/cobalt: md.c Log Message: Use proper part_type for the boot partition (while it looks unused). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/arch/cobalt/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 15:41:19 UTC 2022 Modified Files: src/usr.sbin/sysinst: gpt.c label.c mbr.c Log Message: Enhance support for the pseudo file system type "EFI System Partition". To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/mbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.28 src/usr.sbin/sysinst/gpt.c:1.29 --- src/usr.sbin/sysinst/gpt.c:1.28 Sun Jan 30 11:58:29 2022 +++ src/usr.sbin/sysinst/gpt.c Sat Jun 11 15:41:19 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.28 2022/01/30 11:58:29 martin Exp $ */ +/* $NetBSD: gpt.c,v 1.29 2022/06/11 15:41:19 martin Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -103,6 +103,8 @@ struct { .fsflags = GLM_MAYBE_FAT32|GLM_MAYBE_NTFS }, { .name = "efi", .fstype = FS_MSDOS, .ptype = PT_EFI_SYSTEM, .fsflags = GLM_MAYBE_FAT32 }, + { .name = "efi", .fstype = FS_EFI_SP, .ptype = PT_EFI_SYSTEM, + .fsflags = GLM_MAYBE_FAT32 }, { .name = "bios", .fstype = FS_MSDOS, .ptype = PT_FAT, .fsflags = GLM_MAYBE_FAT32 }, { .name = "lfs", .fstype = FS_BSDLFS, .ptype = PT_root }, Index: src/usr.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.34 src/usr.sbin/sysinst/label.c:1.35 --- src/usr.sbin/sysinst/label.c:1.34 Thu Jun 9 18:26:06 2022 +++ src/usr.sbin/sysinst/label.c Sat Jun 11 15:41:19 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.34 2022/06/09 18:26:06 martin Exp $ */ +/* $NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.34 2022/06/09 18:26:06 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $"); #endif #include @@ -1079,7 +1079,7 @@ update_edit_ptn_menu(menudesc *m, void * continue; if (m->opts[i].opt_action == edit_fs_preserve && t != FS_BSDFFS && t != FS_BSDLFS && t != FS_APPLEUFS && - t != FS_MSDOS && t != FS_EX2FS) { + t != FS_MSDOS && t != FS_EFI_SP && t != FS_EX2FS) { /* Can not newfs this filesystem */ edit->wanted->instflags &= ~PUIINST_NEWFS; continue; Index: src/usr.sbin/sysinst/mbr.c diff -u src/usr.sbin/sysinst/mbr.c:1.44 src/usr.sbin/sysinst/mbr.c:1.45 --- src/usr.sbin/sysinst/mbr.c:1.44 Sat Jun 11 15:30:48 2022 +++ src/usr.sbin/sysinst/mbr.c Sat Jun 11 15:41:19 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.44 2022/06/11 15:30:48 martin Exp $ */ +/* $NetBSD: mbr.c,v 1.45 2022/06/11 15:41:19 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -117,7 +117,7 @@ const struct { { .ptype=MBR_PTYPE_FAT16B, .desc="DOS FAT16, >32M" }, { .ptype=MBR_PTYPE_FAT16L, .desc="Windows FAT16, LBA" }, { .ptype=MBR_PTYPE_FAT32, .desc="Windows FAT32" }, - { .ptype=MBR_PTYPE_EFI, .desc="(U)EFI Boot" }, + { .ptype=MBR_PTYPE_EFI, .desc="(U)EFI system partition" }, }; /* bookeeping of available partition types (including custom ones) */ @@ -1187,6 +1187,8 @@ mbr_get_fs_part_type(enum part_type pt, return _gen_type_desc[sub_type].gen; } break; + case FS_EFI_SP: + return _gen_type_desc[MBR_PTYPE_EFI].gen; } return NULL;
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 15:41:19 UTC 2022 Modified Files: src/usr.sbin/sysinst: gpt.c label.c mbr.c Log Message: Enhance support for the pseudo file system type "EFI System Partition". To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/mbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 15:30:48 UTC 2022 Modified Files: src/usr.sbin/sysinst: mbr.c Log Message: Remove unused field. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/sysinst/mbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/mbr.c diff -u src/usr.sbin/sysinst/mbr.c:1.43 src/usr.sbin/sysinst/mbr.c:1.44 --- src/usr.sbin/sysinst/mbr.c:1.43 Mon May 23 21:46:12 2022 +++ src/usr.sbin/sysinst/mbr.c Sat Jun 11 15:30:48 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.43 2022/05/23 21:46:12 andvar Exp $ */ +/* $NetBSD: mbr.c,v 1.44 2022/06/11 15:30:48 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -97,7 +97,6 @@ /* A list of predefined partition types */ const struct { unsigned int ptype; - char short_desc[12]; const char *desc; } mbr_part_types_src[] = { { .ptype=MBR_PTYPE_NETBSD, .desc="NetBSD" },
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Jun 11 15:30:48 UTC 2022 Modified Files: src/usr.sbin/sysinst: mbr.c Log Message: Remove unused field. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/sysinst/mbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: tsutsui Date: Sat Jun 11 15:25:52 UTC 2022 Modified Files: src/share/man/man4: le.4 Log Message: Add configuration information of luna68k. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/share/man/man4/le.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/le.4 diff -u src/share/man/man4/le.4:1.24 src/share/man/man4/le.4:1.25 --- src/share/man/man4/le.4:1.24 Sat Jan 25 18:53:31 2020 +++ src/share/man/man4/le.4 Sat Jun 11 15:25:52 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: le.4,v 1.24 2020/01/25 18:53:31 thorpej Exp $ +.\" $NetBSD: le.4,v 1.25 2022/06/11 15:25:52 tsutsui Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -34,7 +34,7 @@ .\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp .\" from: @(#)le.4 8.1 (Berkeley) 6/9/93 .\" -.Dd January 25, 2020 +.Dd June 11, 2022 .Dt LE 4 .Os .Sh NAME @@ -65,6 +65,8 @@ .Cd "le0 at vme0 irq 5 # Riebl/PAM" .Ss hp300 .Cd "le* at dio? scode ?" +.Ss luna68k +.Cd "le0 at mainbus0" .Ss mvme68k .Cd "le0 at pcc? ipl 3 # MVME147" .Ss news68k
CVS commit: src/share/man/man4
Module Name:src Committed By: tsutsui Date: Sat Jun 11 15:25:52 UTC 2022 Modified Files: src/share/man/man4: le.4 Log Message: Add configuration information of luna68k. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/share/man/man4/le.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/luna68k/dev
Module Name:src Committed By: tsutsui Date: Sat Jun 11 14:45:37 UTC 2022 Modified Files: src/sys/arch/luna68k/dev: psgpam.c Log Message: Match psgpam(4) only on LUNA-I. LUNA-II doesn't have YM2149 at XP. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/dev/psgpam.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/luna68k/dev/psgpam.c diff -u src/sys/arch/luna68k/dev/psgpam.c:1.1 src/sys/arch/luna68k/dev/psgpam.c:1.2 --- src/sys/arch/luna68k/dev/psgpam.c:1.1 Fri Jun 10 21:42:23 2022 +++ src/sys/arch/luna68k/dev/psgpam.c Sat Jun 11 14:45:37 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: psgpam.c,v 1.1 2022/06/10 21:42:23 tsutsui Exp $ */ +/* $NetBSD: psgpam.c,v 1.2 2022/06/11 14:45:37 tsutsui Exp $ */ /* * Copyright (c) 2018 Yosuke Sugahara. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: psgpam.c,v 1.1 2022/06/10 21:42:23 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psgpam.c,v 1.2 2022/06/11 14:45:37 tsutsui Exp $"); #include #include @@ -196,6 +196,10 @@ psgpam_match(device_t parent, cfdata_t c if (psgpam_matched) return 0; + /* Only the first generation LUNA has YM2149 at XP */ + if (machtype != LUNA_I) + return 0; + if (strcmp(xa->xa_name, psgpam_cd.cd_name)) return 0;
CVS commit: src/sys/arch/luna68k/dev
Module Name:src Committed By: tsutsui Date: Sat Jun 11 14:45:37 UTC 2022 Modified Files: src/sys/arch/luna68k/dev: psgpam.c Log Message: Match psgpam(4) only on LUNA-I. LUNA-II doesn't have YM2149 at XP. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/dev/psgpam.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 14:17:33 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict_syshdr.c d_c99_bool_strict_syshdr.exp Log Message: tests/lint: demonstrate wrong syshdr check in strict bool mode To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c cvs rdiff -u -r1.16 -r1.17 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp 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/d_c99_bool_strict_syshdr.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.15 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.16 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.15 Fri May 20 21:03:04 2022 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c Sat Jun 11 14:17:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.15 2022/05/20 21:03:04 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.16 2022/06/11 14:17:33 rillig Exp $ */ # 3 "d_c99_bool_strict_syshdr.c" /* @@ -136,11 +136,11 @@ ch_isspace_sys_bool(char c) * * strcmp: 0 means equal, < 0 means less than, > 0 means greater than * * Without a detailed list of individual functions, it's not possible to - * guess what the return value means. Therefore in strict bool mode, the + * guess what the return value means. Therefore, in strict bool mode, the * return value of these functions cannot be implicitly converted to bool, - * not even in a context where the result is compared to 0. Allowing that - * would allow expressions like !strcmp(s1, s2), which is not correct since - * strcmp returns an "ordered comparison result", not a bool. + * not even in a controlling expression. Allowing that would allow + * expressions like !strcmp(s1, s2), which is not correct since strcmp + * returns an "ordered comparison result", not a bool. */ # 1 "math.h" 3 4 @@ -247,3 +247,42 @@ pass_bool_to_function(void) # 248 "d_c99_bool_strict_syshdr.c" ); } + + +extern int *errno_location(void); + +/* + * As of 2022-06-11, the rule for loosening the strict boolean check for + * expressions from system headers is flawed. That rule allows statements + * like 'if (NULL)' or 'if (errno)', even though these have pointer type or + * integer type. + */ +void +if_pointer_or_int(void) +{ + /* if (NULL) */ + if ( +# 266 "d_c99_bool_strict_syshdr.c" 3 4 + ((void *)0) +# 268 "d_c99_bool_strict_syshdr.c" + ) + return; + /* expect-1: warning: statement not reached [193] */ + + /* if (EXIT_SUCCESS) */ + if ( +# 275 "d_c99_bool_strict_syshdr.c" 3 4 + 0 +# 277 "d_c99_bool_strict_syshdr.c" + ) + return; + /* expect-1: warning: statement not reached [193] */ + + /* if (errno) */ + if ( +# 284 "d_c99_bool_strict_syshdr.c" 3 4 + (*errno_location()) +# 286 "d_c99_bool_strict_syshdr.c" + ) + return; +} Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp:1.16 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp:1.17 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp:1.16 Thu May 19 17:24:14 2022 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp Sat Jun 11 14:17:33 2022 @@ -6,3 +6,5 @@ d_c99_bool_strict_syshdr.c(172): error: d_c99_bool_strict_syshdr.c(172): warning: function 'str_equal_bad' expects to return value [214] d_c99_bool_strict_syshdr.c(229): error: argument #1 expects '_Bool', gets passed 'int' [334] d_c99_bool_strict_syshdr.c(242): error: argument #1 expects '_Bool', gets passed 'int' [334] +d_c99_bool_strict_syshdr.c(269): warning: statement not reached [193] +d_c99_bool_strict_syshdr.c(278): warning: statement not reached [193]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 14:17:33 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict_syshdr.c d_c99_bool_strict_syshdr.exp Log Message: tests/lint: demonstrate wrong syshdr check in strict bool mode To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c cvs rdiff -u -r1.16 -r1.17 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 13:19:28 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: make definition of type keywords simpler The only type keyword that is available in more than one variant is 'signed', which can also be written '__signed'. Neither of the type keywords is declared as being specific to GCC, even though __int128_t and __uint128_t actually are non-standard. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/usr.bin/xlint/lint1/lex.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/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.131 src/usr.bin/xlint/lint1/lex.c:1.132 --- src/usr.bin/xlint/lint1/lex.c:1.131 Fri May 20 21:18:55 2022 +++ src/usr.bin/xlint/lint1/lex.c Sat Jun 11 13:19:28 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.131 2022/05/20 21:18:55 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.132 2022/06/11 13:19:28 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: lex.c,v 1.131 2022/05/20 21:18:55 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.132 2022/06/11 13:19:28 rillig Exp $"); #endif #include @@ -87,8 +87,8 @@ bool in_system_header; kwdef(name, token, 0, 0, 0, since, gcc, 0, deco) #define kwdef_sclass(name, sclass, since, gcc, deco) \ kwdef(name, T_SCLASS, sclass, 0, 0, since, gcc, 0, deco) -#define kwdef_type(name, tspec, since, gcc, deco) \ - kwdef(name, T_TYPE, 0, tspec, 0, since, gcc, 0, deco) +#define kwdef_type(name, tspec, since) \ + kwdef(name, T_TYPE, 0, tspec, 0, since, 0, 0, 1) #define kwdef_tqual(name, tqual, since, gcc, deco) \ kwdef(name, T_QUAL, 0, 0, tqual, since, gcc, 0, deco) #define kwdef_keyword(name, token) \ @@ -118,33 +118,33 @@ static const struct keyword { kwdef_token( "asm", T_ASM, 78,1,7), kwdef_token( "attribute", T_ATTRIBUTE, 78,1,6), kwdef_sclass( "auto", AUTO, 78,0,1), - kwdef_type( "_Bool", BOOL, 99,0,1), + kwdef_type( "_Bool", BOOL, 99), kwdef_keyword( "break", T_BREAK), kwdef_token( "__builtin_offsetof", T_BUILTIN_OFFSETOF, 78,1,1), kwdef_keyword( "case", T_CASE), - kwdef_type( "char", CHAR, 78,0,1), - kwdef_type( "_Complex", COMPLEX, 99,0,1), + kwdef_type( "char", CHAR, 78), + kwdef_type( "_Complex", COMPLEX, 99), kwdef_tqual( "const", CONST, 90,0,7), kwdef_keyword( "continue", T_CONTINUE), kwdef_keyword( "default", T_DEFAULT), kwdef_keyword( "do", T_DO), - kwdef_type( "double", DOUBLE, 78,0,1), + kwdef_type( "double", DOUBLE, 78), kwdef_keyword( "else", T_ELSE), kwdef_keyword( "enum", T_ENUM), kwdef_token( "__extension__",T_EXTENSION, 78,1,1), kwdef_sclass( "extern", EXTERN, 78,0,1), - kwdef_type( "float", FLOAT, 78,0,1), + kwdef_type( "float", FLOAT, 78), kwdef_keyword( "for", T_FOR), kwdef_token( "_Generic", T_GENERIC, 11,0,1), kwdef_keyword( "goto", T_GOTO), kwdef_keyword( "if", T_IF), kwdef_token( "__imag__", T_IMAG, 78,1,1), kwdef_sclass( "inline", INLINE, 99,0,7), - kwdef_type( "int", INT, 78,0,1), + kwdef_type( "int", INT, 78), #ifdef INT128_SIZE - kwdef_type( "__int128_t", INT128, 99,0,1), + kwdef_type( "__int128_t", INT128, 99), #endif - kwdef_type( "long", LONG, 78,0,1), + kwdef_type( "long", LONG, 78), kwdef_token( "_Noreturn", T_NORETURN, 11,0,1), kwdef_token( "__packed", T_PACKED, 78,0,1), kwdef_token( "__real__", T_REAL, 78,1,1), @@ -152,8 +152,8 @@ static const struct keyword { kwdef_tqual( "restrict", RESTRICT, 99,0,7), kwdef_keyword( "return", T_RETURN), kwdef( "section", T_AT_SECTION, 0,0,0, 78,1,1,7), - kwdef_type( "short", SHORT, 78,0,1), - kwdef_type( "signed", SIGNED, 90,0,3), + kwdef_type( "short", SHORT, 78), + kwdef( "signed", T_TYPE, 0, SIGNED, 0, 90,0,0,3), kwdef_keyword( "sizeof", T_SIZEOF), kwdef_sclass( "static", STATIC, 78,0,1), kwdef_keyword( "_Static_assert", T_STATIC_ASSERT), @@ -165,11 +165,11 @@ static const struct keyword { kwdef_sclass( "typedef", TYPEDEF, 78,0,1), kwdef_token( "typeof", T_TYPEOF, 78,1,7), #ifdef INT128_SIZE - kwdef_type( "__uint128_t", UINT128, 99,0,1), + kwdef_type( "__uint128_t", UINT128, 99), #endif kwdef("union", T_STRUCT_OR_UNION, 0, UNION, 0, 78,0,0,1), - kwdef_type( "unsigned", UNSIGN, 78,0,1), - kwdef_type( "void", VOID, 78,0,1), + kwdef_type( "unsigned", UNSIGN, 78), + kwdef_type( "void", VOID, 78), kwdef_tqual( "volatile", VOLATILE, 90,0,7), kwdef_keyword( "while", T_WHILE),
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 13:19:28 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: make definition of type keywords simpler The only type keyword that is available in more than one variant is 'signed', which can also be written '__signed'. Neither of the type keywords is declared as being specific to GCC, even though __int128_t and __uint128_t actually are non-standard. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/usr.bin/xlint/lint1/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Jun 11 12:24:00 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_013.c msg_013.exp msg_021.c msg_021.exp msg_027.c msg_027.exp msg_030.c msg_030.exp msg_237.c msg_237.exp src/usr.bin/xlint/lint1: decl.c err.c func.c Log Message: lint: add quotes around placeholders for a few more messages To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_013.c \ src/tests/usr.bin/xlint/lint1/msg_013.exp \ src/tests/usr.bin/xlint/lint1/msg_021.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_021.c \ src/tests/usr.bin/xlint/lint1/msg_237.c \ src/tests/usr.bin/xlint/lint1/msg_237.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_027.c \ src/tests/usr.bin/xlint/lint1/msg_027.exp cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_030.c \ src/tests/usr.bin/xlint/lint1/msg_030.exp cvs rdiff -u -r1.284 -r1.285 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.168 -r1.169 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.138 -r1.139 src/usr.bin/xlint/lint1/func.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_013.c diff -u src/tests/usr.bin/xlint/lint1/msg_013.c:1.3 src/tests/usr.bin/xlint/lint1/msg_013.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_013.c:1.3 Thu Aug 26 19:23:25 2021 +++ src/tests/usr.bin/xlint/lint1/msg_013.c Sat Jun 11 12:24:00 2022 @@ -1,12 +1,12 @@ -/* $NetBSD: msg_013.c,v 1.3 2021/08/26 19:23:25 rillig Exp $ */ +/* $NetBSD: msg_013.c,v 1.4 2022/06/11 12:24:00 rillig Exp $ */ # 3 "msg_013.c" -// Test for message: incomplete enum type: %s [13] +// Test for message: incomplete enum type '%s' [13] enum tag; /* XXX: why ''? */ -/* expect+1: warning: incomplete enum type: [13] */ +/* expect+1: warning: incomplete enum type '' [13] */ void function(enum tag); enum tag { Index: src/tests/usr.bin/xlint/lint1/msg_013.exp diff -u src/tests/usr.bin/xlint/lint1/msg_013.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_013.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_013.exp:1.3 Thu Aug 26 19:23:25 2021 +++ src/tests/usr.bin/xlint/lint1/msg_013.exp Sat Jun 11 12:24:00 2022 @@ -1 +1 @@ -msg_013.c(10): warning: incomplete enum type: [13] +msg_013.c(10): warning: incomplete enum type '' [13] Index: src/tests/usr.bin/xlint/lint1/msg_021.exp diff -u src/tests/usr.bin/xlint/lint1/msg_021.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_021.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_021.exp:1.3 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_021.exp Sat Jun 11 12:24:00 2022 @@ -1,6 +1,6 @@ -msg_021.c(8): error: redeclaration of formal parameter parameter [21] -msg_021.c(10): warning: argument type defaults to 'int': parameter [32] -msg_021.c(16): error: redeclaration of formal parameter parameter [237] -msg_021.c(23): error: redeclaration of parameter [27] -msg_021.c(28): error: redeclaration of formal parameter param [237] -msg_021.c(36): error: redeclaration of parameter [27] +msg_021.c(11): error: redeclaration of formal parameter 'parameter' [21] +msg_021.c(13): warning: argument type defaults to 'int': parameter [32] +msg_021.c(21): error: redeclaration of formal parameter 'parameter' [237] +msg_021.c(29): error: redeclaration of 'parameter' [27] +msg_021.c(35): error: redeclaration of formal parameter 'param' [237] +msg_021.c(44): error: redeclaration of 'parameter' [27] Index: src/tests/usr.bin/xlint/lint1/msg_021.c diff -u src/tests/usr.bin/xlint/lint1/msg_021.c:1.2 src/tests/usr.bin/xlint/lint1/msg_021.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_021.c:1.2 Sun Jan 31 09:48:47 2021 +++ src/tests/usr.bin/xlint/lint1/msg_021.c Sat Jun 11 12:24:00 2022 @@ -1,31 +1,38 @@ -/* $NetBSD: msg_021.c,v 1.2 2021/01/31 09:48:47 rillig Exp $ */ +/* $NetBSD: msg_021.c,v 1.3 2022/06/11 12:24:00 rillig Exp $ */ # 3 "msg_021.c" -// Test for message: redeclaration of formal parameter %s [21] +// Test for message: redeclaration of formal parameter '%s' [21] + +/* See also message 237, which has the same text. */ /*ARGSUSED*/ void -old_style_with_duplicate_parameter(parameter, parameter) /* expect: 21 */ +/* expect+1: error: redeclaration of formal parameter 'parameter' [21] */ +old_style_with_duplicate_parameter(parameter, parameter) int parameter; -{/* expect: 32 */ +{ + /* expect-1: warning: argument type defaults to 'int': parameter [32] */ } void old_style_with_duplicate_parameter_declaration(parameter) int parameter; -int parameter; /* expect: 237 */ +/* expect+1: error: redeclaration of formal parameter 'parameter' [237] */ +int parameter; { } void old_style_with_local_variable(parameter) int parameter; { - int parameter; /* expect: 27 */ + /* expect+1: error: redeclaration of 'parameter' [27] */ + int parameter; } /*ARGSUSED*/
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Jun 11 12:24:00 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_013.c msg_013.exp msg_021.c msg_021.exp msg_027.c msg_027.exp msg_030.c msg_030.exp msg_237.c msg_237.exp src/usr.bin/xlint/lint1: decl.c err.c func.c Log Message: lint: add quotes around placeholders for a few more messages To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_013.c \ src/tests/usr.bin/xlint/lint1/msg_013.exp \ src/tests/usr.bin/xlint/lint1/msg_021.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_021.c \ src/tests/usr.bin/xlint/lint1/msg_237.c \ src/tests/usr.bin/xlint/lint1/msg_237.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_027.c \ src/tests/usr.bin/xlint/lint1/msg_027.exp cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_030.c \ src/tests/usr.bin/xlint/lint1/msg_030.exp cvs rdiff -u -r1.284 -r1.285 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.168 -r1.169 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.138 -r1.139 src/usr.bin/xlint/lint1/func.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Jun 11 11:52:13 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: decl.c decl.exp emit.c emit.exp gcc_attribute_func.c gcc_attribute_func.exp gcc_init_compound_literal.c gcc_init_compound_literal.exp init.c init.exp msg_000.exp msg_001.c msg_001.exp msg_019.exp msg_031.exp msg_044.c msg_044.exp msg_045.c msg_045.exp msg_046.c msg_046.exp msg_067.c msg_067.exp msg_085.exp msg_135.c msg_135.exp msg_136.exp msg_143.exp msg_152.exp msg_175.exp msg_226.c msg_226.exp msg_233.c msg_233.exp msg_234.c msg_234.exp msg_235.c msg_235.exp msg_236.c msg_236.exp msg_247.c msg_247.exp msg_260.c msg_260.exp msg_261.c msg_261.exp msg_268.c msg_268.exp msg_269.c msg_269.exp msg_307.c msg_307.exp msg_314.c msg_347.c msg_347.exp msg_348.c msg_348.exp platform_long.c platform_long.exp platform_lp64.c platform_lp64.exp src/usr.bin/xlint/lint1: decl.c err.c Log Message: lint: add quotes around a few more placeholders in messages To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/decl.exp \ src/tests/usr.bin/xlint/lint1/emit.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/emit.exp \ src/tests/usr.bin/xlint/lint1/msg_044.c \ src/tests/usr.bin/xlint/lint1/msg_044.exp \ src/tests/usr.bin/xlint/lint1/msg_045.c \ src/tests/usr.bin/xlint/lint1/msg_045.exp \ src/tests/usr.bin/xlint/lint1/msg_085.exp \ src/tests/usr.bin/xlint/lint1/msg_136.exp \ src/tests/usr.bin/xlint/lint1/msg_143.exp \ src/tests/usr.bin/xlint/lint1/msg_226.c \ src/tests/usr.bin/xlint/lint1/msg_226.exp \ src/tests/usr.bin/xlint/lint1/msg_233.c \ src/tests/usr.bin/xlint/lint1/msg_233.exp \ src/tests/usr.bin/xlint/lint1/msg_234.c \ src/tests/usr.bin/xlint/lint1/msg_234.exp \ src/tests/usr.bin/xlint/lint1/msg_235.c \ src/tests/usr.bin/xlint/lint1/msg_235.exp \ src/tests/usr.bin/xlint/lint1/msg_236.c \ src/tests/usr.bin/xlint/lint1/msg_236.exp \ src/tests/usr.bin/xlint/lint1/msg_261.c \ src/tests/usr.bin/xlint/lint1/msg_261.exp \ src/tests/usr.bin/xlint/lint1/msg_268.c \ src/tests/usr.bin/xlint/lint1/msg_268.exp \ src/tests/usr.bin/xlint/lint1/msg_269.c \ src/tests/usr.bin/xlint/lint1/msg_269.exp \ src/tests/usr.bin/xlint/lint1/msg_307.c \ src/tests/usr.bin/xlint/lint1/msg_307.exp \ src/tests/usr.bin/xlint/lint1/msg_314.c \ src/tests/usr.bin/xlint/lint1/msg_347.c \ src/tests/usr.bin/xlint/lint1/msg_347.exp \ src/tests/usr.bin/xlint/lint1/platform_long.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/gcc_attribute_func.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.exp \ src/tests/usr.bin/xlint/lint1/msg_000.exp \ src/tests/usr.bin/xlint/lint1/platform_long.exp \ src/tests/usr.bin/xlint/lint1/platform_lp64.c \ src/tests/usr.bin/xlint/lint1/platform_lp64.exp cvs rdiff -u -r1.4 -r1.5 \ src/tests/usr.bin/xlint/lint1/gcc_init_compound_literal.c \ src/tests/usr.bin/xlint/lint1/gcc_init_compound_literal.exp \ src/tests/usr.bin/xlint/lint1/msg_046.c \ src/tests/usr.bin/xlint/lint1/msg_046.exp \ src/tests/usr.bin/xlint/lint1/msg_067.c \ src/tests/usr.bin/xlint/lint1/msg_067.exp \ src/tests/usr.bin/xlint/lint1/msg_260.c \ src/tests/usr.bin/xlint/lint1/msg_260.exp \ src/tests/usr.bin/xlint/lint1/msg_348.c \ src/tests/usr.bin/xlint/lint1/msg_348.exp cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/init.c \ src/tests/usr.bin/xlint/lint1/init.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_001.c \ src/tests/usr.bin/xlint/lint1/msg_031.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_001.exp \ src/tests/usr.bin/xlint/lint1/msg_019.exp \ src/tests/usr.bin/xlint/lint1/msg_152.exp cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/msg_135.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_135.exp cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_175.exp cvs rdiff -u -r1.16 -r1.17 src/tests/usr.bin/xlint/lint1/msg_247.c cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/xlint/lint1/msg_247.exp cvs rdiff -u -r1.283 -r1.284 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.167 -r1.168 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
Module Name:src Committed By: rillig Date: Sat Jun 11 11:52:13 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: decl.c decl.exp emit.c emit.exp gcc_attribute_func.c gcc_attribute_func.exp gcc_init_compound_literal.c gcc_init_compound_literal.exp init.c init.exp msg_000.exp msg_001.c msg_001.exp msg_019.exp msg_031.exp msg_044.c msg_044.exp msg_045.c msg_045.exp msg_046.c msg_046.exp msg_067.c msg_067.exp msg_085.exp msg_135.c msg_135.exp msg_136.exp msg_143.exp msg_152.exp msg_175.exp msg_226.c msg_226.exp msg_233.c msg_233.exp msg_234.c msg_234.exp msg_235.c msg_235.exp msg_236.c msg_236.exp msg_247.c msg_247.exp msg_260.c msg_260.exp msg_261.c msg_261.exp msg_268.c msg_268.exp msg_269.c msg_269.exp msg_307.c msg_307.exp msg_314.c msg_347.c msg_347.exp msg_348.c msg_348.exp platform_long.c platform_long.exp platform_lp64.c platform_lp64.exp src/usr.bin/xlint/lint1: decl.c err.c Log Message: lint: add quotes around a few more placeholders in messages To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/decl.exp \ src/tests/usr.bin/xlint/lint1/emit.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/emit.exp \ src/tests/usr.bin/xlint/lint1/msg_044.c \ src/tests/usr.bin/xlint/lint1/msg_044.exp \ src/tests/usr.bin/xlint/lint1/msg_045.c \ src/tests/usr.bin/xlint/lint1/msg_045.exp \ src/tests/usr.bin/xlint/lint1/msg_085.exp \ src/tests/usr.bin/xlint/lint1/msg_136.exp \ src/tests/usr.bin/xlint/lint1/msg_143.exp \ src/tests/usr.bin/xlint/lint1/msg_226.c \ src/tests/usr.bin/xlint/lint1/msg_226.exp \ src/tests/usr.bin/xlint/lint1/msg_233.c \ src/tests/usr.bin/xlint/lint1/msg_233.exp \ src/tests/usr.bin/xlint/lint1/msg_234.c \ src/tests/usr.bin/xlint/lint1/msg_234.exp \ src/tests/usr.bin/xlint/lint1/msg_235.c \ src/tests/usr.bin/xlint/lint1/msg_235.exp \ src/tests/usr.bin/xlint/lint1/msg_236.c \ src/tests/usr.bin/xlint/lint1/msg_236.exp \ src/tests/usr.bin/xlint/lint1/msg_261.c \ src/tests/usr.bin/xlint/lint1/msg_261.exp \ src/tests/usr.bin/xlint/lint1/msg_268.c \ src/tests/usr.bin/xlint/lint1/msg_268.exp \ src/tests/usr.bin/xlint/lint1/msg_269.c \ src/tests/usr.bin/xlint/lint1/msg_269.exp \ src/tests/usr.bin/xlint/lint1/msg_307.c \ src/tests/usr.bin/xlint/lint1/msg_307.exp \ src/tests/usr.bin/xlint/lint1/msg_314.c \ src/tests/usr.bin/xlint/lint1/msg_347.c \ src/tests/usr.bin/xlint/lint1/msg_347.exp \ src/tests/usr.bin/xlint/lint1/platform_long.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/gcc_attribute_func.c \ src/tests/usr.bin/xlint/lint1/gcc_attribute_func.exp \ src/tests/usr.bin/xlint/lint1/msg_000.exp \ src/tests/usr.bin/xlint/lint1/platform_long.exp \ src/tests/usr.bin/xlint/lint1/platform_lp64.c \ src/tests/usr.bin/xlint/lint1/platform_lp64.exp cvs rdiff -u -r1.4 -r1.5 \ src/tests/usr.bin/xlint/lint1/gcc_init_compound_literal.c \ src/tests/usr.bin/xlint/lint1/gcc_init_compound_literal.exp \ src/tests/usr.bin/xlint/lint1/msg_046.c \ src/tests/usr.bin/xlint/lint1/msg_046.exp \ src/tests/usr.bin/xlint/lint1/msg_067.c \ src/tests/usr.bin/xlint/lint1/msg_067.exp \ src/tests/usr.bin/xlint/lint1/msg_260.c \ src/tests/usr.bin/xlint/lint1/msg_260.exp \ src/tests/usr.bin/xlint/lint1/msg_348.c \ src/tests/usr.bin/xlint/lint1/msg_348.exp cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/init.c \ src/tests/usr.bin/xlint/lint1/init.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_001.c \ src/tests/usr.bin/xlint/lint1/msg_031.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_001.exp \ src/tests/usr.bin/xlint/lint1/msg_019.exp \ src/tests/usr.bin/xlint/lint1/msg_152.exp cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/msg_135.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_135.exp cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_175.exp cvs rdiff -u -r1.16 -r1.17 src/tests/usr.bin/xlint/lint1/msg_247.c cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/xlint/lint1/msg_247.exp cvs rdiff -u -r1.283 -r1.284 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.167 -r1.168 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/decl.c diff -u src/tests/usr.bin/xlint/lint1/decl.c:1.15 src/tests/usr.bin/xlint/lint1/decl.c:1.16 --- src/tests/usr.bin/xlint/lint1/decl.c:1.15 Sun Apr 24 20:08:23 2022 +++ src/tests/usr.bin/xlint/lint1/decl.c Sat Jun 11 11:52:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.15 2022/04/24 20:08:23 rillig Exp $ */ +/* $NetBSD:
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 11:20:40 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_234.c msg_234.exp msg_236.c msg_236.exp msg_307.c msg_307.exp msg_314.c msg_314.exp Log Message: tests/lint: add tests for messages that lack quotes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_234.c \ src/tests/usr.bin/xlint/lint1/msg_234.exp \ src/tests/usr.bin/xlint/lint1/msg_236.c \ src/tests/usr.bin/xlint/lint1/msg_236.exp \ src/tests/usr.bin/xlint/lint1/msg_307.c \ src/tests/usr.bin/xlint/lint1/msg_307.exp \ src/tests/usr.bin/xlint/lint1/msg_314.c \ src/tests/usr.bin/xlint/lint1/msg_314.exp 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_234.c diff -u src/tests/usr.bin/xlint/lint1/msg_234.c:1.2 src/tests/usr.bin/xlint/lint1/msg_234.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_234.c:1.2 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_234.c Sat Jun 11 11:20:40 2022 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_234.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: msg_234.c,v 1.3 2022/06/11 11:20:40 rillig Exp $ */ # 3 "msg_234.c" // Test for message: union %s never defined [234] -TODO: "Add example code that triggers the above message." /* expect: 249 */ -TODO: "Add example code that almost triggers the above message." +/* expect+1: warning: union declared_but_not_defined never defined [234] */ +union declared_but_not_defined; Index: src/tests/usr.bin/xlint/lint1/msg_234.exp diff -u src/tests/usr.bin/xlint/lint1/msg_234.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_234.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_234.exp:1.2 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_234.exp Sat Jun 11 11:20:40 2022 @@ -1 +1 @@ -msg_234.c(6): error: syntax error ':' [249] +msg_234.c(7): warning: union declared_but_not_defined never defined [234] Index: src/tests/usr.bin/xlint/lint1/msg_236.c diff -u src/tests/usr.bin/xlint/lint1/msg_236.c:1.2 src/tests/usr.bin/xlint/lint1/msg_236.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_236.c:1.2 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_236.c Sat Jun 11 11:20:40 2022 @@ -1,7 +1,15 @@ -/* $NetBSD: msg_236.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: msg_236.c,v 1.3 2022/06/11 11:20:40 rillig Exp $ */ # 3 "msg_236.c" // Test for message: static function %s unused [236] -TODO: "Add example code that triggers the above message." /* expect: 249 */ -TODO: "Add example code that almost triggers the above message." +void +external_function(void) +{ +} + +/* expect+2: warning: static function static_function unused [236] */ +static void +static_function(void) +{ +} Index: src/tests/usr.bin/xlint/lint1/msg_236.exp diff -u src/tests/usr.bin/xlint/lint1/msg_236.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_236.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_236.exp:1.2 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_236.exp Sat Jun 11 11:20:40 2022 @@ -1 +1 @@ -msg_236.c(6): error: syntax error ':' [249] +msg_236.c(13): warning: static function static_function unused [236] Index: src/tests/usr.bin/xlint/lint1/msg_307.c diff -u src/tests/usr.bin/xlint/lint1/msg_307.c:1.2 src/tests/usr.bin/xlint/lint1/msg_307.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_307.c:1.2 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_307.c Sat Jun 11 11:20:40 2022 @@ -1,7 +1,15 @@ -/* $NetBSD: msg_307.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: msg_307.c,v 1.3 2022/06/11 11:20:40 rillig Exp $ */ # 3 "msg_307.c" // Test for message: static variable %s set but not used [307] -TODO: "Add example code that triggers the above message." /* expect: 249 */ -TODO: "Add example code that almost triggers the above message." +/* expect+1: warning: static variable set_but_not_used set but not used [307] */ +static int set_but_not_used; + +static int only_incremented; + +void function(void) +{ + set_but_not_used = 3; + only_incremented++; +} Index: src/tests/usr.bin/xlint/lint1/msg_307.exp diff -u src/tests/usr.bin/xlint/lint1/msg_307.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_307.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_307.exp:1.2 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_307.exp Sat Jun 11 11:20:40 2022 @@ -1 +1 @@ -msg_307.c(6): error: syntax error ':' [249] +msg_307.c(7): warning: static variable set_but_not_used set but not used [307] Index: src/tests/usr.bin/xlint/lint1/msg_314.c diff -u src/tests/usr.bin/xlint/lint1/msg_314.c:1.2 src/tests/usr.bin/xlint/lint1/msg_314.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_314.c:1.2 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_314.c Sat Jun 11 11:20:40 2022 @@ -1,7 +1,20 @@ -/* $NetBSD: msg_314.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: msg_314.c,v 1.3 2022/06/11
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 11:20:40 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_234.c msg_234.exp msg_236.c msg_236.exp msg_307.c msg_307.exp msg_314.c msg_314.exp Log Message: tests/lint: add tests for messages that lack quotes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_234.c \ src/tests/usr.bin/xlint/lint1/msg_234.exp \ src/tests/usr.bin/xlint/lint1/msg_236.c \ src/tests/usr.bin/xlint/lint1/msg_236.exp \ src/tests/usr.bin/xlint/lint1/msg_307.c \ src/tests/usr.bin/xlint/lint1/msg_307.exp \ src/tests/usr.bin/xlint/lint1/msg_314.c \ src/tests/usr.bin/xlint/lint1/msg_314.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 10:46:38 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_261.c msg_261.exp Log Message: tests/lint: add test for 'previous definition' message To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_261.c \ src/tests/usr.bin/xlint/lint1/msg_261.exp 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_261.c diff -u src/tests/usr.bin/xlint/lint1/msg_261.c:1.2 src/tests/usr.bin/xlint/lint1/msg_261.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_261.c:1.2 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_261.c Sat Jun 11 10:46:38 2022 @@ -1,7 +1,16 @@ -/* $NetBSD: msg_261.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: msg_261.c,v 1.3 2022/06/11 10:46:38 rillig Exp $ */ # 3 "msg_261.c" // Test for message: previous definition of %s [261] -TODO: "Add example code that triggers the above message." /* expect: 249 */ -TODO: "Add example code that almost triggers the above message." +/* lint1-extra-flags: -r */ + +/* expect+2: previous definition of function [261] */ +void +function(void) +{ +} + +/* expect+2: error: redeclaration of 'function' with type 'function(void) returning int', expected 'function(void) returning void' [347] */ +/* expect+1: warning: static function function declared but not defined [290] */ +static int function(void); Index: src/tests/usr.bin/xlint/lint1/msg_261.exp diff -u src/tests/usr.bin/xlint/lint1/msg_261.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_261.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_261.exp:1.2 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_261.exp Sat Jun 11 10:46:38 2022 @@ -1 +1,3 @@ -msg_261.c(6): error: syntax error ':' [249] +msg_261.c(16): error: redeclaration of 'function' with type 'function(void) returning int', expected 'function(void) returning void' [347] +msg_261.c(10): previous definition of function [261] +msg_261.c(16): warning: static function function declared but not defined [290]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Jun 11 10:46:38 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_261.c msg_261.exp Log Message: tests/lint: add test for 'previous definition' message To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_261.c \ src/tests/usr.bin/xlint/lint1/msg_261.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 09:24:07 UTC 2022 Modified Files: src/usr.bin/make: str.c Log Message: make: clean up comments for string splitting and string matching No binary change. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/usr.bin/make/str.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/make/str.c diff -u src/usr.bin/make/str.c:1.92 src/usr.bin/make/str.c:1.93 --- src/usr.bin/make/str.c:1.92 Sat Jun 11 08:06:32 2022 +++ src/usr.bin/make/str.c Sat Jun 11 09:24:07 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.92 2022/06/11 08:06:32 rillig Exp $ */ +/* $NetBSD: str.c,v 1.93 2022/06/11 09:24:07 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -71,7 +71,7 @@ #include "make.h" /* "@(#)str.c 5.8 (Berkeley) 6/1/90" */ -MAKE_RCSID("$NetBSD: str.c,v 1.92 2022/06/11 08:06:32 rillig Exp $"); +MAKE_RCSID("$NetBSD: str.c,v 1.93 2022/06/11 09:24:07 rillig Exp $"); static HashTable interned_strings; @@ -219,7 +219,7 @@ Substring_Words(const char *str, bool ex if (word_start == NULL) word_start = word_end; *word_end++ = '\\'; -/* catch '\' at end of line */ +/* catch lonely '\' at end of string */ if (str_p[1] == '\0') continue; ch = *++str_p; @@ -317,6 +317,8 @@ in_range(char e1, char c, char e2) * The following special characters are known *?\[] (as in fnmatch(3)). * * XXX: this function does not detect or report malformed patterns. + * + * See varmod-match.mk for examples and edge cases. */ bool Str_Match(const char *str, const char *pat) @@ -340,13 +342,7 @@ Str_Match(const char *str, const char *p if (*pat == '?') /* match any single character */ continue; - /* - * A '[' in the pattern matches a character from a list. - * The '[' is followed by the list of acceptable characters, - * or by ranges (two characters separated by '-'). In these - * character lists, the backslash is an ordinary character. - */ - if (*pat == '[') { + if (*pat == '[') { /* match a character from a list */ bool neg = pat[1] == '^'; pat += neg ? 2 : 1; @@ -356,15 +352,6 @@ Str_Match(const char *str, const char *p break; return false; } -/* - * XXX: This naive comparison makes the - * control flow of the pattern parser - * dependent on the actual value of the - * string. This is unpredictable. It may be - * though that the code only looks wrong but - * actually all code paths result in the same - * behavior. This needs further tests. - */ if (*pat == *str) break; if (pat[1] == '-') {
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 09:24:07 UTC 2022 Modified Files: src/usr.bin/make: str.c Log Message: make: clean up comments for string splitting and string matching No binary change. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/usr.bin/make/str.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sat Jun 11 09:15:49 UTC 2022 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: test edge cases in pattern matching To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-match.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sat Jun 11 09:15:49 UTC 2022 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: test edge cases in pattern matching To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-match.mk 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/make/unit-tests/varmod-match.exp diff -u src/usr.bin/make/unit-tests/varmod-match.exp:1.6 src/usr.bin/make/unit-tests/varmod-match.exp:1.7 --- src/usr.bin/make/unit-tests/varmod-match.exp:1.6 Sat Jun 11 07:54:25 2022 +++ src/usr.bin/make/unit-tests/varmod-match.exp Sat Jun 11 09:15:49 2022 @@ -10,8 +10,8 @@ CondParser_Eval: ${:Ua \$ sign:M*$$*} != Comparing "$" != "$" CondParser_Eval: ${:Ua \$ sign any-asterisk:M*\$*} != "any-asterisk" Comparing "any-asterisk" != "any-asterisk" -make: "varmod-match.mk" line 151: Unknown modifier "]" -make: "varmod-match.mk" line 151: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +make: "varmod-match.mk" line 157: Unknown modifier "]" +make: "varmod-match.mk" line 157: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-match.mk diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.10 src/usr.bin/make/unit-tests/varmod-match.mk:1.11 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.10 Sat Jun 11 07:54:25 2022 +++ src/usr.bin/make/unit-tests/varmod-match.mk Sat Jun 11 09:15:49 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.10 2022/06/11 07:54:25 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.11 2022/06/11 09:15:49 rillig Exp $ # # Tests for the :M variable modifier, which filters words that match the # given pattern. @@ -130,6 +130,12 @@ ${:U*}= asterisk . error .endif +# [\] matches a single backslash +WORDS= a\b a[\]b ab +.if ${WORDS:Ma[\]b} != "a\\b" +. error +.endif + # : terminates the pattern .if ${ A * :L:M:} != "" . error @@ -156,26 +162,95 @@ ${:U*}= asterisk # [\] matches exactly a backslash; no escaping takes place in # character ranges -# Without the 'a' in the below expressions, the backslash would end a word and -# thus influence how the string is split into words. -.if ${ ${:U\\a} ${:Ua} :L:M[\]a} != "\\a" +# Without the 'a' in the below words, the backslash would end a word and thus +# influence how the string is split into words. +WORDS= 1\a 2\\a +.if ${WORDS:M?[\]a} != "1\\a" +. error +.endif + +# [[-]] May look like it would match a single '[', '\' or ']', but +# the inner ']' has two roles: it is the upper bound of the +# character range as well as the closing character of the +# character list. The outer ']' is just a regular character. +WORDS= [ ] [] \] ]] +.if ${WORDS:M[[-]]} != "[] \\] ]]" +. error +.endif + +# [b[-]a] +# Same as for '[[-]]': the character list stops at the first +# ']', and the 'a]' is treated as a literal string. +WORDS= [a \a ]a []a \]a ]]a [a] \a] ]a] ba] +.if ${WORDS:M[b[-]a]} != "[a] \\a] ]a] ba]" +. error +.endif + +# [-] Matches a single '-' since the '-' only becomes part of a +# character range if it is preceded and followed by another +# character. +WORDS= - -] +.if ${WORDS:M[-]} != "-" +. error +.endif + +# [ Incomplete empty character list, never matches. +WORDS= a a[ +.if ${WORDS:Ma[} != "" +. error +.endif + +# [^ Incomplete negated empty character list, matches any single +# character. +WORDS= a a[ aX +.if ${WORDS:Ma[^} != "a[ aX" . error .endif -#.MAKEFLAGS: -dcv -# -# Incomplete patterns: -# [ matches TODO -# [x matches TODO -# [^ matches TODO -# [- matches TODO -# [xy matches TODO -# [^x matches TODO -# [\ matches TODO -# -# [x- matches exactly 'x', doesn't match 'x-' -# [^x- matches TODO -# \ matches never +# [-x1-3 Incomplete character list, matches those elements that can be +# parsed without lookahead. +WORDS= - + x xx 0 1 2 3 4 [x1-3 +.if ${WORDS:M[-x1-3} != "- x 1 2 3" +. error +.endif + +# [^-x1-3 +# Incomplete negated character list, matches any character +# except those elements that can be parsed without lookahead. +WORDS= - + x xx 0 1 2 3 4 [x1-3 +.if ${WORDS:M[^-x1-3} != "+ 0 4" +. error +.endif + +# [\ Incomplete character list containing a single '\'. +# +# A word can only end with a backslash if the preceding +# character is a backslash as well; in all other cases the final +# backslash would escape the following space, making the space +# part of the word. Only the very last word of a string can be +# '\', as there is no following space that could be escaped. +WORDS= \\ \a ${:Ux\\} +.if ${WORDS:M?[\]} != " x\\" +. error +.endif + +# [x- Incomplete character list containing an incomplete character +# range,
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 08:06:32 UTC 2022 Modified Files: src/usr.bin/make: str.c Log Message: make: condense Str_Match The test for '\\' followed by '\0' was redundant since at that point, *str is guaranteed to be not '\0', which takes the next 'return false'. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/usr.bin/make/str.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Jun 11 08:06:32 UTC 2022 Modified Files: src/usr.bin/make: str.c Log Message: make: condense Str_Match The test for '\\' followed by '\0' was redundant since at that point, *str is guaranteed to be not '\0', which takes the next 'return false'. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/usr.bin/make/str.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/make/str.c diff -u src/usr.bin/make/str.c:1.91 src/usr.bin/make/str.c:1.92 --- src/usr.bin/make/str.c:1.91 Fri May 13 21:42:30 2022 +++ src/usr.bin/make/str.c Sat Jun 11 08:06:32 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.91 2022/05/13 21:42:30 rillig Exp $ */ +/* $NetBSD: str.c,v 1.92 2022/06/11 08:06:32 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -71,7 +71,7 @@ #include "make.h" /* "@(#)str.c 5.8 (Berkeley) 6/1/90" */ -MAKE_RCSID("$NetBSD: str.c,v 1.91 2022/05/13 21:42:30 rillig Exp $"); +MAKE_RCSID("$NetBSD: str.c,v 1.92 2022/06/11 08:06:32 rillig Exp $"); static HashTable interned_strings; @@ -321,12 +321,8 @@ in_range(char e1, char c, char e2) bool Str_Match(const char *str, const char *pat) { - for (;;) { - if (*pat == '\0') - return *str == '\0'; - - /* A '*' in the pattern matches any substring. */ - if (*pat == '*') { + for (; *pat != '\0'; pat++, str++) { + if (*pat == '*') { /* match any substring */ pat++; while (*pat == '*') pat++; @@ -341,9 +337,8 @@ Str_Match(const char *str, const char *p if (*str == '\0') return false; - /* A '?' in the pattern matches any single character. */ - if (*pat == '?') - goto thisCharOK; + if (*pat == '?') /* match any single character */ + continue; /* * A '[' in the pattern matches a character from a list. @@ -387,26 +382,16 @@ Str_Match(const char *str, const char *p pat++; if (*pat == '\0') pat--; - goto thisCharOK; + continue; } - /* - * A backslash in the pattern matches the character following - * it exactly. - */ - if (*pat == '\\') { + if (*pat == '\\') /* match the next character exactly */ pat++; - if (*pat == '\0') -return false; - } if (*pat != *str) return false; - - thisCharOK: - pat++; - str++; } + return *str == '\0'; } void
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sat Jun 11 07:54:25 UTC 2022 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: demonstrate another pathological pattern match To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-match.mk 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/make/unit-tests/varmod-match.exp diff -u src/usr.bin/make/unit-tests/varmod-match.exp:1.5 src/usr.bin/make/unit-tests/varmod-match.exp:1.6 --- src/usr.bin/make/unit-tests/varmod-match.exp:1.5 Thu Mar 3 20:20:23 2022 +++ src/usr.bin/make/unit-tests/varmod-match.exp Sat Jun 11 07:54:25 2022 @@ -5,12 +5,13 @@ Comparing "five six seven" != "five six CondParser_Eval: ${NUMBERS:M[^s]*[ex]} != "One Three five" Comparing "One Three five" != "One Three five" CondParser_Eval: ${:U:Mb} +CondParser_Eval: ${:U..b:M*?*?*?*?*?a} CondParser_Eval: ${:Ua \$ sign:M*$$*} != "\$" Comparing "$" != "$" CondParser_Eval: ${:Ua \$ sign any-asterisk:M*\$*} != "any-asterisk" Comparing "any-asterisk" != "any-asterisk" -make: "varmod-match.mk" line 146: Unknown modifier "]" -make: "varmod-match.mk" line 146: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +make: "varmod-match.mk" line 151: Unknown modifier "]" +make: "varmod-match.mk" line 151: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-match.mk diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.9 src/usr.bin/make/unit-tests/varmod-match.mk:1.10 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.9 Sun May 8 06:51:27 2022 +++ src/usr.bin/make/unit-tests/varmod-match.mk Sat Jun 11 07:54:25 2022 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.9 2022/05/08 06:51:27 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.10 2022/06/11 07:54:25 rillig Exp $ # # Tests for the :M variable modifier, which filters words that match the # given pattern. @@ -28,11 +28,16 @@ NUMBERS= One Two Three Four five six sev . error .endif -# Before 2020-06-13, this expression took quite a long time in Str_Match, -# calling itself 601080390 times for 16 asterisks. +# Before 2020-06-13, this expression called Str_Match 601,080,390 times. +# Since 2020-06-13, this expression calls Str_Match 1 time. .if ${:U:Mb} .endif +# As of 2022-06-11, this expression calls Str_Match 5,242,223 times. +# Adding another '*?' to the pattern calls Str_Match 41,261,143 times. +.if ${:U..b:M*?*?*?*?*?a} +.endif + # To match a dollar sign in a word, double it. # # This is different from the :S and :C variable modifiers, where a '$'
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sat Jun 11 07:54:25 UTC 2022 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: demonstrate another pathological pattern match To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-match.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.