From owner-p4-projects@FreeBSD.ORG Sat Dec 27 16:15:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D9341065673; Sat, 27 Dec 2008 16:15:56 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31EC41065674 for ; Sat, 27 Dec 2008 16:15:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 20CD68FC14 for ; Sat, 27 Dec 2008 16:15:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRGFtnO055250 for ; Sat, 27 Dec 2008 16:15:55 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mBRGFtYN055248 for perforce@freebsd.org; Sat, 27 Dec 2008 16:15:55 GMT (envelope-from ed@FreeBSD.org) Date: Sat, 27 Dec 2008 16:15:55 GMT Message-Id: <200812271615.mBRGFtYN055248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 155331 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 16:15:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=155331 Change 155331 by ed@ed_dull on 2008/12/27 16:15:35 - Add a stress testing utility, that throws random data into the emulator. - Fix two crash bugs, caused by the stress testing utility. Affected files ... .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_stress.c#1 add .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_subr.h#20 edit Differences ... ==== //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_subr.h#20 (text+ko) ==== @@ -375,9 +375,13 @@ if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { tr.tr_begin.tp_row = t->t_cursor.tp_row; } else { + teken_pos_t tp; + /* Copy rows up. */ tr.tr_begin.tp_row = t->t_cursor.tp_row + nrows; - teken_funcs_copy(t, &tr, &t->t_cursor); + tp.tp_row = t->t_cursor.tp_row; + tp.tp_col = 0; + teken_funcs_copy(t, &tr, &tp); tr.tr_begin.tp_row = t->t_scrollreg.ts_end - nrows; } @@ -429,7 +433,7 @@ tr.tr_end.tp_row = t->t_cursor.tp_row + 1; if (t->t_cursor.tp_col + ncols >= t->t_winsize.tp_col) - tr.tr_end.tp_col = t->t_winsize.tp_col - 1; + tr.tr_end.tp_col = t->t_winsize.tp_col; else tr.tr_end.tp_col = t->t_cursor.tp_col + ncols;