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
This commit is contained in:
parent
dd970f41f7
commit
379affd5cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192252
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user