initctl: fix remaining lingering artifacts in 'top' output

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-12-17 08:19:38 +01:00
1 parent 390a0f48c1
commit a3d9b6e9b1
4 files changed
+24 -6

No files matched your search

+4 -1
View File
@@ -687,7 +687,7 @@ int fistmpfs(char *dir)
* Called by initctl, and by finit at boot and shutdown, to
* (re)initialize the screen size for print() et al.
*/
int ttinit(void)
int ttinit(int probe_size)
{
struct pollfd fd = { STDIN_FILENO, POLLIN, 0 };
struct winsize ws = { 0 };
@@ -707,6 +707,9 @@ int ttinit(void)
tcsetattr(STDERR_FILENO, TCSANOW, &tc);
}
if (probe_size)
goto fallback;
/* 1. Try TIOCWINSZ to query window size from kernel */
if (!ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws)) {
ttrows = ws.ws_row;