From owner-p4-projects@FreeBSD.ORG Wed Sep 24 17:14:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 228B01065689; Wed, 24 Sep 2008 17:14:11 +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 DBC821065681 for ; Wed, 24 Sep 2008 17:14:10 +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 CB5938FC16 for ; Wed, 24 Sep 2008 17:14:10 +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 m8OHEA1U082039 for ; Wed, 24 Sep 2008 17:14:10 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8OHEAQC082037 for perforce@freebsd.org; Wed, 24 Sep 2008 17:14:10 GMT (envelope-from ed@FreeBSD.org) Date: Wed, 24 Sep 2008 17:14:10 GMT Message-Id: <200809241714.m8OHEAQC082037@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 150389 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: Wed, 24 Sep 2008 17:14:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=150389 Change 150389 by ed@ed_dull on 2008/09/24 17:13:16 Print baud rates in debugging output. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty.c#48 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty.c#48 (text+ko) ==== @@ -1820,6 +1820,16 @@ DB_PRINTSYM(close, th->th_close); } +static void +_db_show_termios(const char *name, const struct termios *t) +{ + + db_printf("%s: iflag 0x%x oflag 0x%x cflag 0x%x " + "lflag 0x%x ispeed %u ospeed %u\n", name, + t->c_iflag, t->c_oflag, t->c_cflag, t->c_lflag, + t->c_ispeed, t->c_ospeed); +} + /* DDB command to show TTY statistics. */ DB_SHOW_COMMAND(tty, db_show_tty) { @@ -1846,9 +1856,7 @@ tp->t_outq.to_nblocks, tp->t_outq.to_quota); db_printf("\tinlow: %zu\n", tp->t_inlow); db_printf("\toutlow: %zu\n", tp->t_outlow); - db_printf("\ttermios: iflag 0x%x oflag 0x%x cflag 0x%x lflag 0x%x\n", - tp->t_termios.c_iflag, tp->t_termios.c_oflag, tp->t_termios.c_cflag, - tp->t_termios.c_lflag); + _db_show_termios("\ttermios", &tp->t_termios); db_printf("\twinsize: row %u col %u xpixel %u ypixel %u\n", tp->t_winsize.ws_row, tp->t_winsize.ws_col, tp->t_winsize.ws_xpixel, tp->t_winsize.ws_ypixel); @@ -1857,22 +1865,10 @@ db_printf("\tcompatflags: 0x%x\n", tp->t_compatflags); /* Init/lock-state devices. */ - db_printf("\ttermios_init_in: iflag 0x%x oflag 0x%x cflag 0x%x lflag " - "0x%x\n", tp->t_termios_init_in.c_iflag, - tp->t_termios_init_in.c_oflag, tp->t_termios_init_in.c_cflag, - tp->t_termios_init_in.c_lflag); - db_printf("\ttermios_init_out: iflag 0x%x oflag 0x%x cflag 0x%x lflag " - "0x%x\n", tp->t_termios_init_out.c_iflag, - tp->t_termios_init_out.c_oflag, tp->t_termios_init_out.c_cflag, - tp->t_termios_init_out.c_lflag); - db_printf("\ttermios_lock_in: iflag 0x%x oflag 0x%x cflag 0x%x lflag " - "0x%x\n", tp->t_termios_lock_in.c_iflag, - tp->t_termios_lock_in.c_oflag, tp->t_termios_lock_in.c_cflag, - tp->t_termios_lock_in.c_lflag); - db_printf("\ttermios_lock_out: iflag 0x%x oflag 0x%x cflag 0x%x lflag " - "0x%x\n", tp->t_termios_lock_out.c_iflag, - tp->t_termios_lock_out.c_oflag, tp->t_termios_lock_out.c_cflag, - tp->t_termios_lock_out.c_lflag); + _db_show_termios("\ttermios_init_in", &tp->t_termios_init_in); + _db_show_termios("\ttermios_init_out", &tp->t_termios_init_out); + _db_show_termios("\ttermios_lock_in", &tp->t_termios_lock_in); + _db_show_termios("\ttermios_lock_out", &tp->t_termios_lock_out); /* Hooks */ _db_show_devsw("\t", tp->t_devsw);