CVS commit: src
Module Name:src Committed By: gutteridge Date: Mon Apr 25 02:29:14 UTC 2022 Modified Files: src/distrib/sets/lists/base: mi src/external/intel-fw-public/iwl6005: Makefile src/external/intel-fw-public/iwl6005/dist: LICENSE.iwlwifi-6000g2a-ucode README.iwlwifi-6000g2a-ucode src/sys/dev/pci: if_iwn.c Added Files: src/external/intel-fw-public/iwl6005/dist: iwlwifi-6000g2a-6.ucode Removed Files: src/external/intel-fw-public/iwl6005/dist: iwlwifi-6000g2a-5.ucode Log Message: Update firmware for Intel Centrino Advanced-N 6205 WiFi cards Use the final version of firmware provided for these cards. This has been tested with both variants of impacted iwn(4) cards (6005_2X2_1 and 6005_2X2_2, as found in a Dell E6230 and a Lenovo T420), improvements noted. To generate a diff of this commit: cvs rdiff -u -r1.1293 -r1.1294 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.2 -r1.3 src/external/intel-fw-public/iwl6005/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode \ src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode cvs rdiff -u -r1.1 -r0 \ src/external/intel-fw-public/iwl6005/dist/iwlwifi-6000g2a-5.ucode cvs rdiff -u -r0 -r1.1 \ src/external/intel-fw-public/iwl6005/dist/iwlwifi-6000g2a-6.ucode cvs rdiff -u -r1.98 -r1.99 src/sys/dev/pci/if_iwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1293 src/distrib/sets/lists/base/mi:1.1294 --- src/distrib/sets/lists/base/mi:1.1293 Wed Apr 6 14:20:07 2022 +++ src/distrib/sets/lists/base/mi Mon Apr 25 02:29:13 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1293 2022/04/06 14:20:07 reinoud Exp $ +# $NetBSD: mi,v 1.1294 2022/04/25 02:29:13 gutteridge Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -240,7 +240,8 @@ ./libdata/firmware/if_iwn/iwlwifi-5000-2.ucode base-firmware-root firmware ./libdata/firmware/if_iwn/iwlwifi-5150-2.ucode base-firmware-root firmware ./libdata/firmware/if_iwn/iwlwifi-6000-4.ucode base-firmware-root firmware -./libdata/firmware/if_iwn/iwlwifi-6000g2a-5.ucode base-firmware-root firmware +./libdata/firmware/if_iwn/iwlwifi-6000g2a-5.ucode base-obsolete obsolete +./libdata/firmware/if_iwn/iwlwifi-6000g2a-6.ucode base-firmware-root firmware ./libdata/firmware/if_iwn/iwlwifi-6000g2b-6.ucode base-firmware-root firmware ./libdata/firmware/if_iwn/iwlwifi-6050-5.ucode base-firmware-root firmware ./libdata/firmware/if_otus base-firmware-root Index: src/external/intel-fw-public/iwl6005/Makefile diff -u src/external/intel-fw-public/iwl6005/Makefile:1.2 src/external/intel-fw-public/iwl6005/Makefile:1.3 --- src/external/intel-fw-public/iwl6005/Makefile:1.2 Wed May 30 20:54:06 2018 +++ src/external/intel-fw-public/iwl6005/Makefile Mon Apr 25 02:29:13 2022 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2018/05/30 20:54:06 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2022/04/25 02:29:13 gutteridge Exp $ NOMAN= # define FILES= dist/LICENSE.iwlwifi-6000g2a-ucode dist/README.iwlwifi-6000g2a-ucode \ - dist/iwlwifi-6000g2a-5.ucode + dist/iwlwifi-6000g2a-6.ucode FILESDIR= ${FIRMWAREDIR}/if_iwn Index: src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode diff -u src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode:1.1 src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode:1.2 --- src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode:1.1 Fri May 20 01:59:14 2011 +++ src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode Mon Apr 25 02:29:13 2022 @@ -1,4 +1,4 @@ -Copyright (c) 2006-2011, Intel Corporation. +Copyright (c) 2006-2012, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without Index: src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode diff -u src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode:1.1 src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode:1.2 --- src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode:1.1 Fri May 20 01:59:14 2011 +++ src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode Mon Apr 25 02:29:13 2022 @@ -1,5 +1,5 @@ Intel Wireless WiFi Link 6000G2A AGN Adapter -Copyright (C) 2006-2011 Intel Corporation. All rights reserved. +Copyright (C) 2006-2012 Intel Corporation. All rights reserved. Microcode Package README.iwlwifi-6000g2a-ucode @@ -12,11 +12,11 @@ INDEX 1. OVERVIEW -The file iwlwifi-6000g2a-5.ucode provided in this package must be +The file iwlwifi-6000g2a-6.ucode provided in this package must be present on your system in order for the Intel Wireless WiFi Link AGN driver for Linux (iwlagn) to
CVS commit: src
Module Name:src Committed By: gutteridge Date: Mon Apr 25 02:29:14 UTC 2022 Modified Files: src/distrib/sets/lists/base: mi src/external/intel-fw-public/iwl6005: Makefile src/external/intel-fw-public/iwl6005/dist: LICENSE.iwlwifi-6000g2a-ucode README.iwlwifi-6000g2a-ucode src/sys/dev/pci: if_iwn.c Added Files: src/external/intel-fw-public/iwl6005/dist: iwlwifi-6000g2a-6.ucode Removed Files: src/external/intel-fw-public/iwl6005/dist: iwlwifi-6000g2a-5.ucode Log Message: Update firmware for Intel Centrino Advanced-N 6205 WiFi cards Use the final version of firmware provided for these cards. This has been tested with both variants of impacted iwn(4) cards (6005_2X2_1 and 6005_2X2_2, as found in a Dell E6230 and a Lenovo T420), improvements noted. To generate a diff of this commit: cvs rdiff -u -r1.1293 -r1.1294 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.2 -r1.3 src/external/intel-fw-public/iwl6005/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode \ src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode cvs rdiff -u -r1.1 -r0 \ src/external/intel-fw-public/iwl6005/dist/iwlwifi-6000g2a-5.ucode cvs rdiff -u -r0 -r1.1 \ src/external/intel-fw-public/iwl6005/dist/iwlwifi-6000g2a-6.ucode cvs rdiff -u -r1.98 -r1.99 src/sys/dev/pci/if_iwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: rillig Date: Sun Apr 24 20:32:44 UTC 2022 Modified Files: src/sys/ufs/lfs: lfs_accessors.h Log Message: lfs: fix lint warning about empty declaration To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/ufs/lfs/lfs_accessors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/lfs_accessors.h diff -u src/sys/ufs/lfs/lfs_accessors.h:1.50 src/sys/ufs/lfs/lfs_accessors.h:1.51 --- src/sys/ufs/lfs/lfs_accessors.h:1.50 Mon Sep 7 02:28:12 2020 +++ src/sys/ufs/lfs/lfs_accessors.h Sun Apr 24 20:32:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_accessors.h,v 1.50 2020/09/07 02:28:12 riastradh Exp $ */ +/* $NetBSD: lfs_accessors.h,v 1.51 2022/04/24 20:32:44 rillig Exp $ */ /* from NetBSD: lfs.h,v 1.165 2015/07/24 06:59:32 dholland Exp */ /* from NetBSD: dinode.h,v 1.25 2016/01/22 23:06:10 dholland Exp */ @@ -486,24 +486,24 @@ lfs_copy_dinode(STRUCT_LFS *fs, } \ } \ -LFS_DEF_DINO_ACCESSOR(uint16_t, uint16_t, mode); -LFS_DEF_DINO_ACCESSOR(int16_t, int16_t, nlink); -LFS_DEF_DINO_ACCESSOR(uint64_t, uint32_t, inumber); -LFS_DEF_DINO_ACCESSOR(uint64_t, uint64_t, size); -LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, atime); -LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, atimensec); -LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, mtime); -LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, mtimensec); -LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, ctime); -LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, ctimensec); -LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, flags); -LFS_DEF_DINO_ACCESSOR(uint64_t, uint32_t, blocks); -LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, gen); -LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, uid); -LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, gid); +LFS_DEF_DINO_ACCESSOR(uint16_t, uint16_t, mode) +LFS_DEF_DINO_ACCESSOR(int16_t, int16_t, nlink) +LFS_DEF_DINO_ACCESSOR(uint64_t, uint32_t, inumber) +LFS_DEF_DINO_ACCESSOR(uint64_t, uint64_t, size) +LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, atime) +LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, atimensec) +LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, mtime) +LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, mtimensec) +LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, ctime) +LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, ctimensec) +LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, flags) +LFS_DEF_DINO_ACCESSOR(uint64_t, uint32_t, blocks) +LFS_DEF_DINO_ACCESSOR(int32_t, int32_t, gen) +LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, uid) +LFS_DEF_DINO_ACCESSOR(uint32_t, uint32_t, gid) /* XXX this should be done differently (it's a fake field) */ -LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, rdev); +LFS_DEF_DINO_ACCESSOR(int64_t, int32_t, rdev) static __inline daddr_t lfs_dino_getdb(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix) @@ -747,10 +747,10 @@ lfs_iblock_set(STRUCT_LFS *fs, void *blo } \ } \ -LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, nblocks); -LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, version); -LFS_DEF_FI_ACCESSOR(uint64_t, uint32_t, ino); -LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, lastlength); +LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, nblocks) +LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, version) +LFS_DEF_FI_ACCESSOR(uint64_t, uint32_t, ino) +LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, lastlength) static __inline daddr_t lfs_fi_getblock(STRUCT_LFS *fs, FINFO *fip, unsigned idx) @@ -882,11 +882,11 @@ lfs_ii_setblock(STRUCT_LFS *fs, IINFO *i } \ } \ -LFS_DEF_IF_ACCESSOR(uint32_t, uint32_t, version); -LFS_DEF_IF_ACCESSOR(int64_t, int32_t, daddr); -LFS_DEF_IF_ACCESSOR(uint64_t, uint32_t, nextfree); -LFS_DEF_IF_ACCESSOR(uint64_t, uint32_t, atime_sec); -LFS_DEF_IF_ACCESSOR(uint32_t, uint32_t, atime_nsec); +LFS_DEF_IF_ACCESSOR(uint32_t, uint32_t, version) +LFS_DEF_IF_ACCESSOR(int64_t, int32_t, daddr) +LFS_DEF_IF_ACCESSOR(uint64_t, uint32_t, nextfree) +LFS_DEF_IF_ACCESSOR(uint64_t, uint32_t, atime_sec) +LFS_DEF_IF_ACCESSOR(uint32_t, uint32_t, atime_nsec) /* * Cleaner information structure. This resides in the ifile and is used @@ -921,13 +921,13 @@ LFS_DEF_IF_ACCESSOR(uint32_t, uint32_t, } \ } \ -LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, clean); -LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, dirty); -LFS_DEF_CI_ACCESSOR(int64_t, int32_t, bfree); -LFS_DEF_CI_ACCESSOR(int64_t, int32_t, avail); -LFS_DEF_CI_ACCESSOR(uint64_t, uint32_t, free_head); -LFS_DEF_CI_ACCESSOR(uint64_t, uint32_t, free_tail); -LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, flags); +LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, clean) +LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, dirty) +LFS_DEF_CI_ACCESSOR(int64_t, int32_t, bfree) +LFS_DEF_CI_ACCESSOR(int64_t, int32_t, avail) +LFS_DEF_CI_ACCESSOR(uint64_t, uint32_t, free_head) +LFS_DEF_CI_ACCESSOR(uint64_t, uint32_t, free_tail) +LFS_DEF_CI_ACCESSOR(uint32_t, uint32_t, flags) static __inline void lfs_ci_shiftcleantodirty(STRUCT_LFS *fs, CLEANERINFO *cip, unsigned num) @@ -1067,17 +1067,17 @@ segsum_finfobase(STRUCT_LFS
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: rillig Date: Sun Apr 24 20:32:44 UTC 2022 Modified Files: src/sys/ufs/lfs: lfs_accessors.h Log Message: lfs: fix lint warning about empty declaration To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/ufs/lfs/lfs_accessors.h 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 Apr 24 20:08:23 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: d_compound_literals1.c d_compound_literals2.c d_gcc_compound_statements1.c decl.c decl.exp msg_001.c msg_001.exp msg_032.c msg_032.exp msg_053.c msg_053.exp msg_062.c msg_062.exp msg_216.c msg_216.exp msg_250.c msg_250.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: error out on declarations with implicit int type To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_compound_literals1.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals2.c \ src/tests/usr.bin/xlint/lint1/msg_032.c \ src/tests/usr.bin/xlint/lint1/msg_032.exp \ src/tests/usr.bin/xlint/lint1/msg_053.c \ src/tests/usr.bin/xlint/lint1/msg_053.exp \ src/tests/usr.bin/xlint/lint1/msg_062.c \ src/tests/usr.bin/xlint/lint1/msg_062.exp \ src/tests/usr.bin/xlint/lint1/msg_250.c \ src/tests/usr.bin/xlint/lint1/msg_250.exp cvs rdiff -u -r1.8 -r1.9 \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/decl.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_001.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_216.c \ src/tests/usr.bin/xlint/lint1/msg_216.exp cvs rdiff -u -r1.401 -r1.402 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_compound_literals1.c diff -u src/tests/usr.bin/xlint/lint1/d_compound_literals1.c:1.3 src/tests/usr.bin/xlint/lint1/d_compound_literals1.c:1.4 --- src/tests/usr.bin/xlint/lint1/d_compound_literals1.c:1.3 Sun Jan 31 14:57:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_compound_literals1.c Sun Apr 24 20:08:23 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: d_compound_literals1.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ +/* $NetBSD: d_compound_literals1.c,v 1.4 2022/04/24 20:08:23 rillig Exp $ */ # 3 "d_compound_literals1.c" /* compound literals */ @@ -7,7 +7,7 @@ struct p { short a, b, c, d; }; -foo() +void foo(void) { struct p me = (struct p){ 1, 2, 3, 4 }; me.a = me.b; Index: src/tests/usr.bin/xlint/lint1/d_compound_literals2.c diff -u src/tests/usr.bin/xlint/lint1/d_compound_literals2.c:1.3 src/tests/usr.bin/xlint/lint1/d_compound_literals2.c:1.4 --- src/tests/usr.bin/xlint/lint1/d_compound_literals2.c:1.3 Sun Jan 31 14:57:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_compound_literals2.c Sun Apr 24 20:08:23 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: d_compound_literals2.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ +/* $NetBSD: d_compound_literals2.c,v 1.4 2022/04/24 20:08:23 rillig Exp $ */ # 3 "d_compound_literals2.c" /* compound literals */ @@ -16,7 +16,7 @@ bar(int i) return [i]; } -foo() +void foo(void) { *bar(1) = (struct p){ 1, 2, 3, 4 }; } Index: src/tests/usr.bin/xlint/lint1/msg_032.c diff -u src/tests/usr.bin/xlint/lint1/msg_032.c:1.3 src/tests/usr.bin/xlint/lint1/msg_032.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_032.c:1.3 Tue Apr 5 23:09:19 2022 +++ src/tests/usr.bin/xlint/lint1/msg_032.c Sun Apr 24 20:08:23 2022 @@ -1,8 +1,9 @@ -/* $NetBSD: msg_032.c,v 1.3 2022/04/05 23:09:19 rillig Exp $ */ +/* $NetBSD: msg_032.c,v 1.4 2022/04/24 20:08:23 rillig Exp $ */ # 3 "msg_032.c" // Test for message: argument type defaults to 'int': %s [32] +/* expect+5: error: old style declaration; add 'int' [1] */ add(a, b, c) /* expect+3: warning: argument type defaults to 'int': a [32] */ /* expect+2: warning: argument type defaults to 'int': b [32] */ Index: src/tests/usr.bin/xlint/lint1/msg_032.exp diff -u src/tests/usr.bin/xlint/lint1/msg_032.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_032.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_032.exp:1.3 Tue Apr 5 23:09:19 2022 +++ src/tests/usr.bin/xlint/lint1/msg_032.exp Sun Apr 24 20:08:23 2022 @@ -1,3 +1,4 @@ -msg_032.c(10): warning: argument type defaults to 'int': a [32] -msg_032.c(10): warning: argument type defaults to 'int': b [32] -msg_032.c(10): warning: argument type defaults to 'int': c [32] +msg_032.c(11): error: old style declaration; add 'int' [1] +msg_032.c(11): warning: argument type defaults to 'int': a [32] +msg_032.c(11): warning: argument type defaults to 'int': b [32] +msg_032.c(11): warning: argument type defaults to 'int': c [32] Index: src/tests/usr.bin/xlint/lint1/msg_053.c diff -u src/tests/usr.bin/xlint/lint1/msg_053.c:1.3 src/tests/usr.bin/xlint/lint1/msg_053.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_053.c:1.3 Fri Aug 27 20:16:50 2021 +++ src/tests/usr.bin/xlint/lint1/msg_053.c Sun Apr 24 20:08:23 2022 @@ -1,8 +1,9 @@ -/* $NetBSD: msg_053.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */ +/* $NetBSD:
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Apr 24 20:08:23 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: d_compound_literals1.c d_compound_literals2.c d_gcc_compound_statements1.c decl.c decl.exp msg_001.c msg_001.exp msg_032.c msg_032.exp msg_053.c msg_053.exp msg_062.c msg_062.exp msg_216.c msg_216.exp msg_250.c msg_250.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: error out on declarations with implicit int type To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_compound_literals1.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals2.c \ src/tests/usr.bin/xlint/lint1/msg_032.c \ src/tests/usr.bin/xlint/lint1/msg_032.exp \ src/tests/usr.bin/xlint/lint1/msg_053.c \ src/tests/usr.bin/xlint/lint1/msg_053.exp \ src/tests/usr.bin/xlint/lint1/msg_062.c \ src/tests/usr.bin/xlint/lint1/msg_062.exp \ src/tests/usr.bin/xlint/lint1/msg_250.c \ src/tests/usr.bin/xlint/lint1/msg_250.exp cvs rdiff -u -r1.8 -r1.9 \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/decl.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_001.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_216.c \ src/tests/usr.bin/xlint/lint1/msg_216.exp cvs rdiff -u -r1.401 -r1.402 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 19:46:29 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_001.c msg_001.exp Log Message: tests/lint: demonstrate missing check for missing type To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_001.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_001.c diff -u src/tests/usr.bin/xlint/lint1/msg_001.c:1.4 src/tests/usr.bin/xlint/lint1/msg_001.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_001.c:1.4 Sun Jan 31 11:23:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.c Sun Apr 24 19:46:29 2022 @@ -1,8 +1,28 @@ -/* $NetBSD: msg_001.c,v 1.4 2021/01/31 11:23:01 rillig Exp $ */ +/* $NetBSD: msg_001.c,v 1.5 2022/04/24 19:46:29 rillig Exp $ */ # 3 "msg_001.c" // Test for message: old style declaration; add 'int' [1] -old_style = 1; /* expect: [1] */ +/* expect+1: warning: old style declaration; add 'int' [1] */ +old_style = 1; int new_style = 1; + +/* expect+2: error: old style declaration; add 'int' [1] */ +/* expect+1: warning: static variable static_old_style unused [226] */ +static static_old_style = 1; + +/* expect+1: warning: static variable static_new_style unused [226] */ +static int static_new_style = 1; + +/* TODO: complain about missing 'int' */ +extern_implicit_int(void) +{ +} + +/* TODO: complain about missing 'int' */ +/* expect+2: warning: static function static_implicit_int unused [236] */ +static +static_implicit_int(void) +{ +} Index: src/tests/usr.bin/xlint/lint1/msg_001.exp diff -u src/tests/usr.bin/xlint/lint1/msg_001.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_001.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_001.exp:1.3 Sun Jan 31 11:23:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.exp Sun Apr 24 19:46:29 2022 @@ -1 +1,5 @@ -msg_001.c(6): warning: old style declaration; add 'int' [1] +msg_001.c(7): warning: old style declaration; add 'int' [1] +msg_001.c(13): error: old style declaration; add 'int' [1] +msg_001.c(13): warning: static variable static_old_style unused [226] +msg_001.c(16): warning: static variable static_new_style unused [226] +msg_001.c(26): warning: static function static_implicit_int unused [236]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 19:46:29 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_001.c msg_001.exp Log Message: tests/lint: demonstrate missing check for missing type To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_001.exp 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 Apr 24 19:21:01 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: decl.c decl.exp emit.c emit.exp msg_007.c msg_007.exp msg_030.c msg_030.exp msg_072.c msg_072.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: error out on missing type in declarations To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/decl.exp cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/emit.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/emit.exp cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_007.c \ src/tests/usr.bin/xlint/lint1/msg_007.exp \ src/tests/usr.bin/xlint/lint1/msg_030.c \ src/tests/usr.bin/xlint/lint1/msg_030.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_072.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_072.exp cvs rdiff -u -r1.400 -r1.401 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/decl.c diff -u src/tests/usr.bin/xlint/lint1/decl.c:1.13 src/tests/usr.bin/xlint/lint1/decl.c:1.14 --- src/tests/usr.bin/xlint/lint1/decl.c:1.13 Sun Apr 3 10:05:23 2022 +++ src/tests/usr.bin/xlint/lint1/decl.c Sun Apr 24 19:21:01 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.13 2022/04/03 10:05:23 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.14 2022/04/24 19:21:01 rillig Exp $ */ # 3 "decl.c" /* @@ -104,7 +104,7 @@ int declaration_without_type_specifier(void) { const i = 3; - + /* expect-1: error: old style declaration; add 'int' [1] */ return i; } Index: src/tests/usr.bin/xlint/lint1/decl.exp diff -u src/tests/usr.bin/xlint/lint1/decl.exp:1.9 src/tests/usr.bin/xlint/lint1/decl.exp:1.10 --- src/tests/usr.bin/xlint/lint1/decl.exp:1.9 Sun Apr 3 10:05:23 2022 +++ src/tests/usr.bin/xlint/lint1/decl.exp Sun Apr 24 19:21:01 2022 @@ -9,6 +9,7 @@ decl.c(68): warning: converting 'pointer decl.c(70): warning: illegal combination of pointer (pointer to double) and integer (char), arg #1 [154] decl.c(72): warning: converting 'pointer to pointer to char' to incompatible 'pointer to double' for argument 1 [153] decl.c(80): error: syntax error '"' [249] +decl.c(106): error: old style declaration; add 'int' [1] decl.c(163): error: syntax error 'int' [249] decl.c(166): error: syntax error 'int' [249] decl.c(180): error: syntax error 'goto' [249] Index: src/tests/usr.bin/xlint/lint1/emit.c diff -u src/tests/usr.bin/xlint/lint1/emit.c:1.10 src/tests/usr.bin/xlint/lint1/emit.c:1.11 --- src/tests/usr.bin/xlint/lint1/emit.c:1.10 Sat Jan 15 14:22:03 2022 +++ src/tests/usr.bin/xlint/lint1/emit.c Sun Apr 24 19:21:01 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: emit.c,v 1.10 2022/01/15 14:22:03 rillig Exp $ */ +/* $NetBSD: emit.c,v 1.11 2022/04/24 19:21:01 rillig Exp $ */ # 3 "emit.c" /* @@ -121,7 +121,7 @@ extern const volatile int extern_const_v extern void return_void_unknown_parameters(); extern /* implicit int */ return_implicit_int_unknown_parameters(); - +/* expect-1: error: old style declaration; add 'int' [1] */ /* For function declarations, the keyword 'extern' is optional. */ extern void extern_return_void_no_parameters(void); /* implicit extern */ void return_void_no_parameters(void); Index: src/tests/usr.bin/xlint/lint1/emit.exp diff -u src/tests/usr.bin/xlint/lint1/emit.exp:1.2 src/tests/usr.bin/xlint/lint1/emit.exp:1.3 --- src/tests/usr.bin/xlint/lint1/emit.exp:1.2 Sat Jan 15 14:22:03 2022 +++ src/tests/usr.bin/xlint/lint1/emit.exp Sun Apr 24 19:21:01 2022 @@ -1,3 +1,4 @@ +emit.c(123): error: old style declaration; add 'int' [1] emit.c(108): warning: static variable static_int unused [226] emit.c(129): warning: static function static_return_void_no_parameters declared but not defined [290] emit.c(149): warning: static function static_function declared but not defined [290] Index: src/tests/usr.bin/xlint/lint1/msg_007.c diff -u src/tests/usr.bin/xlint/lint1/msg_007.c:1.3 src/tests/usr.bin/xlint/lint1/msg_007.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_007.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_007.c Sun Apr 24 19:21:01 2022 @@ -1,7 +1,10 @@ -/* $NetBSD: msg_007.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_007.c,v 1.4 2022/04/24 19:21:01 rillig Exp $ */ # 3 "msg_007.c" // Test for message: only one storage class allowed [7] -extern static void example(void); /* expect: 7 */ +/* expect+1: error: only one storage class allowed [7] */ +extern static void example(void); + +/* expect+1: error: old style declaration; add 'int' [1] */ extern extern_function(void); Index: src/tests/usr.bin/xlint/lint1/msg_007.exp diff -u src/tests/usr.bin/xlint/lint1/msg_007.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_007.exp:1.4 ---
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Apr 24 19:21:01 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: decl.c decl.exp emit.c emit.exp msg_007.c msg_007.exp msg_030.c msg_030.exp msg_072.c msg_072.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: error out on missing type in declarations To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/decl.exp cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/emit.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/emit.exp cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_007.c \ src/tests/usr.bin/xlint/lint1/msg_007.exp \ src/tests/usr.bin/xlint/lint1/msg_030.c \ src/tests/usr.bin/xlint/lint1/msg_030.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_072.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_072.exp cvs rdiff -u -r1.400 -r1.401 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 17:32:23 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve 4 shift/reduce conflicts in labeled_statement The attributes are already parsed as part of the statement. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.399 -r1.400 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.399 src/usr.bin/xlint/lint1/cgram.y:1.400 --- src/usr.bin/xlint/lint1/cgram.y:1.399 Sun Apr 24 16:54:09 2022 +++ src/usr.bin/xlint/lint1/cgram.y Sun Apr 24 17:32:22 2022 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.399 2022/04/24 16:54:09 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.400 2022/04/24 17:32:22 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.399 2022/04/24 16:54:09 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.400 2022/04/24 17:32:22 rillig Exp $"); #endif #include @@ -126,7 +126,7 @@ anonymize(sym_t *s) %} -%expect 132 +%expect 128 %union { val_t *y_val; @@ -1648,7 +1648,7 @@ non_expr_statement: /* helper for C99 6 ; labeled_statement: /* C99 6.8.1 */ - label type_attribute_opt statement + label statement ; label:
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 17:32:23 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve 4 shift/reduce conflicts in labeled_statement The attributes are already parsed as part of the statement. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.399 -r1.400 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 16:54:09 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve 6 shift/reduce conflicts in type_direct_declarator No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.398 src/usr.bin/xlint/lint1/cgram.y:1.399 --- src/usr.bin/xlint/lint1/cgram.y:1.398 Sun Apr 24 16:50:06 2022 +++ src/usr.bin/xlint/lint1/cgram.y Sun Apr 24 16:54:09 2022 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.398 2022/04/24 16:50:06 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.399 2022/04/24 16:54:09 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.398 2022/04/24 16:50:06 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.399 2022/04/24 16:54:09 rillig Exp $"); #endif #include @@ -126,7 +126,7 @@ anonymize(sym_t *s) %} -%expect 138 +%expect 132 %union { val_t *y_val; @@ -1246,14 +1246,11 @@ notype_direct_declarator: ; type_direct_declarator: - identifier { - $$ = declarator_name(getsym($1)); - } - | T_LPAREN type_declarator T_RPAREN { - $$ = $2; + type_attribute_list_opt identifier { + $$ = declarator_name(getsym($2)); } - | type_attribute type_direct_declarator { - $$ = $2; + | type_attribute_list_opt T_LPAREN type_declarator T_RPAREN { + $$ = $3; } | type_direct_declarator T_LBRACK array_size_opt T_RBRACK { $$ = add_array($1, $3.has_dim, $3.dim);
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 16:54:09 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve 6 shift/reduce conflicts in type_direct_declarator No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 16:50:06 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: solve 6 shift/reduce conflicts in notype_direct_declarator No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.397 -r1.398 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.397 src/usr.bin/xlint/lint1/cgram.y:1.398 --- src/usr.bin/xlint/lint1/cgram.y:1.397 Sun Apr 24 15:55:50 2022 +++ src/usr.bin/xlint/lint1/cgram.y Sun Apr 24 16:50:06 2022 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.397 2022/04/24 15:55:50 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.398 2022/04/24 16:50:06 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.397 2022/04/24 15:55:50 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.398 2022/04/24 16:50:06 rillig Exp $"); #endif #include @@ -126,7 +126,7 @@ anonymize(sym_t *s) %} -%expect 144 +%expect 138 %union { val_t *y_val; @@ -834,6 +834,11 @@ declmod: | type_attribute_list ; +type_attribute_list_opt: + /* empty */ + | type_attribute_list + ; + type_attribute_list: type_attribute | type_attribute_list type_attribute @@ -1223,14 +1228,11 @@ type_declarator: ; notype_direct_declarator: - T_NAME { - $$ = declarator_name(getsym($1)); + type_attribute_list_opt T_NAME { + $$ = declarator_name(getsym($2)); } - | T_LPAREN type_declarator T_RPAREN { - $$ = $2; - } - | type_attribute notype_direct_declarator { - $$ = $2; + | type_attribute_list_opt T_LPAREN type_declarator T_RPAREN { + $$ = $3; } | notype_direct_declarator T_LBRACK array_size_opt T_RBRACK { $$ = add_array($1, $3.has_dim, $3.dim);
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 16:50:06 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: solve 6 shift/reduce conflicts in notype_direct_declarator No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.397 -r1.398 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Apr 24 16:39:56 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1438 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.3 diff -u src/doc/CHANGES-9.3:1.1.2.84 src/doc/CHANGES-9.3:1.1.2.85 --- src/doc/CHANGES-9.3:1.1.2.84 Mon Apr 18 10:57:05 2022 +++ src/doc/CHANGES-9.3 Sun Apr 24 16:39:56 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.3,v 1.1.2.84 2022/04/18 10:57:05 martin Exp $ +# $NetBSD: CHANGES-9.3,v 1.1.2.85 2022/04/24 16:39:56 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -1540,3 +1540,11 @@ sys/fs/udf/udf_allocation.c 1.46 Avoid a race introduced with ticket #1431. [reinoud, ticket #1437] +sys/compat/netbsd32/netbsd32.h 1.140 +sys/compat/netbsd32/netbsd32_fs.c 1.95 +sys/fs/udf/udf_subr.c1.169 + + Fix endian issue with UDF extended attribute handling. + PR 56801: implement support for mounting UDF in compat32. + [reinoud, ticket #1438] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Apr 24 16:39:56 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1438 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Sun Apr 24 16:39:00 UTC 2022 Modified Files: src/sys/compat/netbsd32 [netbsd-9]: netbsd32.h netbsd32_fs.c src/sys/fs/udf [netbsd-9]: udf_subr.c Log Message: Pull up following revision(s) (requested by reinoud in ticket #1438): sys/compat/netbsd32/netbsd32.h: revision 1.140 sys/compat/netbsd32/netbsd32_fs.c: revision 1.95 sys/fs/udf/udf_subr.c: revision 1.169 Fix endian issue with UDF extended attribute handling Implement support for mounting UDF in compat32 Fixes PR#56801 To generate a diff of this commit: cvs rdiff -u -r1.123.4.1 -r1.123.4.2 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.82.4.1 -r1.82.4.2 src/sys/compat/netbsd32/netbsd32_fs.c cvs rdiff -u -r1.146.2.2 -r1.146.2.3 src/sys/fs/udf/udf_subr.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/compat/netbsd32/netbsd32.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.123.4.1 src/sys/compat/netbsd32/netbsd32.h:1.123.4.2 --- src/sys/compat/netbsd32/netbsd32.h:1.123.4.1 Tue Nov 19 13:36:25 2019 +++ src/sys/compat/netbsd32/netbsd32.h Sun Apr 24 16:39:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.123.4.1 2019/11/19 13:36:25 martin Exp $ */ +/* $NetBSD: netbsd32.h,v 1.123.4.2 2022/04/24 16:39:00 martin Exp $ */ /* * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green @@ -1095,6 +1095,25 @@ struct netbsd32_msdosfs_args { int gmtoff; /* v3: offset from UTC in seconds */ }; +/* from */ +struct netbsd32_udf_args { + uint32_t version; /* version of this structure */ + netbsd32_charp fspec; /* mount specifier */ + int32_t sessionnr; /* session specifier, rel of abs */ + uint32_t udfmflags; /* mount options */ + int32_t gmtoff; /* offset from UTC in seconds*/ + + uid_t anon_uid; /* mapping of anonymous files uid*/ + gid_t anon_gid; /* mapping of anonymous files gid*/ + uid_t nobody_uid; /* nobody:nobody will map to -1:-1 */ + gid_t nobody_gid; /* nobody:nobody will map to -1:-1 */ + + uint32_t sector_size; /* for mounting dumps/files */ + + /* extendable */ + uint8_t reserved[32]; +}; + /* from */ struct netbsd32_layer_args { netbsd32_charp target; /* Target of loopback */ Index: src/sys/compat/netbsd32/netbsd32_fs.c diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.82.4.1 src/sys/compat/netbsd32/netbsd32_fs.c:1.82.4.2 --- src/sys/compat/netbsd32/netbsd32_fs.c:1.82.4.1 Wed Oct 16 17:29:49 2019 +++ src/sys/compat/netbsd32/netbsd32_fs.c Sun Apr 24 16:39:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_fs.c,v 1.82.4.1 2019/10/16 17:29:49 martin Exp $ */ +/* $NetBSD: netbsd32_fs.c,v 1.82.4.2 2022/04/24 16:39:00 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.82.4.1 2019/10/16 17:29:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.82.4.2 2022/04/24 16:39:00 martin Exp $"); #include #include @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_fs. #include #include #include +#include #include #include @@ -794,6 +795,7 @@ netbsd32___mount50(struct lwp *l, const struct netbsd32_iso_args iso_args; struct netbsd32_nfs_args nfs_args; struct netbsd32_msdosfs_args msdosfs_args; + struct netbsd32_udf_args udf_args; struct netbsd32_tmpfs_args tmpfs_args; struct netbsd32_null_args null_args; } fs_args32; @@ -803,6 +805,7 @@ netbsd32___mount50(struct lwp *l, const struct iso_args iso_args; struct nfs_args nfs_args; struct msdosfs_args msdosfs_args; + struct udf_args udf_args; struct tmpfs_args tmpfs_args; struct null_args null_args; } fs_args; @@ -928,6 +931,40 @@ netbsd32___mount50(struct lwp *l, const data_seg = UIO_SYSSPACE; data = _args.msdosfs_args; data_len = sizeof(fs_args.msdosfs_args); + } else if (strcmp(mtype, MOUNT_UDF) == 0) { + if (data_len != 0 && data_len < sizeof(fs_args32.udf_args)) + return EINVAL; + if ((flags & MNT_GETARGS) == 0) { + error = copyin(data, _args32.udf_args, + sizeof(fs_args32.udf_args)); + if (error) +return error; + fs_args.udf_args.version = + fs_args32.udf_args.version; + fs_args.udf_args.fspec = + NETBSD32PTR64(fs_args32.udf_args.fspec); + fs_args.udf_args.sessionnr = + fs_args32.udf_args.sessionnr; + fs_args.udf_args.udfmflags = + fs_args32.udf_args.udfmflags; + fs_args.udf_args.gmtoff = + fs_args32.udf_args.gmtoff; + fs_args.udf_args.anon_uid = + fs_args32.udf_args.anon_uid; + fs_args.udf_args.anon_gid = + fs_args32.udf_args.anon_gid; + fs_args.udf_args.nobody_uid = + fs_args32.udf_args.nobody_uid; + fs_args.udf_args.nobody_gid = + fs_args32.udf_args.nobody_gid; + fs_args.udf_args.sector_size = + fs_args32.udf_args.sector_size; +
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Sun Apr 24 16:39:00 UTC 2022 Modified Files: src/sys/compat/netbsd32 [netbsd-9]: netbsd32.h netbsd32_fs.c src/sys/fs/udf [netbsd-9]: udf_subr.c Log Message: Pull up following revision(s) (requested by reinoud in ticket #1438): sys/compat/netbsd32/netbsd32.h: revision 1.140 sys/compat/netbsd32/netbsd32_fs.c: revision 1.95 sys/fs/udf/udf_subr.c: revision 1.169 Fix endian issue with UDF extended attribute handling Implement support for mounting UDF in compat32 Fixes PR#56801 To generate a diff of this commit: cvs rdiff -u -r1.123.4.1 -r1.123.4.2 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.82.4.1 -r1.82.4.2 src/sys/compat/netbsd32/netbsd32_fs.c cvs rdiff -u -r1.146.2.2 -r1.146.2.3 src/sys/fs/udf/udf_subr.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 Apr 24 15:55:50 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_049.c msg_049.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: warn about anonymous struct in struct, in plain C99 mode To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_049.c \ src/tests/usr.bin/xlint/lint1/msg_049.exp cvs rdiff -u -r1.396 -r1.397 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_049.c diff -u src/tests/usr.bin/xlint/lint1/msg_049.c:1.4 src/tests/usr.bin/xlint/lint1/msg_049.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_049.c:1.4 Sun Feb 27 11:40:30 2022 +++ src/tests/usr.bin/xlint/lint1/msg_049.c Sun Apr 24 15:55:50 2022 @@ -1,14 +1,9 @@ -/* $NetBSD: msg_049.c,v 1.4 2022/02/27 11:40:30 rillig Exp $ */ +/* $NetBSD: msg_049.c,v 1.5 2022/04/24 15:55:50 rillig Exp $ */ # 3 "msg_049.c" /* Test for message: anonymous struct/union members is a C11 feature [49] */ -/* lint1-flags: -sw */ - -/* - * FIXME: C99 does not allow anonymous struct/union members, that's a GCC - * extension that got incorporated into C11. - */ +/* lint1-flags: -Sw */ struct { unsigned int flag: 1; Index: src/tests/usr.bin/xlint/lint1/msg_049.exp diff -u src/tests/usr.bin/xlint/lint1/msg_049.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_049.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_049.exp:1.4 Sun Feb 27 11:40:30 2022 +++ src/tests/usr.bin/xlint/lint1/msg_049.exp Sun Apr 24 15:55:50 2022 @@ -1 +1 @@ -msg_049.c(25): warning: anonymous struct/union members is a C11 feature [49] +msg_049.c(20): warning: anonymous struct/union members is a C11 feature [49] Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.396 src/usr.bin/xlint/lint1/cgram.y:1.397 --- src/usr.bin/xlint/lint1/cgram.y:1.396 Sun Apr 24 13:38:57 2022 +++ src/usr.bin/xlint/lint1/cgram.y Sun Apr 24 15:55:50 2022 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.396 2022/04/24 13:38:57 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.397 2022/04/24 15:55:50 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.396 2022/04/24 13:38:57 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.397 2022/04/24 15:55:50 rillig Exp $"); #endif #include @@ -979,7 +979,7 @@ struct_declaration: /* C99 6.7.2.1 */ | begin_type_specifier_qualifier_list end_type type_attribute_opt T_SEMI { symtyp = FVFT; - if (!Sflag) + if (!allow_c11 && !allow_gcc) /* anonymous struct/union members is a C11 feature */ warning(49); if (is_struct_or_union(dcs->d_type->t_tspec)) {
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Apr 24 15:55:50 UTC 2022 Modified Files: src/tests/usr.bin/xlint/lint1: msg_049.c msg_049.exp src/usr.bin/xlint/lint1: cgram.y Log Message: lint: warn about anonymous struct in struct, in plain C99 mode To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_049.c \ src/tests/usr.bin/xlint/lint1/msg_049.exp cvs rdiff -u -r1.396 -r1.397 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Sun Apr 24 15:07:08 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Fix endian bug in allocation extents processing To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sbin/fsck_udf/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_udf/main.c diff -u src/sbin/fsck_udf/main.c:1.10 src/sbin/fsck_udf/main.c:1.11 --- src/sbin/fsck_udf/main.c:1.10 Fri Apr 22 21:07:56 2022 +++ src/sbin/fsck_udf/main.c Sun Apr 24 15:07:08 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.10 2022/04/22 21:07:56 reinoud Exp $ */ +/* $NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $ */ /* * Copyright (c) 2022 Reinoud Zandijk @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: main.c,v 1.10 2022/04/22 21:07:56 reinoud Exp $"); +__RCSID("$NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $"); #endif /* not lint */ #include @@ -1088,7 +1088,7 @@ udf_process_file(union dscrptr *dscrptr, lb_num, vpart_num, 1); /* TODO check for prev_entry? */ - l_ad = ext->l_ad; + l_ad = udf_rw32(ext->l_ad); bpos = ext->data; if (ad_type == UDF_ICB_SHORT_ALLOC) short_adp = (struct short_ad *) bpos;
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Sun Apr 24 15:07:08 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Fix endian bug in allocation extents processing To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sbin/fsck_udf/main.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/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 13:38:57 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: reduce shift/reduce conflicts in C grammar Previously, direct_abstract_declarator allowed type attributes like _Noreturn to be prepended and appended to a type without specifying any order. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.395 -r1.396 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.395 src/usr.bin/xlint/lint1/cgram.y:1.396 --- src/usr.bin/xlint/lint1/cgram.y:1.395 Sat Apr 16 09:22:25 2022 +++ src/usr.bin/xlint/lint1/cgram.y Sun Apr 24 13:38:57 2022 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.395 2022/04/16 09:22:25 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.396 2022/04/24 13:38:57 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.395 2022/04/16 09:22:25 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.396 2022/04/24 13:38:57 rillig Exp $"); #endif #include @@ -126,7 +126,7 @@ anonymize(sym_t *s) %} -%expect 150 +%expect 144 %union { val_t *y_val; @@ -1416,6 +1416,12 @@ abstract_declarator: | pointer direct_abstract_declarator { $$ = add_pointer($2, $1); } + | type_attribute_list direct_abstract_declarator { + $$ = $2; + } + | pointer type_attribute_list direct_abstract_declarator { + $$ = add_pointer($3, $1); + } ; /* K ---, C90 ???, C99 6.7.6, C11 6.7.7 */ @@ -1427,9 +1433,6 @@ direct_abstract_declarator: | T_LBRACK array_size_opt T_RBRACK { $$ = add_array(abstract_name(), $2.has_dim, $2.dim); } - | type_attribute direct_abstract_declarator { - $$ = $2; - } | direct_abstract_declarator T_LBRACK array_size_opt T_RBRACK { $$ = add_array($1, $3.has_dim, $3.dim); }
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Apr 24 13:38:57 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: reduce shift/reduce conflicts in C grammar Previously, direct_abstract_declarator allowed type attributes like _Noreturn to be prepended and appended to a type without specifying any order. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.395 -r1.396 src/usr.bin/xlint/lint1/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: uwe Date: Sun Apr 24 11:51:09 UTC 2022 Modified Files: src/sys/dev/pci: virtio.c Log Message: virtio: cosmetics - use (*pfn)(...) syntax. Some people prefer to call function pointers without an explicit dereference (that is purely cosmetic in this position), especially to create faux c++ s->pfn(...) with function pointers in struct members. Some prefer explicit dereference (that requires parens around it). (pfn)(...) without dereference but with parens looks odd to both, so make it conform to one of the established alternatives. Same object code is generated. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: uwe Date: Sun Apr 24 11:51:09 UTC 2022 Modified Files: src/sys/dev/pci: virtio.c Log Message: virtio: cosmetics - use (*pfn)(...) syntax. Some people prefer to call function pointers without an explicit dereference (that is purely cosmetic in this position), especially to create faux c++ s->pfn(...) with function pointers in struct members. Some prefer explicit dereference (that requires parens around it). (pfn)(...) without dereference but with parens looks odd to both, so make it conform to one of the established alternatives. Same object code is generated. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/virtio.c diff -u src/sys/dev/pci/virtio.c:1.53 src/sys/dev/pci/virtio.c:1.54 --- src/sys/dev/pci/virtio.c:1.53 Thu Oct 28 01:36:43 2021 +++ src/sys/dev/pci/virtio.c Sun Apr 24 11:51:09 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.53 2021/10/28 01:36:43 yamaguchi Exp $ */ +/* $NetBSD: virtio.c,v 1.54 2022/04/24 11:51:09 uwe Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.53 2021/10/28 01:36:43 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.54 2022/04/24 11:51:09 uwe Exp $"); #include #include @@ -413,7 +413,7 @@ virtio_soft_intr(void *arg) KASSERT(sc->sc_intrhand != NULL); - (sc->sc_intrhand)(sc); + (*sc->sc_intrhand)(sc); } /* @@ -496,7 +496,7 @@ virtio_vq_intr(struct virtio_softc *sc) vq = >sc_vqs[i]; if (virtio_vq_is_enqueued(sc, vq) == 1) { if (vq->vq_done) -r |= (vq->vq_done)(vq); +r |= (*vq->vq_done)(vq); } } @@ -511,7 +511,7 @@ virtio_vq_intrhand(struct virtio_softc * for (i = 0; i < sc->sc_nvqs; i++) { vq = >sc_vqs[i]; - r |= (vq->vq_intrhand)(vq->vq_intrhand_arg); + r |= (*vq->vq_intrhand)(vq->vq_intrhand_arg); } return r; @@ -1293,7 +1293,7 @@ virtio_child(struct virtio_softc *sc) int virtio_intrhand(struct virtio_softc *sc) { - return (sc->sc_intrhand)(sc); + return (*sc->sc_intrhand)(sc); } uint64_t
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Apr 24 10:36:37 UTC 2022 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/indent: Makefile fmt_decl.c lsym_binary_op.c lsym_comment.c lsym_do.c lsym_eof.c lsym_for.c lsym_form_feed.c lsym_funcname.c lsym_if.c lsym_newline.c lsym_preprocessing.c lsym_rparen_or_rbracket.c lsym_semicolon.c lsym_storage_class.c lsym_tag.c lsym_typedef.c lsym_unary_op.c lsym_while.c lsym_word.c psym_decl.c psym_do.c psym_do_stmt.c psym_else.c psym_stmt.c psym_stmt_list.c Added Files: src/tests/usr.bin/indent: edge_cases.c fmt_init.c Removed Files: src/tests/usr.bin/indent: token_binary_op.c token_comment.c token_decl.c token_do_stmt.c token_end_of_file.c token_for_exprs.c token_form_feed.c token_funcname.c token_ident.c token_keyword_do.c token_keyword_do_else.c token_keyword_else.c token_keyword_for_if_while.c token_keyword_struct_union_enum.c token_newline.c token_postfix_op.c token_preprocessing.c token_rparen.c token_semicolon.c token_stmt.c token_stmt_list.c token_storage_class.c token_string_prefix.c token_switch_expr.c token_type_def.c token_unary_op.c token_while_expr.c Log Message: tests/indent: migrate token tests to other tests In indent.h 1.49 from 2021-10-25, the enumeration token_type was split into lexer_symbol and parser_symbol to more clearly express that these tokens fall into completely different classes of usage patterns. To generate a diff of this commit: cvs rdiff -u -r1.1197 -r1.1198 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.44 -r1.45 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/indent/edge_cases.c \ src/tests/usr.bin/indent/fmt_init.c cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/indent/fmt_decl.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_binary_op.c \ src/tests/usr.bin/indent/lsym_typedef.c \ src/tests/usr.bin/indent/lsym_word.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/lsym_comment.c \ src/tests/usr.bin/indent/lsym_do.c src/tests/usr.bin/indent/lsym_eof.c \ src/tests/usr.bin/indent/lsym_for.c \ src/tests/usr.bin/indent/lsym_form_feed.c \ src/tests/usr.bin/indent/lsym_funcname.c \ src/tests/usr.bin/indent/lsym_if.c \ src/tests/usr.bin/indent/lsym_newline.c \ src/tests/usr.bin/indent/lsym_rparen_or_rbracket.c \ src/tests/usr.bin/indent/lsym_semicolon.c \ src/tests/usr.bin/indent/lsym_storage_class.c \ src/tests/usr.bin/indent/lsym_while.c \ src/tests/usr.bin/indent/psym_decl.c src/tests/usr.bin/indent/psym_do.c \ src/tests/usr.bin/indent/psym_do_stmt.c \ src/tests/usr.bin/indent/psym_else.c src/tests/usr.bin/indent/psym_stmt.c \ src/tests/usr.bin/indent/psym_stmt_list.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/lsym_preprocessing.c \ src/tests/usr.bin/indent/lsym_tag.c \ src/tests/usr.bin/indent/lsym_unary_op.c cvs rdiff -u -r1.13 -r0 src/tests/usr.bin/indent/token_binary_op.c cvs rdiff -u -r1.30 -r0 src/tests/usr.bin/indent/token_comment.c cvs rdiff -u -r1.3 -r0 src/tests/usr.bin/indent/token_decl.c \ src/tests/usr.bin/indent/token_do_stmt.c \ src/tests/usr.bin/indent/token_end_of_file.c \ src/tests/usr.bin/indent/token_funcname.c \ src/tests/usr.bin/indent/token_keyword_do.c \ src/tests/usr.bin/indent/token_keyword_do_else.c \ src/tests/usr.bin/indent/token_keyword_else.c \ src/tests/usr.bin/indent/token_keyword_for_if_while.c \ src/tests/usr.bin/indent/token_postfix_op.c \ src/tests/usr.bin/indent/token_rparen.c \ src/tests/usr.bin/indent/token_stmt.c \ src/tests/usr.bin/indent/token_stmt_list.c \ src/tests/usr.bin/indent/token_storage_class.c \ src/tests/usr.bin/indent/token_switch_expr.c \ src/tests/usr.bin/indent/token_type_def.c cvs rdiff -u -r1.4 -r0 src/tests/usr.bin/indent/token_for_exprs.c \ src/tests/usr.bin/indent/token_newline.c \ src/tests/usr.bin/indent/token_preprocessing.c \ src/tests/usr.bin/indent/token_semicolon.c \ src/tests/usr.bin/indent/token_unary_op.c \ src/tests/usr.bin/indent/token_while_expr.c cvs rdiff -u -r1.5 -r0 src/tests/usr.bin/indent/token_form_feed.c \ src/tests/usr.bin/indent/token_keyword_struct_union_enum.c \ src/tests/usr.bin/indent/token_string_prefix.c cvs rdiff -u -r1.7 -r0 src/tests/usr.bin/indent/token_ident.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1197 src/distrib/sets/lists/tests/mi:1.1198 --- src/distrib/sets/lists/tests/mi:1.1197 Sun Apr 24 08:48:17 2022 +++ src/distrib/sets/lists/tests/mi Sun Apr 24 10:36:37 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1197 2022/04/24 08:48:17 rillig Exp
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Apr 24 10:36:37 UTC 2022 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/indent: Makefile fmt_decl.c lsym_binary_op.c lsym_comment.c lsym_do.c lsym_eof.c lsym_for.c lsym_form_feed.c lsym_funcname.c lsym_if.c lsym_newline.c lsym_preprocessing.c lsym_rparen_or_rbracket.c lsym_semicolon.c lsym_storage_class.c lsym_tag.c lsym_typedef.c lsym_unary_op.c lsym_while.c lsym_word.c psym_decl.c psym_do.c psym_do_stmt.c psym_else.c psym_stmt.c psym_stmt_list.c Added Files: src/tests/usr.bin/indent: edge_cases.c fmt_init.c Removed Files: src/tests/usr.bin/indent: token_binary_op.c token_comment.c token_decl.c token_do_stmt.c token_end_of_file.c token_for_exprs.c token_form_feed.c token_funcname.c token_ident.c token_keyword_do.c token_keyword_do_else.c token_keyword_else.c token_keyword_for_if_while.c token_keyword_struct_union_enum.c token_newline.c token_postfix_op.c token_preprocessing.c token_rparen.c token_semicolon.c token_stmt.c token_stmt_list.c token_storage_class.c token_string_prefix.c token_switch_expr.c token_type_def.c token_unary_op.c token_while_expr.c Log Message: tests/indent: migrate token tests to other tests In indent.h 1.49 from 2021-10-25, the enumeration token_type was split into lexer_symbol and parser_symbol to more clearly express that these tokens fall into completely different classes of usage patterns. To generate a diff of this commit: cvs rdiff -u -r1.1197 -r1.1198 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.44 -r1.45 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/indent/edge_cases.c \ src/tests/usr.bin/indent/fmt_init.c cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/indent/fmt_decl.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_binary_op.c \ src/tests/usr.bin/indent/lsym_typedef.c \ src/tests/usr.bin/indent/lsym_word.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/lsym_comment.c \ src/tests/usr.bin/indent/lsym_do.c src/tests/usr.bin/indent/lsym_eof.c \ src/tests/usr.bin/indent/lsym_for.c \ src/tests/usr.bin/indent/lsym_form_feed.c \ src/tests/usr.bin/indent/lsym_funcname.c \ src/tests/usr.bin/indent/lsym_if.c \ src/tests/usr.bin/indent/lsym_newline.c \ src/tests/usr.bin/indent/lsym_rparen_or_rbracket.c \ src/tests/usr.bin/indent/lsym_semicolon.c \ src/tests/usr.bin/indent/lsym_storage_class.c \ src/tests/usr.bin/indent/lsym_while.c \ src/tests/usr.bin/indent/psym_decl.c src/tests/usr.bin/indent/psym_do.c \ src/tests/usr.bin/indent/psym_do_stmt.c \ src/tests/usr.bin/indent/psym_else.c src/tests/usr.bin/indent/psym_stmt.c \ src/tests/usr.bin/indent/psym_stmt_list.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/lsym_preprocessing.c \ src/tests/usr.bin/indent/lsym_tag.c \ src/tests/usr.bin/indent/lsym_unary_op.c cvs rdiff -u -r1.13 -r0 src/tests/usr.bin/indent/token_binary_op.c cvs rdiff -u -r1.30 -r0 src/tests/usr.bin/indent/token_comment.c cvs rdiff -u -r1.3 -r0 src/tests/usr.bin/indent/token_decl.c \ src/tests/usr.bin/indent/token_do_stmt.c \ src/tests/usr.bin/indent/token_end_of_file.c \ src/tests/usr.bin/indent/token_funcname.c \ src/tests/usr.bin/indent/token_keyword_do.c \ src/tests/usr.bin/indent/token_keyword_do_else.c \ src/tests/usr.bin/indent/token_keyword_else.c \ src/tests/usr.bin/indent/token_keyword_for_if_while.c \ src/tests/usr.bin/indent/token_postfix_op.c \ src/tests/usr.bin/indent/token_rparen.c \ src/tests/usr.bin/indent/token_stmt.c \ src/tests/usr.bin/indent/token_stmt_list.c \ src/tests/usr.bin/indent/token_storage_class.c \ src/tests/usr.bin/indent/token_switch_expr.c \ src/tests/usr.bin/indent/token_type_def.c cvs rdiff -u -r1.4 -r0 src/tests/usr.bin/indent/token_for_exprs.c \ src/tests/usr.bin/indent/token_newline.c \ src/tests/usr.bin/indent/token_preprocessing.c \ src/tests/usr.bin/indent/token_semicolon.c \ src/tests/usr.bin/indent/token_unary_op.c \ src/tests/usr.bin/indent/token_while_expr.c cvs rdiff -u -r1.5 -r0 src/tests/usr.bin/indent/token_form_feed.c \ src/tests/usr.bin/indent/token_keyword_struct_union_enum.c \ src/tests/usr.bin/indent/token_string_prefix.c cvs rdiff -u -r1.7 -r0 src/tests/usr.bin/indent/token_ident.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fsck_msdos
Module Name:src Committed By: hannken Date: Sun Apr 24 10:35:15 UTC 2022 Modified Files: src/sbin/fsck_msdos: boot.c Log Message: Cast read()/write() result to size_t to make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/fsck_msdos/boot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_msdos/boot.c diff -u src/sbin/fsck_msdos/boot.c:1.24 src/sbin/fsck_msdos/boot.c:1.25 --- src/sbin/fsck_msdos/boot.c:1.24 Sat Apr 23 22:40:28 2022 +++ src/sbin/fsck_msdos/boot.c Sun Apr 24 10:35:15 2022 @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: boot.c,v 1.24 2022/04/23 22:40:28 mlelstv Exp $"); +__RCSID("$NetBSD: boot.c,v 1.25 2022/04/24 10:35:15 hannken Exp $"); #endif /* not lint */ #include @@ -132,7 +132,8 @@ readboot(int dosfs, struct bootblock *bo if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) != boot->FSInfo * boot->BytesPerSec - || read(dosfs, fsinfo, 2 * secsize) != 2 * secsize) { + || (size_t)read(dosfs, fsinfo, 2 * secsize) + != 2 * secsize) { perr("could not read fsinfo block"); return FSFATAL; } @@ -181,7 +182,7 @@ readboot(int dosfs, struct bootblock *bo if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET) != boot->Backup * boot->BytesPerSec - || read(dosfs, backup, secsize) != secsize) { + || (size_t)read(dosfs, backup, secsize) != secsize) { perr("could not read backup bootblock"); free(fsinfo); free(backup); @@ -307,7 +308,8 @@ writefsinfo(int dosfs, struct bootblock if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) != boot->FSInfo * boot->BytesPerSec - || read(dosfs, fsinfo, 2 * boot->BytesPerSec) != 2 * boot->BytesPerSec) { + || (size_t)read(dosfs, fsinfo, 2 * boot->BytesPerSec) + != 2 * boot->BytesPerSec) { perr("could not read fsinfo block"); free(fsinfo); return FSFATAL; @@ -322,7 +324,8 @@ writefsinfo(int dosfs, struct bootblock fsinfo[0x1ef] = (u_char)(boot->FSNext >> 24); if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) != boot->FSInfo * boot->BytesPerSec - || write(dosfs, fsinfo, 2 * boot->BytesPerSec) != 2 * boot->BytesPerSec) { + || (size_t)write(dosfs, fsinfo, 2 * boot->BytesPerSec) + != 2 * boot->BytesPerSec) { perr("Unable to write FSInfo"); free(fsinfo); return FSFATAL;
CVS commit: src/sbin/fsck_msdos
Module Name:src Committed By: hannken Date: Sun Apr 24 10:35:15 UTC 2022 Modified Files: src/sbin/fsck_msdos: boot.c Log Message: Cast read()/write() result to size_t to make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/fsck_msdos/boot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: hannken Date: Sun Apr 24 09:55:48 UTC 2022 Modified Files: src/sys/dev/usb: uvideo.c Log Message: Add missing argument to debug printf. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/usb/uvideo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/uvideo.c diff -u src/sys/dev/usb/uvideo.c:1.78 src/sys/dev/usb/uvideo.c:1.79 --- src/sys/dev/usb/uvideo.c:1.78 Sun Apr 17 13:17:30 2022 +++ src/sys/dev/usb/uvideo.c Sun Apr 24 09:55:48 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: uvideo.c,v 1.78 2022/04/17 13:17:30 riastradh Exp $ */ +/* $NetBSD: uvideo.c,v 1.79 2022/04/24 09:55:48 hannken Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.78 2022/04/17 13:17:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.79 2022/04/24 09:55:48 hannken Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1422,6 +1422,7 @@ uvideo_stream_init_frame_based_format(st DPRINTF(("uvideo:" " truncated CS subtype-0x%x descriptor," " length %d < %d", +uvdesc->bDescriptorSubtype, uvdesc->bLength, subtypelen)); break; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: hannken Date: Sun Apr 24 09:55:48 UTC 2022 Modified Files: src/sys/dev/usb: uvideo.c Log Message: Add missing argument to debug printf. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/usb/uvideo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/indent
Module Name:src Committed By: rillig Date: Sun Apr 24 09:04:12 UTC 2022 Modified Files: src/tests/usr.bin/indent: Makefile fmt_block.c fmt_decl.c fmt_else_comment.c fmt_expr.c indent_off_on.c label.c lex_char.c lex_ident.c lex_string.c lsym_binary_op.c lsym_case_label.c lsym_colon.c lsym_comma.c lsym_comment.c lsym_do.c lsym_else.c lsym_eof.c lsym_for.c lsym_form_feed.c lsym_funcname.c lsym_if.c lsym_lbrace.c lsym_lparen_or_lbracket.c lsym_newline.c lsym_offsetof.c lsym_period.c lsym_postfix_op.c lsym_preprocessing.c lsym_question.c lsym_rbrace.c lsym_return.c lsym_rparen_or_rbracket.c lsym_semicolon.c lsym_sizeof.c lsym_storage_class.c lsym_switch.c lsym_tag.c lsym_type_in_parentheses.c lsym_type_outside_parentheses.c lsym_typedef.c lsym_unary_op.c lsym_while.c lsym_word.c opt_P.c opt_T.c opt_bacc.c opt_bad.c opt_badp.c opt_bap.c opt_bap_sob.c opt_bbb.c opt_bc.c opt_bl_br.c opt_bs.c opt_c.c opt_cd.c opt_cdb.c opt_ce.c opt_ci.c opt_cli.c opt_cs.c opt_d.c opt_di.c opt_dj.c opt_eei.c opt_ei.c opt_fbs.c opt_fc1.c opt_fcb.c opt_i.c opt_ip.c opt_l.c opt_lc.c opt_ldi.c opt_lp.c opt_lpl.c opt_pcs.c opt_psl.c opt_sc.c opt_sob.c opt_ta.c opt_ts.c opt_ut.c opt_v.c opt_version.c ps_ind_level.c psym_decl.c psym_do.c psym_do_stmt.c psym_else.c psym_for_exprs.c psym_if_expr.c psym_if_expr_stmt.c psym_if_expr_stmt_else.c psym_lbrace.c psym_rbrace.c psym_semicolon.c psym_stmt.c psym_stmt_list.c psym_switch_expr.c psym_while_expr.c t_options.awk t_options.sh token_binary_op.c token_comment.c token_decl.c token_do_stmt.c token_end_of_file.c token_for_exprs.c token_form_feed.c token_funcname.c token_ident.c token_keyword_do.c token_keyword_do_else.c token_keyword_else.c token_keyword_for_if_while.c token_keyword_struct_union_enum.c token_newline.c token_postfix_op.c token_preprocessing.c token_rparen.c token_semicolon.c token_stmt.c token_stmt_list.c token_storage_class.c token_string_prefix.c token_switch_expr.c token_type_def.c token_unary_op.c token_while_expr.c Log Message: tests/indent: change directive from '#' to '//' Using a '//' instead of '#' turns the directives into well-formed C code, resulting in fewer error markers in the editor. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/fmt_block.c \ src/tests/usr.bin/indent/fmt_else_comment.c \ src/tests/usr.bin/indent/fmt_expr.c src/tests/usr.bin/indent/label.c \ src/tests/usr.bin/indent/lex_char.c src/tests/usr.bin/indent/lex_string.c \ src/tests/usr.bin/indent/lsym_period.c \ src/tests/usr.bin/indent/lsym_postfix_op.c \ src/tests/usr.bin/indent/lsym_preprocessing.c \ src/tests/usr.bin/indent/lsym_question.c \ src/tests/usr.bin/indent/lsym_rbrace.c \ src/tests/usr.bin/indent/lsym_return.c \ src/tests/usr.bin/indent/lsym_tag.c \ src/tests/usr.bin/indent/lsym_unary_op.c src/tests/usr.bin/indent/opt_T.c \ src/tests/usr.bin/indent/opt_bap_sob.c src/tests/usr.bin/indent/opt_c.c \ src/tests/usr.bin/indent/opt_cd.c src/tests/usr.bin/indent/opt_d.c \ src/tests/usr.bin/indent/opt_i.c src/tests/usr.bin/indent/opt_lc.c \ src/tests/usr.bin/indent/opt_ta.c src/tests/usr.bin/indent/opt_version.c \ src/tests/usr.bin/indent/psym_for_exprs.c \ src/tests/usr.bin/indent/psym_if_expr.c \ src/tests/usr.bin/indent/psym_if_expr_stmt.c \ src/tests/usr.bin/indent/psym_if_expr_stmt_else.c \ src/tests/usr.bin/indent/psym_switch_expr.c \ src/tests/usr.bin/indent/psym_while_expr.c \ src/tests/usr.bin/indent/token_for_exprs.c \ src/tests/usr.bin/indent/token_newline.c \ src/tests/usr.bin/indent/token_preprocessing.c \ src/tests/usr.bin/indent/token_semicolon.c \ src/tests/usr.bin/indent/token_unary_op.c \ src/tests/usr.bin/indent/token_while_expr.c cvs rdiff -u -r1.34 -r1.35 src/tests/usr.bin/indent/fmt_decl.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/indent_off_on.c \ src/tests/usr.bin/indent/opt_cdb.c src/tests/usr.bin/indent/opt_ci.c \ src/tests/usr.bin/indent/opt_di.c src/tests/usr.bin/indent/opt_eei.c \ src/tests/usr.bin/indent/opt_fc1.c src/tests/usr.bin/indent/opt_fcb.c \ src/tests/usr.bin/indent/opt_psl.c src/tests/usr.bin/indent/opt_v.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/lex_ident.c \ src/tests/usr.bin/indent/lsym_binary_op.c \ src/tests/usr.bin/indent/lsym_colon.c \ src/tests/usr.bin/indent/lsym_comma.c \ src/tests/usr.bin/indent/lsym_offsetof.c \ src/tests/usr.bin/indent/lsym_sizeof.c \ src/tests/usr.bin/indent/lsym_typedef.c \
CVS commit: src/tests/usr.bin/indent
Module Name:src Committed By: rillig Date: Sun Apr 24 08:52:44 UTC 2022 Modified Files: src/tests/usr.bin/indent: fmt_decl.c lsym_offsetof.c opt_bacc.c opt_badp.c opt_bs.c opt_ci.c opt_fcb.c opt_l.c t_options.awk token_comment.c token_string_prefix.c Log Message: tests/indent: normalize amount of empty lines between test cases To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/tests/usr.bin/indent/fmt_decl.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/lsym_offsetof.c \ src/tests/usr.bin/indent/opt_l.c \ src/tests/usr.bin/indent/token_string_prefix.c cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/opt_bacc.c \ src/tests/usr.bin/indent/opt_bs.c src/tests/usr.bin/indent/t_options.awk cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/opt_badp.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/indent/opt_ci.c \ src/tests/usr.bin/indent/opt_fcb.c cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/indent/token_comment.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/indent/fmt_decl.c diff -u src/tests/usr.bin/indent/fmt_decl.c:1.33 src/tests/usr.bin/indent/fmt_decl.c:1.34 --- src/tests/usr.bin/indent/fmt_decl.c:1.33 Fri Apr 22 21:21:20 2022 +++ src/tests/usr.bin/indent/fmt_decl.c Sun Apr 24 08:52:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: fmt_decl.c,v 1.33 2022/04/22 21:21:20 rillig Exp $ */ +/* $NetBSD: fmt_decl.c,v 1.34 2022/04/24 08:52:44 rillig Exp $ */ /* * Tests for declarations of global variables, external functions, and local @@ -613,6 +613,7 @@ ToToken(bool cond) #indent end #indent run-equals-input -TToken + /* Since lexi.c 1.153 from 2021-11-25. */ #indent run-equals-input @@ -647,6 +648,7 @@ static CachedDir *dot = NULL; #indent end #indent run-equals-input -TCachedDir + /* Since lexi.c 1.153 from 2021-11-25. */ #indent run-equals-input @@ -713,6 +715,7 @@ CachedDir_Assign(CachedDir **var, Cached #indent end #indent run-equals-input + #indent run-equals-input -TCachedDir Index: src/tests/usr.bin/indent/lsym_offsetof.c diff -u src/tests/usr.bin/indent/lsym_offsetof.c:1.3 src/tests/usr.bin/indent/lsym_offsetof.c:1.4 --- src/tests/usr.bin/indent/lsym_offsetof.c:1.3 Fri Apr 22 21:21:20 2022 +++ src/tests/usr.bin/indent/lsym_offsetof.c Sun Apr 24 08:52:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: lsym_offsetof.c,v 1.3 2022/04/22 21:21:20 rillig Exp $ */ +/* $NetBSD: lsym_offsetof.c,v 1.4 2022/04/24 08:52:44 rillig Exp $ */ /* * Tests for the token lsym_offsetof, which represents the keyword 'offsetof' @@ -10,6 +10,7 @@ size_t offset = offsetof(struct s, memb #indent end #indent run-equals-input + #indent run-equals-input -bs /* Index: src/tests/usr.bin/indent/opt_l.c diff -u src/tests/usr.bin/indent/opt_l.c:1.3 src/tests/usr.bin/indent/opt_l.c:1.4 --- src/tests/usr.bin/indent/opt_l.c:1.3 Fri Apr 22 21:21:20 2022 +++ src/tests/usr.bin/indent/opt_l.c Sun Apr 24 08:52:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: opt_l.c,v 1.3 2022/04/22 21:21:20 rillig Exp $ */ +/* $NetBSD: opt_l.c,v 1.4 2022/04/24 08:52:44 rillig Exp $ */ /* * Tests for the option '-l', which specifies the maximum length of a line. @@ -27,9 +27,11 @@ * same output. */ #indent end + #indent run-equals-prev-output -lc38 #indent run-equals-input -l78 + #indent run-equals-input -lc78 Index: src/tests/usr.bin/indent/token_string_prefix.c diff -u src/tests/usr.bin/indent/token_string_prefix.c:1.3 src/tests/usr.bin/indent/token_string_prefix.c:1.4 --- src/tests/usr.bin/indent/token_string_prefix.c:1.3 Fri Apr 22 21:21:20 2022 +++ src/tests/usr.bin/indent/token_string_prefix.c Sun Apr 24 08:52:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: token_string_prefix.c,v 1.3 2022/04/22 21:21:20 rillig Exp $ */ +/* $NetBSD: token_string_prefix.c,v 1.4 2022/04/24 08:52:44 rillig Exp $ */ /* * Tests for strings of wide characters, which are prefixed with 'L'. @@ -15,7 +15,9 @@ wchar_t wide_string[] = L"wide string"; * string literal. */ #indent run-equals-input -di0 + #indent run-equals-input -di0 -l25 + #indent run-equals-input -di0 -l1 Index: src/tests/usr.bin/indent/opt_bacc.c diff -u src/tests/usr.bin/indent/opt_bacc.c:1.8 src/tests/usr.bin/indent/opt_bacc.c:1.9 --- src/tests/usr.bin/indent/opt_bacc.c:1.8 Sat Apr 23 06:43:23 2022 +++ src/tests/usr.bin/indent/opt_bacc.c Sun Apr 24 08:52:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: opt_bacc.c,v 1.8 2022/04/23 06:43:23 rillig Exp $ */ +/* $NetBSD: opt_bacc.c,v 1.9 2022/04/24 08:52:44 rillig Exp $ */ /* * Tests for the options '-bacc' and '-nbacc' ("blank line around conditional @@ -145,4 +145,5 @@ int outer_below; #indent end #indent run-equals-input -di0 -bacc + #indent run-equals-input -di0 -nbacc Index: src/tests/usr.bin/indent/opt_bs.c diff -u src/tests/usr.bin/indent/opt_bs.c:1.8 src/tests/usr.bin/indent/opt_bs.c:1.9 --- src/tests/usr.bin/indent/opt_bs.c:1.8 Fri Apr 22
CVS commit: src/tests/usr.bin/indent
Module Name:src Committed By: rillig Date: Sun Apr 24 08:52:44 UTC 2022 Modified Files: src/tests/usr.bin/indent: fmt_decl.c lsym_offsetof.c opt_bacc.c opt_badp.c opt_bs.c opt_ci.c opt_fcb.c opt_l.c t_options.awk token_comment.c token_string_prefix.c Log Message: tests/indent: normalize amount of empty lines between test cases To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/tests/usr.bin/indent/fmt_decl.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/lsym_offsetof.c \ src/tests/usr.bin/indent/opt_l.c \ src/tests/usr.bin/indent/token_string_prefix.c cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/opt_bacc.c \ src/tests/usr.bin/indent/opt_bs.c src/tests/usr.bin/indent/t_options.awk cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/opt_badp.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/indent/opt_ci.c \ src/tests/usr.bin/indent/opt_fcb.c cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/indent/token_comment.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 Apr 24 08:48:17 UTC 2022 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/indent: Makefile lsym_lparen_or_lbracket.c lsym_rbrace.c Removed Files: src/tests/usr.bin/indent: token_lparen.c token_rbrace.c Log Message: tests/indent: migrate tests for parentheses, brackets, braces To generate a diff of this commit: cvs rdiff -u -r1.1196 -r1.1197 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.42 -r1.43 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/lsym_rbrace.c cvs rdiff -u -r1.10 -r0 src/tests/usr.bin/indent/token_lparen.c cvs rdiff -u -r1.2 -r0 src/tests/usr.bin/indent/token_rbrace.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 Apr 24 08:48:17 UTC 2022 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/indent: Makefile lsym_lparen_or_lbracket.c lsym_rbrace.c Removed Files: src/tests/usr.bin/indent: token_lparen.c token_rbrace.c Log Message: tests/indent: migrate tests for parentheses, brackets, braces To generate a diff of this commit: cvs rdiff -u -r1.1196 -r1.1197 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.42 -r1.43 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/lsym_rbrace.c cvs rdiff -u -r1.10 -r0 src/tests/usr.bin/indent/token_lparen.c cvs rdiff -u -r1.2 -r0 src/tests/usr.bin/indent/token_rbrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1196 src/distrib/sets/lists/tests/mi:1.1197 --- src/distrib/sets/lists/tests/mi:1.1196 Sat Apr 23 09:59:13 2022 +++ src/distrib/sets/lists/tests/mi Sun Apr 24 08:48:17 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1196 2022/04/23 09:59:13 rillig Exp $ +# $NetBSD: mi,v 1.1197 2022/04/24 08:48:17 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -5274,13 +5274,13 @@ ./usr/tests/usr.bin/indent/token_keyword_for_if_while.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_keyword_struct_union_enum.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_lbrace.ctests-obsolete obsolete,atf -./usr/tests/usr.bin/indent/token_lparen.ctests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/token_lparen.ctests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/token_newline.ctests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_period.ctests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/token_postfix_op.ctests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_preprocessing.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_question.ctests-obsolete obsolete,atf -./usr/tests/usr.bin/indent/token_rbrace.ctests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/token_rbrace.ctests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/token_rparen.ctests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_semicolon.ctests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/token_stmt.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/indent/Makefile diff -u src/tests/usr.bin/indent/Makefile:1.42 src/tests/usr.bin/indent/Makefile:1.43 --- src/tests/usr.bin/indent/Makefile:1.42 Sat Apr 23 09:59:14 2022 +++ src/tests/usr.bin/indent/Makefile Sun Apr 24 08:48:17 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2022/04/23 09:59:14 rillig Exp $ +# $NetBSD: Makefile,v 1.43 2022/04/24 08:48:17 rillig Exp $ .include @@ -124,11 +124,9 @@ FILES+= token_keyword_do_else.c FILES+= token_keyword_else.c FILES+= token_keyword_for_if_while.c FILES+= token_keyword_struct_union_enum.c -FILES+= token_lparen.c FILES+= token_newline.c FILES+= token_postfix_op.c FILES+= token_preprocessing.c -FILES+= token_rbrace.c FILES+= token_rparen.c FILES+= token_semicolon.c FILES+= token_stmt.c Index: src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c diff -u src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c:1.5 src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c:1.6 --- src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c:1.5 Sat Apr 23 17:25:58 2022 +++ src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c Sun Apr 24 08:48:17 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: lsym_lparen_or_lbracket.c,v 1.5 2022/04/23 17:25:58 rillig Exp $ */ +/* $NetBSD: lsym_lparen_or_lbracket.c,v 1.6 2022/04/24 08:48:17 rillig Exp $ */ /* * Tests for the token lsym_lparen_or_lbracket, which represents a '(' or '[' @@ -9,18 +9,20 @@ * In an expression, '(' starts an inner expression to override the usual * operator precedence. * - * In an expression, an identifier followed by '(' starts a function call - * expression. + * In a function call expression, '(' marks the beginning of the function + * arguments. * * In a 'sizeof' expression, '(' is required if the argument is a type name. * + * In an expression, '(' followed by a type name starts a cast expression or + * a compound literal. + * + * In a type declaration, '(' marks the beginning of the function parameters. + * * After one of the keywords 'for', 'if', 'switch' or 'while', the controlling * expression must be enclosed in '(' and ')'; see lsym_for.c, lsym_if.c, * lsym_switch.c, lsym_while.c. * - * In an expression, '(' followed by a type name starts a cast expression or - * a compound literal. - * * In a
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Sun Apr 24 07:11:31 UTC 2022 Modified Files: src/sys/dev/pci: if_bwfm_pci.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_bwfm_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_bwfm_pci.c diff -u src/sys/dev/pci/if_bwfm_pci.c:1.11 src/sys/dev/pci/if_bwfm_pci.c:1.12 --- src/sys/dev/pci/if_bwfm_pci.c:1.11 Thu Aug 26 21:33:36 2021 +++ src/sys/dev/pci/if_bwfm_pci.c Sun Apr 24 07:11:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bwfm_pci.c,v 1.11 2021/08/26 21:33:36 andvar Exp $ */ +/* $NetBSD: if_bwfm_pci.c,v 1.12 2022/04/24 07:11:31 skrll Exp $ */ /* $OpenBSD: if_bwfm_pci.c,v 1.18 2018/02/08 05:00:38 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bwfm_pci.c,v 1.11 2021/08/26 21:33:36 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bwfm_pci.c,v 1.12 2022/04/24 07:11:31 skrll Exp $"); #include #include @@ -326,36 +326,36 @@ static const struct bwfm_firmware_select BWFM_FW_ENTRY(BRCM_CC_43465_CHIP_ID, BWFM_FWSEL_REV_GE(4), "brcmfmac4366c-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4350_CHIP_ID, BWFM_FWSEL_REV_LE(7), "brcmfmac4350c2-pcie"), BWFM_FW_ENTRY(BRCM_CC_4350_CHIP_ID, BWFM_FWSEL_REV_GE(8), "brcmfmac4350-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_43525_CHIP_ID, BWFM_FWSEL_REV_GE(4), "brcmfmac4365c-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4356_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac4356-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_43567_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac43570-pcie"), BWFM_FW_ENTRY(BRCM_CC_43569_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac43570-pcie"), BWFM_FW_ENTRY(BRCM_CC_43570_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac43570-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4358_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac4358-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4359_CHIP_ID, BWFM_FWSEL_ALLREVS, "brcmfmac4359-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4365_CHIP_ID, BWFM_FWSEL_REV_LE(3), "brcmfmac4365b-pcie"), BWFM_FW_ENTRY(BRCM_CC_4365_CHIP_ID, BWFM_FWSEL_REV_GE(4), "brcmfmac4365c-pcie"), - + BWFM_FW_ENTRY(BRCM_CC_4366_CHIP_ID, BWFM_FWSEL_REV_LE(3), "brcmfmac4366b-pcie"), BWFM_FW_ENTRY(BRCM_CC_4366_CHIP_ID, @@ -496,7 +496,7 @@ bwfm_pci_attachhook(device_t self) bwfm_firmware_context_init(, bwfm->sc_chip.ch_chip, bwfm->sc_chip.ch_chiprev, NULL, BWFM_FWREQ(BWFM_FILETYPE_UCODE)); - + if (!bwfm_firmware_open(bwfm, bwfm_pci_fwtab, )) { /* Error message already displayed. */ goto err;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Sun Apr 24 07:11:31 UTC 2022 Modified Files: src/sys/dev/pci: if_bwfm_pci.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_bwfm_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:52:59 UTC 2022 Modified Files: src/sys/lib/libsa: ffsv1.c ffsv2.c files.c globals.c ufs.c Log Message: Don't load filessytem module for filesystem that was found but isn't used for booting. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libsa/ffsv1.c src/sys/lib/libsa/ffsv2.c cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libsa/files.c cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libsa/globals.c cvs rdiff -u -r1.82 -r1.83 src/sys/lib/libsa/ufs.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/lib/libsa/ffsv1.c diff -u src/sys/lib/libsa/ffsv1.c:1.8 src/sys/lib/libsa/ffsv1.c:1.9 --- src/sys/lib/libsa/ffsv1.c:1.8 Thu May 27 06:54:44 2021 +++ src/sys/lib/libsa/ffsv1.c Sun Apr 24 06:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ffsv1.c,v 1.8 2021/05/27 06:54:44 mrg Exp $ */ +/* $NetBSD: ffsv1.c,v 1.9 2022/04/24 06:52:59 mlelstv Exp $ */ #define LIBSA_FFSv1 @@ -19,8 +19,7 @@ #define FS_MAGIC FS_UFS1_MAGIC -#if 0 -#define FSMOD "wapbl/ufs/ffs" -#endif +/* #define FSMOD "wapbl/ufs/ffs" */ +#define FSMOD NULL #include "ufs.c" Index: src/sys/lib/libsa/ffsv2.c diff -u src/sys/lib/libsa/ffsv2.c:1.8 src/sys/lib/libsa/ffsv2.c:1.9 --- src/sys/lib/libsa/ffsv2.c:1.8 Thu May 27 06:54:44 2021 +++ src/sys/lib/libsa/ffsv2.c Sun Apr 24 06:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ffsv2.c,v 1.8 2021/05/27 06:54:44 mrg Exp $ */ +/* $NetBSD: ffsv2.c,v 1.9 2022/04/24 06:52:59 mlelstv Exp $ */ #define LIBSA_FFSv2 @@ -19,8 +19,7 @@ #define FS_MAGIC FS_UFS2_MAGIC -#if 0 -#define FSMOD "wapbl/ufs/ffs" -#endif +/* #define FSMOD "wapbl/ufs/ffs" */ +#define FSMOD NULL #include "ufs.c" Index: src/sys/lib/libsa/files.c diff -u src/sys/lib/libsa/files.c:1.1 src/sys/lib/libsa/files.c:1.2 --- src/sys/lib/libsa/files.c:1.1 Fri Mar 15 13:23:34 2002 +++ src/sys/lib/libsa/files.c Sun Apr 24 06:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.1 2002/03/15 13:23:34 simonb Exp $ */ +/* $NetBSD: files.c,v 1.2 2022/04/24 06:52:59 mlelstv Exp $ */ /* * files.c: @@ -10,3 +10,4 @@ #include "stand.h" struct open_file files[SOPEN_MAX]; +const char *fsmod = NULL; /* file system module name to load */ Index: src/sys/lib/libsa/globals.c diff -u src/sys/lib/libsa/globals.c:1.11 src/sys/lib/libsa/globals.c:1.12 --- src/sys/lib/libsa/globals.c:1.11 Sat Mar 29 14:30:16 2014 +++ src/sys/lib/libsa/globals.c Sun Apr 24 06:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: globals.c,v 1.11 2014/03/29 14:30:16 jakllsch Exp $ */ +/* $NetBSD: globals.c,v 1.12 2022/04/24 06:52:59 mlelstv Exp $ */ /* * globals.c: @@ -20,7 +20,6 @@ u_char bcea[ETHER_ADDR_LEN] = BA; /* bro char rootpath[FNAME_SIZE]; /* root mount path */ char bootfile[FNAME_SIZE]; /* bootp says to boot this */ char hostname[FNAME_SIZE]; /* our hostname */ -const char *fsmod = NULL; /* file system module name to load */ struct in_addr myip; /* my ip address */ struct in_addr rootip; /* root ip address */ struct in_addr gateip; /* swap ip address */ Index: src/sys/lib/libsa/ufs.c diff -u src/sys/lib/libsa/ufs.c:1.82 src/sys/lib/libsa/ufs.c:1.83 --- src/sys/lib/libsa/ufs.c:1.82 Sun Apr 24 06:48:15 2022 +++ src/sys/lib/libsa/ufs.c Sun Apr 24 06:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs.c,v 1.82 2022/04/24 06:48:15 mlelstv Exp $ */ +/* $NetBSD: ufs.c,v 1.83 2022/04/24 06:52:59 mlelstv Exp $ */ /*- * Copyright (c) 1993 @@ -857,9 +857,11 @@ ufs_open(const char *path, struct open_f out: if (rc) ufs_close(f); -#ifdef FSMOD /* Only defined for lfs */ else +#ifdef FSMOD fsmod = FSMOD; +#else + fsmod = NULL; #endif return rc; }
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:52:59 UTC 2022 Modified Files: src/sys/lib/libsa: ffsv1.c ffsv2.c files.c globals.c ufs.c Log Message: Don't load filessytem module for filesystem that was found but isn't used for booting. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libsa/ffsv1.c src/sys/lib/libsa/ffsv2.c cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libsa/files.c cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libsa/globals.c cvs rdiff -u -r1.82 -r1.83 src/sys/lib/libsa/ufs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:49:38 UTC 2022 Modified Files: src/sys/stand/efiboot: conf.c efiblock.c efiblock.h Log Message: Use physical sector size as unit for disk addresses. Provide new ioctl to libsa to query for sector size. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/conf.c cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efiblock.c cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efiblock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/stand/efiboot/conf.c diff -u src/sys/stand/efiboot/conf.c:1.5 src/sys/stand/efiboot/conf.c:1.6 --- src/sys/stand/efiboot/conf.c:1.5 Sun Oct 11 14:03:33 2020 +++ src/sys/stand/efiboot/conf.c Sun Apr 24 06:49:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.5 2020/10/11 14:03:33 jmcneill Exp $ */ +/* $NetBSD: conf.c,v 1.6 2022/04/24 06:49:38 mlelstv Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -41,7 +41,7 @@ struct devsw devsw[] = { { "efifile", efi_file_strategy, efi_file_open, efi_file_close, noioctl }, - { "efiblock", efi_block_strategy, efi_block_open, efi_block_close, noioctl }, + { "efiblock", efi_block_strategy, efi_block_open, efi_block_close, efi_block_ioctl }, { "net", net_strategy, net_open, net_close, noioctl }, }; int ndevs = __arraycount(devsw); Index: src/sys/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.18 src/sys/stand/efiboot/efiblock.c:1.19 --- src/sys/stand/efiboot/efiblock.c:1.18 Sat Oct 30 11:18:51 2021 +++ src/sys/stand/efiboot/efiblock.c Sun Apr 24 06:49:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.18 2021/10/30 11:18:51 jmcneill Exp $ */ +/* $NetBSD: efiblock.c,v 1.19 2022/04/24 06:49:38 mlelstv Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -129,20 +129,21 @@ efi_block_do_read_blockio(struct efi_blo EFI_STATUS status; EFI_LBA lba_start, lba_end; UINT64 blkbuf_offset; - UINT64 blkbuf_size; + UINT64 blkbuf_size, alloc_size; lba_start = off / bdev->bio->Media->BlockSize; - lba_end = (off + bufsize + bdev->bio->Media->BlockSize - 1) / - bdev->bio->Media->BlockSize; + lba_end = (off + bufsize - 1) / bdev->bio->Media->BlockSize; blkbuf_offset = off % bdev->bio->Media->BlockSize; - blkbuf_size = (lba_end - lba_start) * bdev->bio->Media->BlockSize; + blkbuf_size = (lba_end - lba_start + 1) * bdev->bio->Media->BlockSize; + + alloc_size = blkbuf_size; if (bdev->bio->Media->IoAlign > 1) { - blkbuf_size = (blkbuf_size + bdev->bio->Media->IoAlign - 1) / + alloc_size = (blkbuf_size + bdev->bio->Media->IoAlign - 1) / bdev->bio->Media->IoAlign * bdev->bio->Media->IoAlign; } - blkbuf = AllocatePool(blkbuf_size); + blkbuf = AllocatePool(alloc_size); if (blkbuf == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -285,18 +286,16 @@ efi_block_find_partitions_disklabel(stru struct mbr_sector *mbr, uint32_t start, uint32_t size) { struct efi_block_part *bpart; - char buf[DEV_BSIZE]; + char buf[DEV_BSIZE]; /* XXX, arbitrary size >= struct disklabel */ struct disklabel d; struct partition *p; EFI_STATUS status; int n; status = efi_block_read(bdev, - ((EFI_LBA)start + LABELSECTOR) * DEV_BSIZE, buf, sizeof(buf)); - if (EFI_ERROR(status) || getdisklabel(buf, ) != NULL) { - FreePool(buf); + ((EFI_LBA)start + LABELSECTOR) * bdev->bio->Media->BlockSize, buf, sizeof(buf)); + if (EFI_ERROR(status) || getdisklabel(buf, ) != NULL) return EIO; - } if (le32toh(d.d_magic) != DISKMAGIC || le32toh(d.d_magic2) != DISKMAGIC) return EINVAL; @@ -419,7 +418,7 @@ efi_block_find_partitions_gpt(struct efi void *buf; UINTN sz; - status = efi_block_read(bdev, GPT_HDR_BLKNO * DEV_BSIZE, , + status = efi_block_read(bdev, (EFI_LBA)GPT_HDR_BLKNO * bdev->bio->Media->BlockSize, , sizeof(hdr)); if (EFI_ERROR(status)) { return EIO; @@ -436,7 +435,7 @@ efi_block_find_partitions_gpt(struct efi return ENOMEM; status = efi_block_read(bdev, - le64toh(hdr.hdr_lba_table) * DEV_BSIZE, buf, sz); + le64toh(hdr.hdr_lba_table) * bdev->bio->Media->BlockSize, buf, sz); if (EFI_ERROR(status)) { FreePool(buf); return EIO; @@ -682,6 +681,7 @@ int efi_block_strategy(void *devdata, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize) { struct efi_block_part *bpart = devdata; + struct efi_block_dev *bdev = bpart->bdev; EFI_STATUS status; UINT64 off; @@ -692,13 +692,13 @@ efi_block_strategy(void *devdata, int rw switch (bpart->type) { case EFI_BLOCK_PART_DISKLABEL: - off = (dblk + bpart->disklabel.part.p_offset) * DEV_BSIZE; + off = ((EFI_LBA)dblk + bpart->disklabel.part.p_offset) * bdev->bio->Media->BlockSize; break; case EFI_BLOCK_PART_GPT: - off = (dblk + le64toh(bpart->gpt.ent.ent_lba_start)) * DEV_BSIZE; + off = ((EFI_LBA)dblk + le64toh(bpart->gpt.ent.ent_lba_start)) * bdev->bio->Media->BlockSize; break; case
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:49:38 UTC 2022 Modified Files: src/sys/stand/efiboot: conf.c efiblock.c efiblock.h Log Message: Use physical sector size as unit for disk addresses. Provide new ioctl to libsa to query for sector size. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/conf.c cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efiblock.c cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efiblock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:48:15 UTC 2022 Modified Files: src/sys/lib/libsa: ext2fs.c minixfs3.c saioctl.h ufs.c Log Message: Ask driver about sector size to support reading superblocks from fixed byte offsets. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libsa/ext2fs.c cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libsa/minixfs3.c cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libsa/saioctl.h cvs rdiff -u -r1.81 -r1.82 src/sys/lib/libsa/ufs.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/lib/libsa/ext2fs.c diff -u src/sys/lib/libsa/ext2fs.c:1.30 src/sys/lib/libsa/ext2fs.c:1.31 --- src/sys/lib/libsa/ext2fs.c:1.30 Tue Apr 19 09:25:38 2022 +++ src/sys/lib/libsa/ext2fs.c Sun Apr 24 06:48:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs.c,v 1.30 2022/04/19 09:25:38 skrll Exp $ */ +/* $NetBSD: ext2fs.c,v 1.31 2022/04/24 06:48:15 mlelstv Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. @@ -415,9 +415,15 @@ read_sblock(struct open_file *f, struct struct ext2fs ext2fs; size_t buf_size; int rc; + u_int secsize; + + secsize = 0; + rc = DEV_IOCTL(f->f_dev)(f, SAIOSECSIZE, ); + if (rc != 0 || secsize == 0) + secsize = DEV_BSIZE; rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, - SBOFF / DEV_BSIZE, SBSIZE, sbbuf, _size); + SBOFF / secsize, SBSIZE, sbbuf, _size); if (rc) return rc; Index: src/sys/lib/libsa/minixfs3.c diff -u src/sys/lib/libsa/minixfs3.c:1.9 src/sys/lib/libsa/minixfs3.c:1.10 --- src/sys/lib/libsa/minixfs3.c:1.9 Tue Apr 19 09:25:38 2022 +++ src/sys/lib/libsa/minixfs3.c Sun Apr 24 06:48:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: minixfs3.c,v 1.9 2022/04/19 09:25:38 skrll Exp $ */ +/* $NetBSD: minixfs3.c,v 1.10 2022/04/24 06:48:15 mlelstv Exp $ */ /*- * Copyright (c) 2012 @@ -449,6 +449,7 @@ read_sblock(struct open_file *f, struct static uint8_t sbbuf[MINBSIZE]; size_t buf_size; int rc; + u_int secsize; /* We must read amount multiple of sector size, hence we can't * read SBSIZE and read MINBSIZE. @@ -456,8 +457,13 @@ read_sblock(struct open_file *f, struct if (SBSIZE > MINBSIZE) return EINVAL; + secsize = 0; + rc = DEV_IOCTL(f->f_dev)(f, SAIOSECSIZE, ); + if (rc != 0 || secsize == 0) + secsize = DEV_BSIZE; + rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, - SUPER_BLOCK_OFF / DEV_BSIZE, MINBSIZE, sbbuf, _size); + SUPER_BLOCK_OFF / secsize, MINBSIZE, sbbuf, _size); if (rc) return rc; Index: src/sys/lib/libsa/saioctl.h diff -u src/sys/lib/libsa/saioctl.h:1.4 src/sys/lib/libsa/saioctl.h:1.5 --- src/sys/lib/libsa/saioctl.h:1.4 Sun Dec 11 12:24:46 2005 +++ src/sys/lib/libsa/saioctl.h Sun Apr 24 06:48:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: saioctl.h,v 1.4 2005/12/11 12:24:46 christos Exp $ */ +/* $NetBSD: saioctl.h,v 1.5 2022/04/24 06:48:15 mlelstv Exp $ */ /*- * Copyright (c) 1993 @@ -46,3 +46,5 @@ #define SAIOSSDEV (('d'<<8)|12) /* is device skip sector type? */ #define SAIODEBUG (('d'<<8)|13) /* enable/disable debugging */ #define SAIOGBADINFO (('d'<<8)|14) /* get bad-sector table */ + +#define SAIOSECSIZE (('d'<<8)|15) /* get sector size */ Index: src/sys/lib/libsa/ufs.c diff -u src/sys/lib/libsa/ufs.c:1.81 src/sys/lib/libsa/ufs.c:1.82 --- src/sys/lib/libsa/ufs.c:1.81 Tue Apr 19 09:25:38 2022 +++ src/sys/lib/libsa/ufs.c Sun Apr 24 06:48:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs.c,v 1.81 2022/04/19 09:25:38 skrll Exp $ */ +/* $NetBSD: ufs.c,v 1.82 2022/04/24 06:48:15 mlelstv Exp $ */ /*- * Copyright (c) 1993 @@ -594,13 +594,21 @@ ffs_find_superblock(struct open_file *f, struct file *fp = (struct file *)f->f_fsdata; int rc; size_t buf_size; + u_int secsize; #ifdef LIBSA_FFSv2 static daddr_t sblock_try[] = SBLOCKSEARCH; int i; +#endif + + secsize = 0; + rc = DEV_IOCTL(f->f_dev)(f, SAIOSECSIZE, ); + if (rc != 0 || secsize == 0) + secsize = DEV_BSIZE; +#ifdef LIBSA_FFSv2 for (i = 0; sblock_try[i] != -1; i++) { rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, - sblock_try[i] / DEV_BSIZE, SBLOCKSIZE, fs, _size); + sblock_try[i] / secsize, SBLOCKSIZE, fs, _size); if (rc) return rc; if (buf_size != SBLOCKSIZE) @@ -615,7 +623,7 @@ ffs_find_superblock(struct open_file *f, return EINVAL; #else /* LIBSA_FFSv2 */ rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, - SBLOCKOFFSET / DEV_BSIZE, SBLOCKSIZE, fs, _size); + SBLOCKOFFSET / secsize, SBLOCKSIZE, fs, _size); if (rc) return rc; if (buf_size != SBLOCKSIZE)
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: mlelstv Date: Sun Apr 24 06:48:15 UTC 2022 Modified Files: src/sys/lib/libsa: ext2fs.c minixfs3.c saioctl.h ufs.c Log Message: Ask driver about sector size to support reading superblocks from fixed byte offsets. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libsa/ext2fs.c cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libsa/minixfs3.c cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libsa/saioctl.h cvs rdiff -u -r1.81 -r1.82 src/sys/lib/libsa/ufs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.