CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:03:50 UTC 2021

Modified Files:
src/lib/libcurses: acs.c add_wchstr.c addch.c addchnstr.c addnstr.c
addwstr.c attributes.c background.c bell.c border.c chgat.c
clrtoeol.c color.c copywin.c cr_put.c curs_set.c curses_private.h
delwin.c erase.c fileio.c get_wch.c get_wstr.c getch.c getstr.c
initscr.c ins_wch.c ins_wstr.c insdelln.c insstr.c keypad.c line.c
meta.c move.c mvwin.c newwin.c overlay.c overwrite.c pause.c
putchar.c refresh.c resize.c ripoffline.c screen.c scroll.c
setterm.c slk.c toucholap.c touchwin.c tscroll.c tstp.c tty.c
underscore.c

Log Message:
Expand __CTRACE() to __nothing #ifndef DEBUG.

Remove most of #ifdef DEBUG around __CTRACE() calls.

No binary changes, except for line numbers for assert().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libcurses/acs.c src/lib/libcurses/addch.c \
src/lib/libcurses/delwin.c src/lib/libcurses/move.c \
src/lib/libcurses/mvwin.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libcurses/add_wchstr.c \
src/lib/libcurses/addchnstr.c src/lib/libcurses/insstr.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libcurses/addnstr.c \
src/lib/libcurses/overlay.c src/lib/libcurses/toucholap.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/addwstr.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/attributes.c \
src/lib/libcurses/clrtoeol.c src/lib/libcurses/resize.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/background.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/bell.c \
src/lib/libcurses/get_wstr.c src/lib/libcurses/meta.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/border.c \
src/lib/libcurses/insdelln.c src/lib/libcurses/overwrite.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libcurses/chgat.c \
src/lib/libcurses/ripoffline.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libcurses/color.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libcurses/copywin.c
cvs rdiff -u -r1.35 -r1.36 src/lib/libcurses/cr_put.c \
src/lib/libcurses/initscr.c src/lib/libcurses/screen.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libcurses/curs_set.c \
src/lib/libcurses/pause.c
cvs rdiff -u -r1.74 -r1.75 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.32 -r1.33 src/lib/libcurses/erase.c \
src/lib/libcurses/touchwin.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/fileio.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libcurses/get_wch.c
cvs rdiff -u -r1.75 -r1.76 src/lib/libcurses/getch.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/getstr.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libcurses/ins_wch.c \
src/lib/libcurses/line.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libcurses/ins_wstr.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libcurses/keypad.c src/lib/libcurses/slk.c \
src/lib/libcurses/tscroll.c
cvs rdiff -u -r1.60 -r1.61 src/lib/libcurses/newwin.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/putchar.c
cvs rdiff -u -r1.113 -r1.114 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libcurses/scroll.c
cvs rdiff -u -r1.69 -r1.70 src/lib/libcurses/setterm.c
cvs rdiff -u -r1.44 -r1.45 src/lib/libcurses/tstp.c
cvs rdiff -u -r1.48 -r1.49 src/lib/libcurses/tty.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libcurses/underscore.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:03:50 UTC 2021

Modified Files:
src/lib/libcurses: acs.c add_wchstr.c addch.c addchnstr.c addnstr.c
addwstr.c attributes.c background.c bell.c border.c chgat.c
clrtoeol.c color.c copywin.c cr_put.c curs_set.c curses_private.h
delwin.c erase.c fileio.c get_wch.c get_wstr.c getch.c getstr.c
initscr.c ins_wch.c ins_wstr.c insdelln.c insstr.c keypad.c line.c
meta.c move.c mvwin.c newwin.c overlay.c overwrite.c pause.c
putchar.c refresh.c resize.c ripoffline.c screen.c scroll.c
setterm.c slk.c toucholap.c touchwin.c tscroll.c tstp.c tty.c
underscore.c

Log Message:
Expand __CTRACE() to __nothing #ifndef DEBUG.

Remove most of #ifdef DEBUG around __CTRACE() calls.

No binary changes, except for line numbers for assert().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libcurses/acs.c src/lib/libcurses/addch.c \
src/lib/libcurses/delwin.c src/lib/libcurses/move.c \
src/lib/libcurses/mvwin.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libcurses/add_wchstr.c \
src/lib/libcurses/addchnstr.c src/lib/libcurses/insstr.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libcurses/addnstr.c \
src/lib/libcurses/overlay.c src/lib/libcurses/toucholap.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/addwstr.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libcurses/attributes.c \
src/lib/libcurses/clrtoeol.c src/lib/libcurses/resize.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/background.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/bell.c \
src/lib/libcurses/get_wstr.c src/lib/libcurses/meta.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/border.c \
src/lib/libcurses/insdelln.c src/lib/libcurses/overwrite.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libcurses/chgat.c \
src/lib/libcurses/ripoffline.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libcurses/color.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libcurses/copywin.c
cvs rdiff -u -r1.35 -r1.36 src/lib/libcurses/cr_put.c \
src/lib/libcurses/initscr.c src/lib/libcurses/screen.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libcurses/curs_set.c \
src/lib/libcurses/pause.c
cvs rdiff -u -r1.74 -r1.75 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.32 -r1.33 src/lib/libcurses/erase.c \
src/lib/libcurses/touchwin.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/fileio.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libcurses/get_wch.c
cvs rdiff -u -r1.75 -r1.76 src/lib/libcurses/getch.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/getstr.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libcurses/ins_wch.c \
src/lib/libcurses/line.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libcurses/ins_wstr.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libcurses/keypad.c src/lib/libcurses/slk.c \
src/lib/libcurses/tscroll.c
cvs rdiff -u -r1.60 -r1.61 src/lib/libcurses/newwin.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/putchar.c
cvs rdiff -u -r1.113 -r1.114 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libcurses/scroll.c
cvs rdiff -u -r1.69 -r1.70 src/lib/libcurses/setterm.c
cvs rdiff -u -r1.44 -r1.45 src/lib/libcurses/tstp.c
cvs rdiff -u -r1.48 -r1.49 src/lib/libcurses/tty.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libcurses/underscore.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/libcurses/acs.c
diff -u src/lib/libcurses/acs.c:1.21 src/lib/libcurses/acs.c:1.22
--- src/lib/libcurses/acs.c:1.21	Fri Jan  6 13:53:18 2017
+++ src/lib/libcurses/acs.c	Mon Sep  6 07:03:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: acs.c,v 1.21 2017/01/06 13:53:18 roy Exp $	*/
+/*	$NetBSD: acs.c,v 1.22 2021/09/06 07:03:49 rin Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: acs.c,v 1.21 2017/01/06 13:53:18 roy Exp $");
+__RCSID("$NetBSD: acs.c,v 1.22 2021/09/06 07:03:49 rin Exp $");
 #endif/* not lint */
 
 #include "curses.h"
@@ -112,9 +112,7 @@ __init_acs(SCREEN *screen)
 		if (acs < NUM_ACS)
 			_acs_char[acs] = term | __ALTCHARSET;
 		aofac++;
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INIT, "__init_acs: %c = %c\n", acs, term);
-#endif
 	}
 
 	if (t_ena_acs(screen->term) != NULL)
@@ -162,9 +160,7 @@ __init_wacs(SCREEN *screen)
 	lstr = nl_langinfo(CODESET);
 	_DIAGASSERT(lstr);
 	if (strcasecmp(lstr, "UTF-8")) {
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INIT, "__init_wacs: setting defaults\n" );
-#endif /* DEBUG */
 		WACS_RARROW->vals[0]  = ( wchar_t )btowc( '>' );
 		WACS_LARROW->vals[0]  = ( wchar_t )btowc( '<' );
 		WACS_UARROW->vals[0]  = ( wchar_t )btowc( '^' );
@@ -189,10 +185,8 @@ __init_wacs(SCREEN *screen)
 		WACS_STERLING->vals[0]= ( wchar_t )btowc( '}' );
 	} else {
 		/* Unicode defaults */
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INIT,
 		"__init_wacs: setting Unicode defaults\n" );
-#endif /* DEBUG */
 		WACS_RARROW->vals[0]  = 0x2192;
 		ACS_RARROW = '+' | __ACS_IS_WACS;
 		WACS_LARROW->vals[0]  

CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:08:25 UTC 2021

Modified Files:
src/lib/libcurses: addbytes.c

