mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
initctl: fix remaining lingering artifacts in 'top' output
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+24
-6
No files matched your search
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user