From owner-p4-projects@FreeBSD.ORG Sat Aug 2 15:37:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13B2F1065683; Sat, 2 Aug 2008 15:37:23 +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 CBF28106566B for ; Sat, 2 Aug 2008 15:37:22 +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 828AB8FC15 for ; Sat, 2 Aug 2008 15:37:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m72FbMTX031739 for ; Sat, 2 Aug 2008 15:37:22 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m72FbMvN031737 for perforce@freebsd.org; Sat, 2 Aug 2008 15:37:22 GMT (envelope-from ed@FreeBSD.org) Date: Sat, 2 Aug 2008 15:37:22 GMT Message-Id: <200808021537.m72FbMvN031737@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 146462 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, 02 Aug 2008 15:37:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=146462 Change 146462 by ed@ed_dull on 2008/08/02 15:36:49 Fix some small style(9) issues in tty.c. Also reduce the baud rate for psuedo-devices to 38400 baud, which means the buffer sizes are similar to the old TTY code. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty.c#10 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty.c#10 (text+ko) ==== @@ -768,6 +768,7 @@ static int ttydevsw_defopen(struct tty *tp) { + return (0); } @@ -779,6 +780,7 @@ static void ttydevsw_defoutwakeup(struct tty *tp) { + panic("Terminal device has output, while not implemented"); } @@ -790,14 +792,16 @@ static int ttydevsw_defioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) { + return (ENOIOCTL); } static int ttydevsw_defparam(struct tty *tp, struct termios *t) { + /* Use a fake baud rate, we're not a real device. */ - t->c_ispeed = t->c_ospeed = B115200; + t->c_ispeed = t->c_ospeed = B38400; return (0); } @@ -805,19 +809,23 @@ static int ttydevsw_defmodem(struct tty *tp, int sigon, int sigoff) { + /* Simulate a carrier to make the TTY layer happy */ return (SER_DCD); } static int -ttydevsw_defmmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +ttydevsw_defmmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr, + int nprot) { + return (-1); } static void ttydevsw_deffree(void *softc) { + panic("Terminal device freed without a free-handler"); }