fix misplaced or missing "e" in words with "ment" ending (argument, implement, increment, decrement, alignment), in comments, documentation, log messages.diff -r1.6 -r1.7 src/common/lib/libc/arch/arm/string/strcpy_arm.S
(andvar)
--- src/common/lib/libc/arch/arm/string/strcpy_arm.S 2017/01/14 03:35:21 1.6
+++ src/common/lib/libc/arch/arm/string/strcpy_arm.S 2024/02/08 20:51:24 1.7
@@ -19,27 +19,27 @@ | @@ -19,27 +19,27 @@ | |||
19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
20 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 20 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
27 | * POSSIBILITY OF SUCH DAMAGE. | 27 | * POSSIBILITY OF SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <machine/asm.h> | 30 | #include <machine/asm.h> | |
31 | 31 | |||
32 | RCSID("$NetBSD: strcpy_arm.S,v 1.6 2017/01/14 03:35:21 christos Exp $") | 32 | RCSID("$NetBSD: strcpy_arm.S,v 1.7 2024/02/08 20:51:24 andvar Exp $") | |
33 | 33 | |||
34 | #ifdef STRLCPY | 34 | #ifdef STRLCPY | |
35 | #ifdef _LIBC | 35 | #ifdef _LIBC | |
36 | WEAK_ALIAS(strlcpy, _strlcpy) | 36 | WEAK_ALIAS(strlcpy, _strlcpy) | |
37 | # define FUNCNAME _strlcpy | 37 | # define FUNCNAME _strlcpy | |
38 | # else | 38 | # else | |
39 | # define FUNCNAME strlcpy | 39 | # define FUNCNAME strlcpy | |
40 | # endif | 40 | # endif | |
41 | #elif defined(STRNCPY) | 41 | #elif defined(STRNCPY) | |
42 | # ifdef _LIBC | 42 | # ifdef _LIBC | |
43 | WEAK_ALIAS(strncpy, _strncpy) | 43 | WEAK_ALIAS(strncpy, _strncpy) | |
44 | # define FUNCNAME _strncpy | 44 | # define FUNCNAME _strncpy | |
45 | # else | 45 | # else | |
@@ -238,29 +238,29 @@ ENTRY(FUNCNAME) | @@ -238,29 +238,29 @@ ENTRY(FUNCNAME) | |||
238 | uqadd8 r3, r5, r7 /* NUL detection magic happens */ | 238 | uqadd8 r3, r5, r7 /* NUL detection magic happens */ | |
239 | mvns r3, r3 /* is the complemented result 0? */ | 239 | mvns r3, r3 /* is the complemented result 0? */ | |
240 | beq .Lincongruent_mainloop_load /* yes, no NUL encountered! */ | 240 | beq .Lincongruent_mainloop_load /* yes, no NUL encountered! */ | |
241 | #ifdef __ARMEL__ | 241 | #ifdef __ARMEL__ | |
242 | rev r3, r3 /* CLZ wants BE input */ | 242 | rev r3, r3 /* CLZ wants BE input */ | |
243 | #endif | 243 | #endif | |
244 | clz r3, r3 /* count leading zeros */ | 244 | clz r3, r3 /* count leading zeros */ | |
245 | #else | 245 | #else | |
246 | /* | 246 | /* | |
247 | * We already tested for byte 0 above so we don't need to it again. | 247 | * We already tested for byte 0 above so we don't need to it again. | |
248 | */ | 248 | */ | |
249 | mov r3, #24 /* assume NUL is in byte 3 */ | 249 | mov r3, #24 /* assume NUL is in byte 3 */ | |
250 | tst r5, #BYTE1 /* did we find a NUL in byte 1? */ | 250 | tst r5, #BYTE1 /* did we find a NUL in byte 1? */ | |
251 | subeq r3, r3, #8 /* yes, decremnt byte position */ | 251 | subeq r3, r3, #8 /* yes, decrement byte position */ | |
252 | tstne r5, #BYTE2 /* no, did we find a NUL in byte 2? */ | 252 | tstne r5, #BYTE2 /* no, did we find a NUL in byte 2? */ | |
253 | subeq r3, r3, #8 /* yes, decremnt byte position */ | 253 | subeq r3, r3, #8 /* yes, decrement byte position */ | |
254 | tstne r5, #BYTE3 /* no, did we find a NUL in byte 3? */ | 254 | tstne r5, #BYTE3 /* no, did we find a NUL in byte 3? */ | |
255 | bne .Lincongruent_mainloop_load /* no, no NUL encountered! */ | 255 | bne .Lincongruent_mainloop_load /* no, no NUL encountered! */ | |
256 | #endif | 256 | #endif | |
257 | mov r5, r4 /* discard already dealt with bytes */ | 257 | mov r5, r4 /* discard already dealt with bytes */ | |
258 | .Lincongruent_end_of_string: | 258 | .Lincongruent_end_of_string: | |
259 | #if defined(STRLCPY) | 259 | #if defined(STRLCPY) | |
260 | add r1, r1, r3, lsr #3 /* then add offset to NUL */ | 260 | add r1, r1, r3, lsr #3 /* then add offset to NUL */ | |
261 | #endif | 261 | #endif | |
262 | sub r3, r3, r9 /* adjust NUL offset */ | 262 | sub r3, r3, r9 /* adjust NUL offset */ | |
263 | b .Llast_bytes /* NUL encountered! finish up */ | 263 | b .Llast_bytes /* NUL encountered! finish up */ | |
264 | 264 | |||
265 | #if defined(STRLCPY) || defined(STRNCPY) | 265 | #if defined(STRLCPY) || defined(STRNCPY) | |
266 | .Lincongruent_no_more_room: | 266 | .Lincongruent_no_more_room: |
--- src/sbin/blkdiscard/blkdiscard.c 2024/01/25 02:42:17 1.3
+++ src/sbin/blkdiscard/blkdiscard.c 2024/02/08 20:51:24 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: blkdiscard.c,v 1.3 2024/01/25 02:42:17 mrg Exp $ */ | 1 | /* $NetBSD: blkdiscard.c,v 1.4 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2019, 2020, 2022, 2024 Matthew R. Green | 4 | * Copyright (c) 2019, 2020, 2022, 2024 Matthew R. Green | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -145,27 +145,27 @@ main(int argc, char *argv[]) | @@ -145,27 +145,27 @@ main(int argc, char *argv[]) | |||
145 | case 'z': | 145 | case 'z': | |
146 | zeroout = true; | 146 | zeroout = true; | |
147 | break; | 147 | break; | |
148 | case 'h': | 148 | case 'h': | |
149 | usage(NULL); | 149 | usage(NULL); | |
150 | default: | 150 | default: | |
151 | usage("bad options\n"); | 151 | usage("bad options\n"); | |
152 | } | 152 | } | |
153 | } | 153 | } | |
154 | argc -= optind; | 154 | argc -= optind; | |
155 | argv += optind; | 155 | argv += optind; | |
156 | 156 | |||
157 | if (secure) | 157 | if (secure) | |
158 | usage("blkdiscard: secure erase not yet implemnted\n"); | 158 | usage("blkdiscard: secure erase not yet implemented\n"); | |
159 | if (zeroout) { | 159 | if (zeroout) { | |
160 | zeros = calloc(1, max_per_call); | 160 | zeros = calloc(1, max_per_call); | |
161 | if (!zeros) | 161 | if (!zeros) | |
162 | errx(1, "Unable to allocate %lld bytes for zeros", | 162 | errx(1, "Unable to allocate %lld bytes for zeros", | |
163 | (long long)max_per_call); | 163 | (long long)max_per_call); | |
164 | } | 164 | } | |
165 | 165 | |||
166 | if (length) | 166 | if (length) | |
167 | end_offset = first_byte + length; | 167 | end_offset = first_byte + length; | |
168 | 168 | |||
169 | if (argc != 1) | 169 | if (argc != 1) | |
170 | usage("not one arg left\n"); | 170 | usage("not one arg left\n"); | |
171 | 171 |
--- src/share/doc/papers/pulldown/0.t 2001/07/04 05:29:25 1.1
+++ src/share/doc/papers/pulldown/0.t 2024/02/08 20:51:24 1.2
--- src/sys/arch/powerpc/include/psl.h 2021/03/06 08:08:19 1.22
+++ src/sys/arch/powerpc/include/psl.h 2024/02/08 20:51:24 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: psl.h,v 1.22 2021/03/06 08:08:19 rin Exp $ */ | 1 | /* $NetBSD: psl.h,v 1.23 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | 4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | |
5 | * Copyright (C) 1995, 1996 TooLs GmbH. | 5 | * Copyright (C) 1995, 1996 TooLs GmbH. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -64,27 +64,27 @@ | @@ -64,27 +64,27 @@ | |||
64 | #define PSL_FE1 0x00000100 /* B.6. floating point mode 1 */ | 64 | #define PSL_FE1 0x00000100 /* B.6. floating point mode 1 */ | |
65 | #define PSL_IP 0x00000040 /* ..6. interrupt prefix */ | 65 | #define PSL_IP 0x00000040 /* ..6. interrupt prefix */ | |
66 | #define PSL_IR 0x00000020 /* .468 instruction address relocation */ | 66 | #define PSL_IR 0x00000020 /* .468 instruction address relocation */ | |
67 | #define PSL_IS PSL_IR /* B... instruction address space */ | 67 | #define PSL_IS PSL_IR /* B... instruction address space */ | |
68 | #define PSL_DR 0x00000010 /* .468 data address relocation */ | 68 | #define PSL_DR 0x00000010 /* .468 data address relocation */ | |
69 | #define PSL_DS PSL_DR /* B... data address space */ | 69 | #define PSL_DS PSL_DR /* B... data address space */ | |
70 | #define PSL_PM 0x00000008 /* ..6. Performance monitor */ | 70 | #define PSL_PM 0x00000008 /* ..6. Performance monitor */ | |
71 | #define PSL_PMM PSL_PM /* B... Performance monitor */ | 71 | #define PSL_PMM PSL_PM /* B... Performance monitor */ | |
72 | #define PSL_RI 0x00000002 /* ..6. recoverable interrupt */ | 72 | #define PSL_RI 0x00000002 /* ..6. recoverable interrupt */ | |
73 | #define PSL_LE 0x00000001 /* ..6. endian mode (1 == le) */ | 73 | #define PSL_LE 0x00000001 /* ..6. endian mode (1 == le) */ | |
74 | 74 | |||
75 | #define PSL_601_MASK ~(PSL_VEC|PSL_POW|PSL_ILE|PSL_BE|PSL_RI|PSL_LE) | 75 | #define PSL_601_MASK ~(PSL_VEC|PSL_POW|PSL_ILE|PSL_BE|PSL_RI|PSL_LE) | |
76 | 76 | |||
77 | /* The IBM 970 series does not implemnt LE mode */ | 77 | /* The IBM 970 series does not implement LE mode */ | |
78 | #define PSL_970_MASK ~(PSL_ILE|PSL_LE) | 78 | #define PSL_970_MASK ~(PSL_ILE|PSL_LE) | |
79 | 79 | |||
80 | /* | 80 | /* | |
81 | * Floating-point exception modes: | 81 | * Floating-point exception modes: | |
82 | */ | 82 | */ | |
83 | #define PSL_FE_DIS 0 /* none */ | 83 | #define PSL_FE_DIS 0 /* none */ | |
84 | #define PSL_FE_NONREC PSL_FE1 /* imprecise non-recoverable */ | 84 | #define PSL_FE_NONREC PSL_FE1 /* imprecise non-recoverable */ | |
85 | #define PSL_FE_REC PSL_FE0 /* imprecise recoverable */ | 85 | #define PSL_FE_REC PSL_FE0 /* imprecise recoverable */ | |
86 | #define PSL_FE_PREC (PSL_FE0 | PSL_FE1) /* precise */ | 86 | #define PSL_FE_PREC (PSL_FE0 | PSL_FE1) /* precise */ | |
87 | #define PSL_FE_DFLT PSL_FE_DIS /* default == none */ | 87 | #define PSL_FE_DFLT PSL_FE_DIS /* default == none */ | |
88 | 88 | |||
89 | /* | 89 | /* | |
90 | * Note that PSL_POW and PSL_ILE are not in the saved copy of the MSR | 90 | * Note that PSL_POW and PSL_ILE are not in the saved copy of the MSR |
--- src/sys/dev/marvell/mvxpbm.c 2021/12/05 03:04:41 1.3
+++ src/sys/dev/marvell/mvxpbm.c 2024/02/08 20:51:24 1.4
@@ -1,41 +1,41 @@ | @@ -1,41 +1,41 @@ | |||
1 | /* $NetBSD: mvxpbm.c,v 1.3 2021/12/05 03:04:41 msaitoh Exp $ */ | 1 | /* $NetBSD: mvxpbm.c,v 1.4 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | 3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | |
4 | * All rights reserved. | 4 | * All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | |
19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
23 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | 23 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | |
24 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 24 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
25 | * POSSIBILITY OF SUCH DAMAGE. | 25 | * POSSIBILITY OF SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | #include <sys/cdefs.h> | 27 | #include <sys/cdefs.h> | |
28 | __KERNEL_RCSID(0, "$NetBSD: mvxpbm.c,v 1.3 2021/12/05 03:04:41 msaitoh Exp $"); | 28 | __KERNEL_RCSID(0, "$NetBSD: mvxpbm.c,v 1.4 2024/02/08 20:51:24 andvar Exp $"); | |
29 | 29 | |||
30 | #include "opt_multiprocessor.h" | 30 | #include "opt_multiprocessor.h" | |
31 | 31 | |||
32 | #include <sys/param.h> | 32 | #include <sys/param.h> | |
33 | #include <sys/systm.h> | 33 | #include <sys/systm.h> | |
34 | #include <sys/device.h> | 34 | #include <sys/device.h> | |
35 | #include <sys/mbuf.h> | 35 | #include <sys/mbuf.h> | |
36 | 36 | |||
37 | #include <dev/marvell/marvellreg.h> | 37 | #include <dev/marvell/marvellreg.h> | |
38 | #include <dev/marvell/marvellvar.h> | 38 | #include <dev/marvell/marvellvar.h> | |
39 | 39 | |||
40 | #include "mvxpbmvar.h" | 40 | #include "mvxpbmvar.h" | |
41 | 41 | |||
@@ -176,27 +176,27 @@ mvxpbm_alloc_buffer(struct mvxpbm_softc | @@ -176,27 +176,27 @@ mvxpbm_alloc_buffer(struct mvxpbm_softc | |||
176 | int error; | 176 | int error; | |
177 | 177 | |||
178 | /* | 178 | /* | |
179 | * set default buffer sizes. this will changed to satisfy | 179 | * set default buffer sizes. this will changed to satisfy | |
180 | * alignment restrictions. | 180 | * alignment restrictions. | |
181 | */ | 181 | */ | |
182 | sc->sc_chunk_count = 0; | 182 | sc->sc_chunk_count = 0; | |
183 | sc->sc_chunk_size = MVXPBM_PACKET_SIZE; | 183 | sc->sc_chunk_size = MVXPBM_PACKET_SIZE; | |
184 | sc->sc_chunk_header_size = sizeof(struct mvxpbm_chunk); | 184 | sc->sc_chunk_header_size = sizeof(struct mvxpbm_chunk); | |
185 | sc->sc_chunk_packet_offset = 64; | 185 | sc->sc_chunk_packet_offset = 64; | |
186 | 186 | |||
187 | /* | 187 | /* | |
188 | * adjust bm_chunk_size, bm_chunk_header_size, bm_slotsize | 188 | * adjust bm_chunk_size, bm_chunk_header_size, bm_slotsize | |
189 | * to satisfy alignemnt restrictions. | 189 | * to satisfy alignment restrictions. | |
190 | * | 190 | * | |
191 | * <---------------- bm_slotsize [oct.] ------------------> | 191 | * <---------------- bm_slotsize [oct.] ------------------> | |
192 | * <--- bm_chunk_size[oct.] ----> | 192 | * <--- bm_chunk_size[oct.] ----> | |
193 | * <--- header_size[oct] ---> <-- MBXPE_BM_SIZE[oct.] ---> | 193 | * <--- header_size[oct] ---> <-- MBXPE_BM_SIZE[oct.] ---> | |
194 | * +-----------------+--------+---------+-----------------+--+ | 194 | * +-----------------+--------+---------+-----------------+--+ | |
195 | * | bm_chunk hdr |pad |pkt_off | packet data | | | 195 | * | bm_chunk hdr |pad |pkt_off | packet data | | | |
196 | * +-----------------+--------+---------+-----------------+--+ | 196 | * +-----------------+--------+---------+-----------------+--+ | |
197 | * ^ ^ ^ ^ | 197 | * ^ ^ ^ ^ | |
198 | * | | | | | 198 | * | | | | | |
199 | * ptr ptr_data DMA here ptr_next | 199 | * ptr ptr_data DMA here ptr_next | |
200 | * | 200 | * | |
201 | * Restrictions: | 201 | * Restrictions: | |
202 | * - total buffer size must be multiple of MVXPBM_BUF_ALIGN | 202 | * - total buffer size must be multiple of MVXPBM_BUF_ALIGN |
--- src/sys/dev/pci/cs4280.c 2023/12/20 05:08:34 1.76
+++ src/sys/dev/pci/cs4280.c 2024/02/08 20:51:24 1.77
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cs4280.c,v 1.76 2023/12/20 05:08:34 thorpej Exp $ */ | 1 | /* $NetBSD: cs4280.c,v 1.77 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. | 4 | * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -42,27 +42,27 @@ | @@ -42,27 +42,27 @@ | |||
42 | * wss* at pnpbios? | 42 | * wss* at pnpbios? | |
43 | * or | 43 | * or | |
44 | * sb* at pnpbios? | 44 | * sb* at pnpbios? | |
45 | * Since I could not find any documents on handling ISA codec, | 45 | * Since I could not find any documents on handling ISA codec, | |
46 | * clcs does not support those chips. | 46 | * clcs does not support those chips. | |
47 | */ | 47 | */ | |
48 | 48 | |||
49 | /* | 49 | /* | |
50 | * TODO | 50 | * TODO | |
51 | * Joystick support | 51 | * Joystick support | |
52 | */ | 52 | */ | |
53 | 53 | |||
54 | #include <sys/cdefs.h> | 54 | #include <sys/cdefs.h> | |
55 | __KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.76 2023/12/20 05:08:34 thorpej Exp $"); | 55 | __KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.77 2024/02/08 20:51:24 andvar Exp $"); | |
56 | 56 | |||
57 | #include "midi.h" | 57 | #include "midi.h" | |
58 | 58 | |||
59 | #include <sys/param.h> | 59 | #include <sys/param.h> | |
60 | #include <sys/systm.h> | 60 | #include <sys/systm.h> | |
61 | #include <sys/kernel.h> | 61 | #include <sys/kernel.h> | |
62 | #include <sys/fcntl.h> | 62 | #include <sys/fcntl.h> | |
63 | #include <sys/device.h> | 63 | #include <sys/device.h> | |
64 | #include <sys/proc.h> | 64 | #include <sys/proc.h> | |
65 | #include <sys/systm.h> | 65 | #include <sys/systm.h> | |
66 | #include <sys/audioio.h> | 66 | #include <sys/audioio.h> | |
67 | #include <sys/bus.h> | 67 | #include <sys/bus.h> | |
68 | #include <sys/bswap.h> | 68 | #include <sys/bswap.h> | |
@@ -1073,27 +1073,27 @@ cs4280_set_adc_rate(struct cs428x_softc | @@ -1073,27 +1073,27 @@ cs4280_set_adc_rate(struct cs428x_softc | |||
1073 | 1073 | |||
1074 | tmp1 = BA1READ4(sc, CS4280_CGC) & ~CGC_MASK; | 1074 | tmp1 = BA1READ4(sc, CS4280_CGC) & ~CGC_MASK; | |
1075 | tmp1 |= cgl; | 1075 | tmp1 |= cgl; | |
1076 | BA1WRITE4(sc, CS4280_CGC, tmp1); | 1076 | BA1WRITE4(sc, CS4280_CGC, tmp1); | |
1077 | } | 1077 | } | |
1078 | 1078 | |||
1079 | static void | 1079 | static void | |
1080 | cs4280_set_dac_rate(struct cs428x_softc *sc, int rate) | 1080 | cs4280_set_dac_rate(struct cs428x_softc *sc, int rate) | |
1081 | { | 1081 | { | |
1082 | /* | 1082 | /* | |
1083 | * playback rate may range from 8000Hz to 48000Hz | 1083 | * playback rate may range from 8000Hz to 48000Hz | |
1084 | * | 1084 | * | |
1085 | * play_phase_increment = floor(rate*65536*1024/48000) | 1085 | * play_phase_increment = floor(rate*65536*1024/48000) | |
1086 | * px = round(rate*65536*1024 - play_phase_incremnt*48000) | 1086 | * px = round(rate*65536*1024 - play_phase_increment*48000) | |
1087 | * py=floor(px/200) | 1087 | * py=floor(px/200) | |
1088 | * play_sample_rate_correction = px - 200*py | 1088 | * play_sample_rate_correction = px - 200*py | |
1089 | * | 1089 | * | |
1090 | * play_phase_increment is a 32bit signed quantity. | 1090 | * play_phase_increment is a 32bit signed quantity. | |
1091 | * play_sample_rate_correction is a 16bit signed quantity. | 1091 | * play_sample_rate_correction is a 16bit signed quantity. | |
1092 | */ | 1092 | */ | |
1093 | int32_t ppi; | 1093 | int32_t ppi; | |
1094 | int16_t psrc; | 1094 | int16_t psrc; | |
1095 | uint32_t px, py; | 1095 | uint32_t px, py; | |
1096 | 1096 | |||
1097 | if (rate < 8000) | 1097 | if (rate < 8000) | |
1098 | rate = 8000; | 1098 | rate = 8000; | |
1099 | if (rate > 48000) | 1099 | if (rate > 48000) |
--- src/sys/dev/pci/cs4280reg.h 2019/05/08 13:40:18 1.8
+++ src/sys/dev/pci/cs4280reg.h 2024/02/08 20:51:24 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cs4280reg.h,v 1.8 2019/05/08 13:40:18 isaki Exp $ */ | 1 | /* $NetBSD: cs4280reg.h,v 1.9 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. | 4 | * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -182,27 +182,27 @@ | @@ -182,27 +182,27 @@ | |||
182 | #define CS4280_CDTC 0x0100 /* Capture DMA Transaction Count */ | 182 | #define CS4280_CDTC 0x0100 /* Capture DMA Transaction Count */ | |
183 | #define CS4280_CIE 0x0104 /* Capture Interrupt Enable */ | 183 | #define CS4280_CIE 0x0104 /* Capture Interrupt Enable */ | |
184 | #define CIE_CI_ENABLE 0x00000001 /* Capture Interrupt enabled */ | 184 | #define CIE_CI_ENABLE 0x00000001 /* Capture Interrupt enabled */ | |
185 | #define CIE_CI_DISABLE 0x00000011 /* Capture Interrupt disabled */ | 185 | #define CIE_CI_DISABLE 0x00000011 /* Capture Interrupt disabled */ | |
186 | #define CIE_CI_MASK 0x0000003f | 186 | #define CIE_CI_MASK 0x0000003f | |
187 | #define CS4280_CBA 0x010c /* Capture Buffer Address */ | 187 | #define CS4280_CBA 0x010c /* Capture Buffer Address */ | |
188 | #define CS4280_CSRC 0x02c8 /* Capture Sample Rate Correction */ | 188 | #define CS4280_CSRC 0x02c8 /* Capture Sample Rate Correction */ | |
189 | #define CSRC_MASK 0xffff0000 | 189 | #define CSRC_MASK 0xffff0000 | |
190 | #define CS4280_MK_CSRC(csrc, cy) ((((csrc) << 16) & 0xffff0000) | ((cy) & 0xffff)) | 190 | #define CS4280_MK_CSRC(csrc, cy) ((((csrc) << 16) & 0xffff0000) | ((cy) & 0xffff)) | |
191 | #define CS4280_CCI 0x02d8 /* Capture Coefficient Increment */ | 191 | #define CS4280_CCI 0x02d8 /* Capture Coefficient Increment */ | |
192 | #define CCI_MASK 0xffff0000 | 192 | #define CCI_MASK 0xffff0000 | |
193 | #define CS4280_CD 0x02e0 /* Capture Delay */ | 193 | #define CS4280_CD 0x02e0 /* Capture Delay */ | |
194 | #define CD_MASK 0xfffc000 | 194 | #define CD_MASK 0xfffc000 | |
195 | #define CS4280_CPI 0x02f4 /* Capture Phase Incremnt */ | 195 | #define CS4280_CPI 0x02f4 /* Capture Phase Increment */ | |
196 | #define CS4280_CGL 0x0134 /* Capture Group Length */ | 196 | #define CS4280_CGL 0x0134 /* Capture Group Length */ | |
197 | #define CGL_MASK 0x0000ffff | 197 | #define CGL_MASK 0x0000ffff | |
198 | #define CS4280_CNT 0x0340 /* Capture Number of Triplets */ | 198 | #define CS4280_CNT 0x0340 /* Capture Number of Triplets */ | |
199 | #define CS4280_CGC 0x0138 /* Capture Group Count */ | 199 | #define CS4280_CGC 0x0138 /* Capture Group Count */ | |
200 | #define CGC_MASK 0x0000ffff | 200 | #define CGC_MASK 0x0000ffff | |
201 | #define CS4280_CVOL 0x02f8 /* Capture Volume */ | 201 | #define CS4280_CVOL 0x02f8 /* Capture Volume */ | |
202 | 202 | |||
203 | /* Processor Registers */ | 203 | /* Processor Registers */ | |
204 | #define CS4280_SPCR 0x30000 /* Processor Control Register */ | 204 | #define CS4280_SPCR 0x30000 /* Processor Control Register */ | |
205 | #define SPCR_RUN 0x00000001 | 205 | #define SPCR_RUN 0x00000001 | |
206 | #define SPCR_STPFR 0x00000002 | 206 | #define SPCR_STPFR 0x00000002 | |
207 | #define SPCR_RUNFR 0x00000004 | 207 | #define SPCR_RUNFR 0x00000004 | |
208 | #define SPCR_DRQEN 0x00000020 | 208 | #define SPCR_DRQEN 0x00000020 |
--- src/sys/fs/nfs/client/nfs_clrpcops.c 2016/12/13 22:17:33 1.2
+++ src/sys/fs/nfs/client/nfs_clrpcops.c 2024/02/08 20:51:25 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: nfs_clrpcops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */ | 1 | /* $NetBSD: nfs_clrpcops.c,v 1.3 2024/02/08 20:51:25 andvar Exp $ */ | |
2 | /*- | 2 | /*- | |
3 | * Copyright (c) 1989, 1993 | 3 | * Copyright (c) 1989, 1993 | |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. | |
5 | * | 5 | * | |
6 | * This code is derived from software contributed to Berkeley by | 6 | * This code is derived from software contributed to Berkeley by | |
7 | * Rick Macklem at The University of Guelph. | 7 | * Rick Macklem at The University of Guelph. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
31 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. | |
32 | * | 32 | * | |
33 | */ | 33 | */ | |
34 | 34 | |||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> | |
36 | /* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clrpcops.c 298788 2016-04-29 16:07:25Z pfg "); */ | 36 | /* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clrpcops.c 298788 2016-04-29 16:07:25Z pfg "); */ | |
37 | __RCSID("$NetBSD: nfs_clrpcops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $"); | 37 | __RCSID("$NetBSD: nfs_clrpcops.c,v 1.3 2024/02/08 20:51:25 andvar Exp $"); | |
38 | 38 | |||
39 | /* | 39 | /* | |
40 | * Rpc op calls, generally called from the vnode op calls or through the | 40 | * Rpc op calls, generally called from the vnode op calls or through the | |
41 | * buffer cache, for NFS v2, 3 and 4. | 41 | * buffer cache, for NFS v2, 3 and 4. | |
42 | * These do not normally make any changes to vnode arguments or use | 42 | * These do not normally make any changes to vnode arguments or use | |
43 | * structures that might change between the VFS variants. The returned | 43 | * structures that might change between the VFS variants. The returned | |
44 | * arguments are all at the end, after the NFSPROC_T *p one. | 44 | * arguments are all at the end, after the NFSPROC_T *p one. | |
45 | */ | 45 | */ | |
46 | 46 | |||
47 | #ifndef APPLEKEXT | 47 | #ifndef APPLEKEXT | |
48 | #ifdef _KERNEL_OPT | 48 | #ifdef _KERNEL_OPT | |
49 | #include "opt_inet6.h" | 49 | #include "opt_inet6.h" | |
50 | #endif | 50 | #endif | |
@@ -1012,27 +1012,27 @@ nfsrpc_getattr(vnode_t vp, struct ucred | @@ -1012,27 +1012,27 @@ nfsrpc_getattr(vnode_t vp, struct ucred | |||
1012 | } | 1012 | } | |
1013 | error = nfscl_request(nd, vp, p, cred, stuff); | 1013 | error = nfscl_request(nd, vp, p, cred, stuff); | |
1014 | if (error) | 1014 | if (error) | |
1015 | return (error); | 1015 | return (error); | |
1016 | if (!nd->nd_repstat) | 1016 | if (!nd->nd_repstat) | |
1017 | error = nfsm_loadattr(nd, nap); | 1017 | error = nfsm_loadattr(nd, nap); | |
1018 | else | 1018 | else | |
1019 | error = nd->nd_repstat; | 1019 | error = nd->nd_repstat; | |
1020 | mbuf_freem(nd->nd_mrep); | 1020 | mbuf_freem(nd->nd_mrep); | |
1021 | return (error); | 1021 | return (error); | |
1022 | } | 1022 | } | |
1023 | 1023 | |||
1024 | /* | 1024 | /* | |
1025 | * nfs getattr call with non-vnode arguemnts. | 1025 | * nfs getattr call with non-vnode arguments. | |
1026 | */ | 1026 | */ | |
1027 | APPLESTATIC int | 1027 | APPLESTATIC int | |
1028 | nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred, | 1028 | nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred, | |
1029 | struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, u_int64_t *xidp, | 1029 | struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, u_int64_t *xidp, | |
1030 | uint32_t *leasep) | 1030 | uint32_t *leasep) | |
1031 | { | 1031 | { | |
1032 | struct nfsrv_descript nfsd, *nd = &nfsd; | 1032 | struct nfsrv_descript nfsd, *nd = &nfsd; | |
1033 | int error, vers = NFS_VER2; | 1033 | int error, vers = NFS_VER2; | |
1034 | nfsattrbit_t attrbits; | 1034 | nfsattrbit_t attrbits; | |
1035 | 1035 | |||
1036 | nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL); | 1036 | nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL); | |
1037 | if (nd->nd_flag & ND_NFSV4) { | 1037 | if (nd->nd_flag & ND_NFSV4) { | |
1038 | vers = NFS_VER4; | 1038 | vers = NFS_VER4; |
--- src/usr.sbin/inetd/parse_v2.c 2021/10/12 19:08:04 1.6
+++ src/usr.sbin/inetd/parse_v2.c 2024/02/08 20:51:25 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: parse_v2.c,v 1.6 2021/10/12 19:08:04 christos Exp $ */ | 1 | /* $NetBSD: parse_v2.c,v 1.7 2024/02/08 20:51:25 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2021 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2021 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by James Browning, Gabe Coffland, Alex Gavin, and Solomon Ritzow. | 8 | * by James Browning, Gabe Coffland, Alex Gavin, and Solomon Ritzow. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __RCSID("$NetBSD: parse_v2.c,v 1.6 2021/10/12 19:08:04 christos Exp $"); | 33 | __RCSID("$NetBSD: parse_v2.c,v 1.7 2024/02/08 20:51:25 andvar Exp $"); | |
34 | 34 | |||
35 | #include <ctype.h> | 35 | #include <ctype.h> | |
36 | #include <errno.h> | 36 | #include <errno.h> | |
37 | #include <limits.h> | 37 | #include <limits.h> | |
38 | #include <stdbool.h> | 38 | #include <stdbool.h> | |
39 | #include <stdio.h> | 39 | #include <stdio.h> | |
40 | #include <stdlib.h> | 40 | #include <stdlib.h> | |
41 | #include <string.h> | 41 | #include <string.h> | |
42 | #include <syslog.h> | 42 | #include <syslog.h> | |
43 | #include <err.h> | 43 | #include <err.h> | |
44 | 44 | |||
45 | #include "inetd.h" | 45 | #include "inetd.h" | |
46 | #include "ipsec.h" | 46 | #include "ipsec.h" | |
@@ -124,27 +124,27 @@ static struct key_handler { | @@ -124,27 +124,27 @@ static struct key_handler { | |||
124 | { "exec", exec_handler }, | 124 | { "exec", exec_handler }, | |
125 | { "args", args_handler }, | 125 | { "args", args_handler }, | |
126 | { "ip_max", ip_max_handler }, | 126 | { "ip_max", ip_max_handler }, | |
127 | #ifdef IPSEC | 127 | #ifdef IPSEC | |
128 | { "ipsec", ipsec_handler } | 128 | { "ipsec", ipsec_handler } | |
129 | #endif | 129 | #endif | |
130 | }; | 130 | }; | |
131 | 131 | |||
132 | /* Error Not Initialized */ | 132 | /* Error Not Initialized */ | |
133 | #define ENI(key) ERR("Required option '%s' not specified", (key)) | 133 | #define ENI(key) ERR("Required option '%s' not specified", (key)) | |
134 | 134 | |||
135 | #define WAIT_WRN "Option 'wait' for internal service '%s' was inferred" | 135 | #define WAIT_WRN "Option 'wait' for internal service '%s' was inferred" | |
136 | 136 | |||
137 | /* Too Few Arguemnts (values) */ | 137 | /* Too Few Arguments (values) */ | |
138 | #define TFA(key) ERR("Option '%s' has too few arguments", (key)) | 138 | #define TFA(key) ERR("Option '%s' has too few arguments", (key)) | |
139 | 139 | |||
140 | /* Too Many Arguments (values) */ | 140 | /* Too Many Arguments (values) */ | |
141 | #define TMA(key) ERR("Option '%s' has too many arguments", (key)) | 141 | #define TMA(key) ERR("Option '%s' has too many arguments", (key)) | |
142 | 142 | |||
143 | /* Too Many Definitions */ | 143 | /* Too Many Definitions */ | |
144 | #define TMD(key) ERR("Option '%s' is already specified", (key)) | 144 | #define TMD(key) ERR("Option '%s' is already specified", (key)) | |
145 | 145 | |||
146 | #define VALID_SOCKET_TYPES "stream, dgram, rdm, seqpacket, raw" | 146 | #define VALID_SOCKET_TYPES "stream, dgram, rdm, seqpacket, raw" | |
147 | 147 | |||
148 | parse_v2_result | 148 | parse_v2_result | |
149 | parse_syntax_v2(struct servtab *sep, char **cpp) | 149 | parse_syntax_v2(struct servtab *sep, char **cpp) | |
150 | { | 150 | { |
--- src/usr.sbin/sysinst/disklabel.c 2023/01/06 15:05:52 1.51
+++ src/usr.sbin/sysinst/disklabel.c 2024/02/08 20:51:24 1.52
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: disklabel.c,v 1.51 2023/01/06 15:05:52 martin Exp $ */ | 1 | /* $NetBSD: disklabel.c,v 1.52 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2018 The NetBSD Foundation, Inc. | 4 | * Copyright 2018 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -69,27 +69,27 @@ static void | @@ -69,27 +69,27 @@ static void | |||
69 | disklabel_init_default_alignment(struct disklabel_disk_partitions *parts, | 69 | disklabel_init_default_alignment(struct disklabel_disk_partitions *parts, | |
70 | uint track) | 70 | uint track) | |
71 | { | 71 | { | |
72 | if (track == 0) | 72 | if (track == 0) | |
73 | track = MEG / parts->dp.bytes_per_sector; | 73 | track = MEG / parts->dp.bytes_per_sector; | |
74 | 74 | |||
75 | if (dl_maxpart == 0) | 75 | if (dl_maxpart == 0) | |
76 | dl_maxpart = getmaxpartitions(); | 76 | dl_maxpart = getmaxpartitions(); | |
77 | 77 | |||
78 | #ifdef MD_DISKLABEL_SET_ALIGN_PRE | 78 | #ifdef MD_DISKLABEL_SET_ALIGN_PRE | |
79 | if (MD_DISKLABEL_SET_ALIGN_PRE(parts->ptn_alignment, track)) | 79 | if (MD_DISKLABEL_SET_ALIGN_PRE(parts->ptn_alignment, track)) | |
80 | return; | 80 | return; | |
81 | #endif | 81 | #endif | |
82 | /* Use 1MB alignemnt for large (>128GB) disks */ | 82 | /* Use 1MB alignment for large (>128GB) disks */ | |
83 | if (parts->dp.disk_size > HUGE_DISK_SIZE) { | 83 | if (parts->dp.disk_size > HUGE_DISK_SIZE) { | |
84 | parts->ptn_alignment = 2048; | 84 | parts->ptn_alignment = 2048; | |
85 | } else if (parts->dp.disk_size > TINY_DISK_SIZE || | 85 | } else if (parts->dp.disk_size > TINY_DISK_SIZE || | |
86 | parts->dp.bytes_per_sector > 512) { | 86 | parts->dp.bytes_per_sector > 512) { | |
87 | parts->ptn_alignment = 64; | 87 | parts->ptn_alignment = 64; | |
88 | } else { | 88 | } else { | |
89 | parts->ptn_alignment = 1; | 89 | parts->ptn_alignment = 1; | |
90 | } | 90 | } | |
91 | #ifdef MD_DISKLABEL_SET_ALIGN_POST | 91 | #ifdef MD_DISKLABEL_SET_ALIGN_POST | |
92 | MD_DISKLABEL_SET_ALIGN_POST(parts->ptn_alignment, track); | 92 | MD_DISKLABEL_SET_ALIGN_POST(parts->ptn_alignment, track); | |
93 | #endif | 93 | #endif | |
94 | } | 94 | } | |
95 | 95 |
--- src/usr.sbin/sysinst/gpt.c 2022/12/15 14:54:27 1.30
+++ src/usr.sbin/sysinst/gpt.c 2024/02/08 20:51:24 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: gpt.c,v 1.30 2022/12/15 14:54:27 martin Exp $ */ | 1 | /* $NetBSD: gpt.c,v 1.31 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2018 The NetBSD Foundation, Inc. | 4 | * Copyright 2018 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -1005,27 +1005,27 @@ gpt_create_unknown_part_type(void) | @@ -1005,27 +1005,27 @@ gpt_create_unknown_part_type(void) | |||
1005 | return NULL; | 1005 | return NULL; | |
1006 | 1006 | |||
1007 | return gpt_get_uuid_part_type(&id); | 1007 | return gpt_get_uuid_part_type(&id); | |
1008 | } | 1008 | } | |
1009 | 1009 | |||
1010 | static daddr_t | 1010 | static daddr_t | |
1011 | gpt_get_part_alignment(const struct disk_partitions *parts) | 1011 | gpt_get_part_alignment(const struct disk_partitions *parts) | |
1012 | { | 1012 | { | |
1013 | 1013 | |||
1014 | assert(parts->disk_size > 0); | 1014 | assert(parts->disk_size > 0); | |
1015 | if (parts->disk_size < 0) | 1015 | if (parts->disk_size < 0) | |
1016 | return 1; | 1016 | return 1; | |
1017 | 1017 | |||
1018 | /* Use 1MB offset/alignemnt for large (>128GB) disks */ | 1018 | /* Use 1MB offset/alignment for large (>128GB) disks */ | |
1019 | if (parts->disk_size > HUGE_DISK_SIZE) | 1019 | if (parts->disk_size > HUGE_DISK_SIZE) | |
1020 | return 2048; | 1020 | return 2048; | |
1021 | else if (parts->disk_size > TINY_DISK_SIZE) | 1021 | else if (parts->disk_size > TINY_DISK_SIZE) | |
1022 | return 64; | 1022 | return 64; | |
1023 | else | 1023 | else | |
1024 | return 4; | 1024 | return 4; | |
1025 | } | 1025 | } | |
1026 | 1026 | |||
1027 | static bool | 1027 | static bool | |
1028 | gpt_can_add_partition(const struct disk_partitions *arg) | 1028 | gpt_can_add_partition(const struct disk_partitions *arg) | |
1029 | { | 1029 | { | |
1030 | const struct gpt_disk_partitions *parts = | 1030 | const struct gpt_disk_partitions *parts = | |
1031 | (const struct gpt_disk_partitions*)arg; | 1031 | (const struct gpt_disk_partitions*)arg; |
--- src/usr.sbin/sysinst/mbr.c 2022/07/10 12:49:05 1.46
+++ src/usr.sbin/sysinst/mbr.c 2024/02/08 20:51:24 1.47
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mbr.c,v 1.46 2022/07/10 12:49:05 martin Exp $ */ | 1 | /* $NetBSD: mbr.c,v 1.47 2024/02/08 20:51:24 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -881,27 +881,27 @@ mbr_sort_main_mbr(struct mbr_sector *m) | @@ -881,27 +881,27 @@ mbr_sort_main_mbr(struct mbr_sector *m) | |||
881 | 881 | |||
882 | static void | 882 | static void | |
883 | mbr_init_default_alignments(struct mbr_disk_partitions *parts, uint track) | 883 | mbr_init_default_alignments(struct mbr_disk_partitions *parts, uint track) | |
884 | { | 884 | { | |
885 | if (track == 0) | 885 | if (track == 0) | |
886 | track = 16065; | 886 | track = 16065; | |
887 | 887 | |||
888 | assert(parts->dp.disk_size > 0); | 888 | assert(parts->dp.disk_size > 0); | |
889 | if (parts->dp.disk_size < 0) | 889 | if (parts->dp.disk_size < 0) | |
890 | return; | 890 | return; | |
891 | 891 | |||
892 | parts->ptn_0_offset = parts->geo_sec; | 892 | parts->ptn_0_offset = parts->geo_sec; | |
893 | 893 | |||
894 | /* Use 1MB offset/alignemnt for large (>128GB) disks */ | 894 | /* Use 1MB offset/alignment for large (>128GB) disks */ | |
895 | if (parts->dp.disk_size > HUGE_DISK_SIZE) { | 895 | if (parts->dp.disk_size > HUGE_DISK_SIZE) { | |
896 | parts->ptn_alignment = 2048; | 896 | parts->ptn_alignment = 2048; | |
897 | } else if (parts->dp.disk_size > TINY_DISK_SIZE) { | 897 | } else if (parts->dp.disk_size > TINY_DISK_SIZE) { | |
898 | parts->ptn_alignment = 64; | 898 | parts->ptn_alignment = 64; | |
899 | } else { | 899 | } else { | |
900 | parts->ptn_alignment = 1; | 900 | parts->ptn_alignment = 1; | |
901 | } | 901 | } | |
902 | parts->ext_ptn_alignment = track; | 902 | parts->ext_ptn_alignment = track; | |
903 | } | 903 | } | |
904 | 904 | |||
905 | static struct disk_partitions * | 905 | static struct disk_partitions * | |
906 | mbr_create_new(const char *disk, daddr_t start, daddr_t len, | 906 | mbr_create_new(const char *disk, daddr_t start, daddr_t len, | |
907 | bool is_boot_drive, struct disk_partitions *parent) | 907 | bool is_boot_drive, struct disk_partitions *parent) |