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"); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"