From owner-p4-projects@FreeBSD.ORG Fri Jul 25 14:53:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A14741065671; Fri, 25 Jul 2008 14:53:24 +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 64D77106566C for ; Fri, 25 Jul 2008 14:53:24 +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 58BDC8FC0C for ; Fri, 25 Jul 2008 14:53:24 +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 m6PErOXh091086 for ; Fri, 25 Jul 2008 14:53:24 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6PErOhY091084 for perforce@freebsd.org; Fri, 25 Jul 2008 14:53:24 GMT (envelope-from ed@FreeBSD.org) Date: Fri, 25 Jul 2008 14:53:24 GMT Message-Id: <200807251453.m6PErOhY091084@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 145892 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: Fri, 25 Jul 2008 14:53:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=145892 Change 145892 by ed@ed_dull on 2008/07/25 14:52:30 Small cleanups to tty_info.c to make it more in sync with the stock sources. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty_info.c#3 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty_info.c#3 (text+ko) ==== @@ -41,13 +41,15 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/kern/tty_info.c,v 1.1 2008/07/25 14:31:00 ed Exp $"); #include -#include +#include +#include #include #include #include +#include #include #include @@ -205,6 +207,9 @@ return (p2->p_pid > p1->p_pid); /* tie - return highest pid */ } +/* + * Report on state of foreground process group. + */ void tty_info(struct tty *tp) { @@ -227,25 +232,18 @@ load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; ttyprintf(tp, "load: %d.%02d ", load / 100, load % 100); - /* - * On return following a ttyprintf(), we set tp->t_rocount to 0 so - * that pending input will be retyped on BS. - */ if (tp->t_session == NULL) { ttyprintf(tp, "not a controlling terminal\n"); - /*tp->t_rocount = 0;*/ return; } if (tp->t_pgrp == NULL) { ttyprintf(tp, "no foreground process group\n"); - /*tp->t_rocount = 0;*/ return; } PGRP_LOCK(tp->t_pgrp); if (LIST_EMPTY(&tp->t_pgrp->pg_members)) { PGRP_UNLOCK(tp->t_pgrp); ttyprintf(tp, "empty foreground process group\n"); - /*tp->t_rocount = 0;*/ return; } @@ -310,5 +308,4 @@ (long)utime.tv_sec, utime.tv_usec / 10000, (long)stime.tv_sec, stime.tv_usec / 10000, pctcpu / 100, rss); - /*tp->t_rocount = 0;*/ }