Log Message:
Unifdef DEBUG for CTRACE().


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libcurses/addbytes.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/libcurses/addbytes.c
diff -u src/lib/libcurses/addbytes.c:1.57 src/lib/libcurses/addbytes.c:1.58
--- src/lib/libcurses/addbytes.c:1.57	Tue Jun 22 07:49:09 2021
+++ src/lib/libcurses/addbytes.c	Mon Sep  6 07:08:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: addbytes.c,v 1.57 2021/06/22 07:49:09 blymn Exp $	*/
+/*	$NetBSD: addbytes.c,v 1.58 2021/09/06 07:08:25 rin Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c	8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.57 2021/06/22 07:49:09 blymn Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.58 2021/09/06 07:08:25 rin Exp $");
 #endif
 #endif/* not lint */
 
@@ -144,10 +144,8 @@ _cursesi_waddbytes(WINDOW *win, const ch
 	while (count > 0) {
 #ifndef HAVE_WCHAR
 		c = *bytes++;
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT, "ADDBYTES('%c', %x) at (%d, %d)\n",
 		c, attr, *py, *px);
-#endif
 		err = _cursesi_addbyte(win, &lp, py, px, c, attr, char_interp);
 		count--;
 #else
@@ -171,11 +169,9 @@ _cursesi_waddbytes(WINDOW *win, const ch
 			break;
 		}
 
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT,
 		"ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n",
 		(unsigned)wc, unctrl((unsigned)wc), attr, *py, *px, n);
-#endif
 		cc.vals[0] = wc;
 		cc.elements = 1;
 		cc.attributes = attr;
@@ -250,19 +246,15 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 		}
 	}
 
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT, "ADDBYTES(%p, %d, %d)\n", win, *y, *x);
-#endif
 
 	if (char_interp && ((*lp)->flags & __ISPASTEOL)) {
 		*x = 0;
 		(*lp)->flags &= ~__ISPASTEOL;
 		if (*y == win->scr_b) {
-#ifdef DEBUG
 			__CTRACE(__CTRACE_INPUT,
  "ADDBYTES - on bottom "
  "of scrolling region\n");
-#endif
 			if (!(win->flags & __SCROLLOK))
 return ERR;
 			scroll(win);
@@ -274,12 +266,10 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 			return OK;
 	}
 
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT,
 		 "ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
 		 *y, *x, *win->alines[*y]->firstchp,
 		 *win->alines[*y]->lastchp);
-#endif
 
 	attributes = (win->wattr | attr) & (__ATTRIBUTES & ~__COLOR);
 	if (attr & __COLOR)
@@ -302,12 +292,10 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 		*(*lp)->firstchp = newx;
 	if (newx > *(*lp)->lastchp)
 		*(*lp)->lastchp = newx;
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT, "ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
 		 *(*lp)->firstchp, *(*lp)->lastchp,
 		 *(*lp)->firstchp - win->ch_off,
 		 *(*lp)->lastchp - win->ch_off);
-#endif
 	if (win->bch != ' ' && c == ' ')
 		(*lp)->line[*x].ch = win->bch;
 	else
@@ -324,12 +312,10 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 	else
 		(*x)++;
 
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT,
 		 "ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d\n",
 		 *y, *x, *win->alines[*y]->firstchp,
 		 *win->alines[*y]->lastchp);
-#endif
 	__sync(win);
 	return OK;
 }
@@ -405,11 +391,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 
 	/* check for non-spacing character */
 	if (!wcwidth(wch->vals[0])) {
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT,
 			 "_cursesi_addwchar: char '%c' is non-spacing\n",
 			 wch->vals[0]);
-#endif /* DEBUG */
 		cw = WCOL(*lp);
 		if (cw < 0) {
 			lp += cw;
@@ -451,11 +435,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 		sx = *x;
 	} else {
 		for (sx = *x - 1; sx >= max(*x + cw, 0); sx--) {
-#ifdef DEBUG
 			__CTRACE(__CTRACE_INPUT,
  "_cursesi_addwchar: clear current char (%d,%d)\n",
  *y, sx);
-#endif /* DEBUG */
 			tp = &win->alines[*y]->line[sx];
 			tp->ch = (wchar_t) btowc((int) win->bch);
 			if (_cursesi_copy_nsp(win->bnsp, tp) == ERR)
@@ -477,11 +459,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 		cw = 1;
 
 	if (cw > win->maxx - *x) {
-#ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT,
 			 "_cursesi_addwchar: clear EOL (%d,%d)\n",
 			 *y, *x);
-#endif /* DEBUG */
 		if (*y == win->scr_b) {
 			if (!(win->flags & __SCROLLOK))
 return ERR;
@@ -512,11 +492,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 	}
 
 	/* add spacing character */
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT,
 		 "_cursesi_addwchar: add character (%d,%d) 0x%x\n",
 		 *y, *x, wch->vals[0]);
-#endif /* DEBUG */
 	(*lnp)->flags |= __ISDIRTY;
 	newx = *x + win->ch_off;
 	if (newx < *(*lnp)->firstchp)
@@ -541,11 +519,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 
 	SET_WCOL(*lp, cw);
 
-#ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT,
 		 "_cursesi_addwchar: add spacing char 0x%x, attr 0x%x\n",
 		 lp->ch, lp->attr);
