mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Refactor screen_init(), use methods developed in pimd project
- Refactor screen_init()
- use native impl. of TTY probing from pimd project
- check if TIOCWINSZ works
- check if we're running in watch(1), for initctl
- check if ANSI goto(999,999) escape seq. works (invasive)
- fallback to 80x24
- Drop screen_exit()
- Rename screen_init() to get_width(), for now, matching pimd
- Relocate call in main() to banner(), first fn to write to TTY
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
fe27ed17eb
commit
4bcfd606b4
6 files changed
+76
-30
No files matched your search
+4
-6
@@ -478,10 +478,6 @@ int main(int argc, char *argv[])
|
||||
chdir("/");
|
||||
umask(0);
|
||||
|
||||
/* Set up canvas */
|
||||
if (!rescue && !debug)
|
||||
screen_init();
|
||||
|
||||
/* Allow progress, if enabled */
|
||||
enable_progress(1);
|
||||
|
||||
@@ -490,8 +486,10 @@ int main(int argc, char *argv[])
|
||||
*/
|
||||
emergency_shell();
|
||||
|
||||
/* Load plugins early, the first hook is in banner(), so we
|
||||
* need plugins loaded before calling it. */
|
||||
/*
|
||||
* Load plugins early, the first hook is in banner(), so we
|
||||
* need plugins loaded before calling it.
|
||||
*/
|
||||
plugin_init(&loop);
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user