From owner-svn-src-all@FreeBSD.ORG Sun May 17 16:17:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EED49106564A; Sun, 17 May 2009 16:17:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFA6C8FC29; Sun, 17 May 2009 16:17:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4HGHm1w032398; Sun, 17 May 2009 16:17:48 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4HGHmQ1032397; Sun, 17 May 2009 16:17:48 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905171617.n4HGHmQ1032397@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 May 2009 16:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192252 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 16:17:49 -0000 Author: ed Date: Sun May 17 16:17:48 2009 New Revision: 192252 URL: http://svn.freebsd.org/changeset/base/192252 Log: Print an extra newline when not at the first column already. This makes siginfo output look a lot better when pressing it the first time when in sh(1), for example: $ load: 0.00 cmd: sh 1945 [ttyin] 3.94r 0.00u 0.00s 0% 1960k load: 0.00 cmd: sh 1945 [ttyin] 4.19r 0.00u 0.00s 0% 1960k will now become: $ load: 0.00 cmd: sh 1945 [ttyin] 3.94r 0.00u 0.00s 0% 1960k load: 0.00 cmd: sh 1945 [ttyin] 4.19r 0.00u 0.00s 0% 1960k Modified: head/sys/kern/tty_info.c Modified: head/sys/kern/tty_info.c ============================================================================== --- head/sys/kern/tty_info.c Sun May 17 15:42:41 2009 (r192251) +++ head/sys/kern/tty_info.c Sun May 17 16:17:48 2009 (r192252) @@ -230,7 +230,8 @@ tty_info(struct tty *tp) /* Print load average. */ load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; - ttyprintf(tp, "load: %d.%02d ", load / 100, load % 100); + ttyprintf(tp, "%sload: %d.%02d ", tp->t_column == 0 ? "" : "\n", + load / 100, load % 100); if (tp->t_session == NULL) { ttyprintf(tp, "not a controlling terminal\n");