Re: CVS commit: src/sys/uvm
On 2022/06/09 1:55, Michael Lorenz wrote: Module Name:src Committed By: macallan Date: Wed Jun 8 16:55:00 UTC 2022 Modified Files: src/sys/uvm: uvm_map.c Log Message: initialize a variable to appease clang My bug! Thanks for fixing it. rin
CVS commit: src/usr.bin/man
Module Name:src Committed By: gutteridge Date: Sun Jun 19 18:51:06 UTC 2022 Modified Files: src/usr.bin/man: man.conf.5 Log Message: man.conf.5: improve wording on searching alternate machine paths As requested by uwe@. Hopefully this is clearer now. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/man/man.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/man
Module Name:src Committed By: gutteridge Date: Sun Jun 19 18:51:06 UTC 2022 Modified Files: src/usr.bin/man: man.conf.5 Log Message: man.conf.5: improve wording on searching alternate machine paths As requested by uwe@. Hopefully this is clearer now. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/man/man.conf.5 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/man/man.conf.5 diff -u src/usr.bin/man/man.conf.5:1.29 src/usr.bin/man/man.conf.5:1.30 --- src/usr.bin/man/man.conf.5:1.29 Sat Jun 18 13:41:12 2022 +++ src/usr.bin/man/man.conf.5 Sun Jun 19 18:51:06 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: man.conf.5,v 1.29 2022/06/18 13:41:12 uwe Exp $ +.\" $NetBSD: man.conf.5,v 1.30 2022/06/19 18:51:06 gutteridge Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -170,11 +170,11 @@ Defines additional paths to be searched hardware name whose literal value is taken from .Xr uname 1 .Fl m . -For example on an amd64, +For example, on an amd64, the .Ic _amd64 control keyword is used, where .Ql x86 -is commonly supplied as an alternate machine path to also search. +is supplied by default as an alternate machine path to also search. .El .Pp Section configuration lines in
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: rillig Date: Sun Jun 19 18:28:16 UTC 2022 Modified Files: src/sys/lib/libkern: Makefile.inc Log Message: libkern: fix wrong escaping in makefile In the unlikely event that KERNDIR contains a '$' character, that '$' should not be doubled to '$$'. It only needs the usual shell quoting. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/lib/libkern/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/Makefile.inc diff -u src/sys/lib/libkern/Makefile.inc:1.47 src/sys/lib/libkern/Makefile.inc:1.48 --- src/sys/lib/libkern/Makefile.inc:1.47 Mon May 30 14:13:59 2022 +++ src/sys/lib/libkern/Makefile.inc Sun Jun 19 18:28:16 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.47 2022/05/30 14:13:59 rin Exp $ +# $NetBSD: Makefile.inc,v 1.48 2022/06/19 18:28:16 rillig Exp $ # # Configuration variables (default values are below): # @@ -41,7 +41,7 @@ KERNLIBLN= ${KERNDST}/${LIBKERNLNBN} LIBKERN_MD_FLAGS?= none KERNMAKE= \ - cd ${KERNDST} && ${MAKE} -f ${KERNDIR:q}/Makefile \ + cd ${KERNDST} && ${MAKE} -f ${KERNDIR:Q}/Makefile \ KERNDIR=${KERNDIR:q} \ CC=${CC:q} CFLAGS=${CFLAGS:q} CPUFLAGS= \ AS=${AS:q} AFLAGS=${AFLAGS:q} \
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: rillig Date: Sun Jun 19 18:28:16 UTC 2022 Modified Files: src/sys/lib/libkern: Makefile.inc Log Message: libkern: fix wrong escaping in makefile In the unlikely event that KERNDIR contains a '$' character, that '$' should not be doubled to '$$'. It only needs the usual shell quoting. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/lib/libkern/Makefile.inc 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: Sun Jun 19 12:14:34 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: c99_bool_strict_suppressed.c d_c99_bool_strict.c d_c99_bool_strict_syshdr.c d_c99_complex_split.c msg_033.c msg_045.c msg_089.c msg_102.c msg_105.c msg_107.c msg_121.c msg_123.c msg_132.c src/usr.bin/xlint/lint1: ckbool.c decl.c err.c tree.c Log Message: lint: add quotes around placeholders in 4 messages To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c \ src/tests/usr.bin/xlint/lint1/msg_045.c \ src/tests/usr.bin/xlint/lint1/msg_089.c cvs rdiff -u -r1.37 -r1.38 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.16 -r1.17 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/d_c99_complex_split.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_033.c \ src/tests/usr.bin/xlint/lint1/msg_102.c \ src/tests/usr.bin/xlint/lint1/msg_105.c \ src/tests/usr.bin/xlint/lint1/msg_107.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_121.c \ src/tests/usr.bin/xlint/lint1/msg_123.c cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.288 -r1.289 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.171 -r1.172 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.453 -r1.454 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c diff -u src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c:1.4 src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c:1.5 --- src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c:1.4 Sun Aug 8 13:19:51 2021 +++ src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c Sun Jun 19 12:14:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: c99_bool_strict_suppressed.c,v 1.4 2021/08/08 13:19:51 rillig Exp $ */ +/* $NetBSD: c99_bool_strict_suppressed.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */ # 3 "c99_bool_strict_suppressed.c" /* @@ -29,7 +29,7 @@ test(_Bool b, int i, const char *p) while (1) break; - /* suppressed+1: error: operands of '=' have incompatible types (_Bool != int) [107] */ + /* suppressed+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */ b = i; /* suppressed+1: error: operand of '!' must be bool, not 'int' [330] */ Index: src/tests/usr.bin/xlint/lint1/msg_045.c diff -u src/tests/usr.bin/xlint/lint1/msg_045.c:1.4 src/tests/usr.bin/xlint/lint1/msg_045.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_045.c:1.4 Sat Jun 11 11:52:13 2022 +++ src/tests/usr.bin/xlint/lint1/msg_045.c Sun Jun 19 12:14:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_045.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: msg_045.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */ # 3 "msg_045.c" /* Test for message: base type is really '%s %s' [45] */ @@ -16,6 +16,6 @@ function() /* expect+2: error: 'counter' has incomplete type 'incomplete union counter' [31] */ /* expect+1: warning: union 'counter' never defined [234] */ union counter counter; - /* expect+1: warning: illegal member use: value [102] */ + /* expect+1: warning: illegal use of member 'value' [102] */ counter.value++; } Index: src/tests/usr.bin/xlint/lint1/msg_089.c diff -u src/tests/usr.bin/xlint/lint1/msg_089.c:1.4 src/tests/usr.bin/xlint/lint1/msg_089.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_089.c:1.4 Wed Jun 15 20:18:31 2022 +++ src/tests/usr.bin/xlint/lint1/msg_089.c Sun Jun 19 12:14:34 2022 @@ -1,10 +1,10 @@ -/* $NetBSD: msg_089.c,v 1.4 2022/06/15 20:18:31 rillig Exp $ */ +/* $NetBSD: msg_089.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */ # 3 "msg_089.c" -// Test for message: typedef redeclared: %s [89] +// Test for message: typedef '%s' redeclared [89] typedef int number; -/* expect+1: error: typedef redeclared: number [89] */ +/* expect+1: error: typedef 'number' redeclared [89] */ typedef int number; -/* expect+1: error: typedef redeclared: number [89] */ +/* expect+1: error: typedef 'number' redeclared [89] */ typedef double number; Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.37 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.38 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.37 Sun Feb 27 08:31:26 2022 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Sun Jun 19 12:14:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.37 2022/02/27 08:31:26 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.38 2022/06/19 12:14:34 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -226,17 +226,17 @@ strict_bool_bit_fields(void) bool b; b = flags.bool_flag; - /* expe
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jun 19 12:14:34 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: c99_bool_strict_suppressed.c d_c99_bool_strict.c d_c99_bool_strict_syshdr.c d_c99_complex_split.c msg_033.c msg_045.c msg_089.c msg_102.c msg_105.c msg_107.c msg_121.c msg_123.c msg_132.c src/usr.bin/xlint/lint1: ckbool.c decl.c err.c tree.c Log Message: lint: add quotes around placeholders in 4 messages To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c \ src/tests/usr.bin/xlint/lint1/msg_045.c \ src/tests/usr.bin/xlint/lint1/msg_089.c cvs rdiff -u -r1.37 -r1.38 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.16 -r1.17 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/d_c99_complex_split.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_033.c \ src/tests/usr.bin/xlint/lint1/msg_102.c \ src/tests/usr.bin/xlint/lint1/msg_105.c \ src/tests/usr.bin/xlint/lint1/msg_107.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_121.c \ src/tests/usr.bin/xlint/lint1/msg_123.c cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.288 -r1.289 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.171 -r1.172 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.453 -r1.454 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun Jun 19 12:08:31 UTC 2022 Modified Files: src/usr.sbin/sysinst: defs.h disks.c label.c Log Message: Centralize the "we can newfs this type of filesystem" predicate and fix the list. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/usr.sbin/sysinst/defs.h \ src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.37 -r1.38 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/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.83 src/usr.sbin/sysinst/defs.h:1.84 --- src/usr.sbin/sysinst/defs.h:1.83 Sun May 22 11:27:37 2022 +++ src/usr.sbin/sysinst/defs.h Sun Jun 19 12:08:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.83 2022/05/22 11:27:37 andvar Exp $ */ +/* $NetBSD: defs.h,v 1.84 2022/06/19 12:08:31 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -718,6 +718,7 @@ bool clone_partition_data(struct disk_pa struct menudesc; void disp_cur_fspart(int, int); +bool can_newfs_fstype(unsigned int); int make_filesystems(struct install_partition_desc *); int make_fstab(struct install_partition_desc *); int mount_disks(struct install_partition_desc *); Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.83 src/usr.sbin/sysinst/disks.c:1.84 --- src/usr.sbin/sysinst/disks.c:1.83 Sat Jun 11 18:30:02 2022 +++ src/usr.sbin/sysinst/disks.c Sun Jun 19 12:08:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.83 2022/06/11 18:30:02 martin Exp $ */ +/* $NetBSD: disks.c,v 1.84 2022/06/19 12:08:31 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1220,6 +1220,27 @@ sort_part_usage_by_mount(const void *a, return (uintptr_t)a < (uintptr_t)b ? -1 : 1; } +/* + * Are we able to newfs this type of file system? + * Keep in sync with switch labels below! + */ +bool +can_newfs_fstype(unsigned int t) +{ + switch (t) { + case FS_APPLEUFS: + case FS_BSDFFS: + case FS_BSDLFS: + case FS_MSDOS: + case FS_EFI_SP: + case FS_SYSVBFS: + case FS_V7: + case FS_EX2FS: + return true; + } + return false; +} + int make_filesystems(struct install_partition_desc *install) { @@ -1331,6 +1352,7 @@ make_filesystems(struct install_partitio fsname = "lfs"; break; case FS_MSDOS: + case FS_EFI_SP: asprintf(&newfs, "/sbin/newfs_msdos"); mnt_opts = "-tmsdos"; fsname = "msdos"; Index: src/usr.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.37 src/usr.sbin/sysinst/label.c:1.38 --- src/usr.sbin/sysinst/label.c:1.37 Sat Jun 18 13:52:42 2022 +++ src/usr.sbin/sysinst/label.c Sun Jun 19 12:08:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.37 2022/06/18 13:52:42 martin Exp $ */ +/* $NetBSD: label.c,v 1.38 2022/06/19 12:08:31 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.37 2022/06/18 13:52:42 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.38 2022/06/19 12:08:31 martin Exp $"); #endif #include @@ -978,6 +978,8 @@ edit_ptn(menudesc *menu, void *arg) edit.info.last_mounted = edit.wanted->mount; if (is_new_part) { edit.wanted->parts = pset->parts; + if (!can_newfs_fstype(edit.wanted->fs_type)) +edit.wanted->instflags &= ~PUIINST_NEWFS; edit.wanted->cur_part_id = pset->parts->pscheme-> add_partition(pset->parts, &edit.info, &err); if (edit.wanted->cur_part_id == NO_PART) @@ -1081,8 +1083,7 @@ update_edit_ptn_menu(menudesc *m, void * /* can only install onto PT_root partitions */ continue; if (m->opts[i].opt_action == edit_fs_preserve && - t != FS_BSDFFS && t != FS_BSDLFS && t != FS_APPLEUFS && - t != FS_MSDOS && t != FS_EFI_SP && t != FS_EX2FS) { + !can_newfs_fstype(t)) { /* Can not newfs this filesystem */ edit->wanted->instflags &= ~PUIINST_NEWFS; continue;
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun Jun 19 12:08:31 UTC 2022 Modified Files: src/usr.sbin/sysinst: defs.h disks.c label.c Log Message: Centralize the "we can newfs this type of filesystem" predicate and fix the list. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/usr.sbin/sysinst/defs.h \ src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.37 -r1.38 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
Module Name:src Committed By: rillig Date: Sun Jun 19 11:50:42 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: accept.sh check-expect.lua init.c msg_024.c msg_025.c msg_026.c msg_028.c msg_029.c src/usr.bin/xlint/lint1: decl.c err.c Log Message: tests/lint: add quotes around placeholders in a few messages To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/accept.sh cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/check-expect.lua cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_024.c \ src/tests/usr.bin/xlint/lint1/msg_025.c \ src/tests/usr.bin/xlint/lint1/msg_026.c \ src/tests/usr.bin/xlint/lint1/msg_028.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_029.c cvs rdiff -u -r1.287 -r1.288 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.170 -r1.171 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/accept.sh diff -u src/tests/usr.bin/xlint/lint1/accept.sh:1.10 src/tests/usr.bin/xlint/lint1/accept.sh:1.11 --- src/tests/usr.bin/xlint/lint1/accept.sh:1.10 Fri Jun 17 20:23:58 2022 +++ src/tests/usr.bin/xlint/lint1/accept.sh Sun Jun 19 11:50:42 2022 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: accept.sh,v 1.10 2022/06/17 20:23:58 rillig Exp $ +# $NetBSD: accept.sh,v 1.11 2022/06/19 11:50:42 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,11 +37,11 @@ set -eu : "${archsubdir:=$(make -v ARCHSUBDIR)}" . './t_integration.sh' # for configure_test_case +done_tests='' for pattern in "$@"; do # shellcheck disable=SC2231 - for test in *$pattern*.c; do - base=${test%.*} - cfile="$base.c" + for cfile in *$pattern*.c; do + base=${cfile%.*} expfile="$base.exp" ln_file="$base.exp-ln" @@ -85,8 +85,10 @@ for pattern in "$@"; do fi fi esac + + done_tests="$done_tests $cfile" done done -# shellcheck disable=SC2035 -lua '../check-expect.lua' *.c +# shellcheck disable=SC2086 +lua './check-expect.lua' $done_tests Index: src/tests/usr.bin/xlint/lint1/check-expect.lua diff -u src/tests/usr.bin/xlint/lint1/check-expect.lua:1.1 src/tests/usr.bin/xlint/lint1/check-expect.lua:1.2 --- src/tests/usr.bin/xlint/lint1/check-expect.lua:1.1 Fri Jun 17 20:31:56 2022 +++ src/tests/usr.bin/xlint/lint1/check-expect.lua Sun Jun 19 11:50:42 2022 @@ -1,12 +1,12 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.1 2022/06/17 20:31:56 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.2 2022/06/19 11:50:42 rillig Exp $ --[[ usage: lua ./check-expect.lua *.c Check that the /* expect+-n: ... */ comments in the .c source files match the -actual messages found in the corresponding .exp files. The .exp files are +actual messages found in the corresponding .exp files. The .exp files are expected in the current working directory. The .exp files are generated on the fly during the ATF tests, see @@ -112,7 +112,10 @@ end local function load_exp(exp_fname) local lines = load_lines(exp_fname) - if lines == nil then return {} end + if lines == nil then +print_error("check-expect.lua: error: file " .. exp_fname .. " not found") +return + end local messages = {} for exp_lineno, line in ipairs(lines) do Index: src/tests/usr.bin/xlint/lint1/init.c diff -u src/tests/usr.bin/xlint/lint1/init.c:1.11 src/tests/usr.bin/xlint/lint1/init.c:1.12 --- src/tests/usr.bin/xlint/lint1/init.c:1.11 Sat Jun 11 11:52:13 2022 +++ src/tests/usr.bin/xlint/lint1/init.c Sun Jun 19 11:50:42 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.11 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: init.c,v 1.12 2022/06/19 11:50:42 rillig Exp $ */ # 3 "init.c" /* @@ -108,14 +108,14 @@ union incomplete_union { }; -/* expect+1: warning: cannot initialize extern declaration: extern_var [26] */ +/* expect+1: warning: cannot initialize extern declaration 'extern_var' [26] */ extern int extern_var = 1; int defined_var = 1; /* expect+1: warning: static variable 'static_var' unused [226] */ static int static_var = 1; /* expect+1: error: illegal storage class [8] */ register int register_var = 1; -/* expect+1: error: cannot initialize typedef: typedef_var [25] */ +/* expect+1: error: cannot initialize typedef 'typedef_var' [25] */ typedef int typedef_var = 1; Index: src/tests/usr.bin/xlint/lint1/msg_024.c diff -u src/tests/usr.bin/xlint/lint1/msg_024.c:1.3 src/tests/usr.bin/xlint/lint1/msg_024.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_024.c:1.3 Fri Aug 27 20:16:50 2021 +++ src/tests/usr.bin/xlint/lint1/msg_024.c Sun Jun 19 11:50:42 2022 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_024.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */ +/* $NetBSD: msg_024.c,v 1.4 2022/06/19 11:50:42 rillig Exp $ */ # 3 "msg_024.c" -// Test for message: cannot init
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jun 19 11:50:42 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: accept.sh check-expect.lua init.c msg_024.c msg_025.c msg_026.c msg_028.c msg_029.c src/usr.bin/xlint/lint1: decl.c err.c Log Message: tests/lint: add quotes around placeholders in a few messages To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/accept.sh cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/check-expect.lua cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_024.c \ src/tests/usr.bin/xlint/lint1/msg_025.c \ src/tests/usr.bin/xlint/lint1/msg_026.c \ src/tests/usr.bin/xlint/lint1/msg_028.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_029.c cvs rdiff -u -r1.287 -r1.288 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.170 -r1.171 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/usr.bin/fstat
Module Name:src Committed By: simonb Date: Sun Jun 19 11:31:19 UTC 2022 Modified Files: src/usr.bin/fstat: Makefile fstat.c fstat.h Added Files: src/usr.bin/fstat: zfs.c zfs_znode.h Log Message: Add basic ZFS support to fstat(1). XXX: Use a local zfs_znode.h for a znode_t definition because the ZFS kernel code makes it too hard to include headers from userland. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/fstat/Makefile cvs rdiff -u -r1.114 -r1.115 src/usr.bin/fstat/fstat.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fstat/fstat.h cvs rdiff -u -r0 -r1.1 src/usr.bin/fstat/zfs.c src/usr.bin/fstat/zfs_znode.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.bin/fstat/Makefile diff -u src/usr.bin/fstat/Makefile:1.26 src/usr.bin/fstat/Makefile:1.27 --- src/usr.bin/fstat/Makefile:1.26 Sun Oct 13 07:28:15 2019 +++ src/usr.bin/fstat/Makefile Sun Jun 19 11:31:19 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:15 mrg Exp $ +# $NetBSD: Makefile,v 1.27 2022/06/19 11:31:19 simonb Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -6,6 +6,9 @@ USE_FORT?= yes # setuid PROG= fstat SRCS= fstat.c isofs.c ntfs.c ptyfs.c tmpfs.c misc.c +.if (${MKZFS} != "no") +SRCS+= zfs.c +.endif DPADD= ${LIBKVM} LDADD= -lkvm BINGRP= kmem @@ -16,6 +19,9 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/sys .if (${USE_INET6} != "no") CPPFLAGS+=-DINET6 .endif +.if (${MKZFS} != "no") +CPPFLAGS+=-DHAVE_ZFS +.endif CPPFLAGS+=-D_KMEMUSER LDADD+=-lutil Index: src/usr.bin/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.114 src/usr.bin/fstat/fstat.c:1.115 --- src/usr.bin/fstat/fstat.c:1.114 Wed Aug 26 23:08:29 2020 +++ src/usr.bin/fstat/fstat.c Sun Jun 19 11:31:19 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.114 2020/08/26 23:08:29 christos Exp $ */ +/* $NetBSD: fstat.c,v 1.115 2022/06/19 11:31:19 simonb Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.114 2020/08/26 23:08:29 christos Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.115 2022/06/19 11:31:19 simonb Exp $"); #endif #endif /* not lint */ @@ -611,6 +611,12 @@ vfilestat(struct vnode *vp, struct files if (!tmpfs_filestat(vp, fsp)) badtype = "error"; break; +#ifdef HAVE_ZFS + case VT_ZFS: + if (!zfs_filestat(vp, fsp)) +badtype = "error"; + break; +#endif case VT_NULL: case VT_OVERLAY: case VT_UMAP: Index: src/usr.bin/fstat/fstat.h diff -u src/usr.bin/fstat/fstat.h:1.10 src/usr.bin/fstat/fstat.h:1.11 --- src/usr.bin/fstat/fstat.h:1.10 Fri Sep 6 17:08:22 2019 +++ src/usr.bin/fstat/fstat.h Sun Jun 19 11:31:19 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.h,v 1.10 2019/09/06 17:08:22 christos Exp $ */ +/* $NetBSD: fstat.h,v 1.11 2022/06/19 11:31:19 simonb Exp $ */ /*- * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -60,4 +60,5 @@ int isofs_filestat(struct vnode *, struc int ntfs_filestat(struct vnode *, struct filestat *); int ptyfs_filestat(struct vnode *, struct filestat *); int tmpfs_filestat(struct vnode *, struct filestat *); +int zfs_filestat(struct vnode *, struct filestat *); void oprint(struct file *, const char *); Added files: Index: src/usr.bin/fstat/zfs.c diff -u /dev/null src/usr.bin/fstat/zfs.c:1.1 --- /dev/null Sun Jun 19 11:31:19 2022 +++ src/usr.bin/fstat/zfs.c Sun Jun 19 11:31:19 2022 @@ -0,0 +1,75 @@ +/* $NetBSD: zfs.c,v 1.1 2022/06/19 11:31:19 simonb Exp $ */ + +/*- + * Copyright (c) 2022 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Simon Burge. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WH
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: simonb Date: Sun Jun 19 11:31:19 UTC 2022 Modified Files: src/usr.bin/fstat: Makefile fstat.c fstat.h Added Files: src/usr.bin/fstat: zfs.c zfs_znode.h Log Message: Add basic ZFS support to fstat(1). XXX: Use a local zfs_znode.h for a znode_t definition because the ZFS kernel code makes it too hard to include headers from userland. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/fstat/Makefile cvs rdiff -u -r1.114 -r1.115 src/usr.bin/fstat/fstat.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/fstat/fstat.h cvs rdiff -u -r0 -r1.1 src/usr.bin/fstat/zfs.c src/usr.bin/fstat/zfs_znode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun Jun 19 10:33:17 UTC 2022 Modified Files: src/games/gomoku: bdinit.c Log Message: gomoku: remove redundant parentheses No binary change. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/games/gomoku/bdinit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/bdinit.c diff -u src/games/gomoku/bdinit.c:1.36 src/games/gomoku/bdinit.c:1.37 --- src/games/gomoku/bdinit.c:1.36 Sun Jun 19 10:23:48 2022 +++ src/games/gomoku/bdinit.c Sun Jun 19 10:33:17 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdinit.c,v 1.36 2022/06/19 10:23:48 rillig Exp $ */ +/* $NetBSD: bdinit.c,v 1.37 2022/06/19 10:33:17 rillig Exp $ */ /* * Copyright (c) 1994 @@ -34,7 +34,7 @@ #include /* from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95 */ -__RCSID("$NetBSD: bdinit.c,v 1.36 2022/06/19 10:23:48 rillig Exp $"); +__RCSID("$NetBSD: bdinit.c,v 1.37 2022/06/19 10:33:17 rillig Exp $"); #include #include "gomoku.h" @@ -73,14 +73,14 @@ init_spot_flags_and_fval(struct spotstr sp->s_fval[WHITE][DIR_D_].s = 0x401; sp->s_fval[WHITE][DIR_DL].s = 0x401; } - if (col > (BSZ - 4)) { + if (col > BSZ - 4) { set_blocked(sp, DIR__R); set_blocked(sp, DIR_DR); sp->s_fval[BLACK][DIR__R].s = 0x600; sp->s_fval[BLACK][DIR_DR].s = 0x600; sp->s_fval[WHITE][DIR__R].s = 0x600; sp->s_fval[WHITE][DIR_DR].s = 0x600; - } else if (col == (BSZ - 4)) { + } else if (col == BSZ - 4) { sp->s_fval[BLACK][DIR__R].s = 0x500; sp->s_fval[WHITE][DIR__R].s = 0x500; if (!is_blocked(sp, DIR_DR)) {
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun Jun 19 10:33:17 UTC 2022 Modified Files: src/games/gomoku: bdinit.c Log Message: gomoku: remove redundant parentheses No binary change. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/games/gomoku/bdinit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun Jun 19 10:23:48 UTC 2022 Modified Files: src/games/gomoku: bdinit.c gomoku.h makemove.c Log Message: gomoku: reduce usage of magic numbers in the code No binary change. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/games/gomoku/bdinit.c cvs rdiff -u -r1.55 -r1.56 src/games/gomoku/gomoku.h cvs rdiff -u -r1.42 -r1.43 src/games/gomoku/makemove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/bdinit.c diff -u src/games/gomoku/bdinit.c:1.35 src/games/gomoku/bdinit.c:1.36 --- src/games/gomoku/bdinit.c:1.35 Sun May 29 16:30:44 2022 +++ src/games/gomoku/bdinit.c Sun Jun 19 10:23:48 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdinit.c,v 1.35 2022/05/29 16:30:44 rillig Exp $ */ +/* $NetBSD: bdinit.c,v 1.36 2022/06/19 10:23:48 rillig Exp $ */ /* * Copyright (c) 1994 @@ -34,7 +34,7 @@ #include /* from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95 */ -__RCSID("$NetBSD: bdinit.c,v 1.35 2022/05/29 16:30:44 rillig Exp $"); +__RCSID("$NetBSD: bdinit.c,v 1.36 2022/06/19 10:23:48 rillig Exp $"); #include #include "gomoku.h" @@ -47,59 +47,56 @@ init_spot_flags_and_fval(struct spotstr sp->s_flags = 0; if (row < 5) { - /* directions 1, 2, 3 are blocked */ - sp->s_flags |= (BFLAG << 1) | (BFLAG << 2) | - (BFLAG << 3); - sp->s_fval[BLACK][1].s = 0x600; - sp->s_fval[BLACK][2].s = 0x600; - sp->s_fval[BLACK][3].s = 0x600; - sp->s_fval[WHITE][1].s = 0x600; - sp->s_fval[WHITE][2].s = 0x600; - sp->s_fval[WHITE][3].s = 0x600; + set_blocked(sp, DIR_DR); + set_blocked(sp, DIR_D_); + set_blocked(sp, DIR_DL); + sp->s_fval[BLACK][DIR_DR].s = 0x600; + sp->s_fval[BLACK][DIR_D_].s = 0x600; + sp->s_fval[BLACK][DIR_DL].s = 0x600; + sp->s_fval[WHITE][DIR_DR].s = 0x600; + sp->s_fval[WHITE][DIR_D_].s = 0x600; + sp->s_fval[WHITE][DIR_DL].s = 0x600; } else if (row == 5) { /* five spaces, blocked on one side */ - sp->s_fval[BLACK][1].s = 0x500; - sp->s_fval[BLACK][2].s = 0x500; - sp->s_fval[BLACK][3].s = 0x500; - sp->s_fval[WHITE][1].s = 0x500; - sp->s_fval[WHITE][2].s = 0x500; - sp->s_fval[WHITE][3].s = 0x500; + sp->s_fval[BLACK][DIR_DR].s = 0x500; + sp->s_fval[BLACK][DIR_D_].s = 0x500; + sp->s_fval[BLACK][DIR_DL].s = 0x500; + sp->s_fval[WHITE][DIR_DR].s = 0x500; + sp->s_fval[WHITE][DIR_D_].s = 0x500; + sp->s_fval[WHITE][DIR_DL].s = 0x500; } else { /* six spaces, not blocked */ - sp->s_fval[BLACK][1].s = 0x401; - sp->s_fval[BLACK][2].s = 0x401; - sp->s_fval[BLACK][3].s = 0x401; - sp->s_fval[WHITE][1].s = 0x401; - sp->s_fval[WHITE][2].s = 0x401; - sp->s_fval[WHITE][3].s = 0x401; + sp->s_fval[BLACK][DIR_DR].s = 0x401; + sp->s_fval[BLACK][DIR_D_].s = 0x401; + sp->s_fval[BLACK][DIR_DL].s = 0x401; + sp->s_fval[WHITE][DIR_DR].s = 0x401; + sp->s_fval[WHITE][DIR_D_].s = 0x401; + sp->s_fval[WHITE][DIR_DL].s = 0x401; } if (col > (BSZ - 4)) { - /* directions 0, 1 are blocked */ - sp->s_flags |= BFLAG | (BFLAG << 1); - sp->s_fval[BLACK][0].s = 0x600; - sp->s_fval[BLACK][1].s = 0x600; - sp->s_fval[WHITE][0].s = 0x600; - sp->s_fval[WHITE][1].s = 0x600; + set_blocked(sp, DIR__R); + set_blocked(sp, DIR_DR); + sp->s_fval[BLACK][DIR__R].s = 0x600; + sp->s_fval[BLACK][DIR_DR].s = 0x600; + sp->s_fval[WHITE][DIR__R].s = 0x600; + sp->s_fval[WHITE][DIR_DR].s = 0x600; } else if (col == (BSZ - 4)) { - sp->s_fval[BLACK][0].s = 0x500; - sp->s_fval[WHITE][0].s = 0x500; - /* if direction 1 is not blocked */ - if ((sp->s_flags & (BFLAG << 1)) == 0) { - sp->s_fval[BLACK][1].s = 0x500; - sp->s_fval[WHITE][1].s = 0x500; + sp->s_fval[BLACK][DIR__R].s = 0x500; + sp->s_fval[WHITE][DIR__R].s = 0x500; + if (!is_blocked(sp, DIR_DR)) { + sp->s_fval[BLACK][DIR_DR].s = 0x500; + sp->s_fval[WHITE][DIR_DR].s = 0x500; } } else { - sp->s_fval[BLACK][0].s = 0x401; - sp->s_fval[WHITE][0].s = 0x401; + sp->s_fval[BLACK][DIR__R].s = 0x401; + sp->s_fval[WHITE][DIR__R].s = 0x401; if (col < 5) { - /* direction 3 is blocked */ - sp->s_flags |= (BFLAG << 3); - sp->s_fval[BLACK][3].s = 0x600; - sp->s_fval[WHITE][3].s = 0x600; - } else if (col == 5 && - (sp->s_flags & (BFLAG << 3)) == 0) { - sp->s_fval[BLACK][3].s = 0x500; - sp->s_fval[WHITE][3].s = 0x500; + set_blocked(sp, DIR_DL); + sp->s_fval[BLACK][DIR_DL].s = 0x600; + sp->s_fval[WHITE][DIR_DL].s = 0x600; + } else if (col == 5 && !is_blocked(sp, DIR_DL)) { + sp->s_fval[BLACK][DIR_DL].s = 0x500; + sp->s_fval[WHITE][DIR_DL].s = 0x500; } } } @@ -110,7 +107,7 @@ init_spot_frame(struct spotstr *sp, fram { for (direction r = 4; r-- > 0; ) { - if ((sp->s_flags & (BFLAG << r)) != 0) + if (is_blocked(sp, r)) continue; frame_index fi = (*fip)++; @@ -247,7 +244,7 @@ init_overlap_frame(int fia, int ra, int const struct spotstr *spb0 = &board[s - offb * db]; if (spb0->s_occ == BORDER) break; - if ((spb
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun Jun 19 10:23:48 UTC 2022 Modified Files: src/games/gomoku: bdinit.c gomoku.h makemove.c Log Message: gomoku: reduce usage of magic numbers in the code No binary change. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/games/gomoku/bdinit.c cvs rdiff -u -r1.55 -r1.56 src/games/gomoku/gomoku.h cvs rdiff -u -r1.42 -r1.43 src/games/gomoku/makemove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.