-#endif /* DEBUG */
 
 	if (wch->elements > 1) {
 		for (i = 1; i < wch->elements; i++) {
@@ -554,20 +530,16 @@ _cursesi_

CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:08:25 UTC 2021

Modified Files:
src/lib/libcurses: addbytes.c

Log Message:
Unifdef DEBUG for CTRACE().


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libcurses/addbytes.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:45:48 UTC 2021

Modified Files:
src/lib/libcurses: add_wchstr.c addbytes.c addch.c addnstr.c addwstr.c
background.c border.c chgat.c color.c cr_put.c curs_set.c get_wch.c
getch.c ins_wstr.c mvwin.c refresh.c setterm.c slk.c

Log Message:
Style fixes most for __CTRACE().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/add_wchstr.c
cvs rdiff -u -r1.58 -r1.59 src/lib/libcurses/addbytes.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libcurses/addch.c \
src/lib/libcurses/mvwin.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/addnstr.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/addwstr.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libcurses/background.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libcurses/border.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/chgat.c
cvs rdiff -u -r1.43 -r1.44 src/lib/libcurses/color.c
cvs rdiff -u -r1.36 -r1.37 src/lib/libcurses/cr_put.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libcurses/curs_set.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/get_wch.c
cvs rdiff -u -r1.76 -r1.77 src/lib/libcurses/getch.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libcurses/ins_wstr.c
cvs rdiff -u -r1.114 -r1.115 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.70 -r1.71 src/lib/libcurses/setterm.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libcurses/slk.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/libcurses/add_wchstr.c
diff -u src/lib/libcurses/add_wchstr.c:1.9 src/lib/libcurses/add_wchstr.c:1.10
--- src/lib/libcurses/add_wchstr.c:1.9	Mon Sep  6 07:03:49 2021
+++ src/lib/libcurses/add_wchstr.c	Mon Sep  6 07:45:48 2021
@@ -1,4 +1,4 @@
-/*   $NetBSD: add_wchstr.c,v 1.9 2021/09/06 07:03:49 rin Exp $ */
+/*   $NetBSD: add_wchstr.c,v 1.10 2021/09/06 07:45:48 rin Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: add_wchstr.c,v 1.9 2021/09/06 07:03:49 rin Exp $");
+__RCSID("$NetBSD: add_wchstr.c,v 1.10 2021/09/06 07:45:48 rin Exp $");
 #endif/* not lint */
 
 #include 
@@ -244,8 +244,8 @@ wadd_wchnstr(WINDOW *win, const cchar_t 
 			}
 			lp++, ex++;
 			__CTRACE(__CTRACE_INPUT,
-"wadd_wchnstr: ex = %d, x = %d, cw = %d\n",
- ex, x, cw);
+			"wadd_wchnstr: ex = %d, x = %d, cw = %d\n",
+			ex, x, cw);
 			while (ex - x <= cw - 1) {
 np = lp->nsp;
 if (np) {
@@ -264,7 +264,7 @@ wadd_wchnstr(WINDOW *win, const cchar_t 
 		} else {
 			/* non-spacing character */
 			__CTRACE(__CTRACE_INPUT,
-"wadd_wchnstr: as non-spacing char");
+			"wadd_wchnstr: as non-spacing char");
 			for (i = 0; i < chp->elements; i++) {
 np = malloc(sizeof(nschar_t));
 if (!np)

Index: src/lib/libcurses/addbytes.c
diff -u src/lib/libcurses/addbytes.c:1.58 src/lib/libcurses/addbytes.c:1.59
--- src/lib/libcurses/addbytes.c:1.58	Mon Sep  6 07:08:25 2021
+++ src/lib/libcurses/addbytes.c	Mon Sep  6 07:45:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: addbytes.c,v 1.58 2021/09/06 07:08:25 rin Exp $	*/
+/*	$NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c	8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.58 2021/09/06 07:08:25 rin Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $");
 #endif
 #endif/* not lint */
 
@@ -253,8 +253,7 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 		(*lp)->flags &= ~__ISPASTEOL;
 		if (*y == win->scr_b) {
 			__CTRACE(__CTRACE_INPUT,
- "ADDBYTES - on bottom "
- "of scrolling region\n");
+			"ADDBYTES - on bottom of scrolling region\n");
 			if (!(win->flags & __SCROLLOK))
 return ERR;
 			scroll(win);
@@ -267,9 +266,8 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 	}
 
 	__CTRACE(__CTRACE_INPUT,
-		 "ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
-		 *y, *x, *win->alines[*y]->firstchp,
-		 *win->alines[*y]->lastchp);
+	"ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
+	*y, *x, *win->alines[*y]->firstchp, *win->alines[*y]->lastchp);
 
 	attributes = (win->wattr | attr) & (__ATTRIBUTES & ~__COLOR);
 	if (attr & __COLOR)
@@ -293,9 +291,9 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 	if (newx > *(*lp)->lastchp)
 		*(*lp)->lastchp = newx;
 	__CTRACE(__CTRACE_INPUT, "ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
-		 *(*lp)->firstchp, *(*lp)->lastchp,
-		 *(*lp)->firstchp - win->ch_off,
-		 *(*lp)->lastchp - win->ch_off);
+	*(*lp)->firstchp, *(*lp)->lastchp,
+	*(*lp)->firstchp - win->ch_off,
+	*(*lp)->lastchp - win->ch_off);
 	if (win->bch != ' ' && c == ' ')
 		(*lp)->line[*x].ch = win->bch;
 	else
@@ -313,9 +311,8 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 		(*x)++;
 
 	__CTRACE(__CTRACE_INPUT,
-		 "ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d\n",
-		 *y, *x, *win->alines[*y]->firstchp,
-		 *win->a

CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 07:45:48 UTC 2021

Modified Files:
src/lib/libcurses: add_wchstr.c addbytes.c addch.c addnstr.c addwstr.c
background.c border.c chgat.c color.c cr_put.c curs_set.c get_wch.c
getch.c ins_wstr.c mvwin.c refresh.c setterm.c slk.c

Log Message:
Style fixes most for __CTRACE().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/add_wchstr.c
cvs rdiff -u -r1.58 -r1.59 src/lib/libcurses/addbytes.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libcurses/addch.c \
src/lib/libcurses/mvwin.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/addnstr.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/addwstr.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libcurses/background.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libcurses/border.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/chgat.c
cvs rdiff -u -r1.43 -r1.44 src/lib/libcurses/color.c
cvs rdiff -u -r1.36 -r1.37 src/lib/libcurses/cr_put.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libcurses/curs_set.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/get_wch.c
cvs rdiff -u -r1.76 -r1.77 src/lib/libcurses/getch.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libcurses/ins_wstr.c
cvs rdiff -u -r1.114 -r1.115 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.70 -r1.71 src/lib/libcurses/setterm.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libcurses/slk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-09-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Sep  6 08:37:43 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-09-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Sep  6 08:37:43 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.74 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.75
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.74	Sun Jul 18 23:57:13 2021
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Mon Sep  6 08:37:43 2021
@@ -3116,7 +3116,8 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i
 		links = zp->z_links + 1;
 	else
 		links = zp->z_links;
-	vap->va_nlink = MIN(links, LINK_MAX);	/* nlink_t limit! */
+	/* XXX NetBSD: use LINK_MAX when that value matches 32-bit nlink_t */
+	vap->va_nlink = MIN(links, UINT32_MAX);	/* nlink_t limit! */
 	vap->va_size = zp->z_size;
 #ifdef illumos
 	vap->va_rdev = vp->v_rdev;



CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Sep  6 13:11:34 UTC 2021

Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

Log Message:
Make no diff to upstream


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Sep  6 13:11:34 UTC 2021

Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

Log Message:
Make no diff to upstream


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/dns.c
diff -u src/crypto/external/bsd/openssh/dist/dns.c:1.20 src/crypto/external/bsd/openssh/dist/dns.c:1.21
--- src/crypto/external/bsd/openssh/dist/dns.c:1.20	Sat Sep  4 01:47:47 2021
+++ src/crypto/external/bsd/openssh/dist/dns.c	Mon Sep  6 13:11:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dns.c,v 1.20 2021/09/04 01:47:47 ryoon Exp $	*/
+/*	$NetBSD: dns.c,v 1.21 2021/09/06 13:11:34 ryoon Exp $	*/
 /* $OpenBSD: dns.c,v 1.41 2021/07/19 03:13:28 dtucker Exp $ */
 
 /*
@@ -27,7 +27,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: dns.c,v 1.20 2021/09/04 01:47:47 ryoon Exp $");
+__RCSID("$NetBSD: dns.c,v 1.21 2021/09/06 13:11:34 ryoon Exp $");
 #include 
 #include 
 
@@ -267,7 +267,7 @@ verify_host_key_dns(const char *hostname
 		/* Check if the current key is the same as the given key */
 		if (hostkey_algorithm == dnskey_algorithm &&
 		hostkey_digest_len == dnskey_digest_len) {
-			if (!consttime_memequal(hostkey_digest, dnskey_digest,
+			if (timingsafe_bcmp(hostkey_digest, dnskey_digest,
 			hostkey_digest_len) == 0) {
 debug_f("matched SSHFP type %d fptype %d",
 dnskey_algorithm, dnskey_digest_type);



Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Rin Okuyama

On 2021/09/06 22:11, Ryo ONODERA wrote:

Module Name:src
Committed By:   ryoon
Date:   Mon Sep  6 13:11:34 UTC 2021

Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

Log Message:
Make no diff to upstream


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This diff from upstream is intentional. See:

http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7

Thanks,
rin


CVS commit: src/sys

2021-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep  6 14:03:18 UTC 2021

Modified Files:
src/sys/arch/arm/apple: apple_dart.c apple_intc.c apple_pcie.c
apple_wdog.c
src/sys/arch/arm/fdt: pcihost_fdt.c pcihost_fdtvar.h
src/sys/arch/arm/rockchip: rk3399_pcie.c
src/sys/arch/evbarm/conf: files.fdt
src/sys/arch/mips/cavium: mainbus.c
src/sys/dev/fdt: fdtbus.c fdtvar.h
Added Files:
src/sys/arch/evbarm/fdt: fdt_bus_machdep.c

Log Message:
Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/apple/apple_dart.c \
src/sys/arch/arm/apple/apple_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/apple/apple_intc.c \
src/sys/arch/arm/apple/apple_wdog.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/fdt/pcihost_fdt.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/pcihost_fdtvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/rockchip/rk3399_pcie.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/files.fdt
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/fdt/fdt_bus_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/cavium/mainbus.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/fdt/fdtvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-09-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep  6 14:03:18 UTC 2021

Modified Files:
src/sys/arch/arm/apple: apple_dart.c apple_intc.c apple_pcie.c
apple_wdog.c
src/sys/arch/arm/fdt: pcihost_fdt.c pcihost_fdtvar.h
src/sys/arch/arm/rockchip: rk3399_pcie.c
src/sys/arch/evbarm/conf: files.fdt
src/sys/arch/mips/cavium: mainbus.c
src/sys/dev/fdt: fdtbus.c fdtvar.h
Added Files:
src/sys/arch/evbarm/fdt: fdt_bus_machdep.c

Log Message:
Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/apple/apple_dart.c \
src/sys/arch/arm/apple/apple_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/apple/apple_intc.c \
src/sys/arch/arm/apple/apple_wdog.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/fdt/pcihost_fdt.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/pcihost_fdtvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/rockchip/rk3399_pcie.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/files.fdt
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/fdt/fdt_bus_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/cavium/mainbus.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/fdt/fdtvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/apple/apple_dart.c
diff -u src/sys/arch/arm/apple/apple_dart.c:1.2 src/sys/arch/arm/apple/apple_dart.c:1.3
--- src/sys/arch/arm/apple/apple_dart.c:1.2	Sat Sep  4 12:35:31 2021
+++ src/sys/arch/arm/apple/apple_dart.c	Mon Sep  6 14:03:17 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: apple_dart.c,v 1.2 2021/09/04 12:35:31 jmcneill Exp $ */
+/* $NetBSD: apple_dart.c,v 1.3 2021/09/06 14:03:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2021 Mark Kettenis 
@@ -20,7 +20,7 @@
 //#define APPLE_DART_DEBUG
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apple_dart.c,v 1.2 2021/09/04 12:35:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_dart.c,v 1.3 2021/09/06 14:03:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -482,8 +482,7 @@ apple_dart_attach(device_t parent, devic
 	sc->sc_phandle = phandle;
 	sc->sc_dmat = faa->faa_dmat;
 	sc->sc_bst = faa->faa_bst;
-	if (bus_space_map(sc->sc_bst, addr, size,
-	_ARM_BUS_SPACE_MAP_STRONGLY_ORDERED, &sc->sc_bsh) != 0) {
+	if (bus_space_map(sc->sc_bst, addr, size, 0, &sc->sc_bsh) != 0) {
 		aprint_error(": couldn't map registers\n");
 		return;
 	}
Index: src/sys/arch/arm/apple/apple_pcie.c
diff -u src/sys/arch/arm/apple/apple_pcie.c:1.2 src/sys/arch/arm/apple/apple_pcie.c:1.3
--- src/sys/arch/arm/apple/apple_pcie.c:1.2	Sat Sep  4 12:35:31 2021
+++ src/sys/arch/arm/apple/apple_pcie.c	Mon Sep  6 14:03:17 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: apple_pcie.c,v 1.2 2021/09/04 12:35:31 jmcneill Exp $ */
+/* $NetBSD: apple_pcie.c,v 1.3 2021/09/06 14:03:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2021 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apple_pcie.c,v 1.2 2021/09/04 12:35:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_pcie.c,v 1.3 2021/09/06 14:03:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -106,9 +106,13 @@ apple_pcie_attach(device_t parent, devic
 	sc->sc_dev = self;
 	sc->sc_dmat = faa->faa_dmat;
 	sc->sc_bst = faa->faa_bst;
+	/*
+	 * Create a new bus tag for PCIe devices that does not inherit the
+	 * nonposted MMIO flag from the host controller.
+	 */
+	sc->sc_pci_bst = fdtbus_bus_tag_create(phandle, 0);
 	sc->sc_phandle = phandle;
-	error = bus_space_map(sc->sc_bst, cs_addr, cs_size,
-	_ARM_BUS_SPACE_MAP_STRONGLY_ORDERED, &sc->sc_bsh);
+	error = bus_space_map(faa->faa_bst, cs_addr, cs_size, 0, &sc->sc_bsh);
 	if (error) {
 		aprint_error(": couldn't map registers: %d\n", error);
 		return;
@@ -146,8 +150,7 @@ apple_pcie_setup_port(struct apple_pcie_
 		aprint_error(": couldn't get %s regs\n", regname);
 		return;
 	}
-	error = bus_space_map(bst, addr, size,
-	_ARM_BUS_SPACE_MAP_STRONGLY_ORDERED, &bsh);
+	error = bus_space_map(bst, addr, size, 0, &bsh);
 	if (error != 0) {
 		aprint_error(": couldn't map %s regs\n", regname);
 		return;

Index: src/sys/arch/arm/apple/apple_intc.c
diff -u src/sys/arch/arm/apple/apple_intc.c:1.1 src/sys/arch/arm/apple/apple_intc.c:1.2
--- src/sys/arch/arm/apple/apple_intc.c:1.1	Mon Aug 30 23:26:26 2021
+++ src/sys/arch/arm/apple/apple_intc.c	Mon Sep  6 14:03:17 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: apple_intc.c,v 1.1 2021/08/30 23:26:26 jmcneill Exp $ */
+/* $NetBSD: apple_intc.c,v 1.2 2021/09/06 14:03:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2021 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apple_intc.c,v 1.1 2021/08/30 23:

Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Ryo ONODERA
Hi,

Rin Okuyama  writes:

> On 2021/09/06 22:11, Ryo ONODERA wrote:
>> Module Name: src
>> Committed By:ryoon
>> Date:Mon Sep  6 13:11:34 UTC 2021
>> 
>> Modified Files:
>>  src/crypto/external/bsd/openssh/dist: dns.c
>> 
>> Log Message:
>> Make no diff to upstream
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c
>> 
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>
> This diff from upstream is intentional. See:
>
> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7

Thanks for your pointer.


#define timingsafe_bcmp(a, b, c) (!consttime_memequal((a), (b), (c)))

is in src/crypto/external/bsd/openssh/dist/includes.h.

My change still uses consttime_memequal() practically like
other places in OpenSSH.

> Thanks,
> rin

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Rin Okuyama

On 2021/09/06 23:11, Ryo ONODERA wrote:

Hi,

Rin Okuyama  writes:


On 2021/09/06 22:11, Ryo ONODERA wrote:

Module Name:src
Committed By:   ryoon
Date:   Mon Sep  6 13:11:34 UTC 2021

Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

Log Message:
Make no diff to upstream


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


This diff from upstream is intentional. See:

http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7


Thanks for your pointer.


#define timingsafe_bcmp(a, b, c) (!consttime_memequal((a), (b), (c)))

is in src/crypto/external/bsd/openssh/dist/includes.h.

My change still uses consttime_memequal() practically like
other places in OpenSSH.


Ah, I got it. Thanks for explanation, and sorry for the noise!

rin


Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Ryo ONODERA
Hi,

Rin Okuyama  writes:

> On 2021/09/06 23:11, Ryo ONODERA wrote:
>> Hi,
>> 
>> Rin Okuyama  writes:
>> 
>>> On 2021/09/06 22:11, Ryo ONODERA wrote:
 Module Name:   src
 Committed By:  ryoon
 Date:  Mon Sep  6 13:11:34 UTC 2021

 Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

 Log Message:
 Make no diff to upstream


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/dns.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
>>>
>>> This diff from upstream is intentional. See:
>>>
>>> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
>>> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7
>> 
>> Thanks for your pointer.
>> 
>> 
>> #define timingsafe_bcmp(a, b, c) (!consttime_memequal((a), (b), (c)))
>> 
>> is in src/crypto/external/bsd/openssh/dist/includes.h.
>> 
>> My change still uses consttime_memequal() practically like
>> other places in OpenSSH.
>
> Ah, I got it. Thanks for explanation, and sorry for the noise!

Sorry for my less explanation.
I should write more information in the commit message.

Thank you.

> rin

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Taylor R Campbell
> Date: Mon, 6 Sep 2021 22:32:22 +0900
> From: Rin Okuyama 
> 
> On 2021/09/06 22:11, Ryo ONODERA wrote:
> > Module Name:src
> > Committed By:   ryoon
> > Date:   Mon Sep  6 13:11:34 UTC 2021
> > 
> > Modified Files:
> > src/crypto/external/bsd/openssh/dist: dns.c
> > 
> > Log Message:
> > Make no diff to upstream
> 
> This diff from upstream is intentional. See:
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
> http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7

At the time, I think upstream used memcmp, so anything different from
that was a local change.  Now our libc has consttime_memequal, and
upstream uses a similar function called timingsafe_bcmp, so as long as
timingsafe_bcmp is defined in terms of consttime_memequal (and not in
terms of memcmp or bcmp), reducing this local diff strikes me as an
improvement (speaking as the author of the original local change).


Re: CVS commit: src/crypto/external/bsd/openssh/dist

2021-09-06 Thread Rin Okuyama

On 2021/09/06 23:31, Taylor R Campbell wrote:

Date: Mon, 6 Sep 2021 22:32:22 +0900
From: Rin Okuyama 

On 2021/09/06 22:11, Ryo ONODERA wrote:

Module Name:src
Committed By:   ryoon
Date:   Mon Sep  6 13:11:34 UTC 2021

Modified Files:
src/crypto/external/bsd/openssh/dist: dns.c

Log Message:
Make no diff to upstream


This diff from upstream is intentional. See:

http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.6
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/dns.c#rev1.7


At the time, I think upstream used memcmp, so anything different from
that was a local change.  Now our libc has consttime_memequal, and
upstream uses a similar function called timingsafe_bcmp, so as long as
timingsafe_bcmp is defined in terms of consttime_memequal (and not in
terms of memcmp or bcmp), reducing this local diff strikes me as an
improvement (speaking as the author of the original local change).


Yeah, I agree. I didn't notice the definitions in includes.h.
Thanks for your detailed explanation!

rin


CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 15:17:25 UTC 2021

Modified Files:
src/lib/libcurses: Makefile shlib_version
Removed Files:
src/lib/libcurses: fileio.h

Log Message:
Always autogen fileio.h.

Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/lib/libcurses/Makefile
cvs rdiff -u -r1.7 -r0 src/lib/libcurses/fileio.h
cvs rdiff -u -r1.45 -r1.46 src/lib/libcurses/shlib_version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Sep  6 15:17:25 UTC 2021

Modified Files:
src/lib/libcurses: Makefile shlib_version
Removed Files:
src/lib/libcurses: fileio.h

Log Message:
Always autogen fileio.h.

Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/lib/libcurses/Makefile
cvs rdiff -u -r1.7 -r0 src/lib/libcurses/fileio.h
cvs rdiff -u -r1.45 -r1.46 src/lib/libcurses/shlib_version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/Makefile
diff -u src/lib/libcurses/Makefile:1.95 src/lib/libcurses/Makefile:1.96
--- src/lib/libcurses/Makefile:1.95	Sun Jun 27 16:24:52 2021
+++ src/lib/libcurses/Makefile	Mon Sep  6 15:17:25 2021
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.95 2021/06/27 16:24:52 christos Exp $
+#	$NetBSD: Makefile,v 1.96 2021/09/06 15:17:25 rin Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/2/94
 
 .include 
 
 WARNS=	2
 
-CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo
+CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo -I.
 .if defined(DEBUG_CURSES)
 CPPFLAGS+=-g -DDEBUG
 .endif
@@ -215,8 +215,12 @@ MLINKS+= curses_addch.3 addch.3 curses_a
 
 SUBDIR.roff+= PSD.doc
 
+DPSRCS+=	fileio.h
+CLEANFILES+=	fileio.h
+
 fileio.h: shlib_version genfileioh.awk
-	${TOOL_AWK} -f ${.CURDIR}/genfileioh.awk < ${.CURDIR}/shlib_version > ${.CURDIR}/fileio.h
+	${TOOL_AWK} -f ${.CURDIR}/genfileioh.awk < ${.CURDIR}/shlib_version \
+	> ${.TARGET}
 
 .include 
 .include 

Index: src/lib/libcurses/shlib_version
diff -u src/lib/libcurses/shlib_version:1.45 src/lib/libcurses/shlib_version:1.46
--- src/lib/libcurses/shlib_version:1.45	Fri Mar 13 15:19:24 2020
+++ src/lib/libcurses/shlib_version	Mon Sep  6 15:17:25 2021
@@ -1,6 +1,5 @@
-#	$NetBSD: shlib_version,v 1.45 2020/03/13 15:19:24 roy Exp $
+#	$NetBSD: shlib_version,v 1.46 2021/09/06 15:17:25 rin Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
-#	Remember to run `make fileio.h` when changing
 #	Remember to increment the major numbers of libform, libmenu and
 #	libpanel when the libcurses major number increments.
 #



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 17:19:53 UTC 2021

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: key_debug.c

Log Message:
libipsec: fix undefined behavior when calling isprint


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 17:19:53 UTC 2021

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: key_debug.c

Log Message:
libipsec: fix undefined behavior when calling isprint


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c
diff -u src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c:1.15 src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c:1.16
--- src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c:1.15	Fri Jun  5 15:19:08 2020
+++ src/crypto/dist/ipsec-tools/src/libipsec/key_debug.c	Mon Sep  6 17:19:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: key_debug.c,v 1.15 2020/06/05 15:19:08 christos Exp $	*/
+/*	$NetBSD: key_debug.c,v 1.16 2021/09/06 17:19:52 rillig Exp $	*/
 
 /*	$KAME: key_debug.c,v 1.29 2001/08/16 14:25:41 itojun Exp $	*/
 
@@ -299,7 +299,7 @@ kdebug_sadb_identity(struct sadb_ext *ex
 			p = (void *)(id + 1);
 			ep = p + len;
 			for (/*nothing*/; *p && p < ep; p++) {
-if (isprint((int)*p))
+if (isprint((unsigned char)*p))
 	printf("%c", *p & 0xff);
 else
 	printf("\\%03o", *p & 0xff);



CVS commit: src/external/bsd/openldap/dist/libraries/libldap

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 17:34:33 UTC 2021

Modified Files:
src/external/bsd/openldap/dist/libraries/libldap: tls2.c

Log Message:
libldap: fix undefined behavior in ldap_int_tls_connect

The function isdigit must not be called with 'char' as argument.

https://bugs.openldap.org/show_bug.cgi?id=9668


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openldap/dist/libraries/libldap/tls2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/openldap/dist/libraries/libldap

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 17:34:33 UTC 2021

Modified Files:
src/external/bsd/openldap/dist/libraries/libldap: tls2.c

Log Message:
libldap: fix undefined behavior in ldap_int_tls_connect

The function isdigit must not be called with 'char' as argument.

https://bugs.openldap.org/show_bug.cgi?id=9668


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openldap/dist/libraries/libldap/tls2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/openldap/dist/libraries/libldap/tls2.c
diff -u src/external/bsd/openldap/dist/libraries/libldap/tls2.c:1.3 src/external/bsd/openldap/dist/libraries/libldap/tls2.c:1.4
--- src/external/bsd/openldap/dist/libraries/libldap/tls2.c:1.3	Sat Aug 14 16:14:56 2021
+++ src/external/bsd/openldap/dist/libraries/libldap/tls2.c	Mon Sep  6 17:34:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls2.c,v 1.3 2021/08/14 16:14:56 christos Exp $	*/
+/*	$NetBSD: tls2.c,v 1.4 2021/09/06 17:34:33 rillig Exp $	*/
 
 /* tls.c - Handle tls/ssl. */
 /* $OpenLDAP$ */
@@ -19,7 +19,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: tls2.c,v 1.3 2021/08/14 16:14:56 christos Exp $");
+__RCSID("$NetBSD: tls2.c,v 1.4 2021/09/06 17:34:33 rillig Exp $");
 
 #include "portable.h"
 #include "ldap_config.h"
@@ -396,7 +396,7 @@ ldap_int_tls_connect( LDAP *ld, LDAPConn
 break;
 			if ( *c == '.' )
 continue;
-			if ( !isdigit( *c )) {
+			if ( !isdigit( (unsigned char)*c )) {
 numeric = 0;
 break;
 			}



CVS commit: src/usr.bin/make

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 19:38:30 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: var-eval-short.mk

Log Message:
make: fix typos in comments


To generate a diff of this commit:
cvs rdiff -u -r1.948 -r1.949 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/var-eval-short.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 19:38:30 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: var-eval-short.mk

Log Message:
make: fix typos in comments


To generate a diff of this commit:
cvs rdiff -u -r1.948 -r1.949 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/var-eval-short.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.948 src/usr.bin/make/var.c:1.949
--- src/usr.bin/make/var.c:1.948	Wed Aug 25 22:14:38 2021
+++ src/usr.bin/make/var.c	Mon Sep  6 19:38:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.948 2021/08/25 22:14:38 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.949 2021/09/06 19:38:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.948 2021/08/25 22:14:38 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.949 2021/09/06 19:38:30 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1975,7 +1975,7 @@ VarStrftime(const char *fmt, bool zulu, 
  * After parsing, the modifier is evaluated.  The side effects from evaluating
  * nested variable expressions in the modifier text often already happen
  * during parsing though.  For most modifiers this doesn't matter since their
- * only noticeable effect is that the update the value of the expression.
+ * only noticeable effect is that they update the value of the expression.
  * Some modifiers such as ':sh' or '::=' have noticeable side effects though.
  *
  * Evaluating the modifier usually takes the current value of the variable

Index: src/usr.bin/make/unit-tests/var-eval-short.mk
diff -u src/usr.bin/make/unit-tests/var-eval-short.mk:1.5 src/usr.bin/make/unit-tests/var-eval-short.mk:1.6
--- src/usr.bin/make/unit-tests/var-eval-short.mk:1.5	Sun Apr  4 13:35:26 2021
+++ src/usr.bin/make/unit-tests/var-eval-short.mk	Mon Sep  6 19:38:30 2021
@@ -1,4 +1,4 @@
-# $NetBSD: var-eval-short.mk,v 1.5 2021/04/04 13:35:26 rillig Exp $
+# $NetBSD: var-eval-short.mk,v 1.6 2021/09/06 19:38:30 rillig Exp $
 #
 # Tests for each variable modifier to ensure that they only do the minimum
 # necessary computations.  If the result of the expression is not needed, they
@@ -44,13 +44,13 @@ FAIL=	${:!echo unexpected 1>&2!}
 .if 0 && ${:Uword:@var@${FAIL}@}
 .endif
 
-# Before var.c,v 1.877 from 2021-03-14, the modifier ':[...]' did not expand
+# Before var.c 1.877 from 2021-03-14, the modifier ':[...]' did not expand
 # the nested expression ${FAIL} and then tried to parse the unexpanded text,
 # which failed since '$' is not a valid range character.
 .if 0 && ${:Uword:[${FAIL}]}
 .endif
 
-# Before var.c,v 1.867 from 2021-03-14, the modifier ':_' defined the variable
+# Before var.c 1.867 from 2021-03-14, the modifier ':_' defined the variable
 # even though the whole expression should have only been parsed, not
 # evaluated.
 .if 0 && ${:Uword:_=VAR}
@@ -58,7 +58,7 @@ FAIL=	${:!echo unexpected 1>&2!}
 .  error
 .endif
 
-# Before var.c,v 1.856 from 2021-03-14, the modifier ':C' did not expand the
+# Before var.c 1.856 from 2021-03-14, the modifier ':C' did not expand the
 # nested expression ${FAIL} and then tried to compile the unexpanded text as a
 # regular expression, which failed both because of the '{FAIL}', which is not
 # a valid repetition, and because of the '', which are repeated



CVS commit: src/sys

2021-09-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep  6 20:55:08 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: dma.c
src/sys/dev/pci: if_tl.c
src/sys/kern: subr_physmap.c

Log Message:
fix typos in word "segment" and two additional typos in if_tl.c.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hp300/dev/dma.c
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/pci/if_tl.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_physmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-09-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep  6 20:55:08 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: dma.c
src/sys/dev/pci: if_tl.c
src/sys/kern: subr_physmap.c

Log Message:
fix typos in word "segment" and two additional typos in if_tl.c.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hp300/dev/dma.c
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/pci/if_tl.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_physmap.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/hp300/dev/dma.c
diff -u src/sys/arch/hp300/dev/dma.c:1.43 src/sys/arch/hp300/dev/dma.c:1.44
--- src/sys/arch/hp300/dev/dma.c:1.43	Sun Jun  6 04:50:06 2010
+++ src/sys/arch/hp300/dev/dma.c	Mon Sep  6 20:55:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dma.c,v 1.43 2010/06/06 04:50:06 mrg Exp $	*/
+/*	$NetBSD: dma.c,v 1.44 2021/09/06 20:55:08 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.43 2010/06/06 04:50:06 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.44 2021/09/06 20:55:08 andvar Exp $");
 
 #include 	/* XXX param.h includes cpu.h */
 
@@ -609,7 +609,7 @@ dmaintr(void *arg)
 			printf("dma channel %d: intr when armed\n", i);
 #endif
 		/*
-		 * Load the next segemnt, or finish up if we're done.
+		 * Load the next segment, or finish up if we're done.
 		 */
 		dc->dm_cur++;
 		if (dc->dm_cur <= dc->dm_last) {

Index: src/sys/dev/pci/if_tl.c
diff -u src/sys/dev/pci/if_tl.c:1.122 src/sys/dev/pci/if_tl.c:1.123
--- src/sys/dev/pci/if_tl.c:1.122	Tue Jul  7 06:27:37 2020
+++ src/sys/dev/pci/if_tl.c	Mon Sep  6 20:55:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tl.c,v 1.122 2020/07/07 06:27:37 msaitoh Exp $	*/
+/*	$NetBSD: if_tl.c,v 1.123 2021/09/06 20:55:08 andvar Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.122 2020/07/07 06:27:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.123 2021/09/06 20:55:08 andvar Exp $");
 
 #undef TLDEBUG
 #define TL_PRIV_STATS
@@ -1281,7 +1281,7 @@ tbdinit:
 		 if (error == 0)
 			bus_dmamap_unload(sc->tl_dmatag, Tx->m_dmamap);
 		 if (again) {
-			/* already copyed, can't do much more */
+			/* already copied, can't do much more */
 			m_freem(mb_head);
 			goto bad;
 		}
@@ -1327,7 +1327,7 @@ tbdinit:
 	if (size < ETHER_MIN_TX) {
 #ifdef DIAGNOSTIC
 		if (segment >= TL_NSEG) {
-			panic("%s: to much segmets (%d)", __func__, segment);
+			panic("%s: too much segments (%d)", __func__, segment);
 		}
 #endif
 		/*

Index: src/sys/kern/subr_physmap.c
diff -u src/sys/kern/subr_physmap.c:1.4 src/sys/kern/subr_physmap.c:1.5
--- src/sys/kern/subr_physmap.c:1.4	Sun Sep  6 15:27:22 2020
+++ src/sys/kern/subr_physmap.c	Mon Sep  6 20:55:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_physmap.c,v 1.4 2020/09/06 15:27:22 riastradh Exp $	*/
+/*	$NetBSD: subr_physmap.c,v 1.5 2021/09/06 20:55:08 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: subr_physmap.c,v 1.4 2020/09/06 15:27:22 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: subr_physmap.c,v 1.5 2021/09/06 20:55:08 andvar Exp $");
 
 #include 
 #include 
@@ -206,7 +206,7 @@ physmap_create_pagelist(struct vm_page *
 		if (curaddr != lastaddr) {
 			/*
 			 * If the addresses are not the same, we need to use
-			 * a new segemnt.  Set its address and update lastaddr.
+			 * a new segment.  Set its address and update lastaddr.
 			 */
 			ps++;
 			ps->ps_addr = curaddr;



CVS commit: src/usr.bin/make/unit-tests

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 21:18:55 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-subst.mk

Log Message:
tests/make: test modifier ':S' with replacement '&'

Before 2020-08-30, OpenBSD make incorrectly copied the anchors '^' and
'$' to the replacement string.  Just guard against this possible bug.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-subst.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/varmod-subst.mk
diff -u src/usr.bin/make/unit-tests/varmod-subst.mk:1.8 src/usr.bin/make/unit-tests/varmod-subst.mk:1.9
--- src/usr.bin/make/unit-tests/varmod-subst.mk:1.8	Fri May 14 19:37:16 2021
+++ src/usr.bin/make/unit-tests/varmod-subst.mk	Mon Sep  6 21:18:55 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-subst.mk,v 1.8 2021/05/14 19:37:16 rillig Exp $
+# $NetBSD: varmod-subst.mk,v 1.9 2021/09/06 21:18:55 rillig Exp $
 #
 # Tests for the :S,from,to, variable modifier.
 
@@ -86,6 +86,19 @@ WORDS=		sequences of letters
 .  error The '.' seems to be interpreted as a wildcard of some kind.
 .endif
 
+.if ${:Uvalue:S,^val,&,} != "value"
+.  error
+.endif
+.if ${:Uvalue:S,ue$,&,} != "value"
+.  error
+.endif
+.if ${:Uvalue:S,^val,&-&-&,} != "val-val-value"
+.  error
+.endif
+.if ${:Uvalue:S,ue$,&-&-&,} != "value-ue-ue"
+.  error
+.endif
+
 mod-subst:
 	@echo $@:
 	@echo :${:Ua b b c:S,a b,,:Q}:



CVS commit: src/usr.bin/make/unit-tests

2021-09-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Sep  6 21:18:55 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-subst.mk

Log Message:
tests/make: test modifier ':S' with replacement '&'

Before 2020-08-30, OpenBSD make incorrectly copied the anchors '^' and
'$' to the replacement string.  Just guard against this possible bug.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-subst.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-09-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep  6 21:56:04 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: kgdb_hppa.c trap.S
src/sys/arch/hppa/include: trap.h
src/sys/arch/sparc/include: ctlreg.h
src/sys/dev/ic: isp.c
src/sys/dev/pci: neo.c
src/sys/netinet: sctp.h

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/hppa/kgdb_hppa.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/hppa/hppa/trap.S
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/include/trap.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc/include/ctlreg.h
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/ic/isp.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/neo.c
cvs rdiff -u -r1.3 -r1.4 src/sys/netinet/sctp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-09-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep  6 21:56:04 UTC 2021

Modified Files:
src/sys/arch/hppa/hppa: kgdb_hppa.c trap.S
src/sys/arch/hppa/include: trap.h
src/sys/arch/sparc/include: ctlreg.h
src/sys/dev/ic: isp.c
src/sys/dev/pci: neo.c
src/sys/netinet: sctp.h

Log Message:
fix various typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/hppa/kgdb_hppa.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/hppa/hppa/trap.S
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/include/trap.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc/include/ctlreg.h
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/ic/isp.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/neo.c
cvs rdiff -u -r1.3 -r1.4 src/sys/netinet/sctp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hppa/hppa/kgdb_hppa.c
diff -u src/sys/arch/hppa/hppa/kgdb_hppa.c:1.9 src/sys/arch/hppa/hppa/kgdb_hppa.c:1.10
--- src/sys/arch/hppa/hppa/kgdb_hppa.c:1.9	Mon Apr 15 20:45:08 2019
+++ src/sys/arch/hppa/hppa/kgdb_hppa.c	Mon Sep  6 21:56:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kgdb_hppa.c,v 1.9 2019/04/15 20:45:08 skrll Exp $	*/
+/*	$NetBSD: kgdb_hppa.c,v 1.10 2021/09/06 21:56:03 andvar Exp $	*/
 
 /*
  * Copyright (c) 1990, 1993
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.9 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.10 2021/09/06 21:56:03 andvar Exp $");
 
 #include 
 #include 
@@ -121,7 +121,7 @@ kgdb_signal(int type)
 	case T_EXCEPTION:	/* assist exception */
 	case T_TLB_DIRTY:	/* TLB dirty bit */
 	case T_PAGEREF:		/* page reference */
-	case T_HIGHERPL:	/* higher-privelege transfer */
+	case T_HIGHERPL:	/* higher-privilege transfer */
 	case T_LOWERPL:		/* lower-privilege transfer */
 #endif
 	default:

Index: src/sys/arch/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.73 src/sys/arch/hppa/hppa/trap.S:1.74
--- src/sys/arch/hppa/hppa/trap.S:1.73	Mon Sep 14 16:11:00 2020
+++ src/sys/arch/hppa/hppa/trap.S	Mon Sep  6 21:56:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.73 2020/09/14 16:11:00 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.74 2021/09/06 21:56:03 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -662,7 +662,7 @@ os_hpmc:
 	STRAP(tlbd,T_TLB_DIRTY,DTLBPRE)	/* 20. TLB dirty bit trap */
 	ATRAP(pgref,T_PAGEREF)		/* 21. page reference trap */
 	CTRAP(emu,T_EMULATION,)		/* 22. assist emulation trap */
-	ATRAP(hpl,T_HIGHERPL)		/* 23. higher-privelege transfer trap*/
+	ATRAP(hpl,T_HIGHERPL)		/* 23. higher-privilege transfer trap*/
 	ATRAP(lpl,T_LOWERPL)		/* 24. lower-privilege transfer trap */
 	ATRAP(tknbr,T_TAKENBR)		/* 25. taken branch trap */
 	ATRAP(dacc,T_DATACC)		/* 26. data access rights trap */

Index: src/sys/arch/hppa/include/trap.h
diff -u src/sys/arch/hppa/include/trap.h:1.4 src/sys/arch/hppa/include/trap.h:1.5
--- src/sys/arch/hppa/include/trap.h:1.4	Sat Jan 16 10:06:31 2010
+++ src/sys/arch/hppa/include/trap.h	Mon Sep  6 21:56:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.h,v 1.4 2010/01/16 10:06:31 skrll Exp $	*/
+/*	$NetBSD: trap.h,v 1.5 2021/09/06 21:56:03 andvar Exp $	*/
 
 /*	$OpenBSD: trap.h,v 1.8 2000/02/10 20:05:39 mickey Exp $	*/
 
@@ -57,7 +57,7 @@
 #define	T_TLB_DIRTY	20	/* TLB dirty bit */
 #define	T_PAGEREF	21	/* page reference */
 #define	T_EMULATION	22	/* assist emulation */
-#define	T_HIGHERPL	23	/* higher-privelege transfer */
+#define	T_HIGHERPL	23	/* higher-privilege transfer */
 #define	T_LOWERPL	24	/* lower-privilege transfer */
 #define	T_TAKENBR	25	/* taken branch */
 #define	T_DATACC	26	/* data access rights >=7100 */

Index: src/sys/arch/sparc/include/ctlreg.h
diff -u src/sys/arch/sparc/include/ctlreg.h:1.30 src/sys/arch/sparc/include/ctlreg.h:1.31
--- src/sys/arch/sparc/include/ctlreg.h:1.30	Thu Aug 29 05:55:18 2019
+++ src/sys/arch/sparc/include/ctlreg.h	Mon Sep  6 21:56:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.30 2019/08/29 05:55:18 msaitoh Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.31 2021/09/06 21:56:03 andvar Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -382,7 +382,7 @@
 #define SFSR_FT_NONE		(0 << 2) 	/* no fault */
 #define SFSR_FT_INVADDR		(1 << 2)	/* invalid address fault */
 #define SFSR_FT_PROTERR		(2 << 2)	/* protection fault */
-#define SFSR_FT_PRIVERR		(3 << 2)	/* privelege violation */
+#define SFSR_FT_PRIVERR		(3 << 2)	/* privilege violation */
 #define SFSR_FT_TRANSERR	(4 << 2)	/* translation fault */
 #define SFSR_FT_BUSERR		(5 << 2)	/* access bus error */
 #define SFSR_FT_INTERR		(6 << 2)	/* internal error */

Index: src/sys/dev/ic/isp.c
diff -u src/sys/dev/ic/isp.c:1.127 src/sys/dev/ic/isp.c:1.128
--- src/sys/dev/ic/isp.c:1.127	Thu Feb  8 09:05:19 2018
+++ src/sys/dev/ic/isp.c	Mon Sep  6 21:56:04 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.127 2018/02/08 09:05:19 dholland Exp $ */
+/* $NetBSD: isp.c,v 1.128 2021/09/

CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 01:23:10 UTC 2021

Modified Files:
src/lib/libcurses: cur_hash.c curses_private.h newwin.c refresh.c
resize.c

Log Message:
PR lib/56388

For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libcurses/cur_hash.c
cvs rdiff -u -r1.75 -r1.76 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.61 -r1.62 src/lib/libcurses/newwin.c
cvs rdiff -u -r1.115 -r1.116 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libcurses/resize.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 01:23:10 UTC 2021

Modified Files:
src/lib/libcurses: cur_hash.c curses_private.h newwin.c refresh.c
resize.c

Log Message:
PR lib/56388

For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libcurses/cur_hash.c
cvs rdiff -u -r1.75 -r1.76 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.61 -r1.62 src/lib/libcurses/newwin.c
cvs rdiff -u -r1.115 -r1.116 src/lib/libcurses/refresh.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libcurses/resize.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/libcurses/cur_hash.c
diff -u src/lib/libcurses/cur_hash.c:1.13 src/lib/libcurses/cur_hash.c:1.14
--- src/lib/libcurses/cur_hash.c:1.13	Fri Jan  6 09:14:07 2017
+++ src/lib/libcurses/cur_hash.c	Tue Sep  7 01:23:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cur_hash.c,v 1.13 2017/01/06 09:14:07 roy Exp $	*/
+/*	$NetBSD: cur_hash.c,v 1.14 2021/09/07 01:23:09 rin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)cur_hash.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: cur_hash.c,v 1.13 2017/01/06 09:14:07 roy Exp $");
+__RCSID("$NetBSD: cur_hash.c,v 1.14 2021/09/07 01:23:09 rin Exp $");
 #endif
 #endif/* not lint */
 
@@ -63,3 +63,25 @@ __hash_more(const void  *v_s, size_t len
 	}
 	return h;
 }
+
+unsigned int
+__hash_line(const __LDATA *cp, int ncols)
+{
+#ifdef HAVE_WCHAR
+	unsigned int h;
+	const nschar_t *np;
+	int x;
+
+	h = 0;
+	for (x = 0; x < ncols; x++) {
+		h = __hash_more(&cp->ch, sizeof(cp->ch), h);
+		h = __hash_more(&cp->attr, sizeof(cp->attr), h);
+		for (np = cp->nsp; np != NULL; np = np->next)
+			h = __hash_more(&np->ch, sizeof(np->ch), h);
+		cp++;
+	}
+	return h;
+#else
+	return __hash(cp, (size_t)(ncols * __LDATASIZE));
+#endif
+}

Index: src/lib/libcurses/curses_private.h
diff -u src/lib/libcurses/curses_private.h:1.75 src/lib/libcurses/curses_private.h:1.76
--- src/lib/libcurses/curses_private.h:1.75	Mon Sep  6 07:03:49 2021
+++ src/lib/libcurses/curses_private.h	Tue Sep  7 01:23:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_private.h,v 1.75 2021/09/06 07:03:49 rin Exp $	*/
+/*	$NetBSD: curses_private.h,v 1.76 2021/09/07 01:23:09 rin Exp $	*/
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -373,6 +373,7 @@ void _cursesi_resetterm(SCREEN *);
 int  _cursesi_setterm(char *, SCREEN *);
 int	 __delay(void);
 unsigned int	 __hash_more(const void *, size_t, unsigned int);
+unsigned int	 __hash_line(const __LDATA *, int);
 #define	__hash(s, len)	__hash_more((s), (len), 0u)
 void	 __id_subwins(WINDOW *);
 void	 __init_getch(SCREEN *);

Index: src/lib/libcurses/newwin.c
diff -u src/lib/libcurses/newwin.c:1.61 src/lib/libcurses/newwin.c:1.62
--- src/lib/libcurses/newwin.c:1.61	Mon Sep  6 07:03:50 2021
+++ src/lib/libcurses/newwin.c	Tue Sep  7 01:23:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: newwin.c,v 1.61 2021/09/06 07:03:50 rin Exp $	*/
+/*	$NetBSD: newwin.c,v 1.62 2021/09/07 01:23:09 rin Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)newwin.c	8.3 (Berkeley) 7/27/94";
 #else
-__RCSID("$NetBSD: newwin.c,v 1.61 2021/09/06 07:03:50 rin Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.62 2021/09/07 01:23:09 rin Exp $");
 #endif
 #endif/* not lint */
 
@@ -169,8 +169,7 @@ __newwin(SCREEN *screen, int nlines, int
 			SET_WCOL(*sp, 1);
 #endif /* HAVE_WCHAR */
 		}
-		lp->hash = __hash((char *)(void *)lp->line,
-  (size_t)(maxx * __LDATASIZE));
+		lp->hash = __hash_line(lp->line, maxx);
 	}
 	return (win);
 }
@@ -227,11 +226,6 @@ __set_subwin(WINDOW *orig, WINDOW *win)
 {
 	int i;
 	__LINE *lp, *olp;
-#ifdef HAVE_WCHAR
-	__LDATA *cp;
-	int j;
-	nschar_t *np;
-#endif /* HAVE_WCHAR */
 
 	win->ch_off = win->begx - orig->begx;
 	/* Point line pointers to line space. */
@@ -244,26 +238,7 @@ __set_subwin(WINDOW *orig, WINDOW *win)
 		lp->line = &olp->line[win->ch_off];
 		lp->firstchp = &olp->firstch;
 		lp->lastchp = &olp->lastch;
-#ifndef HAVE_WCHAR
-		lp->hash = __hash((char *)(void *)lp->line,
-  (size_t)(win->maxx * __LDATASIZE));
-#else
-		lp->hash = 0;
-		for (cp = lp->line, j = 0; j < win->maxx; j++, cp++) {
-			lp->hash = __hash_more( &cp->ch,
-			sizeof( wchar_t ), lp->hash );
-			lp->hash = __hash_more( &cp->attr,
-			sizeof( wchar_t ), lp->hash );
-			if ( cp->nsp ) {
-np = cp->nsp;
-while ( np ) {
-	lp->hash = __hash_more( &np->ch,
-	sizeof( wchar_t ), lp->hash );
-	np = np->next;
-}
-			}
-		}
-#endif /* HAVE_WCHAR */
+		lp->hash = __hash_line(lp->line, win->maxx);
 	}
 
 	__CTRACE(__CTRACE_WINDOW, "__set_subwin: win->ch_off = %d\n",

Index: src/lib/libcurses/refresh.c
di

CVS commit: src/tests/lib/libcurses/check_files

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 01:29:13 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: addstr2.chk

Log Message:
PR lib/56388

Regen addstr2.chk after fix for the line-hash bug in libcurses.

Now, all t_curses tests successfully pass on all platforms I have tried.

Thanks blymn@ for kind advice!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/addstr2.chk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libcurses/check_files

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 01:29:13 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: addstr2.chk

Log Message:
PR lib/56388

Regen addstr2.chk after fix for the line-hash bug in libcurses.

Now, all t_curses tests successfully pass on all platforms I have tried.

Thanks blymn@ for kind advice!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/addstr2.chk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/check_files/addstr2.chk
diff -u src/tests/lib/libcurses/check_files/addstr2.chk:1.2 src/tests/lib/libcurses/check_files/addstr2.chk:1.3
--- src/tests/lib/libcurses/check_files/addstr2.chk:1.2	Tue Jun 22 07:49:58 2021
+++ src/tests/lib/libcurses/check_files/addstr2.chk	Tue Sep  7 01:29:13 2021
@@ -1 +1 @@
-cup24;1X0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456cup24;1Xclearcup24;76Xa   rmamhsmamcup24;1X
\ No newline at end of file
+cup24;1X0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456cup24;1Xclearcsr1;24Xhomecup24;1Xindn4Xcsr1;24Xhomehomecup24;76Xa   rmamhsmamcup24;1X
\ No newline at end of file



CVS commit: src/sys/dev/pci/ixgbe

2021-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep  7 03:48:01 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 Sprinkle __predict_false() in the RX path.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep  7 03:48:01 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 Sprinkle __predict_false() in the RX path.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.90 src/sys/dev/pci/ixgbe/ix_txrx.c:1.91
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.90	Fri Sep  3 08:57:58 2021
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Tue Sep  7 03:48:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.90 2021/09/03 08:57:58 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.91 2021/09/07 03:48:01 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.90 2021/09/03 08:57:58 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.91 2021/09/07 03:48:01 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1350,7 +1350,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 
 	while (i != limit) {
 		rxbuf = &rxr->rx_buffers[i];
-		if (rxbuf->buf == NULL) {
+		if (__predict_false(rxbuf->buf == NULL)) {
 			mp = ixgbe_getcl();
 			if (mp == NULL) {
 rxr->no_mbuf.ev_count++;
@@ -1369,7 +1369,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 			ixgbe_dmamap_unload(rxr->ptag, rxbuf->pmap);
 			error = bus_dmamap_load_mbuf(rxr->ptag->dt_dmat,
 			rxbuf->pmap, mp, BUS_DMA_NOWAIT);
-			if (error != 0) {
+			if (__predict_false(error != 0)) {
 device_printf(adapter->dev, "Refresh mbufs: "
 "payload dmamap load failure - %d\n",
 error);
@@ -1881,7 +1881,7 @@ ixgbe_rxeof(struct ix_queue *que)
 			newmp = ixgbe_getcl();
 		else
 			newmp = NULL;
-		if (newmp == NULL) {
+		if (__predict_false(newmp == NULL)) {
 			rxr->no_mbuf.ev_count++;
 			/*
 			 * Descriptor initialization is already done by the



CVS commit: src/sys/arch/hpcmips/dev

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 06:36:06 UTC 2021

Modified Files:
src/sys/arch/hpcmips/dev: m38813c.c

Log Message:
Make this compile again.

XXX
Unfortunately, kernel does not boot on TX3922-based machines...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hpcmips/dev/m38813c.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/hpcmips/dev

2021-09-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep  7 06:36:06 UTC 2021

Modified Files:
src/sys/arch/hpcmips/dev: m38813c.c

Log Message:
Make this compile again.

XXX
Unfortunately, kernel does not boot on TX3922-based machines...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hpcmips/dev/m38813c.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/hpcmips/dev/m38813c.c
diff -u src/sys/arch/hpcmips/dev/m38813c.c:1.15 src/sys/arch/hpcmips/dev/m38813c.c:1.16
--- src/sys/arch/hpcmips/dev/m38813c.c:1.15	Sat Aug  7 16:18:54 2021
+++ src/sys/arch/hpcmips/dev/m38813c.c	Tue Sep  7 06:36:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: m38813c.c,v 1.15 2021/08/07 16:18:54 thorpej Exp $ */
+/*	$NetBSD: m38813c.c,v 1.16 2021/09/07 06:36:06 rin Exp $ */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: m38813c.c,v 1.15 2021/08/07 16:18:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m38813c.c,v 1.16 2021/09/07 06:36:06 rin Exp $");
 
 #include "opt_use_poll.h"
 
@@ -42,6 +42,8 @@ __KERNEL_RCSID(0, "$NetBSD: m38813c.c,v 
 #include 
 #include 
 
+#include 
+
 #include 
 #include