CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Mon Jan 31 06:54:50 UTC 2022 Modified Files: src/sys/arch/x86/x86: procfs_machdep.c Log Message: Fix procfs_machdep.c rev. 1.143. Print CPUID 0x0007:1 %eax correctly. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x86/x86/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/procfs_machdep.c diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.43 src/sys/arch/x86/x86/procfs_machdep.c:1.44 --- src/sys/arch/x86/x86/procfs_machdep.c:1.43 Fri Jan 14 15:48:50 2022 +++ src/sys/arch/x86/x86/procfs_machdep.c Mon Jan 31 06:54:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.43 2022/01/14 15:48:50 msaitoh Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.44 2022/01/31 06:54:50 msaitoh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.43 2022/01/14 15:48:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.44 2022/01/31 06:54:50 msaitoh Exp $"); #include #include @@ -312,7 +312,7 @@ procfs_getonecpufeatures(struct cpu_info if (ci->ci_max_cpuid >= 0x07) { x86_cpuid2(0x07, 1, descs); - procfs_getonefeatreg(descs[3], x86_features[12], p + diff, + procfs_getonefeatreg(descs[0], x86_features[12], p + diff, left); diff = last - *left; }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Mon Jan 31 06:54:50 UTC 2022 Modified Files: src/sys/arch/x86/x86: procfs_machdep.c Log Message: Fix procfs_machdep.c rev. 1.143. Print CPUID 0x0007:1 %eax correctly. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x86/x86/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/make
Am 30.01.2022 um 20:54 schrieb Christos Zoulas: On Jan 30, 2022, at 2:41 PM, Roland Illig mailto:roland.il...@gmx.de>> wrote: Am 30.01.2022 um 14:21 schrieb Christos Zoulas: Module Name:src Committed By:christos Date:Sun Jan 30 13:21:09 UTC 2022 Modified Files: src/usr.bin/make: dir.c job.c make.h Log Message: Make the GNode lineno unsigned to fix lint warning in var.c calling PrintLocation() Hi Christos, Did you get that warning on i386? On x86_64 I didn't get any lint warnings, as these would have made my pre-commit hook fail. Yes: https://releng.netbsd.org/builds/HEAD-lint/202201300710Z/i386.build.failed Do you know it would only fail on i386? No, I didn't know, and I also couldn't guess the lint warning, that's why I asked. The lint warning from the log is: var.c(4527): warning: argument #4 is converted from 'int' to 'unsigned int' due to prototype [259] The warning makes sense, and it doesn't occur on x86_64 because size_t is a 64-bit integer type there, which can hold any value of int. But still, the representation might change, so lint should warn. Not about potential value truncation, but about prototype compatibility. In lint's should_warn_about_prototype_conversion, I already wrote a comment saying 'XXX: Investigate whether this rule makes sense', so it's probably a conceptual bug in lint that this warning didn't occur on x86_64. Roland
Re: CVS commit: src/usr.bin/make
On Sun, 30 Jan 2022 14:54:25 -0500, Christos Zoulas writes: >> Since usr.bin/make is also used in tools/make, it needs to follow the >> rules in tools/README, which say that all tools should stick to C89. >> The format specifier %zu comes from C99 though. > >Yes, %zu is annoying because windows does not have it either (until very >recently I think). But cygwin does have it(?) so there is no issue? size_t is annoying ;-) >> Or can we drop the C89 rule from tools/README? In the past few years, >> usr.bin/make used several features from C99 (end-of-line comments, = >long >> long, %zu, snprintf), and nobody cared to fix the C99-isms, so either >> nobody needed the C89 restriction or we simply ignored the complaints. > >I think that we should ask in tech-toolchain. Yes, I prefer to require = >c99 >at this point. For bmake I have converted the %zu to %u. I no longer have access to even a tiny fraction of the systems bmake is used on, but I recall %z being an issue in the past. I cannot find docs on gcc-2.95 (which is the oldest compiler I've recently had to use to port bmake), and the license for that VM has expired, it probably should support c99 but I cannot confirm. --sjg
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 19:49:30 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: Add some more debugging to collect information about the sequence of events. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/dist/lib/isc/hp.c diff -u src/external/mpl/bind/dist/lib/isc/hp.c:1.6 src/external/mpl/bind/dist/lib/isc/hp.c:1.7 --- src/external/mpl/bind/dist/lib/isc/hp.c:1.6 Sun Jan 30 13:54:52 2022 +++ src/external/mpl/bind/dist/lib/isc/hp.c Sun Jan 30 14:49:30 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hp.c,v 1.6 2022/01/30 18:54:52 christos Exp $ */ +/* $NetBSD: hp.c,v 1.7 2022/01/30 19:49:30 christos Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -108,6 +108,9 @@ isc_hp_new(isc_mem_t *mctx, size_t max_h hp->hp = isc_mem_get(mctx, isc__hp_max_threads * sizeof(hp->hp[0])); hp->rl = isc_mem_get(mctx, isc__hp_max_threads * sizeof(hp->rl[0])); + syslog(LOG_ERR, "%s: max_hps=%zu max_threads=%d", __func__, max_hps, + isc__hp_max_threads); + for (int i = 0; i < isc__hp_max_threads; i++) { hp->hp[i] = isc_mem_get(mctx, CLPAD * 2 * sizeof(hp->hp[i][0])); hp->rl[i] = isc_mem_get(mctx, sizeof(*hp->rl[0]));
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 19:49:30 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: Add some more debugging to collect information about the sequence of events. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/make
Am 30.01.2022 um 14:21 schrieb Christos Zoulas: Module Name:src Committed By: christos Date: Sun Jan 30 13:21:09 UTC 2022 Modified Files: src/usr.bin/make: dir.c job.c make.h Log Message: Make the GNode lineno unsigned to fix lint warning in var.c calling PrintLocation() Hi Christos, Did you get that warning on i386? On x86_64 I didn't get any lint warnings, as these would have made my pre-commit hook fail. Since usr.bin/make is also used in tools/make, it needs to follow the rules in tools/README, which say that all tools should stick to C89. The format specifier %zu comes from C99 though. Or can we drop the C89 rule from tools/README? In the past few years, usr.bin/make used several features from C99 (end-of-line comments, long long, %zu, snprintf), and nobody cared to fix the C99-isms, so either nobody needed the C89 restriction or we simply ignored the complaints. Roland
CVS commit: src/external/mpl/dhcp/dist/omapip
Module Name:src Committed By: christos Date: Sun Jan 30 19:47:04 UTC 2022 Modified Files: src/external/mpl/dhcp/dist/omapip: isclib.c Log Message: Bump the number of "workers" to 2 which effectively bumps the number of contexts to 8. We seem to need 5 contexts so that should stop the error checking to hp_retire() from triggering. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/omapip/isclib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/dhcp/dist/omapip/isclib.c diff -u src/external/mpl/dhcp/dist/omapip/isclib.c:1.6 src/external/mpl/dhcp/dist/omapip/isclib.c:1.7 --- src/external/mpl/dhcp/dist/omapip/isclib.c:1.6 Thu Aug 19 07:50:56 2021 +++ src/external/mpl/dhcp/dist/omapip/isclib.c Sun Jan 30 14:47:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $ */ +/* $NetBSD: isclib.c,v 1.7 2022/01/30 19:47:04 christos Exp $ */ /* * Copyright(c) 2009-2019 by Internet Systems Consortium, Inc.("ISC") @@ -24,7 +24,7 @@ */ #include -__RCSID("$NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $"); +__RCSID("$NetBSD: isclib.c,v 1.7 2022/01/30 19:47:04 christos Exp $"); /*Trying to figure out what we need to define to get things to work. It looks like we want/need the library but need the fdwatchcommand @@ -220,7 +220,7 @@ dhcp_context_create(int flags, result = isc_appctx_create(dhcp_gbl_ctx.mctx, _gbl_ctx.actx); - result = isc_managers_create(dhcp_gbl_ctx.mctx, 1, 0, + result = isc_managers_create(dhcp_gbl_ctx.mctx, 2, 0, _gbl_ctx.netmgr, _gbl_ctx.taskmgr); if (result != ISC_R_SUCCESS) goto cleanup;
CVS commit: src/external/mpl/dhcp/dist/omapip
Module Name:src Committed By: christos Date: Sun Jan 30 19:47:04 UTC 2022 Modified Files: src/external/mpl/dhcp/dist/omapip: isclib.c Log Message: Bump the number of "workers" to 2 which effectively bumps the number of contexts to 8. We seem to need 5 contexts so that should stop the error checking to hp_retire() from triggering. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/omapip/isclib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 18:54:52 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: a bit less verbose To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/dist/lib/isc/hp.c diff -u src/external/mpl/bind/dist/lib/isc/hp.c:1.5 src/external/mpl/bind/dist/lib/isc/hp.c:1.6 --- src/external/mpl/bind/dist/lib/isc/hp.c:1.5 Sun Jan 30 08:11:46 2022 +++ src/external/mpl/bind/dist/lib/isc/hp.c Sun Jan 30 13:54:52 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hp.c,v 1.5 2022/01/30 13:11:46 christos Exp $ */ +/* $NetBSD: hp.c,v 1.6 2022/01/30 18:54:52 christos Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -87,7 +87,7 @@ tid(void) { void isc_hp_init(int max_threads) { - syslog(LOG_ERR|LOG_CONS, "setting maxthreads to %d from %d", max_threads, + syslog(LOG_ERR, "setting maxthreads to %d from %d", max_threads, isc__hp_max_threads); isc__hp_max_threads = max_threads; isc__hp_max_retired = max_threads * HP_MAX_HPS;
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 18:54:52 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: a bit less verbose To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Jan 30 16:08:14 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1729 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-8.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-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.117 src/doc/CHANGES-8.3:1.1.2.118 --- src/doc/CHANGES-8.3:1.1.2.117 Sat Jan 29 17:13:08 2022 +++ src/doc/CHANGES-8.3 Sun Jan 30 16:08:14 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.117 2022/01/29 17:13:08 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.118 2022/01/30 16:08:14 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -2408,3 +2408,74 @@ sys/dev/pci/pcireg.h1.62-1.63 - Fix typo. [msaitoh, ticket #1728] +sys/dev/pci/ixgbe/if_sriov.c 1.12-1.16 +sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297, 1.300, + 1.304 via patch +sys/dev/pci/ixgbe/ixgbe.h 1.84 +sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18 +sys/dev/pci/ixgbe/ixgbe_82598.h 1.9 +sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28 +sys/dev/pci/ixgbe/ixgbe_82599.h 1.8 +sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27 +sys/dev/pci/ixgbe/ixgbe_api.h 1.16 +sys/dev/pci/ixgbe/ixgbe_bypass.h 1.3 +sys/dev/pci/ixgbe/ixgbe_common.c 1.34-1.42 +sys/dev/pci/ixgbe/ixgbe_common.h 1.15-1.16 +sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13 +sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9 +sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12 +sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8 +sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11 +sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8 +sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4 +sys/dev/pci/ixgbe/ixgbe_features.h 1.4 +sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15 +sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18 +sys/dev/pci/ixgbe/ixgbe_netmap.c 1.5 +sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8 +sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31 +sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29 +sys/dev/pci/ixgbe/ixgbe_phy.h 1.13 +sys/dev/pci/ixgbe/ixgbe_rss.h 1.6 +sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5 +sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54 +sys/dev/pci/ixgbe/ixgbe_vf.c 1.28-1.29 +sys/dev/pci/ixgbe/ixgbe_vf.h 1.15 +sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22 +sys/dev/pci/ixgbe/ixgbe_x540.h 1.10 +sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25 +sys/dev/pci/ixgbe/ixgbe_x550.h 1.7 +sys/dev/pci/ixgbe/ixv.c1.170, 1.174-1.175 via patch + + - Add typecast for type mismatch. + - Fix retry count calculation of I2C read/write. + - Wait longer for link after fiber MAC setup. + - ixv(4): Use adapter->mta for the multicast array memory instead of + the on-stack array. + - Match X550_PHY_ID correctly on X550. + - Print NVM image version on 82598. + - Use 64bit for lxon + lxoff. + - Don't expose garbage data of hw.ixvN.debug. + - Some NetBSD unrelated changes: + - Fix infinite recursion on PCIe link down if VMDQ is used. + - Move PF mailbox initialization from ixgbe_attach() to + ixgbe_init_iov(). + - Add IPv6 mask for flow director. + - Change error level in ixgbe_fc_autoneg(). + - Check host interface return status when writing NVM. + - Change DCB credit parameters. + - Restore some mailbox related functions. Revert part of ixgbe_mbx.c + rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change. + - Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to + IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change. + - Remove unused argument. Change argument. + - Remove unnecessary return value check. + - Remove debug error message. + - Remove dead code. + - Add some unused macros. + - Fix typo in comment. + - Rename some functions. + - Sort lines, modify comment. + - Whitespace fix. + [msaitoh, ticket #1729] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Jan 30 16:08:14 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1729 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sun Jan 30 16:06:36 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: if_sriov.c ixgbe.c ixgbe.h ixgbe_82598.c ixgbe_82598.h ixgbe_82599.c ixgbe_82599.h ixgbe_api.c ixgbe_api.h ixgbe_bypass.h ixgbe_common.c ixgbe_common.h ixgbe_dcb.c ixgbe_dcb.h ixgbe_dcb_82598.c ixgbe_dcb_82598.h ixgbe_dcb_82599.c ixgbe_dcb_82599.h ixgbe_fdir.h ixgbe_features.h ixgbe_mbx.c ixgbe_mbx.h ixgbe_netmap.c ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixgbe_phy.h ixgbe_rss.h ixgbe_sriov.h ixgbe_type.h ixgbe_vf.c ixgbe_vf.h ixgbe_x540.c ixgbe_x540.h ixgbe_x550.c ixgbe_x550.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1729: sys/dev/pci/ixgbe/if_sriov.c1.12-1.16 sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297,1.300,1.304 via patch sys/dev/pci/ixgbe/ixgbe.h 1.84 sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18 sys/dev/pci/ixgbe/ixgbe_82598.h 1.9 sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28 sys/dev/pci/ixgbe/ixgbe_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27 sys/dev/pci/ixgbe/ixgbe_api.h 1.16 sys/dev/pci/ixgbe/ixgbe_bypass.h1.3 sys/dev/pci/ixgbe/ixgbe_common.c1.34-1.42 sys/dev/pci/ixgbe/ixgbe_common.h1.15-1.16 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13 sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12 sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11 sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4 sys/dev/pci/ixgbe/ixgbe_features.h 1.4 sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15 sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18 sys/dev/pci/ixgbe/ixgbe_netmap.c1.5 sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8 sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31 sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29 sys/dev/pci/ixgbe/ixgbe_phy.h 1.13 sys/dev/pci/ixgbe/ixgbe_rss.h 1.6 sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5 sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54 sys/dev/pci/ixgbe/ixgbe_vf.c1.28-1.29 sys/dev/pci/ixgbe/ixgbe_vf.h1.15 sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22 sys/dev/pci/ixgbe/ixgbe_x540.h 1.10 sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25 sys/dev/pci/ixgbe/ixgbe_x550.h 1.7 sys/dev/pci/ixgbe/ixv.c 1.170, 1.174-1.175 via patch - Add typecast for type mismatch. - Fix retry count calculation of I2C read/write. - Wait longer for link after fiber MAC setup. - ixv(4): Use adapter->mta for the multicast array memory instead of the on-stack array. - Match X550_PHY_ID correctly on X550. - Print NVM image version on 82598. - Use 64bit for lxon + lxoff. - Don't expose garbage data of hw.ixvN.debug. - Some NetBSD unrelated changes: - Fix infinite recursion on PCIe link down if VMDQ is used. - Move PF mailbox initialization from ixgbe_attach() to ixgbe_init_iov(). - Add IPv6 mask for flow director. - Change error level in ixgbe_fc_autoneg(). - Check host interface return status when writing NVM. - Change DCB credit parameters. - Restore some mailbox related functions. Revert part of ixgbe_mbx.c rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change. - Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change. - Remove unused argument. Change argument. - Remove unnecessary return value check. - Remove debug error message. - Remove dead code. - Add some unused macros. - Fix typo in comment. - Rename some functions. - Sort lines, modify comment. - Whitespace fix. To generate a diff of this commit: cvs rdiff -u -r1.1.4.6 -r1.1.4.7 src/sys/dev/pci/ixgbe/if_sriov.c cvs rdiff -u -r1.88.2.46 -r1.88.2.47 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.23 -r1.24.6.24 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.8.8.6 -r1.8.8.7 src/sys/dev/pci/ixgbe/ixgbe_82598.c cvs rdiff -u -r1.5.8.2 -r1.5.8.3 src/sys/dev/pci/ixgbe/ixgbe_82598.h cvs rdiff -u -r1.14.8.7 -r1.14.8.8 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.4.8.2 -r1.4.8.3 src/sys/dev/pci/ixgbe/ixgbe_82599.h cvs rdiff -u -r1.15.8.7 -r1.15.8.8 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Jan 30 16:03:50 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1414 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 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.68 src/doc/CHANGES-9.3:1.1.2.69 --- src/doc/CHANGES-9.3:1.1.2.68 Sat Jan 29 17:19:50 2022 +++ src/doc/CHANGES-9.3 Sun Jan 30 16:03:50 2022 @@ -1,4 +1,4 @@ -29~# $NetBSD: CHANGES-9.3,v 1.1.2.68 2022/01/29 17:19:50 martin Exp $ +29~# $NetBSD: CHANGES-9.3,v 1.1.2.69 2022/01/30 16:03:50 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -1259,3 +1259,74 @@ sys/dev/pci/pcireg.h1.62-1.63 - Fix typo. [msaitoh, ticket #1412] +sys/dev/pci/ixgbe/if_sriov.c 1.12-1.16 +sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297, 1.300, + 1.304 via patch +sys/dev/pci/ixgbe/ixgbe.h 1.84 +sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18 +sys/dev/pci/ixgbe/ixgbe_82598.h 1.9 +sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28 +sys/dev/pci/ixgbe/ixgbe_82599.h 1.8 +sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27 +sys/dev/pci/ixgbe/ixgbe_api.h 1.16 +sys/dev/pci/ixgbe/ixgbe_bypass.h 1.3 +sys/dev/pci/ixgbe/ixgbe_common.c 1.34-1.42 +sys/dev/pci/ixgbe/ixgbe_common.h 1.15-1.16 +sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13 +sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9 +sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12 +sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8 +sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11 +sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8 +sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4 +sys/dev/pci/ixgbe/ixgbe_features.h 1.4 +sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15 +sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18 +sys/dev/pci/ixgbe/ixgbe_netmap.c 1.5 +sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8 +sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31 +sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29 +sys/dev/pci/ixgbe/ixgbe_phy.h 1.13 +sys/dev/pci/ixgbe/ixgbe_rss.h 1.6 +sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5 +sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54 +sys/dev/pci/ixgbe/ixgbe_vf.c 1.28-1.29 +sys/dev/pci/ixgbe/ixgbe_vf.h 1.15 +sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22 +sys/dev/pci/ixgbe/ixgbe_x540.h 1.10 +sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25 +sys/dev/pci/ixgbe/ixgbe_x550.h 1.7 +sys/dev/pci/ixgbe/ixv.c1.170, 1.174-1.175 via patch + + - Add typecast for type mismatch. + - Fix retry count calculation of I2C read/write. + - Wait longer for link after fiber MAC setup. + - ixv(4): Use adapter->mta for the multicast array memory instead of + the on-stack array. + - Match X550_PHY_ID correctly on X550. + - Print NVM image version on 82598. + - Use 64bit for lxon + lxoff. + - Don't expose garbage data of hw.ixvN.debug. + - Some NetBSD unrelated changes: + - Fix infinite recursion on PCIe link down if VMDQ is used. + - Move PF mailbox initialization from ixgbe_attach() to + ixgbe_init_iov(). + - Add IPv6 mask for flow director. + - Change error level in ixgbe_fc_autoneg(). + - Check host interface return status when writing NVM. + - Change DCB credit parameters. + - Restore some mailbox related functions. Revert part of ixgbe_mbx.c + rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change. + - Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to + IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change. + - Remove unused argument. Change argument. + - Remove unnecessary return value check. + - Remove debug error message. + - Remove dead code. + - Add some unused macros. + - Fix typo in comment. + - Rename some functions. + - Sort lines, modify comment. + - Whitespace fix. + [msaitoh, ticket #1414] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Jan 30 16:03:50 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1414 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 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/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sun Jan 30 15:58:29 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: if_sriov.c ixgbe.c ixgbe.h ixgbe_82598.c ixgbe_82598.h ixgbe_82599.c ixgbe_82599.h ixgbe_api.c ixgbe_api.h ixgbe_bypass.h ixgbe_common.c ixgbe_common.h ixgbe_dcb.c ixgbe_dcb.h ixgbe_dcb_82598.c ixgbe_dcb_82598.h ixgbe_dcb_82599.c ixgbe_dcb_82599.h ixgbe_fdir.h ixgbe_features.h ixgbe_mbx.c ixgbe_mbx.h ixgbe_netmap.c ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixgbe_phy.h ixgbe_rss.h ixgbe_sriov.h ixgbe_type.h ixgbe_vf.c ixgbe_vf.h ixgbe_x540.c ixgbe_x540.h ixgbe_x550.c ixgbe_x550.h ixv.c Log Message: Pull up the following revisions, requested by msaitoh in ticket #1414: sys/dev/pci/ixgbe/if_sriov.c1.12-1.16 sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297,1.300,1.304 via patch sys/dev/pci/ixgbe/ixgbe.h 1.84 sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18 sys/dev/pci/ixgbe/ixgbe_82598.h 1.9 sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28 sys/dev/pci/ixgbe/ixgbe_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27 sys/dev/pci/ixgbe/ixgbe_api.h 1.16 sys/dev/pci/ixgbe/ixgbe_bypass.h1.3 sys/dev/pci/ixgbe/ixgbe_common.c1.34-1.42 sys/dev/pci/ixgbe/ixgbe_common.h1.15-1.16 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13 sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12 sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11 sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4 sys/dev/pci/ixgbe/ixgbe_features.h 1.4 sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15 sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18 sys/dev/pci/ixgbe/ixgbe_netmap.c1.5 sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8 sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31 sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29 sys/dev/pci/ixgbe/ixgbe_phy.h 1.13 sys/dev/pci/ixgbe/ixgbe_rss.h 1.6 sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5 sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54 sys/dev/pci/ixgbe/ixgbe_vf.c1.28-1.29 sys/dev/pci/ixgbe/ixgbe_vf.h1.15 sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22 sys/dev/pci/ixgbe/ixgbe_x540.h 1.10 sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25 sys/dev/pci/ixgbe/ixgbe_x550.h 1.7 sys/dev/pci/ixgbe/ixv.c 1.170, 1.174-1.175 via patch - Add typecast for type mismatch. - Fix retry count calculation of I2C read/write. - Wait longer for link after fiber MAC setup. - ixv(4): Use adapter->mta for the multicast array memory instead of the on-stack array. - Match X550_PHY_ID correctly on X550. - Print NVM image version on 82598. - Use 64bit for lxon + lxoff. - Don't expose garbage data of hw.ixvN.debug. - Some NetBSD unrelated changes: - Fix infinite recursion on PCIe link down if VMDQ is used. - Move PF mailbox initialization from ixgbe_attach() to ixgbe_init_iov(). - Add IPv6 mask for flow director. - Change error level in ixgbe_fc_autoneg(). - Check host interface return status when writing NVM. - Change DCB credit parameters. - Restore some mailbox related functions. Revert part of ixgbe_mbx.c rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change. - Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change. - Remove unused argument. Change argument. - Remove unnecessary return value check. - Remove debug error message. - Remove dead code. - Add some unused macros. - Fix typo in comment. - Rename some functions. - Sort lines, modify comment. - Whitespace fix. To generate a diff of this commit: cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/sys/dev/pci/ixgbe/if_sriov.c cvs rdiff -u -r1.199.2.16 -r1.199.2.17 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.6 -r1.56.2.7 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.12.8.4 -r1.12.8.5 src/sys/dev/pci/ixgbe/ixgbe_82598.c cvs rdiff -u -r1.8 -r1.8.8.1 src/sys/dev/pci/ixgbe/ixgbe_82598.h cvs rdiff -u -r1.21.4.2 -r1.21.4.3 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.7 -r1.7.8.1 src/sys/dev/pci/ixgbe/ixgbe_82599.h cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Sun Jan 30 13:21:09 UTC 2022 Modified Files: src/usr.bin/make: dir.c job.c make.h Log Message: Make the GNode lineno unsigned to fix lint warning in var.c calling PrintLocation() To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/dir.c cvs rdiff -u -r1.449 -r1.450 src/usr.bin/make/job.c cvs rdiff -u -r1.294 -r1.295 src/usr.bin/make/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.276 src/usr.bin/make/dir.c:1.277 --- src/usr.bin/make/dir.c:1.276 Wed Dec 15 07:24:13 2021 +++ src/usr.bin/make/dir.c Sun Jan 30 08:21:08 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.276 2021/12/15 12:24:13 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -138,7 +138,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.276 2021/12/15 12:24:13 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.277 2022/01/30 13:21:08 christos Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -1425,7 +1425,7 @@ ResolveMovedDepends(GNode *gn) gn->path = bmake_strdup(fullName); if (!Job_RunTarget(".STALE", gn->fname)) fprintf(stdout, /* XXX: Why stdout? */ - "%s: %s, %d: ignoring stale %s for %s, found %s\n", + "%s: %s, %zu: ignoring stale %s for %s, found %s\n", progname, gn->fname, gn->lineno, makeDependfile, gn->name, fullName); Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.449 src/usr.bin/make/job.c:1.450 --- src/usr.bin/make/job.c:1.449 Sat Jan 22 13:59:23 2022 +++ src/usr.bin/make/job.c Sun Jan 30 08:21:08 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.449 2022/01/22 18:59:23 rillig Exp $ */ +/* $NetBSD: job.c,v 1.450 2022/01/30 13:21:08 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -142,7 +142,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.449 2022/01/22 18:59:23 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.450 2022/01/30 13:21:08 christos Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -1374,7 +1374,7 @@ Job_CheckCommands(GNode *gn, void (*abor if (gn->flags.fromDepend) { if (!Job_RunTarget(".STALE", gn->fname)) fprintf(stdout, - "%s: %s, %d: ignoring stale %s for %s\n", + "%s: %s, %zu: ignoring stale %s for %s\n", progname, gn->fname, gn->lineno, makeDependfile, gn->name); return true; Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.294 src/usr.bin/make/make.h:1.295 --- src/usr.bin/make/make.h:1.294 Sat Jan 29 05:19:49 2022 +++ src/usr.bin/make/make.h Sun Jan 30 08:21:08 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.294 2022/01/29 10:19:49 rillig Exp $ */ +/* $NetBSD: make.h,v 1.295 2022/01/30 13:21:08 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -499,7 +499,7 @@ typedef struct GNode { /* Filename where the GNode got defined, unlimited lifetime */ const char *fname; /* Line number where the GNode got defined, 1-based */ - int lineno; + size_t lineno; } GNode; /* Error levels for diagnostics during parsing. */
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Sun Jan 30 13:21:09 UTC 2022 Modified Files: src/usr.bin/make: dir.c job.c make.h Log Message: Make the GNode lineno unsigned to fix lint warning in var.c calling PrintLocation() To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/dir.c cvs rdiff -u -r1.449 -r1.450 src/usr.bin/make/job.c cvs rdiff -u -r1.294 -r1.295 src/usr.bin/make/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 13:11:46 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: Avoid retiring a thread with a xtid >= isc__hp_max_threads and crashing. XXX: need to fix the real bug, but this will do for now. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/dist/lib/isc/hp.c diff -u src/external/mpl/bind/dist/lib/isc/hp.c:1.4 src/external/mpl/bind/dist/lib/isc/hp.c:1.5 --- src/external/mpl/bind/dist/lib/isc/hp.c:1.4 Thu Apr 29 13:26:12 2021 +++ src/external/mpl/bind/dist/lib/isc/hp.c Sun Jan 30 08:11:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hp.c,v 1.4 2021/04/29 17:26:12 christos Exp $ */ +/* $NetBSD: hp.c,v 1.5 2022/01/30 13:11:46 christos Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -55,6 +55,9 @@ #include #include +#include +#include + #define HP_MAX_THREADS 128 static int isc__hp_max_threads = HP_MAX_THREADS; #define HP_MAX_HPS 4 /* This is named 'K' in the HP paper */ @@ -84,6 +87,8 @@ tid(void) { void isc_hp_init(int max_threads) { + syslog(LOG_ERR|LOG_CONS, "setting maxthreads to %d from %d", max_threads, + isc__hp_max_threads); isc__hp_max_threads = max_threads; isc__hp_max_retired = max_threads * HP_MAX_HPS; } @@ -175,15 +180,25 @@ isc_hp_protect_release(isc_hp_t *hp, int void isc_hp_retire(isc_hp_t *hp, uintptr_t ptr) { - hp->rl[tid()]->list[hp->rl[tid()]->size++] = ptr; - INSIST(hp->rl[tid()]->size < isc__hp_max_retired); + int xtid = tid(); + if (xtid < 0 || xtid >= isc__hp_max_threads) { + syslog(LOG_ERR, "bad thread id %d >= %d", xtid, + isc__hp_max_threads); + return; + } + if (hp->rl[xtid] == NULL) { + syslog(LOG_ERR, "null rl for thread id %d", xtid); + abort(); + } + hp->rl[xtid]->list[hp->rl[xtid]->size++] = ptr; + INSIST(hp->rl[xtid]->size < isc__hp_max_retired); - if (hp->rl[tid()]->size < HP_THRESHOLD_R) { + if (hp->rl[xtid]->size < HP_THRESHOLD_R) { return; } - for (int iret = 0; iret < hp->rl[tid()]->size; iret++) { - uintptr_t obj = hp->rl[tid()]->list[iret]; + for (int iret = 0; iret < hp->rl[xtid]->size; iret++) { + uintptr_t obj = hp->rl[xtid]->list[iret]; bool can_delete = true; for (int itid = 0; itid < isc__hp_max_threads && can_delete; itid++) { @@ -196,11 +211,11 @@ isc_hp_retire(isc_hp_t *hp, uintptr_t pt } if (can_delete) { - size_t bytes = (hp->rl[tid()]->size - iret) * - sizeof(hp->rl[tid()]->list[0]); - memmove(>rl[tid()]->list[iret], ->rl[tid()]->list[iret + 1], bytes); - hp->rl[tid()]->size--; + size_t bytes = (hp->rl[xtid]->size - iret) * + sizeof(hp->rl[xtid]->list[0]); + memmove(>rl[xtid]->list[iret], +>rl[xtid]->list[iret + 1], bytes); + hp->rl[xtid]->size--; hp->deletefunc((void *)obj); } }
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sun Jan 30 13:11:46 UTC 2022 Modified Files: src/external/mpl/bind/dist/lib/isc: hp.c Log Message: Avoid retiring a thread with a xtid >= isc__hp_max_threads and crashing. XXX: need to fix the real bug, but this will do for now. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/lib/isc/hp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun Jan 30 11:58:29 UTC 2022 Modified Files: src/usr.sbin/sysinst: defs.h gpt.c target.c Log Message: Do not defer wedge deletions when we have nothing mounted. Define and use a constant for maximum disk name length. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun Jan 30 11:58:29 UTC 2022 Modified Files: src/usr.sbin/sysinst: defs.h gpt.c target.c Log Message: Do not defer wedge deletions when we have nothing mounted. Define and use a constant for maximum disk name length. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.78 src/usr.sbin/sysinst/defs.h:1.79 --- src/usr.sbin/sysinst/defs.h:1.78 Sat Jan 29 16:01:16 2022 +++ src/usr.sbin/sysinst/defs.h Sun Jan 30 11:58:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.78 2022/01/29 16:01:16 martin Exp $ */ +/* $NetBSD: defs.h,v 1.79 2022/01/30 11:58:29 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -59,6 +59,7 @@ const char *getfslabelname(uint, uint); #define STRSIZE 255 #define MENUSTRSIZE 80 #define SSTRSIZE 30 +#define DISKNAMESIZE 24 /* max(strlen("/dev/rsd22c")) */ /* these are used for different alignment defaults */ #define HUGE_DISK_SIZE (daddr_t)(128 * (GIG / 512)) Index: src/usr.sbin/sysinst/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.27 src/usr.sbin/sysinst/gpt.c:1.28 --- src/usr.sbin/sysinst/gpt.c:1.27 Sat Jan 29 15:32:49 2022 +++ src/usr.sbin/sysinst/gpt.c Sun Jan 30 11:58:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.27 2022/01/29 15:32:49 martin Exp $ */ +/* $NetBSD: gpt.c,v 1.28 2022/01/30 11:58:29 martin Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ bool gpt_parts_check(void); /* check for #define GUID_STR_LEN 40 #define GPT_PTYPE_ALLOC 32 /* initial type array allocation, should be > * gpt type -l | wc -l */ -#define GPT_DEV_LEN 16 /* dkNN */ +#define GPT_DEV_LEN DISKNAMESIZE /* dkNN */ #define GPT_PARTS_PER_SEC 4 /* a 512 byte sector holds 4 entries */ #define GPT_DEFAULT_MAX_PARTS 128 Index: src/usr.sbin/sysinst/target.c diff -u src/usr.sbin/sysinst/target.c:1.16 src/usr.sbin/sysinst/target.c:1.17 --- src/usr.sbin/sysinst/target.c:1.16 Sat Jan 29 15:32:49 2022 +++ src/usr.sbin/sysinst/target.c Sun Jan 30 11:58:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: target.c,v 1.16 2022/01/29 15:32:49 martin Exp $ */ +/* $NetBSD: target.c,v 1.17 2022/01/30 11:58:29 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -71,7 +71,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: target.c,v 1.16 2022/01/29 15:32:49 martin Exp $"); +__RCSID("$NetBSD: target.c,v 1.17 2022/01/30 11:58:29 martin Exp $"); #endif /* @@ -123,7 +123,7 @@ struct unwind_mount { /* Record a wedge for later deletion after all file systems have been unmounted */ struct umount_delwedge { struct umount_delwedge *next; - char disk[MAXPATHLEN], wedge[MAXPATHLEN]; + char disk[DISKNAMESIZE], wedge[DISKNAMESIZE]; }; struct umount_delwedge *post_umount_dwlist = NULL; @@ -549,6 +549,12 @@ register_post_umount_delwedge(const char { struct umount_delwedge *dw; + if (unwind_mountlist == NULL) { + /* we have nothing mounted, can delete it right now */ + delete_wedge(disk, wedge); + return; + } + dw = calloc(1, sizeof(*dw)); dw->next = post_umount_dwlist; strlcpy(dw->disk, disk, sizeof(dw->disk));