CVS commit: src/libexec/httpd
Module Name:src Committed By: riastradh Date: Mon Dec 18 03:48:57 UTC 2023 Modified Files: src/libexec/httpd: ssl-bozo.c Log Message: httpd(8): Add missing newline to `SSL Error' messages. Matches the pattern in all other printf/syslog calls. XXX pullup-10 XXX pullup-9 XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/libexec/httpd/ssl-bozo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/ssl-bozo.c diff -u src/libexec/httpd/ssl-bozo.c:1.33 src/libexec/httpd/ssl-bozo.c:1.34 --- src/libexec/httpd/ssl-bozo.c:1.33 Wed Jun 7 20:12:31 2023 +++ src/libexec/httpd/ssl-bozo.c Mon Dec 18 03:48:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ssl-bozo.c,v 1.33 2023/06/07 20:12:31 mrg Exp $ */ +/* $NetBSD: ssl-bozo.c,v 1.34 2023/12/18 03:48:57 riastradh Exp $ */ /* $eterna: ssl-bozo.c,v 1.15 2011/11/18 09:21:15 mrg Exp $ */ @@ -129,6 +129,7 @@ bozo_clear_ssl_queue(bozohttpd_t *httpd) ERR_lib_error_string(sslcode), ERR_func_error_string(sslcode), ERR_reason_error_string(sslcode)); + fputs("\n", stderr); } else { syslog(LOG_ERR, sslfmt, ERR_lib_error_string(sslcode),
CVS commit: src/libexec/httpd
Module Name:src Committed By: riastradh Date: Mon Dec 18 03:48:57 UTC 2023 Modified Files: src/libexec/httpd: ssl-bozo.c Log Message: httpd(8): Add missing newline to `SSL Error' messages. Matches the pattern in all other printf/syslog calls. XXX pullup-10 XXX pullup-9 XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/libexec/httpd/ssl-bozo.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: Sun Dec 17 23:19:02 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: test the fast code path for ':M' patterns like '*.c' To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.19 -r1.20 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.13 src/usr.bin/make/unit-tests/varmod-match.exp:1.14 --- src/usr.bin/make/unit-tests/varmod-match.exp:1.13 Sun Dec 17 00:19:11 2023 +++ src/usr.bin/make/unit-tests/varmod-match.exp Sun Dec 17 23:19:02 2023 @@ -1,14 +1,14 @@ -make: "varmod-match.mk" line 268: warning: Unfinished character list in pattern 'a[' of modifier ':M' -make: "varmod-match.mk" line 276: warning: Unfinished character list in pattern 'a[^' of modifier ':M' -make: "varmod-match.mk" line 284: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' -make: "varmod-match.mk" line 292: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' -make: "varmod-match.mk" line 301: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' -make: "varmod-match.mk" line 315: warning: Unfinished character list in pattern '?[\' of modifier ':M' -make: "varmod-match.mk" line 323: warning: Unfinished character range in pattern '[x-' of modifier ':M' -make: "varmod-match.mk" line 335: warning: Unfinished character range in pattern '[^x-' of modifier ':M' -make: "varmod-match.mk" line 343: warning: Unfinished character list in pattern '[' of modifier ':M' -make: "varmod-match.mk" line 343: Unknown modifier "]" -make: "varmod-match.mk" line 343: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +make: "varmod-match.mk" line 289: warning: Unfinished character list in pattern 'a[' of modifier ':M' +make: "varmod-match.mk" line 297: warning: Unfinished character list in pattern 'a[^' of modifier ':M' +make: "varmod-match.mk" line 305: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' +make: "varmod-match.mk" line 313: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' +make: "varmod-match.mk" line 322: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' +make: "varmod-match.mk" line 336: warning: Unfinished character list in pattern '?[\' of modifier ':M' +make: "varmod-match.mk" line 344: warning: Unfinished character range in pattern '[x-' of modifier ':M' +make: "varmod-match.mk" line 356: warning: Unfinished character range in pattern '[^x-' of modifier ':M' +make: "varmod-match.mk" line 364: warning: Unfinished character list in pattern '[' of modifier ':M' +make: "varmod-match.mk" line 364: Unknown modifier "]" +make: "varmod-match.mk" line 364: 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.19 src/usr.bin/make/unit-tests/varmod-match.mk:1.20 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.19 Sun Dec 17 00:19:11 2023 +++ src/usr.bin/make/unit-tests/varmod-match.mk Sun Dec 17 23:19:02 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.19 2023/12/17 00:19:11 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.20 2023/12/17 23:19:02 rillig Exp $ # # Tests for the ':M' modifier, which keeps only those words that match the # given pattern. @@ -53,6 +53,27 @@ . error .endif +# Test the fast code path for '*' followed by a regular character. +.if ${:U file.c file.*c file.h file\.c :M*.c} != "file.c file\\.c" +. error +.endif +# Ensure that the fast code path correctly handles the backslash. +.if ${:U file.c file.*c file.h file\.c :M*\.c} != "file.c file\\.c" +. error +.endif +# Ensure that the fast code path correctly handles '\*'. +.if ${:U file.c file.*c file.h file\.c :M*\*c} != "file.*c" +. error +.endif +# Ensure that the partial match '.c' doesn't confuse the fast code path. +.if ${:U file.c.cc file.cc.cc file.cc.c :M*.cc} != "file.c.cc file.cc.cc" +. error +.endif +# Ensure that the substring '.cc' doesn't confuse the fast code path for '.c'. +.if ${:U file.c.cc file.cc.cc file.cc.c :M*.c} != "file.cc.c" +. error +.endif + # 2. Character lists and character ranges #
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Dec 17 23:19:02 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk Log Message: tests/make: test the fast code path for ':M' patterns like '*.c' To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.19 -r1.20 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
Module Name:src Committed By: rillig Date: Sun Dec 17 22:46:44 UTC 2023 Modified Files: src/usr.bin/make: str.c Log Message: make: speed up pattern matching in the ':M' modifier In the common patterns where '*' is followed by a regular character, such as in the patterns '*.c' or '*.mk', search the next possible matching position in a small loop, instead of repeatedly comparing the first remaining pattern character to all special characters. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 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.100 src/usr.bin/make/str.c:1.101 --- src/usr.bin/make/str.c:1.100 Sat Dec 16 21:26:07 2023 +++ src/usr.bin/make/str.c Sun Dec 17 22:46:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.100 2023/12/16 21:26:07 rillig Exp $ */ +/* $NetBSD: str.c,v 1.101 2023/12/17 22:46:44 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.100 2023/12/16 21:26:07 rillig Exp $"); +MAKE_RCSID("$NetBSD: str.c,v 1.101 2023/12/17 22:46:44 rillig Exp $"); static HashTable interned_strings; @@ -375,8 +375,15 @@ match_fixed_length: if (*pat == '\\') /* match the next character exactly */ pat++; - if (*pat != *str) + if (*pat != *str) { + if (asterisk && str == fixed_str) { +while (*str != '\0' && *str != *pat) + str++; +fixed_str = str; +goto match_fixed_length; + } goto no_match; + } } if (*pat == '*') {
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Dec 17 22:46:44 UTC 2023 Modified Files: src/usr.bin/make: str.c Log Message: make: speed up pattern matching in the ':M' modifier In the common patterns where '*' is followed by a regular character, such as in the patterns '*.c' or '*.mk', search the next possible matching position in a small loop, instead of repeatedly comparing the first remaining pattern character to all special characters. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 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/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:07:34 UTC 2023 Modified Files: src/sys/arch/x68k/dev: mha.c Log Message: Pass periph_target from xs->xs_periph, since periph is not defined. Fixes SPC_DEBUG build option. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/x68k/dev/mha.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/x68k/dev/mha.c diff -u src/sys/arch/x68k/dev/mha.c:1.59 src/sys/arch/x68k/dev/mha.c:1.60 --- src/sys/arch/x68k/dev/mha.c:1.59 Tue Dec 5 22:24:40 2023 +++ src/sys/arch/x68k/dev/mha.c Sun Dec 17 22:07:34 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mha.c,v 1.59 2023/12/05 22:24:40 andvar Exp $ */ +/* $NetBSD: mha.c,v 1.60 2023/12/17 22:07:34 andvar Exp $ */ /*- * Copyright (c) 1996-1999 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mha.c,v 1.59 2023/12/05 22:24:40 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mha.c,v 1.60 2023/12/17 22:07:34 andvar Exp $"); #include "opt_ddb.h" @@ -683,7 +683,7 @@ mha_scsi_request(struct scsipi_channel * SPC_TRACE(("[mha_scsi_cmd] ")); SPC_CMDS(("[0x%x, %d]->%d ", (int)xs->cmd->opcode, xs->cmdlen, - periph->periph_target)); + xs->xs_periph->periph_target)); flags = xs->xs_control;
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:07:34 UTC 2023 Modified Files: src/sys/arch/x68k/dev: mha.c Log Message: Pass periph_target from xs->xs_periph, since periph is not defined. Fixes SPC_DEBUG build option. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/x68k/dev/mha.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:03:50 UTC 2023 Modified Files: src/sys/arch/x68k/dev: intio_dmac.c Log Message: Remove accidentally added i in previous commit.. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/dev/intio_dmac.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/x68k/dev/intio_dmac.c diff -u src/sys/arch/x68k/dev/intio_dmac.c:1.38 src/sys/arch/x68k/dev/intio_dmac.c:1.39 --- src/sys/arch/x68k/dev/intio_dmac.c:1.38 Sun Dec 17 22:01:56 2023 +++ src/sys/arch/x68k/dev/intio_dmac.c Sun Dec 17 22:03:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: intio_dmac.c,v 1.38 2023/12/17 22:01:56 andvar Exp $ */ +/* $NetBSD: intio_dmac.c,v 1.39 2023/12/17 22:03:50 andvar Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include "opt_m68k_arch.h" #include -__KERNEL_RCSID(0, "$NetBSD: intio_dmac.c,v 1.38 2023/12/17 22:01:56 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intio_dmac.c,v 1.39 2023/12/17 22:03:50 andvar Exp $"); #include #include @@ -429,7 +429,7 @@ dmac_start_xfer_offset(struct dmac_softc #ifdef DMAC_ARRAYCHAIN #if defined(M68040) || defined(M68060) /* flush data cache for the map */ - if (dmamap->dm_nsegs != 1i && mmutype == MMU_68040 && c > 0) + if (dmamap->dm_nsegs != 1 && mmutype == MMU_68040 && c > 0) dma_cachectl((void *) xf->dx_array, sizeof(struct dmac_sg_array) * c); #endif
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:03:50 UTC 2023 Modified Files: src/sys/arch/x68k/dev: intio_dmac.c Log Message: Remove accidentally added i in previous commit.. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/dev/intio_dmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:01:56 UTC 2023 Modified Files: src/sys/arch/x68k/dev: intio_dmac.c Log Message: Fix DMAC_ARRAYCHAIN enabled build: pass dmac->sc_dev instead of undefined self in dmac_start_xfer_offset(). remove unused chan/ch variables in dmac_program_arraychain(). initialize c to zero in dmac_start_xfer_offset() and add check that is bigger than 0 before calling dma_cachectl() to fix potentially uninitialized error (seems to be false positive though). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x68k/dev/intio_dmac.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/x68k/dev/intio_dmac.c diff -u src/sys/arch/x68k/dev/intio_dmac.c:1.37 src/sys/arch/x68k/dev/intio_dmac.c:1.38 --- src/sys/arch/x68k/dev/intio_dmac.c:1.37 Fri Aug 11 07:30:01 2017 +++ src/sys/arch/x68k/dev/intio_dmac.c Sun Dec 17 22:01:56 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: intio_dmac.c,v 1.37 2017/08/11 07:30:01 isaki Exp $ */ +/* $NetBSD: intio_dmac.c,v 1.38 2023/12/17 22:01:56 andvar Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include "opt_m68k_arch.h" #include -__KERNEL_RCSID(0, "$NetBSD: intio_dmac.c,v 1.37 2017/08/11 07:30:01 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intio_dmac.c,v 1.38 2023/12/17 22:01:56 andvar Exp $"); #include #include @@ -352,7 +352,7 @@ dmac_start_xfer_offset(struct dmac_softc bus_addr_t paddr; uint8_t csr; #ifdef DMAC_ARRAYCHAIN - int c; + int c = 0; #endif DPRINTF(3, ("dmac_start_xfer\n")); @@ -411,7 +411,7 @@ dmac_start_xfer_offset(struct dmac_softc #endif } else { #ifdef DMAC_ARRAYCHAIN - c = dmac_program_arraychain(self, xf, offset, size); + c = dmac_program_arraychain(dmac->sc_dev, xf, offset, size); bus_space_write_4(dmac->sc_bst, chan->ch_bht, DMAC_REG_BAR, (int) chan->ch_seg[0].ds_addr); bus_space_write_2(dmac->sc_bst, chan->ch_bht, @@ -429,7 +429,7 @@ dmac_start_xfer_offset(struct dmac_softc #ifdef DMAC_ARRAYCHAIN #if defined(M68040) || defined(M68060) /* flush data cache for the map */ - if (dmamap->dm_nsegs != 1 && mmutype == MMU_68040) + if (dmamap->dm_nsegs != 1i && mmutype == MMU_68040 && c > 0) dma_cachectl((void *) xf->dx_array, sizeof(struct dmac_sg_array) * c); #endif @@ -444,8 +444,6 @@ static int dmac_program_arraychain(device_t self, struct dmac_dma_xfer *xf, u_int offset, u_int size) { - struct dmac_channel_stat *chan = xf->dx_channel; - int ch = chan->ch_channel; struct x68k_bus_dmamap *map = xf->dx_dmamap; int i, j;
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 22:01:56 UTC 2023 Modified Files: src/sys/arch/x68k/dev: intio_dmac.c Log Message: Fix DMAC_ARRAYCHAIN enabled build: pass dmac->sc_dev instead of undefined self in dmac_start_xfer_offset(). remove unused chan/ch variables in dmac_program_arraychain(). initialize c to zero in dmac_start_xfer_offset() and add check that is bigger than 0 before calling dma_cachectl() to fix potentially uninitialized error (seems to be false positive though). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x68k/dev/intio_dmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 21:52:11 UTC 2023 Modified Files: src/sys/arch/x68k/dev: fd.c Log Message: s/FD_DEBUG/FDDEBUG/ for consistency. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/arch/x68k/dev/fd.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/x68k/dev/fd.c diff -u src/sys/arch/x68k/dev/fd.c:1.127 src/sys/arch/x68k/dev/fd.c:1.128 --- src/sys/arch/x68k/dev/fd.c:1.127 Thu May 26 14:27:43 2022 +++ src/sys/arch/x68k/dev/fd.c Sun Dec 17 21:52:11 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.127 2022/05/26 14:27:43 tsutsui Exp $ */ +/* $NetBSD: fd.c,v 1.128 2023/12/17 21:52:11 andvar Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.127 2022/05/26 14:27:43 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.128 2023/12/17 21:52:11 andvar Exp $"); #include "opt_ddb.h" #include "opt_m68k_arch.h" @@ -1835,7 +1835,7 @@ fdformat(dev_t dev, struct ne7_fd_formb bp->b_bcount = sizeof(struct fd_idfield_data) * finfo->fd_formb_nsecs; bp->b_data = (void *)finfo; -#ifdef FD_DEBUG +#ifdef FDDEBUG printf("fdformat: blkno %" PRIx64 " count %x\n", bp->b_blkno, bp->b_bcount); #endif
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 21:52:11 UTC 2023 Modified Files: src/sys/arch/x68k/dev: fd.c Log Message: s/FD_DEBUG/FDDEBUG/ for consistency. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/arch/x68k/dev/fd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 21:51:29 UTC 2023 Modified Files: src/sys/arch/x68k/dev: bmd.c Log Message: Fix format specifiers and use BMD_UNIT(dev) macro to fix BMD_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x68k/dev/bmd.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/x68k/dev/bmd.c diff -u src/sys/arch/x68k/dev/bmd.c:1.26 src/sys/arch/x68k/dev/bmd.c:1.27 --- src/sys/arch/x68k/dev/bmd.c:1.26 Thu May 26 14:33:29 2022 +++ src/sys/arch/x68k/dev/bmd.c Sun Dec 17 21:51:29 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bmd.c,v 1.26 2022/05/26 14:33:29 tsutsui Exp $ */ +/* $NetBSD: bmd.c,v 1.27 2023/12/17 21:51:29 andvar Exp $ */ /* * Copyright (c) 2002 Tetsuya Isaki. All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bmd.c,v 1.26 2022/05/26 14:33:29 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bmd.c,v 1.27 2023/12/17 21:51:29 andvar Exp $"); #include #include @@ -232,7 +232,7 @@ bmdopen(dev_t dev, int oflags, int devty { struct bmd_softc *sc; - DPRINTF(("%s%d\n", __func__, unit)); + DPRINTF(("%s%d\n", __func__, BMD_UNIT(dev))); sc = device_lookup_private(&bmd_cd, BMD_UNIT(dev)); if (sc == NULL) @@ -291,7 +291,7 @@ bmdstrategy(struct buf *bp) goto done; } - DPRINTF(("bmdstrategy: %s blkno %d bcount %ld:", + DPRINTF(("bmdstrategy: %s blkno %" PRIx64 " bcount %d:", (bp->b_flags & B_READ) ? "read " : "write", bp->b_blkno, bp->b_bcount));
CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: andvar Date: Sun Dec 17 21:51:29 UTC 2023 Modified Files: src/sys/arch/x68k/dev: bmd.c Log Message: Fix format specifiers and use BMD_UNIT(dev) macro to fix BMD_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x68k/dev/bmd.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/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Sun Dec 17 18:59:19 UTC 2023 Modified Files: src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h Log Message: Sync ut{array,hash}.h to elftoolchain [r4024]. This change updates these files to UTARRAY/UTHASH v2.3.0. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/common/utarray.h cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/common/uthash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/utarray.h diff -u src/external/bsd/elftoolchain/dist/common/utarray.h:1.3 src/external/bsd/elftoolchain/dist/common/utarray.h:1.4 --- src/external/bsd/elftoolchain/dist/common/utarray.h:1.3 Wed Nov 18 22:23:05 2020 +++ src/external/bsd/elftoolchain/dist/common/utarray.h Sun Dec 17 18:59:19 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: utarray.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $ */ +/* $NetBSD: utarray.h,v 1.4 2023/12/17 18:59:19 jkoshy Exp $ */ -/* -Copyright (c) 2008-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ +/*- +Copyright (c) 2008-2021, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI #ifndef UTARRAY_H #define UTARRAY_H -#define UTARRAY_VERSION 2.1.0 +#define UTARRAY_VERSION 2.3.0 #include /* size_t */ #include /* memset, etc */ @@ -234,8 +234,9 @@ typedef struct { /* last we pre-define a few icd for common utarrays of ints and strings */ static void utarray_str_cpy(void *dst, const void *src) { - char *const*_src = (char*const*)src, **_dst = (char**)dst; - *_dst = (*_src == NULL) ? NULL : strdup(*_src); + char *const *srcc = (char *const *)src; + char **dstc = (char**)dst; + *dstc = (*srcc == NULL) ? NULL : strdup(*srcc); } static void utarray_str_dtor(void *elt) { char **eltc = (char**)elt; Index: src/external/bsd/elftoolchain/dist/common/uthash.h diff -u src/external/bsd/elftoolchain/dist/common/uthash.h:1.4 src/external/bsd/elftoolchain/dist/common/uthash.h:1.5 --- src/external/bsd/elftoolchain/dist/common/uthash.h:1.4 Mon Nov 30 22:26:30 2020 +++ src/external/bsd/elftoolchain/dist/common/uthash.h Sun Dec 17 18:59:19 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: uthash.h,v 1.4 2020/11/30 22:26:30 jkoshy Exp $ */ +/* $NetBSD: uthash.h,v 1.5 2023/12/17 18:59:19 jkoshy Exp $ */ -/* -Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ +/*- +Copyright (c) 2003-2021, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without @@ -26,12 +26,22 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI #ifndef UTHASH_H #define UTHASH_H -#define UTHASH_VERSION 2.1.0 +#define UTHASH_VERSION 2.3.0 #include/* memcmp, memset, strlen */ #include/* ptrdiff_t */ #include/* exit */ +#if defined(HASH_DEFINE_OWN_STDINT) && HASH_DEFINE_OWN_STDINT +/* This codepath is provided for backward compatibility, but I plan to remove it. */ +#warning "HASH_DEFINE_OWN_STDINT is deprecated; please use HASH_NO_STDINT instead" +typedef unsigned int uint32_t; +typedef unsigned char uint8_t; +#elif defined(HASH_NO_STDINT) && HASH_NO_STDINT +#else +#include/* uint8_t, uint32_t */ +#endif + /* These macros use decltype or the earlier __typeof GNU extension. As decltype is only available in newer compilers (VS2010 or gcc 4.3+ when compiling c++ source) this code uses whatever method is needed @@ -64,25 +74,6 @@ do { } while (0) #endif -/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */ -#if defined(_WIN32) -#if defined(_MSC_VER) && _MSC_VER >= 1600 -#include -#elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__) -#include -#else -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -#endif -#elif defined(__GNUC__) && !defined(__VXWORKS__) -#include -#elif defined(__lint__) -#include -#else -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -#endif - #ifndef uthash_malloc #define uthash_malloc(sz) malloc(sz) /* malloc fcn */ #endif @@ -96,15 +87,12 @@ typedef unsigned char uint8_t; #define uthash_strlen(s) strlen(s) #endif -#ifdef uthash_memcmp -/* This warning will not catch programs that define uthash_memcmp AFTER including uthash.h. */ -#warning "uthash_memcmp is deprecated; please use HASH_KEYCMP instead" -#else -#define uthash_memcmp(a,b,n) memcmp(a,b,n) +#ifndef HASH_FUNCTION +#define HASH_FUNCTION(keyptr,keylen,hashv) HASH_JEN(keyptr, keylen, hashv) #endif #ifndef HASH_KEYCMP -#define HASH_KEYCMP(a,b,n) uthash_memcmp(a,b,n) +#define HASH_KEYCMP(a,b,n) memcmp(a,b,n) #endif #ifndef uthash_noexpand_fyi @@
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Sun Dec 17 18:59:19 UTC 2023 Modified Files: src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h Log Message: Sync ut{array,hash}.h to elftoolchain [r4024]. This change updates these files to UTARRAY/UTHASH v2.3.0. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/common/utarray.h cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/common/uthash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha/conf
Module Name:src Committed By: andvar Date: Sun Dec 17 18:48:53 UTC 2023 Modified Files: src/sys/arch/alpha/conf: GENERIC Log Message: s/keyboad/keyboard/ in wsmux description comment. To generate a diff of this commit: cvs rdiff -u -r1.418 -r1.419 src/sys/arch/alpha/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/conf/GENERIC diff -u src/sys/arch/alpha/conf/GENERIC:1.418 src/sys/arch/alpha/conf/GENERIC:1.419 --- src/sys/arch/alpha/conf/GENERIC:1.418 Thu Feb 9 14:09:47 2023 +++ src/sys/arch/alpha/conf/GENERIC Sun Dec 17 18:48:53 2023 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.418 2023/02/09 14:09:47 abs Exp $ +# $NetBSD: GENERIC,v 1.419 2023/12/17 18:48:53 andvar Exp $ # # This machine description file is used to generate the default NetBSD # kernel. @@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident "GENERIC-$Revision: 1.418 $" +ident "GENERIC-$Revision: 1.419 $" maxusers 32 @@ -728,7 +728,7 @@ pseudo-device vcoda # coda minicache < pseudo-device clockctl # user control of clock subsystem pseudo-device drvctl # user control of drive subsystem pseudo-device wsfont -pseudo-device wsmux # mouse and keyboad multiplexing +pseudo-device wsmux # mouse and keyboard multiplexing pseudo-device ksyms # /dev/ksyms pseudo-device lockstat # lock profiling pseudo-device bcsp # BlueCore Serial Protocol
CVS commit: src/sys/arch/alpha/conf
Module Name:src Committed By: andvar Date: Sun Dec 17 18:48:53 UTC 2023 Modified Files: src/sys/arch/alpha/conf: GENERIC Log Message: s/keyboad/keyboard/ in wsmux description comment. To generate a diff of this commit: cvs rdiff -u -r1.418 -r1.419 src/sys/arch/alpha/conf/GENERIC 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: Sun Dec 17 18:46:42 UTC 2023 Modified Files: src/usr.sbin/sysinst: configmenu.c defs.h main.c menus.entropy menus.mi net.c Log Message: Add a https transfer method (sharing all host details with the http transfer). Make this method the default for all downloads. Try to make sure the binary pkg installation (which runs in a chroot in the already installed system) can make use of SSL verification. This does NOT fix the missing SSL verification in most install media even if using https (due to not fully populated /etc/openssl/certs). To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.89 -r1.90 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/sysinst/main.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/menus.entropy cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/menus.mi cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/net.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/configmenu.c diff -u src/usr.sbin/sysinst/configmenu.c:1.17 src/usr.sbin/sysinst/configmenu.c:1.18 --- src/usr.sbin/sysinst/configmenu.c:1.17 Wed May 18 16:39:03 2022 +++ src/usr.sbin/sysinst/configmenu.c Sun Dec 17 18:46:42 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: configmenu.c,v 1.17 2022/05/18 16:39:03 martin Exp $ */ +/* $NetBSD: configmenu.c,v 1.18 2023/12/17 18:46:42 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -324,6 +324,9 @@ set_binpkg(struct menudesc *menu, void * int allok = 0; arg_rv parm; + if (config_network(0)) + mnt_net_config(); + do { parm.rv = -1; parm.arg = additional_pkgs; @@ -333,7 +336,16 @@ set_binpkg(struct menudesc *menu, void * return 0; } - make_url(pkgpath, &pkg, pkg_dir); + /* + * Make sure we have the TLS certs in a usable state + * (if target is a new installation) + */ + if (pkg.xfer == XFER_HTTPS) { + run_program(RUN_CHROOT | RUN_SILENT, + "/bin/sh /etc/rc.d/certctl_init onestart"); + make_url(pkgpath, &pkg, pkg_dir); + } + if (run_program(RUN_DISPLAY | RUN_PROGRESS | RUN_CHROOT, "pkg_add %s/pkgin", pkgpath) == 0) { allok = 1; Index: src/usr.sbin/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.89 src/usr.sbin/sysinst/defs.h:1.90 --- src/usr.sbin/sysinst/defs.h:1.89 Tue Mar 14 09:54:40 2023 +++ src/usr.sbin/sysinst/defs.h Sun Dec 17 18:46:42 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.89 2023/03/14 09:54:40 kre Exp $ */ +/* $NetBSD: defs.h,v 1.90 2023/12/17 18:46:42 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -599,10 +599,13 @@ extern const char *ushell; #define XFER_FTP 0 #define XFER_HTTP 1 -#define XFER_MAX XFER_HTTP +#define XFER_HTTPS 2 +#define XFER_MAX XFER_HTTPS +#define XFER_HOST_MAX XFER_HTTP /* http and https share a server name */ +#define XFER_HOST(XFER) ((XFER) == XFER_FTP ? 0 : 1) struct ftpinfo { - char xfer_host[XFER_MAX+1][STRSIZE]; + char xfer_host[XFER_HOST_MAX+1][STRSIZE]; char dir[STRSIZE] ; char user[SSTRSIZE]; char pass[STRSIZE]; Index: src/usr.sbin/sysinst/main.c diff -u src/usr.sbin/sysinst/main.c:1.31 src/usr.sbin/sysinst/main.c:1.32 --- src/usr.sbin/sysinst/main.c:1.31 Fri Jun 9 18:44:16 2023 +++ src/usr.sbin/sysinst/main.c Sun Dec 17 18:46:42 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.31 2023/06/09 18:44:16 martin Exp $ */ +/* $NetBSD: main.c,v 1.32 2023/12/17 18:46:42 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -132,8 +132,8 @@ static const struct f_arg fflagopts[] = {"xfer dir", "/usr/INSTALL", xfer_dir, sizeof xfer_dir}, {"ext dir", "", ext_dir_bin, sizeof ext_dir_bin}, {"ext src dir", "", ext_dir_src, sizeof ext_dir_src}, - {"ftp host", SYSINST_FTP_HOST, ftp.xfer_host[XFER_FTP], sizeof ftp.xfer_host[XFER_FTP]}, - {"http host", SYSINST_HTTP_HOST, ftp.xfer_host[XFER_HTTP], sizeof ftp.xfer_host[XFER_HTTP]}, + {"ftp host", SYSINST_FTP_HOST, ftp.xfer_host[XFER_HOST(XFER_FTP)], sizeof ftp.xfer_host[XFER_HOST(XFER_FTP)]}, + {"http host", SYSINST_HTTP_HOST, ftp.xfer_host[XFER_HOST(XFER_HTTP)], sizeof ftp.xfer_host[XFER_HOST(XFER_HTTP)]}, {"ftp dir", SYSINST_FTP_DIR, ftp.dir, sizeof ftp.dir}, {"ftp prefix", "/" ARCH_SUBDIR "/binary/sets", set_dir_bin, sizeof set_dir_bin}, {"ftp src prefix", "/source/sets", set_dir_src, sizeof set_dir_src}, @@ -150,15 +150,15 @@ static const struct f_arg fflagopts[] = {"targetroot mount", "/targetroot", targetroot_mnt, sizeof targetroot_mnt}, {"dist postfix", "." SETS_TAR_SUFF, dist_postfix, sizeof dist_postfix}, {"dist tgz postfix", ".tgz", dist_tgz_postfix, sizeof dist_tgz_postfix}, - {"pkg host", SYSINST_PKG_HOST, pkg.xfer_host[XFER_FTP], sizeof pkg.xfer_host[XFER_FTP]}, - {"pkg http host", SYSINST_PKG_HTTP_HOST, pkg.xfer_host[XFER_HTTP], sizeof pkg.xfer_host[XFER_HTTP]}, + {"pkg host", SYSINS
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun Dec 17 18:46:42 UTC 2023 Modified Files: src/usr.sbin/sysinst: configmenu.c defs.h main.c menus.entropy menus.mi net.c Log Message: Add a https transfer method (sharing all host details with the http transfer). Make this method the default for all downloads. Try to make sure the binary pkg installation (which runs in a chroot in the already installed system) can make use of SSL verification. This does NOT fix the missing SSL verification in most install media even if using https (due to not fully populated /etc/openssl/certs). To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.89 -r1.90 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/sysinst/main.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/menus.entropy cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/menus.mi cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 18:39:02 UTC 2023 Modified Files: src/sys/arch/vax/vax: ka780.c Log Message: Fix TRENDATA option build by moving TRENDATA code block with memlog() definition over its usage in ka780_memerr() and making it static. Also return type is changed to void and removed unnecessary break at the end of the method. Finally fixed struct memlogtab initialization by adding missing braces around each member in the array. The code builds, but I am not sure weather it was fully finished. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/vax/vax/ka780.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/vax/vax/ka780.c diff -u src/sys/arch/vax/vax/ka780.c:1.33 src/sys/arch/vax/vax/ka780.c:1.34 --- src/sys/arch/vax/vax/ka780.c:1.33 Sun Mar 25 08:13:20 2018 +++ src/sys/arch/vax/vax/ka780.c Sun Dec 17 18:39:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ka780.c,v 1.33 2018/03/25 08:13:20 ragge Exp $ */ +/* $NetBSD: ka780.c,v 1.34 2023/12/17 18:39:02 andvar Exp $ */ /*- * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. * All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ka780.c,v 1.33 2018/03/25 08:13:20 ragge Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ka780.c,v 1.34 2023/12/17 18:39:02 andvar Exp $"); #include #include @@ -200,6 +200,55 @@ mem_sbi_attach(device_t parent, device_t printf("\n"); } +#ifdef TRENDATA +/* + * Figure out what chip to replace on Trendata boards. + * Assumes all your memory is Trendata or the non-Trendata + * memory never fails.. + */ +const struct { + u_char m_syndrome; + char m_chip[4]; +} memlogtab[] = { + {0x01, "C00"}, {0x02, "C01"}, {0x04, "C02"}, {0x08, "C03"}, + {0x10, "C04"}, {0x19, "L01"}, {0x1A, "L02"}, {0x1C, "L04"}, + {0x1F, "L07"}, {0x20, "C05"}, {0x38, "L00"}, {0x3B, "L03"}, + {0x3D, "L05"}, {0x3E, "L06"}, {0x40, "C06"}, {0x49, "L09"}, + {0x4A, "L10"}, {0x4c, "L12"}, {0x4F, "L15"}, {0x51, "L17"}, + {0x52, "L18"}, {0x54, "L20"}, {0x57, "L23"}, {0x58, "L24"}, + {0x5B, "L27"}, {0x5D, "L29"}, {0x5E, "L30"}, {0x68, "L08"}, + {0x6B, "L11"}, {0x6D, "L13"}, {0x6E, "L14"}, {0x70, "L16"}, + {0x73, "L19"}, {0x75, "L21"}, {0x76, "L22"}, {0x79, "L25"}, + {0x7A, "L26"}, {0x7C, "L28"}, {0x7F, "L31"}, {0x80, "C07"}, + {0x89, "U01"}, {0x8A, "U02"}, {0x8C, "U04"}, {0x8F, "U07"}, + {0x91, "U09"}, {0x92, "U10"}, {0x94, "U12"}, {0x97, "U15"}, + {0x98, "U16"}, {0x9B, "U19"}, {0x9D, "U21"}, {0x9E, "U22"}, + {0xA8, "U00"}, {0xAB, "U03"}, {0xAD, "U05"}, {0xAE, "U06"}, + {0xB0, "U08"}, {0xB3, "U11"}, {0xB5, "U13"}, {0xB6, "U14"}, + {0xB9, "U17"}, {0xBA, "U18"}, {0xBC, "U20"}, {0xBF, "U23"}, + {0xC1, "U25"}, {0xC2, "U26"}, {0xC4, "U28"}, {0xC7, "U31"}, + {0xE0, "U24"}, {0xE3, "U27"}, {0xE5, "U29"}, {0xE6, "U30"} +}; + +static void +memlog(int m, struct mcr780 *mcr) +{ + int i; + + for (i = 0; i < __arraycount(memlogtab); i++) + if ((u_char)(M780C_SYN(mcr)) == memlogtab[i].m_syndrome) { + printf( + "mcr%d: replace %s chip in %s bank of memory" + " board %d (0-15)\n", + m, memlogtab[i].m_chip, + (M780C_ADDR(mcr) & 0x8000) ? "upper" : "lower", + (M780C_ADDR(mcr) >> 16)); + return; + } + printf("mcr%d: multiple errors, not traceable\n", m); +} +#endif /* TRENDATA */ + /* log crd errors */ void ka780_memerr(void) @@ -250,56 +299,6 @@ ka780_memerr(void) } } -#ifdef TRENDATA -/* - * Figure out what chip to replace on Trendata boards. - * Assumes all your memory is Trendata or the non-Trendata - * memory never fails.. - */ -const struct { - u_char m_syndrome; - char m_chip[4]; -} memlogtab[] = { - 0x01, "C00", 0x02, "C01", 0x04, "C02", 0x08, "C03", - 0x10, "C04", 0x19, "L01", 0x1A, "L02", 0x1C, "L04", - 0x1F, "L07", 0x20, "C05", 0x38, "L00", 0x3B, "L03", - 0x3D, "L05", 0x3E, "L06", 0x40, "C06", 0x49, "L09", - 0x4A, "L10", 0x4c, "L12", 0x4F, "L15", 0x51, "L17", - 0x52, "L18", 0x54, "L20", 0x57, "L23", 0x58, "L24", - 0x5B, "L27", 0x5D, "L29", 0x5E, "L30", 0x68, "L08", - 0x6B, "L11", 0x6D, "L13", 0x6E, "L14", 0x70, "L16", - 0x73, "L19", 0x75, "L21", 0x76, "L22", 0x79, "L25", - 0x7A, "L26", 0x7C, "L28", 0x7F, "L31", 0x80, "C07", - 0x89, "U01", 0x8A, "U02", 0x8C, "U04", 0x8F, "U07", - 0x91, "U09", 0x92, "U10", 0x94, "U12", 0x97, "U15", - 0x98, "U16", 0x9B, "U19", 0x9D, "U21", 0x9E, "U22", - 0xA8, "U00", 0xAB, "U03", 0xAD, "U05", 0xAE, "U06", - 0xB0, "U08", 0xB3, "U11", 0xB5, "U13", 0xB6, "U14", - 0xB9, "U17", 0xBA, "U18", 0xBC, "U20", 0xBF, "U23", - 0xC1, "U25", 0xC2, "U26", 0xC4, "U28", 0xC7, "U31", - 0xE0, "U24", 0xE3, "U27", 0xE5, "U29", 0xE6, "U30" -}; - -int -memlog(int m, struct mcr780 *mcr) -{ - int i; - - for (i = 0; i < __arraycount(memlogtab); i++) - if ((u_char)(M780C_SYN(mcr)) == memlogtab[i].m_syndrome) { - printf ( - "mcr%d: replace %s chip in %s bank of memory board %d (0-15)\n", -m, -memlog
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 18:39:02 UTC 2023 Modified Files: src/sys/arch/vax/vax: ka780.c Log Message: Fix TRENDATA option build by moving TRENDATA code block with memlog() definition over its usage in ka780_memerr() and making it static. Also return type is changed to void and removed unnecessary break at the end of the method. Finally fixed struct memlogtab initialization by adding missing braces around each member in the array. The code builds, but I am not sure weather it was fully finished. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/vax/vax/ka780.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 15:06:34 UTC 2023 Modified Files: src/sys/arch/vax/vax: crx.c Log Message: Fix format specifier for ka820port_ptr->csr. Fixed CRXDEBUG build option for vax. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/vax/crx.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/vax/vax/crx.c diff -u src/sys/arch/vax/vax/crx.c:1.15 src/sys/arch/vax/vax/crx.c:1.16 --- src/sys/arch/vax/vax/crx.c:1.15 Fri Jul 25 08:10:35 2014 +++ src/sys/arch/vax/vax/crx.c Sun Dec 17 15:06:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: crx.c,v 1.15 2014/07/25 08:10:35 dholland Exp $ */ +/* $NetBSD: crx.c,v 1.16 2023/12/17 15:06:33 andvar Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crx.c,v 1.15 2014/07/25 08:10:35 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crx.c,v 1.16 2023/12/17 15:06:33 andvar Exp $"); #include #include @@ -149,7 +149,7 @@ crxrw(dev_t dev, struct uio *uio, int fl #if CRXDEBUG printf("crxrw(csa%d): %s\n", rx50unit(dev), uio->uio_rw==UIO_READ?"read":"write"); - printf("crxrw: ka820port = %x\n", ka820port_ptr->csr); + printf("crxrw: ka820port = %lx\n", ka820port_ptr->csr); #endif /* enforce whole-sector I/O */ if ((uio->uio_offset & 511) || (uio->uio_resid & 511)) @@ -202,7 +202,7 @@ crxrw(dev_t dev, struct uio *uio, int fl #endif #if CRXDEBUG printf("crx: going off\n"); - printf("crxrw: ka820port = %x\n", ka820port_ptr->csr); + printf("crxrw: ka820port = %lx\n", ka820port_ptr->csr); #endif rxaddr->rxgo = 0; /* start it up */ ka820port_ptr->csr |= KA820PORT_RXIRQ; @@ -210,7 +210,7 @@ crxrw(dev_t dev, struct uio *uio, int fl while ((rs->rs_flags & RS_DONE) == 0) { #if CRXDEBUG printf("crx: sleeping on I/O\n"); - printf("crxopen: ka820port = %x\n", ka820port_ptr->csr); + printf("crxopen: ka820port = %lx\n", ka820port_ptr->csr); #endif (void) tsleep(&rs->rs_blkno, PRIBIO, "crxrw", 0); }
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 15:06:34 UTC 2023 Modified Files: src/sys/arch/vax/vax: crx.c Log Message: Fix format specifier for ka820port_ptr->csr. Fixed CRXDEBUG build option for vax. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/vax/crx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 14:54:49 UTC 2023 Modified Files: src/sys/arch/vax/vax: bus_dma.c Log Message: Fix printf format specifier for size. Fixes DEBUG_DMA build option. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/vax/vax/bus_dma.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/vax/vax/bus_dma.c diff -u src/sys/arch/vax/vax/bus_dma.c:1.39 src/sys/arch/vax/vax/bus_dma.c:1.40 --- src/sys/arch/vax/vax/bus_dma.c:1.39 Tue Oct 11 22:03:37 2022 +++ src/sys/arch/vax/vax/bus_dma.c Sun Dec 17 14:54:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.39 2022/10/11 22:03:37 andvar Exp $ */ +/* $NetBSD: bus_dma.c,v 1.40 2023/12/17 14:54:49 andvar Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.39 2022/10/11 22:03:37 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.40 2023/12/17 14:54:49 andvar Exp $"); #include #include @@ -485,7 +485,7 @@ _bus_dmamem_unmap(bus_dma_tag_t t, void { #ifdef DEBUG_DMA - printf("dmamem_unmap: t=%p kva=%p size=%x\n", t, kva, size); + printf("dmamem_unmap: t=%p kva=%p size=%lx\n", t, kva, size); #endif /* DEBUG_DMA */ #ifdef DIAGNOSTIC if ((u_long)kva & PGOFSET)
CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: andvar Date: Sun Dec 17 14:54:49 UTC 2023 Modified Files: src/sys/arch/vax/vax: bus_dma.c Log Message: Fix printf format specifier for size. Fixes DEBUG_DMA build option. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/vax/vax/bus_dma.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: andvar Date: Sun Dec 17 14:38:49 UTC 2023 Modified Files: src/sys/netbt: bt_sysctl.c src/usr.bin/sdpquery: command.c Log Message: s/Adapatation/Adaptation/ in l2cap sysctl description. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/netbt/bt_sysctl.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/sdpquery/command.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/netbt/bt_sysctl.c diff -u src/sys/netbt/bt_sysctl.c:1.4 src/sys/netbt/bt_sysctl.c:1.5 --- src/sys/netbt/bt_sysctl.c:1.4 Sun Mar 26 19:10:33 2023 +++ src/sys/netbt/bt_sysctl.c Sun Dec 17 14:38:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_sysctl.c,v 1.4 2023/03/26 19:10:33 andvar Exp $ */ +/* $NetBSD: bt_sysctl.c,v 1.5 2023/12/17 14:38:49 andvar Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bt_sysctl.c,v 1.4 2023/03/26 19:10:33 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt_sysctl.c,v 1.5 2023/12/17 14:38:49 andvar Exp $"); #include #include @@ -142,7 +142,7 @@ SYSCTL_SETUP(sysctl_net_bluetooth_setup, sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, "l2cap", - SYSCTL_DESCR("Logical Link Control & Adapatation Protocol"), + SYSCTL_DESCR("Logical Link Control & Adaptation Protocol"), NULL, 0, NULL, 0, CTL_NET, PF_BLUETOOTH, BTPROTO_L2CAP, CTL_EOL); Index: src/usr.bin/sdpquery/command.c diff -u src/usr.bin/sdpquery/command.c:1.5 src/usr.bin/sdpquery/command.c:1.6 --- src/usr.bin/sdpquery/command.c:1.5 Tue Jun 16 22:54:10 2015 +++ src/usr.bin/sdpquery/command.c Sun Dec 17 14:38:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: command.c,v 1.5 2015/06/16 22:54:10 christos Exp $ */ +/* $NetBSD: command.c,v 1.6 2023/12/17 14:38:49 andvar Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: command.c,v 1.5 2015/06/16 22:54:10 christos Exp $"); +__RCSID("$NetBSD: command.c,v 1.6 2023/12/17 14:38:49 andvar Exp $"); #include #include @@ -71,7 +71,7 @@ static struct alias { { SDP_SERVICE_CLASS_HEADSET, "HSET", "Headset Service"}, { SDP_UUID_PROTOCOL_L2CAP, - "L2CAP", "Logical Link Control and Adapatation Protocol" }, + "L2CAP", "Logical Link Control and Adaptation Protocol" }, { SDP_SERVICE_CLASS_LAN_ACCESS_USING_PPP, "LAN", "Lan access using PPP Service" }, { SDP_SERVICE_CLASS_NAP,
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Dec 17 14:38:49 UTC 2023 Modified Files: src/sys/netbt: bt_sysctl.c src/usr.bin/sdpquery: command.c Log Message: s/Adapatation/Adaptation/ in l2cap sysctl description. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/netbt/bt_sysctl.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/sdpquery/command.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: Sun Dec 17 14:07:22 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: directive-include-guard.exp directive-include-guard.mk var-scope-local-legacy.exp var-scope-local-legacy.mk varmod-mtime.mk varmod-range.exp varmod-range.mk varmod-subst-regex.mk varmod-subst.mk Log Message: tests/make: extend tests for include guards and empty expressions To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/usr.bin/make/unit-tests/directive-include-guard.exp cvs rdiff -u -r1.15 -r1.16 \ src/usr.bin/make/unit-tests/directive-include-guard.mk cvs rdiff -u -r1.2 -r1.3 \ src/usr.bin/make/unit-tests/var-scope-local-legacy.exp \ src/usr.bin/make/unit-tests/var-scope-local-legacy.mk cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-mtime.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-range.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-range.mk \ src/usr.bin/make/unit-tests/varmod-subst-regex.mk cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-subst.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/directive-include-guard.exp diff -u src/usr.bin/make/unit-tests/directive-include-guard.exp:1.13 src/usr.bin/make/unit-tests/directive-include-guard.exp:1.14 --- src/usr.bin/make/unit-tests/directive-include-guard.exp:1.13 Sun Dec 17 09:17:16 2023 +++ src/usr.bin/make/unit-tests/directive-include-guard.exp Sun Dec 17 14:07:22 2023 @@ -99,4 +99,6 @@ Parse_PushInput: file target-name-parent Parse_PushInput: file target-name-parenthesized.tmp, line 1 Parse_PushInput: file target-call-parenthesized.tmp, line 1 Parse_PushInput: file target-call-parenthesized.tmp, line 1 +Parse_PushInput: file multiline.tmp, line 1 +Skipping 'multiline.tmp' because 'MULTILINE' is defined exit status 0 Index: src/usr.bin/make/unit-tests/directive-include-guard.mk diff -u src/usr.bin/make/unit-tests/directive-include-guard.mk:1.15 src/usr.bin/make/unit-tests/directive-include-guard.mk:1.16 --- src/usr.bin/make/unit-tests/directive-include-guard.mk:1.15 Sun Dec 17 09:17:16 2023 +++ src/usr.bin/make/unit-tests/directive-include-guard.mk Sun Dec 17 14:07:22 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-include-guard.mk,v 1.15 2023/12/17 09:17:16 rillig Exp $ +# $NetBSD: directive-include-guard.mk,v 1.16 2023/12/17 14:07:22 rillig Exp $ # # Tests for multiple-inclusion guards in makefiles. # @@ -601,6 +601,20 @@ LINES.target-call-parenthesized= \ # expect: Parse_PushInput: file target-call-parenthesized.tmp, line 1 # expect: Parse_PushInput: file target-call-parenthesized.tmp, line 1 +# If the '.if' or '.ifndef' directive spans more than a single line, it is +# still recognized as a guard condition. This case is entirely uncommon, but +# at the point where the guard condition is checked, line continuations have +# already been converted to spaces. +CASES+= multiline +LINES.multiline= \ + '.\' \ + ' ifndef \' \ + ' MULTILINE' \ + 'MULTILINE=' \ + '.endif' +# expect: Parse_PushInput: file multiline.tmp, line 1 +# expect: Skipping 'multiline.tmp' because 'MULTILINE' is defined + # Now run all test cases by including each of the files twice and looking at # the debug output. The files that properly guard against multiple inclusion Index: src/usr.bin/make/unit-tests/var-scope-local-legacy.exp diff -u src/usr.bin/make/unit-tests/var-scope-local-legacy.exp:1.2 src/usr.bin/make/unit-tests/var-scope-local-legacy.exp:1.3 --- src/usr.bin/make/unit-tests/var-scope-local-legacy.exp:1.2 Tue Sep 27 19:18:45 2022 +++ src/usr.bin/make/unit-tests/var-scope-local-legacy.exp Sun Dec 17 14:07:22 2023 @@ -2,5 +2,5 @@ : XY=undef_ : AF=undef_ : %D=undef_ %F=undef_ -: @D=._ @F=all_ +: @D=global-value_ @F=all_ exit status 0 Index: src/usr.bin/make/unit-tests/var-scope-local-legacy.mk diff -u src/usr.bin/make/unit-tests/var-scope-local-legacy.mk:1.2 src/usr.bin/make/unit-tests/var-scope-local-legacy.mk:1.3 --- src/usr.bin/make/unit-tests/var-scope-local-legacy.mk:1.2 Tue Sep 27 19:18:45 2022 +++ src/usr.bin/make/unit-tests/var-scope-local-legacy.mk Sun Dec 17 14:07:22 2023 @@ -1,7 +1,24 @@ -# $NetBSD: var-scope-local-legacy.mk,v 1.2 2022/09/27 19:18:45 rillig Exp $ +# $NetBSD: var-scope-local-legacy.mk,v 1.3 2023/12/17 14:07:22 rillig Exp $ # # Tests for legacy target-local variables, such as ${ <${:U:C,^,prefix,}>" != "<> " . error .endif @@ -126,7 +126,7 @@ mod-regex-limits: @echo $@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q} @echo $@:22-ok:${:U1 23 456:C,(.)(.),\2\2,:Q} # The :C modifier only handles single-digit capturing groups, - # which is more than enough for daily use. + # which is enough for all practical use cases. @echo $@:capture:${:UabcdefghijABCDEFGHIJrest:C,(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.),\9\8\7
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Dec 17 14:07:22 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: directive-include-guard.exp directive-include-guard.mk var-scope-local-legacy.exp var-scope-local-legacy.mk varmod-mtime.mk varmod-range.exp varmod-range.mk varmod-subst-regex.mk varmod-subst.mk Log Message: tests/make: extend tests for include guards and empty expressions To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/usr.bin/make/unit-tests/directive-include-guard.exp cvs rdiff -u -r1.15 -r1.16 \ src/usr.bin/make/unit-tests/directive-include-guard.mk cvs rdiff -u -r1.2 -r1.3 \ src/usr.bin/make/unit-tests/var-scope-local-legacy.exp \ src/usr.bin/make/unit-tests/var-scope-local-legacy.mk cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-mtime.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-range.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-range.mk \ src/usr.bin/make/unit-tests/varmod-subst-regex.mk cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-subst.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sun3/sun3
Module Name:src Committed By: andvar Date: Sun Dec 17 13:28:59 UTC 2023 Modified Files: src/sys/arch/sun3/sun3: pmap.c Log Message: Reshuffle ifdef HAVECACHE/DIAGNOSTIC blocks with the main purpose to make code build without HAVECACHE/DIAGNOSTIC options, as well as some cleanup: flags in pv_link is used for HAVECACHE only, declare/define it in the block. flush_by_page declaration can omit ifdef when only conditional body is guarded. segva is used only in DIAGNOSTIC/HAVECACHE in pmap_protect_mmu. combine consecutive DIAGNOSTIC/HAVECACHE blocks were possible. No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/sun3/sun3/pmap.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/sun3/sun3/pmap.c diff -u src/sys/arch/sun3/sun3/pmap.c:1.174 src/sys/arch/sun3/sun3/pmap.c:1.175 --- src/sys/arch/sun3/sun3/pmap.c:1.174 Fri Jun 2 08:51:47 2023 +++ src/sys/arch/sun3/sun3/pmap.c Sun Dec 17 13:28:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.174 2023/06/02 08:51:47 andvar Exp $ */ +/* $NetBSD: pmap.c,v 1.175 2023/12/17 13:28:59 andvar Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.174 2023/06/02 08:51:47 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.175 2023/12/17 13:28:59 andvar Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -1328,15 +1328,15 @@ pv_link(pmap_t pmap, int pte, vaddr_t va paddr_t pa; pv_entry_t *head, pv; u_char *pv_flags; +#ifdef HAVECACHE int flags; +#endif if (!pv_initialized) return 0; CHECK_SPL(); - /* Only the non-cached bit is of interest here. */ - flags = (pte & PG_NC) ? PV_NC : 0; pa = PG_PA(pte); #ifdef PMAP_DEBUG @@ -1362,6 +1362,8 @@ pv_link(pmap_t pmap, int pte, vaddr_t va * Does this new mapping cause VAC alias problems? */ + /* Only the non-cached bit is of interest here. */ + flags = (pte & PG_NC) ? PV_NC : 0; *pv_flags |= flags; if ((*pv_flags & PV_NC) == 0) { for (pv = *head; pv != NULL; pv = pv->pv_next) { @@ -2439,9 +2441,7 @@ pmap_kremove(vaddr_t va, vsize_t len) vaddr_t eva, neva, pgva, segva, segnum; int pte, sme; pmeg_t pmegp; -#ifdef HAVECACHE int flush_by_page = 0; -#endif int s; s = splvm(); @@ -2480,14 +2480,14 @@ pmap_kremove(vaddr_t va, vsize_t len) for (pgva = va; pgva < neva; pgva += PAGE_SIZE) { pte = get_pte(pgva); if (pte & PG_VALID) { -#ifdef HAVECACHE if (flush_by_page) { +#ifdef HAVECACHE cache_flush_page(pgva); /* Get fresh mod/ref bits from write-back. */ pte = get_pte(pgva); -} #endif +} #ifdef PMAP_DEBUG if ((pmap_debug & PMD_SETPTE) || (pgva == pmap_db_watchva)) { @@ -3044,10 +3044,11 @@ out: void pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva) { - vaddr_t pgva, segva; + vaddr_t pgva; int pte; -#ifdef HAVECACHE int flush_by_page = 0; +#if defined(HAVECACHE) || defined(DIAGNOSTIC) + vaddr_t segva = sun3_trunc_seg(sva); #endif CHECK_SPL(); @@ -3057,21 +3058,14 @@ pmap_protect_mmu(pmap_t pmap, vaddr_t sv if (pmap->pm_ctxnum != get_context()) panic("pmap_protect_mmu: wrong context"); } -#endif - segva = sun3_trunc_seg(sva); - -#ifdef DIAGNOSTIC int sme = get_segmap(segva); /* Make sure it is valid and known. */ if (sme == SEGINV) panic("pmap_protect_mmu: SEGINV"); if (pmap->pm_segmap && (pmap->pm_segmap[VA_SEGNUM(segva)] != sme)) panic("pmap_protect_mmu: incorrect sme, va=0x%lx", segva); -#endif - -#ifdef DIAGNOSTIC /* have pmeg, will travel */ pmeg_t pmegp = pmeg_p(sme); /* Make sure we own the pmeg, right va, etc. */ @@ -3085,7 +3079,7 @@ pmap_protect_mmu(pmap_t pmap, vaddr_t sv panic("pmap_protect_mmu: npages corrupted"); if (pmegp->pmeg_vpages == 0) panic("pmap_protect_mmu: no valid pages?"); -#endif +#endif /* DIAGNOSTIC */ #ifdef HAVECACHE if (cache_size) { @@ -3106,13 +3100,13 @@ pmap_protect_mmu(pmap_t pmap, vaddr_t sv for (pgva = sva; pgva < eva; pgva += PAGE_SIZE) { pte = get_pte(pgva); if (pte & PG_VALID) { -#ifdef HAVECACHE if (flush_by_page) { +#ifdef HAVECACHE cache_flush_page(pgva); /* Get fresh mod/ref bits from write-back. */ pte = get_pte(pgva); - } #endif + } if (IS_MAIN_MEM(pte)) { save_modref_bits(pte); } @@ -3273,9 +3267,7 @@ pmap_remove_mmu(pmap_t pmap, vaddr_t sva pmeg_t pmegp; vaddr_t pgva, segva; int pte, sme; -#ifdef HAVECACHE int flush_by_page = 0; -#endif CHECK_SPL(); @@ -,13 +3325,13 @@ pmap_remove_mmu(pmap_t pmap, vaddr_t sva for (pgva = sva; pgva < eva; pgva += PAGE_SIZE) { pte = get_pte(pgva); if (pte & PG_VALID) { -#ifdef HAVECACHE if (flush_by_page) { +#ifdef HAVECACHE cache_flush_page(pgva); /* Get fresh mod/ref bits from write-back. */ pte = get_pte(
CVS commit: src/sys/arch/sun3/sun3
Module Name:src Committed By: andvar Date: Sun Dec 17 13:28:59 UTC 2023 Modified Files: src/sys/arch/sun3/sun3: pmap.c Log Message: Reshuffle ifdef HAVECACHE/DIAGNOSTIC blocks with the main purpose to make code build without HAVECACHE/DIAGNOSTIC options, as well as some cleanup: flags in pv_link is used for HAVECACHE only, declare/define it in the block. flush_by_page declaration can omit ifdef when only conditional body is guarded. segva is used only in DIAGNOSTIC/HAVECACHE in pmap_protect_mmu. combine consecutive DIAGNOSTIC/HAVECACHE blocks were possible. No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/sun3/sun3/pmap.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: Sun Dec 17 10:48:10 UTC 2023 Modified Files: src/usr.bin/make: Makefile Log Message: make: on cleandir, clean the unit-tests as well To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/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.bin/make/Makefile diff -u src/usr.bin/make/Makefile:1.125 src/usr.bin/make/Makefile:1.126 --- src/usr.bin/make/Makefile:1.125 Mon Jun 19 20:14:45 2023 +++ src/usr.bin/make/Makefile Sun Dec 17 10:48:10 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.125 2023/06/19 20:14:45 rillig Exp $ +# $NetBSD: Makefile,v 1.126 2023/12/17 10:48:10 rillig Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 PROG= make @@ -80,7 +80,7 @@ COPTS.filemon_dev.c+= \ .endif SUBDIR.roff+= PSD.doc -.if make(obj) || make(clean) +.if make(obj) || make(clean) || make(cleandir) SUBDIR+= unit-tests .endif
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Dec 17 10:48:10 UTC 2023 Modified Files: src/usr.bin/make: Makefile Log Message: make: on cleandir, clean the unit-tests as well To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/Makefile 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/indent
Module Name:src Committed By: rillig Date: Sun Dec 17 10:02:10 UTC 2023 Modified Files: src/tests/usr.bin/indent: t_misc.sh Log Message: tests/indent: don't create an unneeded file To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/indent/t_misc.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/indent/t_misc.sh diff -u src/tests/usr.bin/indent/t_misc.sh:1.28 src/tests/usr.bin/indent/t_misc.sh:1.29 --- src/tests/usr.bin/indent/t_misc.sh:1.28 Sun Dec 10 17:45:35 2023 +++ src/tests/usr.bin/indent/t_misc.sh Sun Dec 17 10:02:09 2023 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: t_misc.sh,v 1.28 2023/12/10 17:45:35 rillig Exp $ +# $NetBSD: t_misc.sh,v 1.29 2023/12/17 10:02:09 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -211,7 +211,6 @@ option_without_hyphen_body() printf ' -i3 xi5 +di0\n' > .indent.pro printf '%s\n' 'int var[] = {' '1,' '}' > code.c - printf '%s\n' 'int var[] = {' ' 1,' '}' > code.exp atf_check \ -s 'exit:1' \
CVS commit: src/tests/usr.bin/indent
Module Name:src Committed By: rillig Date: Sun Dec 17 10:02:10 UTC 2023 Modified Files: src/tests/usr.bin/indent: t_misc.sh Log Message: tests/indent: don't create an unneeded file To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/indent/t_misc.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/error
Module Name:src Committed By: rillig Date: Sun Dec 17 09:46:57 UTC 2023 Modified Files: src/usr.bin/error: error.1 Log Message: error.1: fix markup To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/error/error.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/error
Module Name:src Committed By: rillig Date: Sun Dec 17 09:46:57 UTC 2023 Modified Files: src/usr.bin/error: error.1 Log Message: error.1: fix markup To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/error/error.1 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/error/error.1 diff -u src/usr.bin/error/error.1:1.22 src/usr.bin/error/error.1:1.23 --- src/usr.bin/error/error.1:1.22 Sat Aug 26 13:52:10 2023 +++ src/usr.bin/error/error.1 Sun Dec 17 09:46:57 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: error.1,v 1.22 2023/08/26 13:52:10 rillig Exp $ +.\" $NetBSD: error.1,v 1.23 2023/12/17 09:46:57 rillig Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -309,7 +309,11 @@ initiated by one syntactically trivial e Humans are still much better at discarding these related errors. .Pp Pascal error messages belong after the lines affected -(error puts them before). The alignment of the +.Po +.Nm +puts them before +.Pc . +The alignment of the .Ql ^ marking the point of error is also disturbed by .Nm .
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Dec 17 09:44:00 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: check-expect.lua cond-op-and.mk cond-op-or.mk deptgt.mk directive-export-gmake.mk directive-for-errors.mk directive-warning.mk Log Message: tests/make: in 'expect' lines, require the complete text of the line To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/check-expect.lua \ src/usr.bin/make/unit-tests/directive-for-errors.mk cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-op-and.mk \ src/usr.bin/make/unit-tests/directive-export-gmake.mk \ src/usr.bin/make/unit-tests/directive-warning.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-op-or.mk cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/deptgt.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: Sun Dec 17 09:17:16 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: directive-include-guard.exp directive-include-guard.mk Log Message: tests/make: add tests for spacing in multiple-inclusion guards To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/usr.bin/make/unit-tests/directive-include-guard.exp cvs rdiff -u -r1.14 -r1.15 \ src/usr.bin/make/unit-tests/directive-include-guard.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/directive-include-guard.exp diff -u src/usr.bin/make/unit-tests/directive-include-guard.exp:1.12 src/usr.bin/make/unit-tests/directive-include-guard.exp:1.13 --- src/usr.bin/make/unit-tests/directive-include-guard.exp:1.12 Thu Oct 19 18:24:33 2023 +++ src/usr.bin/make/unit-tests/directive-include-guard.exp Sun Dec 17 09:17:16 2023 @@ -14,10 +14,16 @@ Parse_PushInput: file variable-if-reuse. Skipping 'variable-if-reuse.tmp' because 'VARIABLE_IF' is defined Parse_PushInput: file variable-if-triple-negation.tmp, line 1 Parse_PushInput: file variable-if-triple-negation.tmp, line 1 +Parse_PushInput: file variable-if-spaced.tmp, line 1 +Parse_PushInput: file variable-if-spaced.tmp, line 1 +Parse_PushInput: file variable-if-parenthesized.tmp, line 1 +Parse_PushInput: file variable-if-parenthesized.tmp, line 1 Parse_PushInput: file variable-ifdef-negated.tmp, line 1 Parse_PushInput: file variable-ifdef-negated.tmp, line 1 Parse_PushInput: file variable-name-mismatch.tmp, line 1 Parse_PushInput: file variable-name-mismatch.tmp, line 1 +Parse_PushInput: file variable-ifndef-parenthesized.tmp, line 1 +Parse_PushInput: file variable-ifndef-parenthesized.tmp, line 1 Parse_PushInput: file variable-name-exclamation.tmp, line 1 Parse_PushInput: file variable-name-exclamation.tmp, line 1 Parse_PushInput: file variable-name-exclamation-middle.tmp, line 1 @@ -89,4 +95,8 @@ Parse_PushInput: file target-already-def Skipping 'target-already-defined.tmp' because 'target-already-defined' is defined Parse_PushInput: file target-name-exclamation.tmp, line 1 Parse_PushInput: file target-name-exclamation.tmp, line 1 +Parse_PushInput: file target-name-parenthesized.tmp, line 1 +Parse_PushInput: file target-name-parenthesized.tmp, line 1 +Parse_PushInput: file target-call-parenthesized.tmp, line 1 +Parse_PushInput: file target-call-parenthesized.tmp, line 1 exit status 0 Index: src/usr.bin/make/unit-tests/directive-include-guard.mk diff -u src/usr.bin/make/unit-tests/directive-include-guard.mk:1.14 src/usr.bin/make/unit-tests/directive-include-guard.mk:1.15 --- src/usr.bin/make/unit-tests/directive-include-guard.mk:1.14 Sun Dec 17 08:53:55 2023 +++ src/usr.bin/make/unit-tests/directive-include-guard.mk Sun Dec 17 09:17:16 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-include-guard.mk,v 1.14 2023/12/17 08:53:55 rillig Exp $ +# $NetBSD: directive-include-guard.mk,v 1.15 2023/12/17 09:17:16 rillig Exp $ # # Tests for multiple-inclusion guards in makefiles. # @@ -111,6 +111,26 @@ LINES.variable-if-triple-negation= \ # expect: Parse_PushInput: file variable-if-triple-negation.tmp, line 1 # expect: Parse_PushInput: file variable-if-triple-negation.tmp, line 1 +# If the guard variable is enclosed in spaces, it does not have an effect, as +# that form is not common in practice. +CASES+= variable-if-spaced +LINES.variable-if-spaced= \ + '.if !defined( VARIABLE_IF_SPACED )' \ + 'VARIABLE_IF_SPACED=' \ + '.endif' +# expect: Parse_PushInput: file variable-if-spaced.tmp, line 1 +# expect: Parse_PushInput: file variable-if-spaced.tmp, line 1 + +# If the guard variable condition is enclosed in parentheses, it does not have +# an effect, as that form is not common in practice. +CASES+= variable-if-parenthesized +LINES.variable-if-parenthesized= \ + '.if (!defined(VARIABLE_IF_PARENTHESIZED))' \ + 'VARIABLE_IF_PARENTHESIZED=' \ + '.endif' +# expect: Parse_PushInput: file variable-if-parenthesized.tmp, line 1 +# expect: Parse_PushInput: file variable-if-parenthesized.tmp, line 1 + # A conditional other than '.if' or '.ifndef' does not guard the file, even if # it is otherwise equivalent to the above accepted forms. CASES+= variable-ifdef-negated @@ -130,6 +150,16 @@ LINES.variable-name-mismatch= \ # expect: Parse_PushInput: file variable-name-mismatch.tmp, line 1 # expect: Parse_PushInput: file variable-name-mismatch.tmp, line 1 +# If the guard variable condition is enclosed in parentheses, it does not have +# an effect, as that form is not common in practice. +CASES+= variable-ifndef-parenthesized +LINES.variable-ifndef-parenthesized= \ + '.ifndef (VARIABLE_IFNDEF_PARENTHESIZED)' \ + 'VARIABLE_IFNDEF_PARENTHESIZED=' \ + '.endif' +# expect: Parse_PushInput: file variable-ifndef-parenthesized.tmp, line 1 +# expect: Parse_PushInput: file variable-ifndef-parenthesized.tmp, line 1
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Dec 17 09:17:16 UTC 2023 Modified Files: src/usr.bin/make/unit-tests: directive-include-guard.exp directive-include-guard.mk Log Message: tests/make: add tests for spacing in multiple-inclusion guards To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/usr.bin/make/unit-tests/directive-include-guard.exp cvs rdiff -u -r1.14 -r1.15 \ src/usr.bin/make/unit-tests/directive-include-guard.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
Module Name:src Committed By: rillig Date: Sun Dec 17 09:02:26 UTC 2023 Modified Files: src/usr.bin/make: main.c make.h meta.c Log Message: make: clean up unused return value of str2Lst_Append No functional change. To generate a diff of this commit: cvs rdiff -u -r1.604 -r1.605 src/usr.bin/make/main.c cvs rdiff -u -r1.326 -r1.327 src/usr.bin/make/make.h cvs rdiff -u -r1.206 -r1.207 src/usr.bin/make/meta.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: Sun Dec 17 09:02:26 UTC 2023 Modified Files: src/usr.bin/make: main.c make.h meta.c Log Message: make: clean up unused return value of str2Lst_Append No functional change. To generate a diff of this commit: cvs rdiff -u -r1.604 -r1.605 src/usr.bin/make/main.c cvs rdiff -u -r1.326 -r1.327 src/usr.bin/make/make.h cvs rdiff -u -r1.206 -r1.207 src/usr.bin/make/meta.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/main.c diff -u src/usr.bin/make/main.c:1.604 src/usr.bin/make/main.c:1.605 --- src/usr.bin/make/main.c:1.604 Sun Dec 17 08:53:55 2023 +++ src/usr.bin/make/main.c Sun Dec 17 09:02:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.604 2023/12/17 08:53:55 rillig Exp $ */ +/* $NetBSD: main.c,v 1.605 2023/12/17 09:02:26 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.604 2023/12/17 08:53:55 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.605 2023/12/17 09:02:26 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -772,22 +772,17 @@ SetVarObjdir(bool writable, const char * } /* - * Splits str into words, adding them to the list. + * Splits str into words (in-place, modifying it), adding them to the list. * The string must be kept alive as long as the list. */ -int -str2Lst_Append(StringList *lp, char *str) +void +AppendWords(StringList *lp, char *str) { char *p; - int n; - const char *sep = " \t"; - for (n = 0, p = strtok(str, sep); p != NULL; p = strtok(NULL, sep)) { + for (p = strtok(str, sep); p != NULL; p = strtok(NULL, sep)) Lst_Append(lp, p); - n++; - } - return n; } #ifdef SIGINFO @@ -1293,7 +1288,7 @@ ReadFirstDefaultMakefile(void) SCOPE_CMDLINE, VARE_WANTRES); /* TODO: handle errors */ - (void)str2Lst_Append(&makefiles, prefs); + AppendWords(&makefiles, prefs); for (ln = makefiles.first; ln != NULL; ln = ln->next) if (ReadMakefile(ln->datum)) Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.326 src/usr.bin/make/make.h:1.327 --- src/usr.bin/make/make.h:1.326 Thu Nov 2 04:50:44 2023 +++ src/usr.bin/make/make.h Sun Dec 17 09:02:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.326 2023/11/02 04:50:44 rillig Exp $ */ +/* $NetBSD: make.h,v 1.327 2023/12/17 09:02:26 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -1040,7 +1040,7 @@ void PrintOnError(GNode *, const char *) void Main_ExportMAKEFLAGS(bool); bool Main_SetObjdir(bool, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3); int mkTempFile(const char *, char *, size_t) MAKE_ATTR_USE; -int str2Lst_Append(StringList *, char *); +void AppendWords(StringList *, char *); void GNode_FprintDetails(FILE *, const char *, const GNode *, const char *); bool GNode_ShouldExecute(GNode *gn) MAKE_ATTR_USE; Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.206 src/usr.bin/make/meta.c:1.207 --- src/usr.bin/make/meta.c:1.206 Sat Aug 19 00:09:17 2023 +++ src/usr.bin/make/meta.c Sun Dec 17 09:02:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.206 2023/08/19 00:09:17 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.207 2023/12/17 09:02:26 rillig Exp $ */ /* * Implement 'meta' mode. @@ -613,7 +613,7 @@ meta_mode_init(const char *make_mode) metaBailiwickStr = Var_Subst("${.MAKE.META.BAILIWICK:O:u:tA}", SCOPE_GLOBAL, VARE_WANTRES); /* TODO: handle errors */ -str2Lst_Append(&metaBailiwick, metaBailiwickStr); +AppendWords(&metaBailiwick, metaBailiwickStr); /* * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS} */ @@ -622,7 +622,7 @@ meta_mode_init(const char *make_mode) metaIgnorePathsStr = Var_Subst("${" MAKE_META_IGNORE_PATHS ":O:u:tA}", SCOPE_GLOBAL, VARE_WANTRES); /* TODO: handle errors */ -str2Lst_Append(&metaIgnorePaths, metaIgnorePathsStr); +AppendWords(&metaIgnorePaths, metaIgnorePathsStr); /* * We ignore any paths that match ${.MAKE.META.IGNORE_PATTERNS}
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Dec 17 08:53:55 UTC 2023 Modified Files: src/usr.bin/make: cond.c dir.c hash.c hash.h job.c main.c parse.c suff.c var.c src/usr.bin/make/unit-tests: directive-include-guard.mk Log Message: make: clean up names of local variables No binary change. To generate a diff of this commit: cvs rdiff -u -r1.355 -r1.356 src/usr.bin/make/cond.c cvs rdiff -u -r1.283 -r1.284 src/usr.bin/make/dir.c cvs rdiff -u -r1.72 -r1.73 src/usr.bin/make/hash.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/hash.h cvs rdiff -u -r1.459 -r1.460 src/usr.bin/make/job.c cvs rdiff -u -r1.603 -r1.604 src/usr.bin/make/main.c cvs rdiff -u -r1.710 -r1.711 src/usr.bin/make/parse.c cvs rdiff -u -r1.370 -r1.371 src/usr.bin/make/suff.c cvs rdiff -u -r1.1082 -r1.1083 src/usr.bin/make/var.c cvs rdiff -u -r1.13 -r1.14 \ src/usr.bin/make/unit-tests/directive-include-guard.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/cond.c diff -u src/usr.bin/make/cond.c:1.355 src/usr.bin/make/cond.c:1.356 --- src/usr.bin/make/cond.c:1.355 Sun Nov 19 22:50:11 2023 +++ src/usr.bin/make/cond.c Sun Dec 17 08:53:54 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.355 2023/11/19 22:50:11 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.356 2023/12/17 08:53:54 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -92,7 +92,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.355 2023/11/19 22:50:11 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.356 2023/12/17 08:53:54 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -212,16 +212,16 @@ ParseWord(const char **pp, bool doEval) { const char *p = *pp; Buffer word; - int paren_depth; + int depth; Buf_InitSize(&word, 16); - paren_depth = 0; + depth = 0; for (;;) { char ch = *p; if (ch == '\0' || ch == ' ' || ch == '\t') break; - if ((ch == '&' || ch == '|') && paren_depth == 0) + if ((ch == '&' || ch == '|') && depth == 0) break; if (ch == '$') { VarEvalMode emode = doEval @@ -238,8 +238,8 @@ ParseWord(const char **pp, bool doEval) continue; } if (ch == '(') - paren_depth++; - else if (ch == ')' && --paren_depth < 0) + depth++; + else if (ch == ')' && --depth < 0) break; Buf_AddByte(&word, ch); p++; @@ -667,19 +667,19 @@ done_lhs: static bool CondParser_FuncCallEmpty(CondParser *par, bool doEval, Token *out_token) { - const char *cp = par->p; + const char *p = par->p; Token tok; FStr val; - if (!skip_string(&cp, "empty")) + if (!skip_string(&p, "empty")) return false; - cpp_skip_whitespace(&cp); - if (*cp != '(') + cpp_skip_whitespace(&p); + if (*p != '(') return false; - cp--; /* Make cp[1] point to the '('. */ - val = Var_Parse(&cp, SCOPE_CMDLINE, + p--; /* Make p[1] point to the '('. */ + val = Var_Parse(&p, SCOPE_CMDLINE, doEval ? VARE_WANTRES : VARE_PARSE_ONLY); /* TODO: handle errors */ @@ -692,7 +692,7 @@ CondParser_FuncCallEmpty(CondParser *par FStr_Done(&val); *out_token = tok; - par->p = cp; + par->p = p; return true; } @@ -743,11 +743,11 @@ CondParser_ComparisonOrLeaf(CondParser * { Token t; char *arg; - const char *cp; + const char *p; /* Push anything numeric through the compare expression */ - cp = par->p; - if (ch_isdigit(cp[0]) || cp[0] == '-' || cp[0] == '+') + p = par->p; + if (ch_isdigit(p[0]) || p[0] == '-' || p[0] == '+') return CondParser_Comparison(par, doEval); /* @@ -762,12 +762,12 @@ CondParser_ComparisonOrLeaf(CondParser * * XXX: In edge cases, an expression may be evaluated twice, * see cond-token-plain.mk, keyword 'twice'. */ - arg = ParseWord(&cp, doEval); + arg = ParseWord(&p, doEval); assert(arg[0] != '\0'); - if (*cp == '=' || *cp == '!' || *cp == '<' || *cp == '>') + if (*p == '=' || *p == '!' || *p == '<' || *p == '>') return CondParser_Comparison(par, doEval); - par->p = cp; + par->p = p; /* * Evaluate the argument using the default function. Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.283 src/usr.bin/make/dir.c:1.284 --- src/usr.bin/make/dir.c:1.283 Thu Sep 21 20:30:59 2023 +++ src/usr.bin/make/dir.c Sun Dec 17 08:53:54 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.283 2023/09/21 20:30:59 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.284 2023/12/17 08:53:54 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.283 2023/09/21 20:30:59 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.284 2023/12/17 08:53:54 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -683,14 +683,14 @@ DirMatchFiles(const char *pattern, Cach
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Dec 17 08:53:55 UTC 2023 Modified Files: src/usr.bin/make: cond.c dir.c hash.c hash.h job.c main.c parse.c suff.c var.c src/usr.bin/make/unit-tests: directive-include-guard.mk Log Message: make: clean up names of local variables No binary change. To generate a diff of this commit: cvs rdiff -u -r1.355 -r1.356 src/usr.bin/make/cond.c cvs rdiff -u -r1.283 -r1.284 src/usr.bin/make/dir.c cvs rdiff -u -r1.72 -r1.73 src/usr.bin/make/hash.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/hash.h cvs rdiff -u -r1.459 -r1.460 src/usr.bin/make/job.c cvs rdiff -u -r1.603 -r1.604 src/usr.bin/make/main.c cvs rdiff -u -r1.710 -r1.711 src/usr.bin/make/parse.c cvs rdiff -u -r1.370 -r1.371 src/usr.bin/make/suff.c cvs rdiff -u -r1.1082 -r1.1083 src/usr.bin/make/var.c cvs rdiff -u -r1.13 -r1.14 \ src/usr.bin/make/unit-tests/directive-include-guard.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.