CVS commit: src/common/lib/libc/atomic
Module Name:src Committed By: skrll Date: Mon May 16 06:07:23 UTC 2022 Modified Files: src/common/lib/libc/atomic: atomic_c11_compare_exchange_cas_32.c Log Message: Fix the copy&paste botch from previous. Spotted by Tom Lane. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/atomic
Module Name:src Committed By: skrll Date: Mon May 16 06:07:23 UTC 2022 Modified Files: src/common/lib/libc/atomic: atomic_c11_compare_exchange_cas_32.c Log Message: Fix the copy&paste botch from previous. Spotted by Tom Lane. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c diff -u src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.4 src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.5 --- src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.4 Sat May 14 05:35:55 2022 +++ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c Mon May 16 06:07:23 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_c11_compare_exchange_cas_32.c,v 1.4 2022/05/14 05:35:55 skrll Exp $ */ +/* $NetBSD: atomic_c11_compare_exchange_cas_32.c,v 1.5 2022/05/16 06:07:23 skrll Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ __atomic_compare_exchange_4(volatile voi * and just do the cas. If we get here the compiler couldn't * do better and it mostly will not matter at all. */ - const uint32_t prev = atomic_cas_8(mem, old, desired); + const uint32_t prev = atomic_cas_32(mem, old, desired); if (prev == old) return true; *ep = prev;
CVS commit: src/external/mit/ctwm/etc
Module Name:src Committed By: nia Date: Mon May 16 04:52:11 UTC 2022 Modified Files: src/external/mit/ctwm/etc: system.ctwmrc Log Message: ctwmrc: Turn off sysinst menu item for now, it requires root for most functions and users likely aren't running X as root. Also turn off the xman menu item until a custom greeter screen can be imported (also note apropos is broken)... To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/mit/ctwm/etc/system.ctwmrc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/ctwm/etc/system.ctwmrc diff -u src/external/mit/ctwm/etc/system.ctwmrc:1.17 src/external/mit/ctwm/etc/system.ctwmrc:1.18 --- src/external/mit/ctwm/etc/system.ctwmrc:1.17 Mon May 9 15:05:18 2022 +++ src/external/mit/ctwm/etc/system.ctwmrc Mon May 16 04:52:11 2022 @@ -1,5 +1,5 @@ # -# $NetBSD: system.ctwmrc,v 1.17 2022/05/09 15:05:18 nia Exp $ +# $NetBSD: system.ctwmrc,v 1.18 2022/05/16 04:52:11 nia Exp $ # # ctwmrc by nia # @@ -281,7 +281,6 @@ menu "deskutils" "Desktop utilities" f.title " Calculator" !"xcalc &" " Text editor" !"xedit &" -" Manual pages" !"LC_ALL=en_US.ISO8859-1 xman -notopbox &" ""f.separator " XEyes" !"xeyes &" " OpenGL Gears" !"glxgears &" @@ -302,7 +301,6 @@ menu "termutils" " Tetris" !"xterm -class UXTerm -e tetris &" ""f.separator " Audio mixer" !"xterm -class UXTerm -e aiomixer &" -" System setup" !"xterm -class UXTerm -e sysinst &" ""f.separator " Top processes" !"xterm -class UXTerm -e top &" " I/O stats" !"xterm -class UXTerm -e 'sysstat iostat' &"
CVS commit: src/external/mit/ctwm/etc
Module Name:src Committed By: nia Date: Mon May 16 04:52:11 UTC 2022 Modified Files: src/external/mit/ctwm/etc: system.ctwmrc Log Message: ctwmrc: Turn off sysinst menu item for now, it requires root for most functions and users likely aren't running X as root. Also turn off the xman menu item until a custom greeter screen can be imported (also note apropos is broken)... To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/mit/ctwm/etc/system.ctwmrc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sbin/cgdconfig
On Sun, May 15, 2022 at 03:53:27PM -0400, Christos Zoulas wrote: > Log Message: > Build argon2 inline so that crunched programs work. I also disabled threads > for now; we can put them back if needed. Please re-enable threads. They influence the output hash so by disabling threads you stop people from being able to decrypt their disks.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:56:20 UTC 2022 Modified Files: src/games/gomoku: bdinit.c bdisp.c gomoku.h main.c stoc.c Log Message: gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4 These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/games/gomoku/bdinit.c cvs rdiff -u -r1.21 -r1.22 src/games/gomoku/bdisp.c cvs rdiff -u -r1.24 -r1.25 src/games/gomoku/gomoku.h cvs rdiff -u -r1.30 -r1.31 src/games/gomoku/main.c cvs rdiff -u -r1.15 -r1.16 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/bdinit.c diff -u src/games/gomoku/bdinit.c:1.10 src/games/gomoku/bdinit.c:1.11 --- src/games/gomoku/bdinit.c:1.10 Sun May 15 22:00:11 2022 +++ src/games/gomoku/bdinit.c Sun May 15 22:56:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdinit.c,v 1.10 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: bdinit.c,v 1.11 2022/05/15 22:56:20 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdinit.c,v 1.10 2022/05/15 22:00:11 rillig Exp $"); +__RCSID("$NetBSD: bdinit.c,v 1.11 2022/05/15 22:56:20 rillig Exp $"); #endif #endif /* not lint */ @@ -57,7 +57,7 @@ bdinit(struct spotstr *bp) /* mark the borders as such */ sp = bp; - for (i = BSZ2; --i >= 0; sp++) { + for (i = 1 + BSZ + 1; --i >= 0; sp++) { sp->s_occ = BORDER; /* top border */ sp->s_flags = BFLAGALL; } @@ -65,8 +65,8 @@ bdinit(struct spotstr *bp) /* fill entire board with EMPTY spots */ memset(frames, 0, sizeof(frames)); cbp = frames; - for (j = 0; ++j < BSZ1; sp++) { /* for each row */ - for (i = 0; ++i < BSZ1; sp++) { /* for each column */ + for (j = 0; ++j < BSZ + 1; sp++) { /* for each row */ + for (i = 0; ++i < BSZ + 1; sp++) { /* for each column */ sp->s_occ = EMPTY; sp->s_flags = 0; sp->s_wval = 0; @@ -145,8 +145,8 @@ bdinit(struct spotstr *bp) } /* mark the borders as such */ - for (i = BSZ1; --i >= 0; sp++) { - sp->s_occ = BORDER; /* bottom border */ + for (i = BSZ + 1; --i >= 0; sp++) { + sp->s_occ = BORDER; /* bottom border */ sp->s_flags = BFLAGALL; } Index: src/games/gomoku/bdisp.c diff -u src/games/gomoku/bdisp.c:1.21 src/games/gomoku/bdisp.c:1.22 --- src/games/gomoku/bdisp.c:1.21 Sun May 15 22:08:05 2022 +++ src/games/gomoku/bdisp.c Sun May 15 22:56:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdisp.c,v 1.21 2022/05/15 22:08:05 rillig Exp $ */ +/* $NetBSD: bdisp.c,v 1.22 2022/05/15 22:56:20 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdisp.c,v 1.21 2022/05/15 22:08:05 rillig Exp $"); +__RCSID("$NetBSD: bdisp.c,v 1.22 2022/05/15 22:56:20 rillig Exp $"); #endif #endif /* not lint */ @@ -85,7 +85,7 @@ void cursfini(void) { - move(BSZ4, 0); + move(BSZ + 4, 0); clrtoeol(); refresh(); echo(); @@ -101,19 +101,19 @@ bdisp_init(void) int i, j; /* top border */ - for (i = 1; i < BSZ1; i++) { + for (i = 1; i < BSZ + 1; i++) { move(0, 2 * i + 1); addch(letters[i]); } /* left and right edges */ - for (j = BSZ1; --j > 0; ) { + for (j = BSZ + 1; --j > 0; ) { move(20 - j, 0); printw("%2d ", j); - move(20 - j, 2 * BSZ1 + 1); + move(20 - j, 2 * (BSZ + 1) + 1); printw("%d ", j); } /* bottom border */ - for (i = 1; i < BSZ1; i++) { + for (i = 1; i < BSZ + 1; i++) { move(20, 2 * i + 1); addch(letters[i]); } @@ -165,10 +165,10 @@ bdisp(void) int i, j, c; struct spotstr *sp; - for (j = BSZ1; --j > 0; ) { - for (i = 1; i < BSZ1; i++) { - move(BSZ1 - j, 2 * i + 1); - sp = &board[i + j * BSZ1]; + for (j = BSZ + 1; --j > 0; ) { + for (i = 1; i < BSZ + 1; i++) { + move(BSZ + 1 - j, 2 * i + 1); + sp = &board[i + j * (BSZ + 1)]; if (debug > 1 && sp->s_occ == EMPTY) { if (sp->s_flags & IFLAGALL) c = '+'; @@ -197,11 +197,11 @@ bdump(FILE *fp) /* top border */ fprintf(fp, " A B C D E F G H J K L M N O P Q R S T\n"); - for (j = BSZ1; --j > 0; ) { + for (j = BSZ + 1; --j > 0; ) { /* left edge */ fprintf(fp, "%2d ", j); - for (i = 1; i < BSZ1; i++) { - sp = &board[i + j * BSZ1]; + for (i = 1; i < BSZ + 1; i++) { + sp = &board[i + j * (BSZ + 1)]; if (debug > 1 && sp->s_occ == EMPTY) { if (sp->s_flags & IFLAGALL) c = '+'; @@ -250,10 +250,10 @@ ask(const char *str) { int len = strlen(str); - move(BSZ4, 0); + move(BSZ + 4, 0); addstr(str); clrtoeol(); - move(BSZ4, len); + move(BSZ + 4, len); refresh(); } @@ -336,7 +336,7 @@ get_coord(void) nx = curx; ny = cury; for (;;) { - mvprintw(BSZ3, (BSZ - 6) / 2, "(%c %d) ", + mvprintw(BSZ + 3, (BSZ - 6) / 2, "(%c %d) ",
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:56:20 UTC 2022 Modified Files: src/games/gomoku: bdinit.c bdisp.c gomoku.h main.c stoc.c Log Message: gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4 These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/games/gomoku/bdinit.c cvs rdiff -u -r1.21 -r1.22 src/games/gomoku/bdisp.c cvs rdiff -u -r1.24 -r1.25 src/games/gomoku/gomoku.h cvs rdiff -u -r1.30 -r1.31 src/games/gomoku/main.c cvs rdiff -u -r1.15 -r1.16 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:41:51 UTC 2022 Modified Files: src/games/gomoku: gomoku.h pickmove.c Log Message: gomoku: remove write-only members from overlap_info Since overlap_info is only used in pickmove.c, move it there. No functional change. In particular, in the middle of a game, gomoku still tends to fall into analysis paralysis, thinking about the best move for more than 3 minutes on modern hardware. Since the algorithm is basically unchanged since the 1990s, it must have been a long waiting time back then, probably an hour per move. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/gomoku/gomoku.h cvs rdiff -u -r1.26 -r1.27 src/games/gomoku/pickmove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/gomoku.h diff -u src/games/gomoku/gomoku.h:1.23 src/games/gomoku/gomoku.h:1.24 --- src/games/gomoku/gomoku.h:1.23 Sun May 15 22:18:36 2022 +++ src/games/gomoku/gomoku.h Sun May 15 22:41:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: gomoku.h,v 1.23 2022/05/15 22:18:36 rillig Exp $ */ +/* $NetBSD: gomoku.h,v 1.24 2022/05/15 22:41:51 rillig Exp $ */ /* * Copyright (c) 1994 @@ -174,7 +174,6 @@ struct combostr { #define C_OPEN_0 0x01 /* link[0] is an open ended frame */ #define C_OPEN_1 0x02 /* link[1] is an open ended frame */ #define C_LOOP 0x04 /* link[1] intersects previous frame */ -#define C_MARK 0x08 /* indicates combo processed */ /* * This structure is used for recording the completion points of @@ -221,17 +220,6 @@ struct spotstr { #define BFLAG 0x01 /* frame intersects border or dead */ #define BFLAGALL 0x0F /* all frames dead */ -/* - * This structure is used to store overlap information between frames. - */ -struct overlap_info { - int o_intersect; /* intersection spot */ - struct combostr *o_fcombo; /* the connecting combo */ - u_char o_link; /* which link to update (0 or 1) */ - u_char o_off; /* offset in frame of intersection */ - u_char o_frameindex; /* intersection frame index */ -}; - extern const char *letters; extern const char pdir[]; Index: src/games/gomoku/pickmove.c diff -u src/games/gomoku/pickmove.c:1.26 src/games/gomoku/pickmove.c:1.27 --- src/games/gomoku/pickmove.c:1.26 Sun May 15 22:18:36 2022 +++ src/games/gomoku/pickmove.c Sun May 15 22:41:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pickmove.c,v 1.26 2022/05/15 22:18:36 rillig Exp $ */ +/* $NetBSD: pickmove.c,v 1.27 2022/05/15 22:41:51 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: pickmove.c,v 1.26 2022/05/15 22:18:36 rillig Exp $"); +__RCSID("$NetBSD: pickmove.c,v 1.27 2022/05/15 22:41:51 rillig Exp $"); #endif #endif /* not lint */ @@ -55,6 +55,15 @@ __RCSID("$NetBSD: pickmove.c,v 1.26 2022 #define BIT_CLR(a, b) ((a)[(b)/BITS_PER_INT] &= ~(1 << ((b) % BITS_PER_INT))) #define BIT_TEST(a, b) ((a)[(b)/BITS_PER_INT] & (1 << ((b) % BITS_PER_INT))) +/* + * This structure is used to store overlap information between frames. + */ +struct overlap_info { + int o_intersect; /* intersection spot */ + u_char o_off; /* offset in frame of intersection */ + u_char o_frameindex; /* intersection frame index */ +}; + static struct combostr *hashcombos[FAREA];/* hash list for finding duplicates */ static struct combostr *sortcombos; /* combos at higher levels */ static int combolen; /* number of combos in sortcombos */ @@ -1148,8 +1157,6 @@ checkframes(struct combostr *cbp, struct return -1; /* invalid overlap */ vertices->o_intersect = n; -vertices->o_fcombo = cbp; -vertices->o_link = 1; vertices->o_off = (n - tcbp->c_vertex) / dd[tcbp->c_dir]; vertices->o_frameindex = myindex; @@ -1198,8 +1205,6 @@ checkframes(struct combostr *cbp, struct return -1; /* invalid overlap */ vertices->o_intersect = n; - vertices->o_fcombo = lcbp; - vertices->o_link = 0; vertices->o_off = (n - cbp->c_vertex) / dd[cbp->c_dir]; vertices->o_frameindex = 0;
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:41:51 UTC 2022 Modified Files: src/games/gomoku: gomoku.h pickmove.c Log Message: gomoku: remove write-only members from overlap_info Since overlap_info is only used in pickmove.c, move it there. No functional change. In particular, in the middle of a game, gomoku still tends to fall into analysis paralysis, thinking about the best move for more than 3 minutes on modern hardware. Since the algorithm is basically unchanged since the 1990s, it must have been a long waiting time back then, probably an hour per move. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/gomoku/gomoku.h cvs rdiff -u -r1.26 -r1.27 src/games/gomoku/pickmove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:18:36 UTC 2022 Modified Files: src/games/gomoku: gomoku.h pickmove.c Log Message: gomoku: remove column macros Of the 19 macros, only 3 were actually used. Replace their uses with expressions based on the board size. It's a small step to making the board size adjustable. There are still other places using hard-coded numbers. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/games/gomoku/gomoku.h cvs rdiff -u -r1.25 -r1.26 src/games/gomoku/pickmove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/gomoku.h diff -u src/games/gomoku/gomoku.h:1.22 src/games/gomoku/gomoku.h:1.23 --- src/games/gomoku/gomoku.h:1.22 Sun May 15 22:00:11 2022 +++ src/games/gomoku/gomoku.h Sun May 15 22:18:36 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: gomoku.h,v 1.22 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: gomoku.h,v 1.23 2022/05/15 22:18:36 rillig Exp $ */ /* * Copyright (c) 1994 @@ -75,26 +75,6 @@ #define TIE 4 #define SAVE 5 -#define A 1 -#define B 2 -#define C 3 -#define D 4 -#define E 5 -#define F 6 -#define G 7 -#define H 8 -#define J 9 -#define K 10 -#define L 11 -#define M 12 -#define N 13 -#define O 14 -#define P 15 -#define Q 16 -#define R 17 -#define S 18 -#define T 19 - #define PT(x, y) ((x) + BSZ1 * (y)) /* Index: src/games/gomoku/pickmove.c diff -u src/games/gomoku/pickmove.c:1.25 src/games/gomoku/pickmove.c:1.26 --- src/games/gomoku/pickmove.c:1.25 Sun May 15 22:08:05 2022 +++ src/games/gomoku/pickmove.c Sun May 15 22:18:36 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pickmove.c,v 1.25 2022/05/15 22:08:05 rillig Exp $ */ +/* $NetBSD: pickmove.c,v 1.26 2022/05/15 22:18:36 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: pickmove.c,v 1.25 2022/05/15 22:08:05 rillig Exp $"); +__RCSID("$NetBSD: pickmove.c,v 1.26 2022/05/15 22:18:36 rillig Exp $"); #endif #endif /* not lint */ @@ -88,10 +88,10 @@ pickmove(int us) /* first move is easy */ if (movenum == 1) - return PT(K, 10); + return PT((BSZ + 1) / 2, (BSZ + 1) / 2); /* initialize all the board values */ - for (pos = PT(T, 20); pos-- > PT(A, 1); ) { + for (pos = PT(BSZ, BSZ + 1); pos-- > PT(1, 1); ) { sp = &board[pos]; sp->s_combo[BLACK].s = MAXCOMBO + 1; sp->s_combo[WHITE].s = MAXCOMBO + 1; @@ -110,9 +110,9 @@ pickmove(int us) scanframes(WHITE); /* find the spot with the highest value */ - pos = PT(T, 19); + pos = PT(BSZ, BSZ); sp1 = sp2 = &board[pos]; - for ( ; pos-- > PT(A, 1); ) { + for ( ; pos-- > PT(1, 1); ) { sp = &board[pos]; if (sp->s_occ != EMPTY) continue; @@ -352,7 +352,7 @@ scanframes(int color) } /* scan for combos at empty spots */ - for (pos = PT(T, 20); pos-- > PT(A, 1); ) { + for (pos = PT(BSZ, BSZ + 1); pos-- > PT(1, 1); ) { sp = &board[pos]; for (ep = sp->s_empty; ep; ep = nep) { cbp = ep->e_combo; @@ -562,7 +562,7 @@ addframes(int level) /* scan for combos at empty spots */ i = curcolor; - for (pos = PT(T, 20); pos-- > PT(A, 1); ) { + for (pos = PT(BSZ, BSZ + 1); pos-- > PT(1, 1); ) { sp = &board[pos]; for (ep = sp->s_empty; ep; ep = nep) { cbp = ep->e_combo;
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:18:36 UTC 2022 Modified Files: src/games/gomoku: gomoku.h pickmove.c Log Message: gomoku: remove column macros Of the 19 macros, only 3 were actually used. Replace their uses with expressions based on the board size. It's a small step to making the board size adjustable. There are still other places using hard-coded numbers. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/games/gomoku/gomoku.h cvs rdiff -u -r1.25 -r1.26 src/games/gomoku/pickmove.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:08:05 UTC 2022 Modified Files: src/games/gomoku: bdisp.c main.c makemove.c pickmove.c stoc.c Log Message: gomoku: remove redundant parentheses around return values No binary change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/games/gomoku/bdisp.c cvs rdiff -u -r1.29 -r1.30 src/games/gomoku/main.c cvs rdiff -u -r1.12 -r1.13 src/games/gomoku/makemove.c cvs rdiff -u -r1.24 -r1.25 src/games/gomoku/pickmove.c cvs rdiff -u -r1.14 -r1.15 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/bdisp.c diff -u src/games/gomoku/bdisp.c:1.20 src/games/gomoku/bdisp.c:1.21 --- src/games/gomoku/bdisp.c:1.20 Sun May 15 22:00:11 2022 +++ src/games/gomoku/bdisp.c Sun May 15 22:08:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdisp.c,v 1.20 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: bdisp.c,v 1.21 2022/05/15 22:08:05 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdisp.c,v 1.20 2022/05/15 22:00:11 rillig Exp $"); +__RCSID("$NetBSD: bdisp.c,v 1.21 2022/05/15 22:08:05 rillig Exp $"); #endif #endif /* not lint */ @@ -317,7 +317,7 @@ get_line(char *buf, int size) } } *cp = '\0'; - return (c != EOF); + return c != EOF; } /* Index: src/games/gomoku/main.c diff -u src/games/gomoku/main.c:1.29 src/games/gomoku/main.c:1.30 --- src/games/gomoku/main.c:1.29 Sun May 15 22:00:11 2022 +++ src/games/gomoku/main.c Sun May 15 22:08:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.29 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: main.c,v 1.30 2022/05/15 22:08:05 rillig Exp $ */ /* * Copyright (c) 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\ #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: main.c,v 1.29 2022/05/15 22:00:11 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.30 2022/05/15 22:08:05 rillig Exp $"); #endif #endif /* not lint */ @@ -344,7 +344,7 @@ again: } quit(); /* NOTREACHED */ - return (0); + return 0; } static int Index: src/games/gomoku/makemove.c diff -u src/games/gomoku/makemove.c:1.12 src/games/gomoku/makemove.c:1.13 --- src/games/gomoku/makemove.c:1.12 Sun May 15 22:00:11 2022 +++ src/games/gomoku/makemove.c Sun May 15 22:08:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: makemove.c,v 1.12 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: makemove.c,v 1.13 2022/05/15 22:08:05 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)makemove.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: makemove.c,v 1.12 2022/05/15 22:00:11 rillig Exp $"); +__RCSID("$NetBSD: makemove.c,v 1.13 2022/05/15 22:08:05 rillig Exp $"); #endif #endif /* not lint */ @@ -73,18 +73,18 @@ makemove(int us, int mv) /* check for end of game */ if (mv == RESIGN) - return (RESIGN); + return RESIGN; /* check for illegal move */ sp = &board[mv]; if (sp->s_occ != EMPTY) - return (ILLEGAL); + return ILLEGAL; /* make move */ sp->s_occ = us; movelog[movenum - 1] = mv; if (++movenum == BSZ * BSZ) - return (TIE); + return TIE; /* compute new frame values */ sp->s_wval = 0; @@ -211,7 +211,7 @@ makemove(int us, int mv) update_overlap(osp); - return (MOVEOK); + return MOVEOK; } /* Index: src/games/gomoku/pickmove.c diff -u src/games/gomoku/pickmove.c:1.24 src/games/gomoku/pickmove.c:1.25 --- src/games/gomoku/pickmove.c:1.24 Sun May 15 22:00:11 2022 +++ src/games/gomoku/pickmove.c Sun May 15 22:08:05 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pickmove.c,v 1.24 2022/05/15 22:00:11 rillig Exp $ */ +/* $NetBSD: pickmove.c,v 1.25 2022/05/15 22:08:05 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: pickmove.c,v 1.24 2022/05/15 22:00:11 rillig Exp $"); +__RCSID("$NetBSD: pickmove.c,v 1.25 2022/05/15 22:08:05 rillig Exp $"); #endif #endif /* not lint */ @@ -88,7 +88,7 @@ pickmove(int us) /* first move is easy */ if (movenum == 1) - return (PT(K, 10)); + return PT(K, 10); /* initialize all the board values */ for (pos = PT(T, 20); pos-- > PT(A, 1); ) { @@ -173,8 +173,8 @@ pickmove(int us) */ if (Tcp->c.a <= 1 && (Ocp->c.a > 1 || Tcp->c.a + Tcp->c.b < Ocp->c.a + Ocp->c.b)) - return (sp2 - board); - return (sp1 - board); + return sp2 - board; + return sp1 - board; } /* @@ -186,44 +186,44 @@ better(const struct spotstr *sp, const s int them, s, s1; if (sp->s_combo[us].s < sp1->s_combo[us].s) - return (1); + return 1; if (sp->s_combo[us].s != sp1->s_combo[us].s) - return (0); + return 0; if (sp->s_level[us] < sp1->s_level[us]) - return (1); + return 1; if (sp->s_level[us] != sp1->s_level[us]) - return (0); + return 0;
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:08:05 UTC 2022 Modified Files: src/games/gomoku: bdisp.c main.c makemove.c pickmove.c stoc.c Log Message: gomoku: remove redundant parentheses around return values No binary change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/games/gomoku/bdisp.c cvs rdiff -u -r1.29 -r1.30 src/games/gomoku/main.c cvs rdiff -u -r1.12 -r1.13 src/games/gomoku/makemove.c cvs rdiff -u -r1.24 -r1.25 src/games/gomoku/pickmove.c cvs rdiff -u -r1.14 -r1.15 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:00:12 UTC 2022 Modified Files: src/games/gomoku: bdinit.c bdisp.c gomoku.h main.c makemove.c pickmove.c stoc.c Log Message: gomoku: apply some style fixes towards KNF There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/games/gomoku/bdinit.c cvs rdiff -u -r1.19 -r1.20 src/games/gomoku/bdisp.c cvs rdiff -u -r1.21 -r1.22 src/games/gomoku/gomoku.h cvs rdiff -u -r1.28 -r1.29 src/games/gomoku/main.c cvs rdiff -u -r1.11 -r1.12 src/games/gomoku/makemove.c cvs rdiff -u -r1.23 -r1.24 src/games/gomoku/pickmove.c cvs rdiff -u -r1.13 -r1.14 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: rillig Date: Sun May 15 22:00:12 UTC 2022 Modified Files: src/games/gomoku: bdinit.c bdisp.c gomoku.h main.c makemove.c pickmove.c stoc.c Log Message: gomoku: apply some style fixes towards KNF There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/games/gomoku/bdinit.c cvs rdiff -u -r1.19 -r1.20 src/games/gomoku/bdisp.c cvs rdiff -u -r1.21 -r1.22 src/games/gomoku/gomoku.h cvs rdiff -u -r1.28 -r1.29 src/games/gomoku/main.c cvs rdiff -u -r1.11 -r1.12 src/games/gomoku/makemove.c cvs rdiff -u -r1.23 -r1.24 src/games/gomoku/pickmove.c cvs rdiff -u -r1.13 -r1.14 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/bdinit.c diff -u src/games/gomoku/bdinit.c:1.9 src/games/gomoku/bdinit.c:1.10 --- src/games/gomoku/bdinit.c:1.9 Sat Oct 13 20:57:35 2012 +++ src/games/gomoku/bdinit.c Sun May 15 22:00:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $ */ +/* $NetBSD: bdinit.c,v 1.10 2022/05/15 22:00:11 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $"); +__RCSID("$NetBSD: bdinit.c,v 1.10 2022/05/15 22:00:11 rillig Exp $"); #endif #endif /* not lint */ @@ -58,7 +58,7 @@ bdinit(struct spotstr *bp) /* mark the borders as such */ sp = bp; for (i = BSZ2; --i >= 0; sp++) { - sp->s_occ = BORDER; /* top border */ + sp->s_occ = BORDER; /* top border */ sp->s_flags = BFLAGALL; } @@ -73,7 +73,7 @@ bdinit(struct spotstr *bp) if (j < 5) { /* directions 1, 2, 3 are blocked */ sp->s_flags |= (BFLAG << 1) | (BFLAG << 2) | - (BFLAG << 3); +(BFLAG << 3); sp->s_fval[BLACK][1].s = MAXCOMBO; sp->s_fval[BLACK][2].s = MAXCOMBO; sp->s_fval[BLACK][3].s = MAXCOMBO; Index: src/games/gomoku/bdisp.c diff -u src/games/gomoku/bdisp.c:1.19 src/games/gomoku/bdisp.c:1.20 --- src/games/gomoku/bdisp.c:1.19 Sat May 14 16:21:04 2022 +++ src/games/gomoku/bdisp.c Sun May 15 22:00:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bdisp.c,v 1.19 2022/05/14 16:21:04 rillig Exp $ */ +/* $NetBSD: bdisp.c,v 1.20 2022/05/15 22:00:11 rillig Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdisp.c,v 1.19 2022/05/14 16:21:04 rillig Exp $"); +__RCSID("$NetBSD: bdisp.c,v 1.20 2022/05/15 22:00:11 rillig Exp $"); #endif #endif /* not lint */ @@ -133,11 +133,11 @@ bdwho(int update) int i, j; move(21, 0); -printw(" "); + printw(" "); i = strlen(plyr[BLACK]); j = strlen(plyr[WHITE]); if (i + j <= 20) { - move(21, 10 - (i+j)/2); + move(21, 10 - (i + j) / 2); printw("BLACK/%s (*) vs. WHITE/%s (O)", plyr[BLACK], plyr[WHITE]); } else { @@ -317,7 +317,7 @@ get_line(char *buf, int size) } } *cp = '\0'; - return(c != EOF); + return (c != EOF); } /* @@ -336,8 +336,8 @@ get_coord(void) nx = curx; ny = cury; for (;;) { - mvprintw(BSZ3, (BSZ -6)/2, "(%c %d) ", -'A'+ ((curx > 7) ? (curx+1) : curx), cury + 1); + mvprintw(BSZ3, (BSZ - 6) / 2, "(%c %d) ", + 'A' + ((curx > 7) ? (curx + 1) : curx), cury + 1); BGOTO(cury, curx); ch = getch(); @@ -407,7 +407,7 @@ get_coord(void) ny = cury; break; case 'Y': - nx = BSZ + curx - 5; + nx = BSZ + curx - 5; ny = cury + 5; break; case 'B': @@ -453,11 +453,11 @@ get_coord(void) return SAVE; case ' ': case '\r': - (void) mvaddstr(BSZ3, (BSZ -6)/2, " "); - return PT(curx+1,cury+1); - } + (void)mvaddstr(BSZ3, (BSZ - 6) / 2, " "); + return PT(curx + 1, cury + 1); + } - curx = nx % BSZ; - cury = ny % BSZ; -} + curx = nx % BSZ; + cury = ny % BSZ; + } } Index: src/games/gomoku/gomoku.h diff -u src/games/gomoku/gomoku.h:1.21 src/games/gomoku/gomoku.h:1.22 --- src/games/gomoku/gomoku.h:1.21 Sat May 14 16:21:04 2022 +++ src/games/gomoku/gomoku.h Sun May 15 22:00:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: gomoku.h,v 1.21 2022/05/14 16:21:04 rillig Exp $ */ +/* $NetBSD: gomoku.h,v 1.22 2022/05/15 22:00:11 rillig Exp $ */ /* * Copyright (c) 1994 @@ -40,16 +40,16 @@ /* board dimensions */ #define BSZ 19 -#define BSZ1 (BSZ+1) -#define BSZ2 (BSZ+2) -#define BSZ3 (BSZ+3) -#define BSZ4 (BSZ+4) -#define BAREA (BSZ2*BSZ1+1) +#define BSZ1 (BSZ + 1) +#define BSZ2 (BSZ + 2) +#define BSZ3 (BSZ + 3) +#define BSZ4 (BSZ + 4) +#define BAREA (BSZ2 * BSZ1 + 1) -#define TRANSCRIPT_COL 46 /* nec
CVS commit: src/etc/mtree
Module Name:src Committed By: mrg Date: Sun May 15 21:41:56 UTC 2022 Modified Files: src/etc/mtree: NetBSD.dist.aarch64 NetBSD.dist.base NetBSD.dist.i386 NetBSD.dist.x86_64 Log Message: create ./usr/libdata/firmware/radeon same as the non-/usr version should fix builds for non x86/arm64. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/etc/mtree/NetBSD.dist.aarch64 cvs rdiff -u -r1.242 -r1.243 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.3 -r1.4 src/etc/mtree/NetBSD.dist.i386 cvs rdiff -u -r1.15 -r1.16 src/etc/mtree/NetBSD.dist.x86_64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.aarch64 diff -u src/etc/mtree/NetBSD.dist.aarch64:1.8 src/etc/mtree/NetBSD.dist.aarch64:1.9 --- src/etc/mtree/NetBSD.dist.aarch64:1.8 Sun May 15 00:24:14 2022 +++ src/etc/mtree/NetBSD.dist.aarch64 Sun May 15 21:41:56 2022 @@ -1,5 +1,4 @@ -# $NetBSD: NetBSD.dist.aarch64,v 1.8 2022/05/15 00:24:14 mrg Exp $ +# $NetBSD: NetBSD.dist.aarch64,v 1.9 2022/05/15 21:41:56 mrg Exp $ ./usr/include/aarch64 ./usr/include/arm -./usr/libdata/firmware/radeon Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.242 src/etc/mtree/NetBSD.dist.base:1.243 --- src/etc/mtree/NetBSD.dist.base:1.242 Sun Mar 6 17:51:42 2022 +++ src/etc/mtree/NetBSD.dist.base Sun May 15 21:41:56 2022 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.242 2022/03/06 17:51:42 christos Exp $ +# $NetBSD: NetBSD.dist.base,v 1.243 2022/05/15 21:41:56 mrg Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -380,6 +380,7 @@ ./usr/libdata/debug/usr/sbin ./usr/libdata/firmware ./usr/libdata/firmware/bcm43xx +./usr/libdata/firmware/radeon ./usr/libdata/ldscripts ./usr/libdata/lint ./usr/libdata/lint/strict-bool Index: src/etc/mtree/NetBSD.dist.i386 diff -u src/etc/mtree/NetBSD.dist.i386:1.3 src/etc/mtree/NetBSD.dist.i386:1.4 --- src/etc/mtree/NetBSD.dist.i386:1.3 Sun May 15 00:24:14 2022 +++ src/etc/mtree/NetBSD.dist.i386 Sun May 15 21:41:56 2022 @@ -1,5 +1,4 @@ -# $NetBSD: NetBSD.dist.i386,v 1.3 2022/05/15 00:24:14 mrg Exp $ +# $NetBSD: NetBSD.dist.i386,v 1.4 2022/05/15 21:41:56 mrg Exp $ ./usr/include/x86 ./usr/include/xen -./usr/libdata/firmware/radeon Index: src/etc/mtree/NetBSD.dist.x86_64 diff -u src/etc/mtree/NetBSD.dist.x86_64:1.15 src/etc/mtree/NetBSD.dist.x86_64:1.16 --- src/etc/mtree/NetBSD.dist.x86_64:1.15 Sun May 15 00:24:14 2022 +++ src/etc/mtree/NetBSD.dist.x86_64 Sun May 15 21:41:56 2022 @@ -1,8 +1,7 @@ -# $NetBSD: NetBSD.dist.x86_64,v 1.15 2022/05/15 00:24:14 mrg Exp $ +# $NetBSD: NetBSD.dist.x86_64,v 1.16 2022/05/15 21:41:56 mrg Exp $ ./usr/include/dev/nvmm ./usr/include/dev/nvmm/x86 ./usr/include/i386 ./usr/include/x86 ./usr/include/xen -./usr/libdata/firmware/radeon
CVS commit: src/etc/mtree
Module Name:src Committed By: mrg Date: Sun May 15 21:41:56 UTC 2022 Modified Files: src/etc/mtree: NetBSD.dist.aarch64 NetBSD.dist.base NetBSD.dist.i386 NetBSD.dist.x86_64 Log Message: create ./usr/libdata/firmware/radeon same as the non-/usr version should fix builds for non x86/arm64. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/etc/mtree/NetBSD.dist.aarch64 cvs rdiff -u -r1.242 -r1.243 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.3 -r1.4 src/etc/mtree/NetBSD.dist.i386 cvs rdiff -u -r1.15 -r1.16 src/etc/mtree/NetBSD.dist.x86_64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: andvar Date: Sun May 15 20:37:51 UTC 2022 Modified Files: src/lib/libc/gen: randomid.c src/sbin/newfs_udf: udf_core.c src/sys/arch/acorn32/acorn32: rpc_machdep.c src/sys/arch/acorn32/eb7500atx: eb7500atx_machdep.c src/sys/arch/atari/dev: fd.c src/sys/fs/udf: udf_subr.c src/usr.sbin/syslogd: tls.c Log Message: s/wich/which in comments. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/randomid.c cvs rdiff -u -r1.10 -r1.11 src/sbin/newfs_udf/udf_core.c cvs rdiff -u -r1.100 -r1.101 src/sys/arch/acorn32/acorn32/rpc_machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c cvs rdiff -u -r1.91 -r1.92 src/sys/arch/atari/dev/fd.c cvs rdiff -u -r1.169 -r1.170 src/sys/fs/udf/udf_subr.c cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/syslogd/tls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/randomid.c diff -u src/lib/libc/gen/randomid.c:1.15 src/lib/libc/gen/randomid.c:1.16 --- src/lib/libc/gen/randomid.c:1.15 Sat Sep 11 20:28:03 2021 +++ src/lib/libc/gen/randomid.c Sun May 15 20:37:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: randomid.c,v 1.15 2021/09/11 20:28:03 andvar Exp $ */ +/* $NetBSD: randomid.c,v 1.16 2022/05/15 20:37:50 andvar Exp $ */ /* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */ /* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ @@ -83,7 +83,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: randomid.c,v 1.15 2021/09/11 20:28:03 andvar Exp $"); +__RCSID("$NetBSD: randomid.c,v 1.16 2022/05/15 20:37:50 andvar Exp $"); #endif #include "namespace.h" @@ -122,7 +122,7 @@ struct randomid_ctx { #define ru_m ru_conf->rc_m #define ru_pfacts ru_conf->rc_pfacts #define ru_skip ru_conf->rc_skip - long ru_out; /* Time after wich will be reseeded */ + long ru_out; /* Time after which will be reseeded */ u_int32_t ru_counter; u_int32_t ru_msb; Index: src/sbin/newfs_udf/udf_core.c diff -u src/sbin/newfs_udf/udf_core.c:1.10 src/sbin/newfs_udf/udf_core.c:1.11 --- src/sbin/newfs_udf/udf_core.c:1.10 Sat May 7 08:51:32 2022 +++ src/sbin/newfs_udf/udf_core.c Sun May 15 20:37:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_core.c,v 1.10 2022/05/07 08:51:32 reinoud Exp $ */ +/* $NetBSD: udf_core.c,v 1.11 2022/05/15 20:37:50 andvar Exp $ */ /* * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: udf_core.c,v 1.10 2022/05/07 08:51:32 reinoud Exp $"); +__RCSID("$NetBSD: udf_core.c,v 1.11 2022/05/15 20:37:50 andvar Exp $"); #include #include @@ -2435,7 +2435,7 @@ udf_create_new_fe(struct file_entry **fe icb = &fe->icbtag; /* - * Always use strategy type 4 unless on WORM wich we don't support + * Always use strategy type 4 unless on WORM which we don't support * (yet). Fill in defaults and set for internal allocation of data. */ icb->strat_type = udf_rw16(4); @@ -2535,7 +2535,7 @@ udf_create_new_efe(struct extfile_entry icb = &efe->icbtag; /* - * Always use strategy type 4 unless on WORM wich we don't support + * Always use strategy type 4 unless on WORM which we don't support * (yet). Fill in defaults and set for internal allocation of data. */ icb->strat_type = udf_rw16(4); Index: src/sys/arch/acorn32/acorn32/rpc_machdep.c diff -u src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.100 src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.101 --- src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.100 Thu Sep 16 20:17:46 2021 +++ src/sys/arch/acorn32/acorn32/rpc_machdep.c Sun May 15 20:37:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_machdep.c,v 1.100 2021/09/16 20:17:46 andvar Exp $ */ +/* $NetBSD: rpc_machdep.c,v 1.101 2022/05/15 20:37:50 andvar Exp $ */ /* * Copyright (c) 2000-2002 Reinoud Zandijk. @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.100 2021/09/16 20:17:46 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.101 2022/05/15 20:37:50 andvar Exp $"); #include #include @@ -457,7 +457,7 @@ initarm(void *cookie) * virtual address == physical address apart from the areas: * 0x -> 0x000f which is mapped to * top 1MB of physical memory - * 0xf000 -> 0xf0ff wich is mapped to + * 0xf000 -> 0xf0ff which is mapped to * physical address 0x1000 -> 0x10ff * or on a Kinetic: * physical address 0x2040 -> 0x20ff Index: src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c diff -u src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.36 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.37 --- src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c:1.36 Thu Sep 16 20:17:46 2021 +++ src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c Sun May 15 20:37:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: eb7500atx_machdep.c,v 1.36 2021/0
CVS commit: src
Module Name:src Committed By: andvar Date: Sun May 15 20:37:51 UTC 2022 Modified Files: src/lib/libc/gen: randomid.c src/sbin/newfs_udf: udf_core.c src/sys/arch/acorn32/acorn32: rpc_machdep.c src/sys/arch/acorn32/eb7500atx: eb7500atx_machdep.c src/sys/arch/atari/dev: fd.c src/sys/fs/udf: udf_subr.c src/usr.sbin/syslogd: tls.c Log Message: s/wich/which in comments. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/randomid.c cvs rdiff -u -r1.10 -r1.11 src/sbin/newfs_udf/udf_core.c cvs rdiff -u -r1.100 -r1.101 src/sys/arch/acorn32/acorn32/rpc_machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c cvs rdiff -u -r1.91 -r1.92 src/sys/arch/atari/dev/fd.c cvs rdiff -u -r1.169 -r1.170 src/sys/fs/udf/udf_subr.c cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/syslogd/tls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: christos Date: Sun May 15 19:53:27 UTC 2022 Modified Files: src/sbin/cgdconfig: Makefile Log Message: Build argon2 inline so that crunched programs work. I also disabled threads for now; we can put them back if needed. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/cgdconfig/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/cgdconfig/Makefile diff -u src/sbin/cgdconfig/Makefile:1.17 src/sbin/cgdconfig/Makefile:1.18 --- src/sbin/cgdconfig/Makefile:1.17 Sat Nov 27 21:01:30 2021 +++ src/sbin/cgdconfig/Makefile Sun May 15 15:53:27 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2021/11/28 02:01:30 christos Exp $ +# $NetBSD: Makefile,v 1.18 2022/05/15 19:53:27 christos Exp $ RUMPPRG=cgdconfig MAN= cgdconfig.8 @@ -12,10 +12,6 @@ SRCS+= cgdconfig.c \ params.c \ utils.c -.if ${MKARGON2} != "no" -SRCS+= argon2_utils.c -.endif - CPPFLAGS+= -I${.CURDIR} -I. -DYY_NO_INPUT YHEADER=1 @@ -24,15 +20,11 @@ DPADD= ${LIBUTIL} ${LIBCRYPT} ${LIBY} $ LDADD= -lutil -lcrypt -ly -ll .if ${MKARGON2} != "no" -ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2 -ARGON2OBJDIR!= cd ${ARGON2DIR}/lib/libargon2 && ${PRINTOBJDIR} -CPPFLAGS+= -I${NETBSDSRCDIR}/external/apache2/argon2/dist/phc-winner-argon2/include -CPPFLAGS+= -DHAVE_ARGON2 - -PROGDPLIBS+= argon2 ${ARGON2DIR}/lib/libargon2 - -LDADD+= -lpthread -DPADD+= ${LIBPTHREAD} +ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2/dist/phc-winner-argon2 +CPPFLAGS+= -I${ARGON2DIR}/include -I${ARGON2DIR}/src/blake2 +CPPFLAGS+= -DHAVE_ARGON2 -DARGON2_NO_THREADS +.PATH.c: ${ARGON2DIR}/src ${ARGON2DIR}/src/blake2 +SRCS+= argon2_utils.c argon2.c core.c encoding.c ref.c blake2b.c .endif .include
CVS commit: src/sbin/cgdconfig
Module Name:src Committed By: christos Date: Sun May 15 19:53:27 UTC 2022 Modified Files: src/sbin/cgdconfig: Makefile Log Message: Build argon2 inline so that crunched programs work. I also disabled threads for now; we can put them back if needed. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/cgdconfig/Makefile 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: jmcneill Date: Sun May 15 18:27:35 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: Use non-deprecated proplib interfaces. prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/sysinst/disks.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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.78 src/usr.sbin/sysinst/disks.c:1.79 --- src/usr.sbin/sysinst/disks.c:1.78 Sun May 15 14:48:37 2022 +++ src/usr.sbin/sysinst/disks.c Sun May 15 18:27:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.78 2022/05/15 14:48:37 jmcneill Exp $ */ +/* $NetBSD: disks.c,v 1.79 2022/05/15 18:27:35 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -343,9 +343,9 @@ get_descr_drvctl(struct disk_desc *dd) command_dict = prop_dictionary_create(); args_dict = prop_dictionary_create(); - prop_dictionary_set_cstring_nocopy(command_dict, "drvctl-command", + prop_dictionary_set_string_nocopy(command_dict, "drvctl-command", "get-properties"); - prop_dictionary_set_cstring_nocopy(args_dict, "device-name", + prop_dictionary_set_string_nocopy(args_dict, "device-name", dd->dd_name); prop_dictionary_set(command_dict, "drvctl-arguments", args_dict); prop_object_release(args_dict);
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 18:27:35 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: Use non-deprecated proplib interfaces. prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
re: CVS commit: src/distrib/common/bootimage
> > Module Name:src > > Committed By: mrg > > Date: Sun May 15 00:05:24 UTC 2022 > > > > Modified Files: > > src/distrib/common/bootimage: Makefile.bootimage > > > > Log Message: > > allow some invocations of expr(1) to "fail" - expr(1) returns "1" is > > the expression expands to "0" or empty, and sometimes these values end > > up correctly being 0. > > Several values (SWAPSECTORS, EFISECTORS, FATSECTORS, and SWAPCYLINDERS) > that couldbe zero already have '|| true'. Should they be consistent? > (I'm not sure if all should use strict '|| test $$? -eq 1 || exit 1') i use the test -eq 1 method to only match the case expr(1) exists due to "0" or "". manual says: The expr utility exits with one of the following values: 0 the expression is neither an empty string nor 0. 1 the expression is an empty string or 0. 2 the expression is invalid. >2 an error occurred (such as memory allocation failure). i kind of meant to fix the other uses too, thanks for reminding me i wasn't done here :) .mrg.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 17:42:32 UTC 2022 Modified Files: src/usr.sbin/sysinst: net.c Log Message: sysinst: Write custom hostname to rc.conf when using DHCP If the user changes the suggested hostname from DHCP, ensure that the new hostname is written to rc.conf by clearing the appropriate DHCPCONF_* flags. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/net.c diff -u src/usr.sbin/sysinst/net.c:1.41 src/usr.sbin/sysinst/net.c:1.42 --- src/usr.sbin/sysinst/net.c:1.41 Sun May 15 17:02:37 2022 +++ src/usr.sbin/sysinst/net.c Sun May 15 17:42:32 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.41 2022/05/15 17:02:37 jmcneill Exp $ */ +/* $NetBSD: net.c,v 1.42 2022/05/15 17:42:32 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -493,6 +493,7 @@ config_network(void) int pid, status; char **ap, *slcmd[10], *in_buf; char buffer[STRSIZE]; + char hostname[MAXHOSTNAMELEN + 1]; struct statvfs sb; struct net_desc net_devs[MAX_NETS]; menu_ent *net_menu; @@ -657,10 +658,14 @@ again: * discovered on the network may not match the desired values * for the target system. */ + strlcpy(hostname, recombine_host_domain(), MAXHOSTNAMELEN); msg_prompt_add(MSG_net_host, net_host, net_host, sizeof net_host); msg_prompt_add(MSG_net_domain, net_domain, net_domain, sizeof net_domain); + if (strcmp(hostname, recombine_host_domain()) != 0) { + net_dhcpconf &= ~(DHCPCONF_DOMAIN|DHCPCONF_HOST); + } if (!dhcp_config) { /* Manually configure IPv4 */
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 17:42:32 UTC 2022 Modified Files: src/usr.sbin/sysinst: net.c Log Message: sysinst: Write custom hostname to rc.conf when using DHCP If the user changes the suggested hostname from DHCP, ensure that the new hostname is written to rc.conf by clearing the appropriate DHCPCONF_* flags. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 17:02:37 UTC 2022 Modified Files: src/usr.sbin/sysinst: net.c Log Message: sysinst: Prompt for hostname and domain, even when using DHCP. Values discovered from the network may not match desired values for the target system. Always give an opportunity to override them when using DHCP. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 17:02:37 UTC 2022 Modified Files: src/usr.sbin/sysinst: net.c Log Message: sysinst: Prompt for hostname and domain, even when using DHCP. Values discovered from the network may not match desired values for the target system. Always give an opportunity to override them when using DHCP. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/net.c diff -u src/usr.sbin/sysinst/net.c:1.40 src/usr.sbin/sysinst/net.c:1.41 --- src/usr.sbin/sysinst/net.c:1.40 Thu Jan 13 14:47:11 2022 +++ src/usr.sbin/sysinst/net.c Sun May 15 17:02:37 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.40 2022/01/13 14:47:11 nia Exp $ */ +/* $NetBSD: net.c,v 1.41 2022/05/15 17:02:37 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -652,13 +652,15 @@ again: } } - if (!(net_dhcpconf & DHCPCONF_HOST)) - msg_prompt_add(MSG_net_host, net_host, net_host, - sizeof net_host); - - if (!(net_dhcpconf & DHCPCONF_DOMAIN)) - msg_prompt_add(MSG_net_domain, net_domain, net_domain, - sizeof net_domain); + /* + * Prompt for hostname and domain, even when using DHCP. The names + * discovered on the network may not match the desired values + * for the target system. + */ + msg_prompt_add(MSG_net_host, net_host, net_host, + sizeof net_host); + msg_prompt_add(MSG_net_domain, net_domain, net_domain, + sizeof net_domain); if (!dhcp_config) { /* Manually configure IPv4 */
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: riastradh Date: Sun May 15 16:58:28 UTC 2022 Modified Files: src/sys/arch/arm/sunxi: sun8i_crypto.c Log Message: sun8icrypto(4): Switch off polling when ready for interrupts. When I introduced logic to do polling and then interrupts, I accidentally made it switch polling from on to...still on, which had the effect of breaking the logic after sun8i_crypto_attach because only sun8i_crypto_attach actually did polling. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/sunxi/sun8i_crypto.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/arm/sunxi/sun8i_crypto.c diff -u src/sys/arch/arm/sunxi/sun8i_crypto.c:1.30 src/sys/arch/arm/sunxi/sun8i_crypto.c:1.31 --- src/sys/arch/arm/sunxi/sun8i_crypto.c:1.30 Sat Mar 19 11:37:05 2022 +++ src/sys/arch/arm/sunxi/sun8i_crypto.c Sun May 15 16:58:28 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_crypto.c,v 1.30 2022/03/19 11:37:05 riastradh Exp $ */ +/* $NetBSD: sun8i_crypto.c,v 1.31 2022/05/15 16:58:28 riastradh Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.30 2022/03/19 11:37:05 riastradh Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.31 2022/05/15 16:58:28 riastradh Exp $"); #include #include @@ -494,7 +494,7 @@ sun8i_crypto_attach(device_t parent, dev * be from us because we've kept ICR set to 0 to mask all * interrupts, but in case the interrupt vector is shared. */ - atomic_store_relaxed(&sc->sc_polling, true); + atomic_store_relaxed(&sc->sc_polling, false); /* Attach the sysctl. */ sun8i_crypto_sysctl_attach(sc);
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: riastradh Date: Sun May 15 16:58:28 UTC 2022 Modified Files: src/sys/arch/arm/sunxi: sun8i_crypto.c Log Message: sun8icrypto(4): Switch off polling when ready for interrupts. When I introduced logic to do polling and then interrupts, I accidentally made it switch polling from on to...still on, which had the effect of breaking the logic after sun8i_crypto_attach because only sun8i_crypto_attach actually did polling. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/sunxi/sun8i_crypto.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/rasops
Module Name:src Committed By: uwe Date: Sun May 15 16:43:39 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops: fix automagic box chars for stride > 1 on little endian This makes DEC line drawing (acsc) work correctly for "iso" fonts of large sizes, e.g. spleen16x32 on x86. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.127 src/sys/dev/rasops/rasops.c:1.128 --- src/sys/dev/rasops/rasops.c:1.127 Sun May 15 16:12:52 2022 +++ src/sys/dev/rasops/rasops.c Sun May 15 16:43:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $ */ +/* $NetBSD: rasops.c,v 1.128 2022/05/15 16:43:39 uwe Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.128 2022/05/15 16:43:39 uwe Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -1195,6 +1195,11 @@ rasops_make_box_chars_16(struct rasops_i vert_mask = 0xc000U >> ((ri->ri_font->fontwidth >> 1) - 1); hmask_left = 0xff00U << (8 - (ri->ri_font->fontwidth >> 1)); hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1); + + vert_mask = htobe16(vert_mask); + hmask_left = htobe16(hmask_left); + hmask_right = htobe16(hmask_right); + mid = (ri->ri_font->fontheight + 1) >> 1; /* 0x00 would be empty anyway so don't bother */ @@ -1234,6 +1239,7 @@ rasops_make_box_chars_8(struct rasops_in vert_mask = 0xc0U >> ((ri->ri_font->fontwidth >> 1) - 1); hmask_left = 0xf0U << (4 - (ri->ri_font->fontwidth >> 1)); hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1); + mid = (ri->ri_font->fontheight + 1) >> 1; /* 0x00 would be empty anyway so don't bother */ @@ -1273,6 +1279,11 @@ rasops_make_box_chars_32(struct rasops_i vert_mask = 0xc000U >> ((ri->ri_font->fontwidth >> 1) - 1); hmask_left = 0xU << (16 - (ri->ri_font->fontwidth >> 1)); hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1); + + vert_mask = htobe32(vert_mask); + hmask_left = htobe32(hmask_left); + hmask_right = htobe32(hmask_right); + mid = (ri->ri_font->fontheight + 1) >> 1; /* 0x00 would be empty anyway so don't bother */
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: uwe Date: Sun May 15 16:43:39 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops: fix automagic box chars for stride > 1 on little endian This makes DEC line drawing (acsc) work correctly for "iso" fonts of large sizes, e.g. spleen16x32 on x86. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/dev/rasops/rasops.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: jmcneill Date: Sun May 15 16:38:26 UTC 2022 Modified Files: src/usr.sbin/sysinst: configmenu.c msg.mi.en Log Message: sysinst: Enable mDNS lookups via NSS when enabling mdnsd. Add/remove "multicast_dns" to the hosts: line in /etc/nsswitch.conf when toggling the mdnsd rcvar. Change the label from "Enable mdnsd" to "Enable multicast DNS support" to better describe what's going on here. Now when you enable multicast DNS support in the installer, the host will both advertise itself on the network and resolve .local network names. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/sysinst/msg.mi.en Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/configmenu.c diff -u src/usr.sbin/sysinst/configmenu.c:1.15 src/usr.sbin/sysinst/configmenu.c:1.16 --- src/usr.sbin/sysinst/configmenu.c:1.15 Thu Apr 21 17:30:15 2022 +++ src/usr.sbin/sysinst/configmenu.c Sun May 15 16:38:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: configmenu.c,v 1.15 2022/04/21 17:30:15 martin Exp $ */ +/* $NetBSD: configmenu.c,v 1.16 2022/05/15 16:38:25 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -53,6 +53,7 @@ static int set_pkgsrc(struct menudesc *, static void config_list_init(void); static void get_rootsh(void); static int toggle_rcvar(struct menudesc *, void *); +static int toggle_mdnsd(struct menudesc *, void *); static void configmenu_hdr(struct menudesc *, void *); static int check_root_password(void); @@ -100,7 +101,7 @@ configinfo config_list[] = { {MSG_enable_sshd, CONFIGOPT_SSHD, "sshd", toggle_rcvar, NULL}, {MSG_enable_ntpd, CONFIGOPT_NTPD, "ntpd", toggle_rcvar, NULL}, {MSG_run_ntpdate, CONFIGOPT_NTPDATE, "ntpdate", toggle_rcvar, NULL}, - {MSG_enable_mdnsd, CONFIGOPT_MDNSD, "mdnsd", toggle_rcvar, NULL}, + {MSG_enable_mdnsd, CONFIGOPT_MDNSD, "mdnsd", toggle_mdnsd, NULL}, {MSG_enable_xdm, CONFIGOPT_XDM, "xdm", toggle_rcvar, NULL}, {MSG_enable_cgd, CONFIGOPT_CGD, "cgd", toggle_rcvar, NULL}, {MSG_enable_lvm, CONFIGOPT_LVM, "lvm", toggle_rcvar, NULL}, @@ -455,6 +456,37 @@ toggle_rcvar(struct menudesc *menu, void return 0; } +static int +toggle_mdnsd(struct menudesc *menu, void *arg) +{ + configinfo **confp = arg; + int s; + const char *setting, *varname; + + varname = confp[menu->cursel]->rcvar; + + s = check_rcvar(varname); + + /* we're toggling, so invert the sense */ + if (s) { + confp[menu->cursel]->setting = MSG_NO; + setting = "files dns"; + } else { + confp[menu->cursel]->setting = MSG_YES; + setting = "files multicast_dns dns"; + } + + if (logfp) { + fprintf(logfp, "setting hosts: %s\n", setting); + fflush(logfp); + } + replace("/etc/nsswitch.conf", "s/^hosts:.*/hosts:\t\t%s/", setting); + + toggle_rcvar(menu, arg); + + return 0; +} + static void configmenu_hdr(struct menudesc *menu, void *arg) { Index: src/usr.sbin/sysinst/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.38 src/usr.sbin/sysinst/msg.mi.en:1.39 --- src/usr.sbin/sysinst/msg.mi.en:1.38 Thu Apr 21 17:30:15 2022 +++ src/usr.sbin/sysinst/msg.mi.en Sun May 15 16:38:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.38 2022/04/21 17:30:15 martin Exp $ */ +/* $NetBSD: msg.mi.en,v 1.39 2022/05/15 16:38:25 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1158,7 +1158,7 @@ message enable_binpkg {Enable installati message enable_sshd {Enable sshd} message enable_ntpd {Enable ntpd} message run_ntpdate {Run ntpdate at boot} -message enable_mdnsd {Enable mdnsd} +message enable_mdnsd {Enable multicast DNS support} message enable_xdm {Enable xdm} message enable_cgd {Enable cgd} message enable_lvm {Enable lvm}
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 16:38:26 UTC 2022 Modified Files: src/usr.sbin/sysinst: configmenu.c msg.mi.en Log Message: sysinst: Enable mDNS lookups via NSS when enabling mdnsd. Add/remove "multicast_dns" to the hosts: line in /etc/nsswitch.conf when toggling the mdnsd rcvar. Change the label from "Enable mdnsd" to "Enable multicast DNS support" to better describe what's going on here. Now when you enable multicast DNS support in the installer, the host will both advertise itself on the network and resolve .local network names. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/sysinst/msg.mi.en Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/distrib/common/bootimage
mrg@ wrote: > Module Name: src > Committed By: mrg > Date: Sun May 15 00:05:24 UTC 2022 > > Modified Files: > src/distrib/common/bootimage: Makefile.bootimage > > Log Message: > allow some invocations of expr(1) to "fail" - expr(1) returns "1" is > the expression expands to "0" or empty, and sometimes these values end > up correctly being 0. Several values (SWAPSECTORS, EFISECTORS, FATSECTORS, and SWAPCYLINDERS) that couldbe zero already have '|| true'. Should they be consistent? (I'm not sure if all should use strict '|| test $$? -eq 1 || exit 1') --- Izumi Tsutsui
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Sun May 15 16:25:09 UTC 2022 Modified Files: src/lib/libcrypt: Makefile Added Files: src/lib/libcrypt: namespace.h Log Message: PR/56838: David A. Holland: namespace pollution in static libcrypt To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libcrypt/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libcrypt/namespace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcrypt/Makefile diff -u src/lib/libcrypt/Makefile:1.33 src/lib/libcrypt/Makefile:1.34 --- src/lib/libcrypt/Makefile:1.33 Sun Oct 31 23:09:58 2021 +++ src/lib/libcrypt/Makefile Sun May 15 12:25:09 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2021/11/01 03:09:58 agc Exp $ +# $NetBSD: Makefile,v 1.34 2022/05/15 16:25:09 christos Exp $ USE_FORT?= yes # cryptographic software @@ -15,6 +15,8 @@ LIB= crypt SRCS= crypt.c md5crypt.c bcrypt.c crypt-sha1.c util.c pw_gensalt.c SRCS+= hmac_sha1.c +CPPFLAGS+= -include ${.CURDIR}/namespace.h + .if defined(HAVE_ARGON2) ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2 .PATH: ${ARGON2DIR}/dist/phc-winner-argon2/src \ Added files: Index: src/lib/libcrypt/namespace.h diff -u /dev/null src/lib/libcrypt/namespace.h:1.1 --- /dev/null Sun May 15 12:25:09 2022 +++ src/lib/libcrypt/namespace.h Sun May 15 12:25:09 2022 @@ -0,0 +1,94 @@ +/* $NetBSD: namespace.h,v 1.1 2022/05/15 16:25:09 christos Exp $ */ + +/*- + * Copyright (c) 2022 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* argon2b.c */ +#define argon2_ctx __libcrypt_internal_argon2_ctx +#define argon2_encodedlen __libcrypt_internal_argon2_encodedlen +#define argon2_error_message __libcrypt_internal_argon2_error_message +#define argon2_hash __libcrypt_internal_argon2_hash +#define argon2_type2string __libcrypt_internal_argon2_type2string +#define argon2_verify __libcrypt_internal_argon2_verify +#define argon2_verify_ctx __libcrypt_internal_argon2_verify_ctx +#define argon2d_ctx __libcrypt_internal_argon2d_ctx +#define argon2d_hash_encoded __libcrypt_internal_argon2d_hash_encoded +#define argon2d_hash_raw __libcrypt_internal_argon2d_hash_raw +#define argon2d_verify __libcrypt_internal_argon2d_verify +#define argon2d_verify_ctx __libcrypt_internal_argon2d_verify_ctx +#define argon2i_ctx __libcrypt_internal_argon2i_ctx +#define argon2i_hash_encoded __libcrypt_internal_argon2i_hash_encoded +#define argon2i_hash_raw __libcrypt_internal_argon2i_hash_raw +#define argon2i_verify __libcrypt_internal_argon2i_verify +#define argon2i_verify_ctx __libcrypt_internal_argon2i_verify_ctx +#define argon2id_ctx __libcrypt_internal_argon2id_ctx +#define argon2id_hash_encoded __libcrypt_internal_argon2id_hash_encoded +#define argon2id_hash_raw __libcrypt_internal_argon2id_hash_raw +#define argon2id_verify __libcrypt_internal_argon2id_verify +#define argon2id_verify_ctx __libcrypt_internal_argon2id_verify_ctx + +/* blake2b.c */ +#define blake2b __libcrypt_internal_blake2b +#define blake2b_final __libcrypt_internal_blake2b_final +#define blake2b_init __libcrypt_internal_blake2b_init +#define blake2b_init_key __libcrypt_internal_blake2b_init_key +#define blake2b_init_param __libcrypt_internal_blake2b_init_param +#define blake2b_long __libcrypt_internal_blake2b_long +#define blake2b_update __libcrypt_internal_blake2b_update + +/* core.c */ +#define allocate_memory __libcrypt_internal_allocate_memory +#define clear_internal_memory __libcrypt_internal_clear_int
CVS commit: src/lib/libcrypt
Module Name:src Committed By: christos Date: Sun May 15 16:25:09 UTC 2022 Modified Files: src/lib/libcrypt: Makefile Added Files: src/lib/libcrypt: namespace.h Log Message: PR/56838: David A. Holland: namespace pollution in static libcrypt To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libcrypt/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libcrypt/namespace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sun May 15 16:20:10 UTC 2022 Modified Files: src/sys/kern: kern_time.c Log Message: adjtime(2): Handle negative tv_sec and tv_usec. Previously I clamped these to avoid dangerous arithmetic overflow. But I assumed sensible values should be nonnegative. For tv_sec, this assumption was just wrong -- the adjustment may be negative. For tv_usec, this assumption is...not wrong, but also not right. tv_usec is not _supposed_ to be negative (by POSIX, the type need only represent values in [-1, 100]; semantically the member is supposed to be a nonnegative number of microseconds below 100), but ntp abuses it to hold negative values, for reasons unclear -- the same effect could be had by subtracting one from tv_sec, and adding 100 to the negative tv_usec. However, let's not break existing ntp userlands... To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sun May 15 16:20:10 UTC 2022 Modified Files: src/sys/kern: kern_time.c Log Message: adjtime(2): Handle negative tv_sec and tv_usec. Previously I clamped these to avoid dangerous arithmetic overflow. But I assumed sensible values should be nonnegative. For tv_sec, this assumption was just wrong -- the adjustment may be negative. For tv_usec, this assumption is...not wrong, but also not right. tv_usec is not _supposed_ to be negative (by POSIX, the type need only represent values in [-1, 100]; semantically the member is supposed to be a nonnegative number of microseconds below 100), but ntp abuses it to hold negative values, for reasons unclear -- the same effect could be had by subtracting one from tv_sec, and adding 100 to the negative tv_usec. However, let's not break existing ntp userlands... To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/kern/kern_time.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/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.213 src/sys/kern/kern_time.c:1.214 --- src/sys/kern/kern_time.c:1.213 Sun Mar 13 12:21:28 2022 +++ src/sys/kern/kern_time.c Sun May 15 16:20:10 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.213 2022/03/13 12:21:28 riastradh Exp $ */ +/* $NetBSD: kern_time.c,v 1.214 2022/05/15 16:20:10 riastradh Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009, 2020 @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.213 2022/03/13 12:21:28 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.214 2022/05/15 16:20:10 riastradh Exp $"); #include #include @@ -625,9 +625,11 @@ adjtime1(const struct timeval *delta, st */ if (delta->tv_sec > INT64_MAX/100 - 1) { time_adjtime = INT64_MAX; + } else if (delta->tv_sec < INT64_MIN/100 + 1) { + time_adjtime = INT64_MIN; } else { - time_adjtime = MAX(0, delta->tv_sec) * 100 - + MAX(0, MIN(99, delta->tv_usec)); + time_adjtime = delta->tv_sec * 100 + + MAX(-99, MIN(99, delta->tv_usec)); } if (time_adjtime) {
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: uwe Date: Sun May 15 16:12:52 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops_mapchar: cosmetics, same object code. Don't hide the important function call inside an if condition. Don't reuse a variable, changing what it means in the middle of an expression. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.126 src/sys/dev/rasops/rasops.c:1.127 --- src/sys/dev/rasops/rasops.c:1.126 Sun May 15 10:29:20 2022 +++ src/sys/dev/rasops/rasops.c Sun May 15 16:12:52 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $ */ +/* $NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -596,13 +596,13 @@ rasops_mapchar(void *cookie, int c, u_in KASSERT(ri->ri_font != NULL); - if ((c = wsfont_map_unichar(ri->ri_font, c)) < 0 || - !CHAR_IN_FONT(c, PICK_FONT(ri, c))) { + int glyph = wsfont_map_unichar(ri->ri_font, c); + if (glyph < 0 || !CHAR_IN_FONT(glyph, PICK_FONT(ri, glyph))) { *cp = ' '; return 0; } - *cp = c; + *cp = glyph; return 5; }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: uwe Date: Sun May 15 16:12:52 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops_mapchar: cosmetics, same object code. Don't hide the important function call inside an if condition. Don't reuse a variable, changing what it means in the middle of an expression. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/dev/rasops/rasops.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: jmcneill Date: Sun May 15 15:06:59 UTC 2022 Modified Files: src/usr.sbin/sysinst: part_edit.c Log Message: sysinst: Center the select_part_scheme menu horizontally To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/part_edit.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: jmcneill Date: Sun May 15 15:06:59 UTC 2022 Modified Files: src/usr.sbin/sysinst: part_edit.c Log Message: sysinst: Center the select_part_scheme menu horizontally To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/part_edit.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/part_edit.c diff -u src/usr.sbin/sysinst/part_edit.c:1.26 src/usr.sbin/sysinst/part_edit.c:1.27 --- src/usr.sbin/sysinst/part_edit.c:1.26 Sun Dec 5 02:52:17 2021 +++ src/usr.sbin/sysinst/part_edit.c Sun May 15 15:06:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: part_edit.c,v 1.26 2021/12/05 02:52:17 msaitoh Exp $ */ +/* $NetBSD: part_edit.c,v 1.27 2022/05/15 15:06:59 jmcneill Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -1459,7 +1459,7 @@ select_part_scheme( title = msg_string(hdr); } ps_menu = new_menu(title, opt, used, - 5, 5, 0, 0, 0, NULL, NULL, NULL, NULL, MSG_exit_menu_generic); + -1, 5, 0, 0, 0, NULL, NULL, NULL, NULL, MSG_exit_menu_generic); if (ps_menu != -1) process_menu(ps_menu, &selected); out:
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 14:48:37 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: disks: Get disk identify data from drvctl When /dev/drvctl exists, attempt to use the disk-info/type property as a disk's description string. Fallback to ATA / SCSI probing when the identify data is not available through this interface. This has the side-effect of adding descriptions for things like NVMe and SD/eMMC devices. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/sysinst/disks.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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.77 src/usr.sbin/sysinst/disks.c:1.78 --- src/usr.sbin/sysinst/disks.c:1.77 Sun May 15 12:48:25 2022 +++ src/usr.sbin/sysinst/disks.c Sun May 15 14:48:37 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.77 2022/05/15 12:48:25 jmcneill Exp $ */ +/* $NetBSD: disks.c,v 1.78 2022/05/15 14:48:37 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -61,6 +61,8 @@ #include #include +#include + #include "defs.h" #include "md.h" #include "msg_defs.h" @@ -321,12 +323,80 @@ get_descr_ata(struct disk_desc *dd) return 1; } +static int +get_descr_drvctl(struct disk_desc *dd) +{ + prop_dictionary_t command_dict; + prop_dictionary_t args_dict; + prop_dictionary_t results_dict; + prop_dictionary_t props; + int8_t perr; + int error, fd; + bool rv; + char size[5]; + const char *model; + + fd = open("/dev/drvctl", O_RDONLY); + if (fd == -1) + return 0; + + command_dict = prop_dictionary_create(); + args_dict = prop_dictionary_create(); + + prop_dictionary_set_cstring_nocopy(command_dict, "drvctl-command", + "get-properties"); + prop_dictionary_set_cstring_nocopy(args_dict, "device-name", + dd->dd_name); + prop_dictionary_set(command_dict, "drvctl-arguments", args_dict); + prop_object_release(args_dict); + + error = prop_dictionary_sendrecv_ioctl(command_dict, fd, + DRVCTLCOMMAND, &results_dict); + prop_object_release(command_dict); + close(fd); + if (error) + return 0; + + rv = prop_dictionary_get_int8(results_dict, "drvctl-error", &perr); + if (rv == false || perr != 0) { + prop_object_release(results_dict); + return 0; + } + + props = prop_dictionary_get(results_dict, + "drvctl-result-data"); + if (props == NULL) { + prop_object_release(results_dict); + return 0; + } + props = prop_dictionary_get(props, "disk-info"); + if (props == NULL || + !prop_dictionary_get_string(props, "type", &model)) { + prop_object_release(results_dict); + return 0; + } + + humanize_number(size, sizeof(size), + (uint64_t)dd->dd_secsize * (uint64_t)dd->dd_totsec, + "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + + snprintf(dd->dd_descr, sizeof(dd->dd_descr), "%s (%s, %s)", + dd->dd_name, size, model); + + prop_object_release(results_dict); + + return 1; +} + static void get_descr(struct disk_desc *dd) { char size[5]; dd->dd_descr[0] = '\0'; + /* try drvctl first, fallback to direct probing */ + if (get_descr_drvctl(dd)) + return; /* try ATA */ if (get_descr_ata(dd)) return; @@ -334,8 +404,6 @@ get_descr(struct disk_desc *dd) if (get_descr_scsi(dd)) return; - /* XXX: identify for ld @ NVME or microSD */ - /* XXX: get description from raid, cgd, vnd... */ /* punt, just give some generic info */
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 14:48:37 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: disks: Get disk identify data from drvctl When /dev/drvctl exists, attempt to use the disk-info/type property as a disk's description string. Fallback to ATA / SCSI probing when the identify data is not available through this interface. This has the side-effect of adding descriptions for things like NVMe and SD/eMMC devices. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/sysinst/disks.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: jmcneill Date: Sun May 15 12:48:25 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: sysinst: Restore printing disk descriptions, lost in r1.35 To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/sysinst/disks.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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.76 src/usr.sbin/sysinst/disks.c:1.77 --- src/usr.sbin/sysinst/disks.c:1.76 Sat Aug 21 11:55:26 2021 +++ src/usr.sbin/sysinst/disks.c Sun May 15 12:48:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.76 2021/08/21 11:55:26 andvar Exp $ */ +/* $NetBSD: disks.c,v 1.77 2022/05/15 12:48:25 jmcneill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -329,15 +329,15 @@ get_descr(struct disk_desc *dd) /* try ATA */ if (get_descr_ata(dd)) - goto done; + return; /* try SCSI */ if (get_descr_scsi(dd)) - goto done; + return; /* XXX: identify for ld @ NVME or microSD */ /* XXX: get description from raid, cgd, vnd... */ -done: + /* punt, just give some generic info */ humanize_number(size, sizeof(size), (uint64_t)dd->dd_secsize * (uint64_t)dd->dd_totsec,
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: jmcneill Date: Sun May 15 12:48:25 UTC 2022 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: sysinst: Restore printing disk descriptions, lost in r1.35 To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: riastradh Date: Sun May 15 12:45:33 UTC 2022 Modified Files: src/sys/arch/x86/x86: nmi.c Log Message: x86: Use atomic_store_release/atomic_load_consume for nmi_handlers. Simplifies things a bit. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/nmi.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/nmi.c diff -u src/sys/arch/x86/x86/nmi.c:1.5 src/sys/arch/x86/x86/nmi.c:1.6 --- src/sys/arch/x86/x86/nmi.c:1.5 Thu Jun 1 02:45:08 2017 +++ src/sys/arch/x86/x86/nmi.c Sun May 15 12:45:33 2022 @@ -1,4 +1,4 @@ -/* $Id: nmi.c,v 1.5 2017/06/01 02:45:08 chs Exp $ */ +/* $Id: nmi.c,v 1.6 2022/05/15 12:45:33 riastradh Exp $ */ /*- * Copyright (c)2009,2011 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nmi.c,v 1.5 2017/06/01 02:45:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nmi.c,v 1.6 2022/05/15 12:45:33 riastradh Exp $"); /* * nmi dispatcher. @@ -82,8 +82,7 @@ nmi_establish(int (*func)(const struct t mutex_enter(&nmi_list_lock); n->n_next = nmi_handlers; - membar_producer(); /* n->n_next should be visible before nmi_handlers */ - nmi_handlers = n; /* atomic store */ + atomic_store_release(&nmi_handlers, n); mutex_exit(&nmi_list_lock); return n; @@ -121,7 +120,7 @@ nmi_disestablish(nmi_handler_t *handle) panic("%s: invalid handle %p", __func__, handle); } #endif /* defined(DIAGNOSTIC) */ - *pp = n->n_next; /* atomic store */ + atomic_store_relaxed(pp, n->n_next); mutex_exit(&nmi_list_lock); /* mutex_exit implies a store fence */ /* @@ -154,9 +153,9 @@ nmi_dispatch(const struct trapframe *tf) * we are in a dangerous context. (NMI) */ - for (n = nmi_handlers; /* atomic load */ - n != NULL; - membar_consumer(), n = n->n_next) { /* atomic load */ + for (n = atomic_load_consume(&nmi_handlers); + n != NULL; + n = atomic_load_relaxed(&n->n_next)) { handled |= (*n->n_func)(tf, n->n_arg); } return handled;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: riastradh Date: Sun May 15 12:45:33 UTC 2022 Modified Files: src/sys/arch/x86/x86: nmi.c Log Message: x86: Use atomic_store_release/atomic_load_consume for nmi_handlers. Simplifies things a bit. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/nmi.c 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 May 15 12:38:03 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Tickets #1450 and #1451 To generate a diff of this commit: cvs rdiff -u -r1.1.2.91 -r1.1.2.92 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.91 src/doc/CHANGES-9.3:1.1.2.92 --- src/doc/CHANGES-9.3:1.1.2.91 Sat May 14 11:42:17 2022 +++ src/doc/CHANGES-9.3 Sun May 15 12:38:02 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.3,v 1.1.2.91 2022/05/14 11:42:17 martin Exp $ +# $NetBSD: CHANGES-9.3,v 1.1.2.92 2022/05/15 12:38:02 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -1613,3 +1613,17 @@ sbin/bioctl/bioctl.c1.19 bioctl(8): Don't print garbage bv_seconds. [msaitoh, ticket #1449] +sys/arch/luna68k/conf/GENERIC 1.131 +sys/arch/luna68k/conf/INSTALL 1.32 + + Use "options WS_KERNEL_FG=WSCOL_GREEN" as most ports with color + support. + [tsutsui, ticket #1450] + +common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c 1.4 (patch) +common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c 1.4 (patch) +common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c 1.4 (patch) + + PR 56832: fix C implementations of __atomic_compare_exchange*. + [skrll, ticket #1451] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun May 15 12:38:03 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Tickets #1450 and #1451 To generate a diff of this commit: cvs rdiff -u -r1.1.2.91 -r1.1.2.92 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/common/lib/libc/atomic
Module Name:src Committed By: martin Date: Sun May 15 12:37:00 UTC 2022 Modified Files: src/common/lib/libc/atomic [netbsd-9]: atomic_c11_compare_exchange_cas_16.c atomic_c11_compare_exchange_cas_32.c atomic_c11_compare_exchange_cas_8.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1451): common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.4 common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.4 common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.4 PR 56832: fix C implementations of __atomic_compare_exchange* To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.20.1 \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c diff -u src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c:1.2 src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c:1.2.20.1 --- src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c:1.2 Tue Nov 4 19:56:44 2014 +++ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c Sun May 15 12:37:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_c11_compare_exchange_cas_16.c,v 1.2 2014/11/04 19:56:44 joerg Exp $ */ +/* $NetBSD: atomic_c11_compare_exchange_cas_16.c,v 1.2.20.1 2022/05/15 12:37:00 martin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -36,20 +36,25 @@ #endif #include -bool __atomic_compare_exchange_2(volatile uint16_t *, uint16_t *, uint16_t, +bool __atomic_compare_exchange_2(volatile void *, void *, uint16_t, bool, int, int); bool -__atomic_compare_exchange_2(volatile uint16_t *mem, -uint16_t *expected, uint16_t desired, +__atomic_compare_exchange_2(volatile void *mem, +void *expected, uint16_t desired, bool weak, int success, int failure) { - uint16_t old = *expected; + uint16_t * const ep = expected; + const uint16_t old = *ep; /* * Ignore the details (weak, memory model on success and failure) * and just do the cas. If we get here the compiler couldn't * do better and it mostly will not matter at all. */ - return atomic_cas_16(mem, old, desired) == old; + const uint16_t prev = atomic_cas_16(mem, old, desired); + if (prev == old) + return true; + *ep = prev; + return false; } Index: src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c diff -u src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.2 src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.2.20.1 --- src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c:1.2 Tue Nov 4 19:56:44 2014 +++ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c Sun May 15 12:37:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_c11_compare_exchange_cas_32.c,v 1.2 2014/11/04 19:56:44 joerg Exp $ */ +/* $NetBSD: atomic_c11_compare_exchange_cas_32.c,v 1.2.20.1 2022/05/15 12:37:00 martin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -36,20 +36,25 @@ #endif #include -bool __atomic_compare_exchange_4(volatile uint32_t *, uint32_t *, uint32_t, +bool __atomic_compare_exchange_4(volatile void *, void *, uint32_t, bool, int, int); bool -__atomic_compare_exchange_4(volatile uint32_t *mem, -uint32_t *expected, uint32_t desired, +__atomic_compare_exchange_4(volatile void *mem, +void *expected, uint32_t desired, bool weak, int success, int failure) { - uint32_t old = *expected; + uint32_t * const ep = expected; + const uint32_t old = *ep; /* * Ignore the details (weak, memory model on success and failure) * and just do the cas. If we get here the compiler couldn't * do better and it mostly will not matter at all. */ - return atomic_cas_32(mem, old, desired) == old; + const uint32_t prev = atomic_cas_8(mem, old, desired); + if (prev == old) + return true; + *ep = prev; + return false; } Index: src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c diff -u src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c:1.2 src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c:1.2.20.1 --- src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c:1.2 Tue Nov 4 19:56:44 2014 +++ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c Sun May 15 12:37:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_c11_compare_exchange_cas_8.c,v 1.2 2014/11/04 19:56:44 joerg Exp $ */ +/* $NetBSD: atomic_c11_compare_exchange_cas_8.c,v 1.2.20.1 2022/05/15 12:37:00 martin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -36,20 +36,25 @@ #endif #include -bool __atomic_compare_exchange_1(v
CVS commit: [netbsd-9] src/common/lib/libc/atomic
Module Name:src Committed By: martin Date: Sun May 15 12:37:00 UTC 2022 Modified Files: src/common/lib/libc/atomic [netbsd-9]: atomic_c11_compare_exchange_cas_16.c atomic_c11_compare_exchange_cas_32.c atomic_c11_compare_exchange_cas_8.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1451): common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.4 common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.4 common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.4 PR 56832: fix C implementations of __atomic_compare_exchange* To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.20.1 \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c \ src/common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c 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/arch/luna68k/conf
Module Name:src Committed By: martin Date: Sun May 15 12:29:47 UTC 2022 Modified Files: src/sys/arch/luna68k/conf [netbsd-9]: GENERIC INSTALL Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1450): sys/arch/luna68k/conf/INSTALL: revision 1.32 sys/arch/luna68k/conf/GENERIC: revision 1.131 Use "options WS_KERNEL_FG=WSCOL_GREEN" as most ports with color support. For demonstration on nono that supports 4bpp framebuffer recently. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.127.2.1 src/sys/arch/luna68k/conf/GENERIC cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/arch/luna68k/conf/INSTALL 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/luna68k/conf/GENERIC diff -u src/sys/arch/luna68k/conf/GENERIC:1.127 src/sys/arch/luna68k/conf/GENERIC:1.127.2.1 --- src/sys/arch/luna68k/conf/GENERIC:1.127 Fri Apr 26 22:46:03 2019 +++ src/sys/arch/luna68k/conf/GENERIC Sun May 15 12:29:46 2022 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.127 2019/04/26 22:46:03 sevan Exp $ +# $NetBSD: GENERIC,v 1.127.2.1 2022/05/15 12:29:46 martin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/luna68k/conf/std.luna68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.127 $" +#ident "GENERIC-$Revision: 1.127.2.1 $" makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk @@ -128,6 +128,9 @@ options NFS_BOOT_DHCP # superset of BOO options WSEMUL_VT100 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling options WSDISPLAY_COMPAT_RAWKBD +options WS_KERNEL_FG=WSCOL_GREEN +#options WS_KERNEL_BG=WSCOL_BLACK + options FONT_OMRON12x20 config netbsd root on ? type ? Index: src/sys/arch/luna68k/conf/INSTALL diff -u src/sys/arch/luna68k/conf/INSTALL:1.27 src/sys/arch/luna68k/conf/INSTALL:1.27.2.1 --- src/sys/arch/luna68k/conf/INSTALL:1.27 Fri Apr 26 22:46:03 2019 +++ src/sys/arch/luna68k/conf/INSTALL Sun May 15 12:29:46 2022 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.27 2019/04/26 22:46:03 sevan Exp $ +# $NetBSD: INSTALL,v 1.27.2.1 2022/05/15 12:29:46 martin Exp $ # # config for installation ramdisk kernel # @@ -108,6 +108,9 @@ options NFS_BOOT_DHCP # superset of BOO options WSEMUL_VT100 options WSDISPLAY_DEFAULTSCREENS=1 #options WSDISPLAY_COMPAT_USL # wsconscfg VT handling +options WS_KERNEL_FG=WSCOL_GREEN +#options WS_KERNEL_BG=WSCOL_BLACK + options FONT_OMRON12x20 config netbsd root on ? type ?
CVS commit: [netbsd-9] src/sys/arch/luna68k/conf
Module Name:src Committed By: martin Date: Sun May 15 12:29:47 UTC 2022 Modified Files: src/sys/arch/luna68k/conf [netbsd-9]: GENERIC INSTALL Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1450): sys/arch/luna68k/conf/INSTALL: revision 1.32 sys/arch/luna68k/conf/GENERIC: revision 1.131 Use "options WS_KERNEL_FG=WSCOL_GREEN" as most ports with color support. For demonstration on nono that supports 4bpp framebuffer recently. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.127.2.1 src/sys/arch/luna68k/conf/GENERIC cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/arch/luna68k/conf/INSTALL 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 May 15 12:18:18 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1741 To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 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/doc
Module Name:src Committed By: martin Date: Sun May 15 12:18:18 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1741 To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 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.127 src/doc/CHANGES-8.3:1.1.2.128 --- src/doc/CHANGES-8.3:1.1.2.127 Wed May 4 15:37:12 2022 +++ src/doc/CHANGES-8.3 Sun May 15 12:18:18 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.127 2022/05/04 15:37:12 sborrill Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.128 2022/05/15 12:18:18 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -2573,3 +2573,8 @@ sys/net/if_pppoe.c 1.179 mbuf corruption. [martin, ticket #1740] +sbin/bioctl/bioctl.c1.19 + + bioctl(8): don't print garbage bv_seconds. + [msaitoh, ticket #1741] +
CVS commit: [netbsd-8] src/sbin/bioctl
Module Name:src Committed By: martin Date: Sun May 15 12:15:53 UTC 2022 Modified Files: src/sbin/bioctl [netbsd-8]: bioctl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1741): sbin/bioctl/bioctl.c: revision 1.19 bioctl(8): Don't print garbage bv_seconds. This bug was added in bioctl.c rev. 1.7. Before: Volume Status Size Device/LabelLevel Stripe = 0 Online 5.5T mfi0 RAID 564K 65535 seconds After: Volume Status Size Device/LabelLevel Stripe = 0 Online 5.5T mfi0 RAID 564K To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.8.1 src/sbin/bioctl/bioctl.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/sbin/bioctl
Module Name:src Committed By: martin Date: Sun May 15 12:15:53 UTC 2022 Modified Files: src/sbin/bioctl [netbsd-8]: bioctl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1741): sbin/bioctl/bioctl.c: revision 1.19 bioctl(8): Don't print garbage bv_seconds. This bug was added in bioctl.c rev. 1.7. Before: Volume Status Size Device/LabelLevel Stripe = 0 Online 5.5T mfi0 RAID 564K 65535 seconds After: Volume Status Size Device/LabelLevel Stripe = 0 Online 5.5T mfi0 RAID 564K To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.8.1 src/sbin/bioctl/bioctl.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/bioctl/bioctl.c diff -u src/sbin/bioctl/bioctl.c:1.17 src/sbin/bioctl/bioctl.c:1.17.8.1 --- src/sbin/bioctl/bioctl.c:1.17 Fri Jan 16 20:12:28 2015 +++ src/sbin/bioctl/bioctl.c Sun May 15 12:15:53 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $ */ +/* $NetBSD: bioctl.c,v 1.17.8.1 2022/05/15 12:15:53 martin Exp $ */ /* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */ /* @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $"); +__RCSID("$NetBSD: bioctl.c,v 1.17.8.1 2022/05/15 12:15:53 martin Exp $"); #endif #include @@ -245,7 +245,7 @@ bio_show_volumes(struct biotmp *bt) bv.bv_cookie = bl.bl_cookie; bv.bv_volid = bt->volid; bv.bv_percent = -1; - bv.bv_seconds = -1; + bv.bv_seconds = 0; if (ioctl(bt->fd, BIOCVOL, &bv) == -1) err(EXIT_FAILURE, "BIOCVOL");
CVS commit: src/etc/rc.d
Module Name:src Committed By: martin Date: Sun May 15 11:47:42 UTC 2022 Modified Files: src/etc/rc.d: sshd Log Message: PR 56835: fix sshd startup script to only whine about bogus keys it created if it actualy did create keys (one should thing that a function called sshd_keygen() only is called to create keys, but the "precmd" magic makes it run every time sshd is started or stopped). Patch from Tom Lane, with modifications suggested by kre and a minor additional cosemtic change. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/etc/rc.d/sshd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/rc.d
Module Name:src Committed By: martin Date: Sun May 15 11:47:42 UTC 2022 Modified Files: src/etc/rc.d: sshd Log Message: PR 56835: fix sshd startup script to only whine about bogus keys it created if it actualy did create keys (one should thing that a function called sshd_keygen() only is called to create keys, but the "precmd" magic makes it run every time sshd is started or stopped). Patch from Tom Lane, with modifications suggested by kre and a minor additional cosemtic change. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/etc/rc.d/sshd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/sshd diff -u src/etc/rc.d/sshd:1.31 src/etc/rc.d/sshd:1.32 --- src/etc/rc.d/sshd:1.31 Sun Sep 26 10:53:20 2021 +++ src/etc/rc.d/sshd Sun May 15 11:47:42 2022 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: sshd,v 1.31 2021/09/26 10:53:20 martin Exp $ +# $NetBSD: sshd,v 1.32 2022/05/15 11:47:42 martin Exp $ # # PROVIDE: sshd @@ -45,6 +45,7 @@ sshd_keygen() ( keygen="/usr/bin/ssh-keygen" umask 022 + new_key_created=false while read type bits filename; do f="/etc/ssh/$filename" if [ "$1" != "force" ] && [ -f "$f" ]; then @@ -58,14 +59,17 @@ sshd_keygen() esac "${keygen}" -t "${type}" ${bitarg} -f "${f}" -N '' -q && \ printf "ssh-keygen: " && "${keygen}" -f "${f}" -l + new_key_created=true done << _EOF dsa 1024 ssh_host_dsa_key ecdsa 521 ssh_host_ecdsa_key ed25519 -1 ssh_host_ed25519_key rsa 0 ssh_host_rsa_key _EOF + if "${new_key_created}"; then + sshd_motd_unsafe_keys_warning + fi ) - sshd_motd_unsafe_keys_warning } sshd_precmd()
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: uwe Date: Sun May 15 10:29:20 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops: make autogenerated box drawing chars actually used Fix mapchar to use PICK_FONT() to match what putchar does. Otherwise putchar will never get to see the glyph codes for the autogenerated box drawing chars. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/dev/rasops/rasops.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/rasops
Module Name:src Committed By: uwe Date: Sun May 15 10:29:20 UTC 2022 Modified Files: src/sys/dev/rasops: rasops.c Log Message: rasops: make autogenerated box drawing chars actually used Fix mapchar to use PICK_FONT() to match what putchar does. Otherwise putchar will never get to see the glyph codes for the autogenerated box drawing chars. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.125 src/sys/dev/rasops/rasops.c:1.126 --- src/sys/dev/rasops/rasops.c:1.125 Fri Dec 24 18:12:58 2021 +++ src/sys/dev/rasops/rasops.c Sun May 15 10:29:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.125 2021/12/24 18:12:58 jmcneill Exp $ */ +/* $NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.125 2021/12/24 18:12:58 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -597,7 +597,7 @@ rasops_mapchar(void *cookie, int c, u_in KASSERT(ri->ri_font != NULL); if ((c = wsfont_map_unichar(ri->ri_font, c)) < 0 || - !CHAR_IN_FONT(c, ri->ri_font)) { + !CHAR_IN_FONT(c, PICK_FONT(ri, c))) { *cp = ' '; return 0; }
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Sun May 15 08:28:29 UTC 2022 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: Sprinkle some consistency To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.38 src/sys/arch/hppa/conf/GENERIC:1.39 --- src/sys/arch/hppa/conf/GENERIC:1.38 Tue Jun 29 10:22:35 2021 +++ src/sys/arch/hppa/conf/GENERIC Sun May 15 08:28:29 2022 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.38 2021/06/29 10:22:35 nia Exp $ +# $NetBSD: GENERIC,v 1.39 2022/05/15 08:28:29 skrll Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.38 $" +#ident "GENERIC-$Revision: 1.39 $" maxusers 32 # estimated number of users @@ -95,21 +95,21 @@ file-system FDESC # /dev/fd file-system KERNFS # /kern file-system NULLFS # loopback file system file-system OVERLAY # overlay file system -file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) +file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) file-system PROCFS # /proc file-system UMAPFS # NULLFS + uid and gid remapping file-system UNION # union file system -file-system CODA # Coda File System; also needs vcoda (below) -file-system PTYFS # /dev/pts/N support -file-system TMPFS # Efficient memory file-system -#file-system UDF # experimental - OSTA UDF CD/DVD file-system +file-system CODA # Coda File System; also needs vcoda (below) +file-system PTYFS # /dev/pts/N support +file-system TMPFS # Efficient memory file-system +#file-system UDF # experimental - OSTA UDF CD/DVD file-system # File system options options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas #options FFS_EI # FFS Endian Independent support options WAPBL # File system journaling support -#options UFS_DIRHASH # UFS Large Directory Hashing - Experimental +#options UFS_DIRHASH # UFS Large Directory Hashing - Experimental options NFSSERVER # Network File System server #options FFS_NO_SNAPSHOT # No FFS snapshot support options UFS_EXTATTR # Extended attribute support for UFS1 @@ -335,7 +335,7 @@ osiop* at gsc? flags 0x0 # NCR 53c7 siop* at gsc?# NCR 53c720 (Fast/Wide) siop* at mainbus0 # NCR 53c720 (Fast/Wide) siop* at phantomas? # NCR 53c720 (Fast/Wide) -siop* at uturn? # NCR 53c720 (Fast/Wide) +siop* at uturn? # NCR 53c720 (Fast/Wide) # PCI SCSI controllers adv* at pci? dev ? function ? # AdvanSys 1200[A,B], 9xx[U,UA] SCSI @@ -400,7 +400,7 @@ icpsp* at icp? unit ? # SCSI pass-thro # how to set up DMA modes for this chip. This may work, or may cause # a machine hang with some controllers. pciide* at pci? dev ? function ? flags 0x # GENERIC pciide driver -acardide* at pci? dev ? function ? # Acard IDE controllers +acardide* at pci? dev ? function ? # Acard IDE controllers aceride* at pci? dev ? function ? # Acer Lab IDE controllers artsata* at pci? dev ? function ? # Intel i31244 SATA controller cmdide* at pci? dev ? function ? # CMD tech IDE controllers @@ -410,12 +410,12 @@ hptide* at pci? dev ? function ? # Trio nside* at pci? dev ? function ? # National Semiconductor IDE controllers optiide* at pci? dev ? function ? # Opti IDE controllers pdcide* at pci? dev ? function ? # Promise IDE controllers -pdcsata* at pci? dev ? function ? # Promise SATA150 controllers +pdcsata* at pci? dev ? function ? # Promise SATA150 controllers rccide* at pci? dev ? function ? # ServerWorks IDE controllers -satalink* at pci? dev ? function ? # SiI SATALink controllers +satalink* at pci? dev ? function ? # SiI SATALink controllers siside* at pci? dev ? function ? # SiS IDE controllers slide* at pci? dev ? function ? # Symphony Labs IDE controllers -stpcide* at pci? dev ? function ? # STMicro STPC IDE controllers +stpcide* at pci? dev ? function ? # STMicro STPC IDE controllers viaide* at pci? dev ? function ? # VIA/AMD/Nvidia IDE controllers # ATA (IDE) bus support @@ -451,7 +451,7 @@ uk* at atapibus? drive ? flags 0x # # Miscellaneous mass storage devices # GSC floppy -#fdc* at gsc? # PC floppy controller (WD37C65C) +#fdc* at gsc?# PC floppy controller (WD37C65C) #fd* at fdc? drive ? # the drives themselves # Network Interfaces @@ -462,33 +462,33 @@ ie* at gsc?# old 82C5[89]6 Ethernet, iee* at gsc?# 82C596 Ethernet # PCI network interfaces -an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) -atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11) +an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Sun May 15 08:28:29 UTC 2022 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: Sprinkle some consistency To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.