|
|
|
@ -27,7 +27,6 @@
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#include <term.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
@ -97,25 +96,6 @@ bool ply_message(const char* hook, const char* name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void clear_tty(char *tty) {
|
|
|
|
|
FILE *f = fopen(tty,"w");
|
|
|
|
|
if(f) {
|
|
|
|
|
int result;
|
|
|
|
|
char *clear_screen_token = "\x1b[3J";
|
|
|
|
|
char *hide_cursor_token = NULL;
|
|
|
|
|
int fd = fileno(f);
|
|
|
|
|
|
|
|
|
|
fwrite(clear_screen_token, strlen(clear_screen_token), 1, f);
|
|
|
|
|
setupterm(NULL, fd, &result);
|
|
|
|
|
if(result > 0) {
|
|
|
|
|
hide_cursor_token = tigetstr("civis");
|
|
|
|
|
fwrite(hide_cursor_token, strlen(hide_cursor_token), 1, f);
|
|
|
|
|
}
|
|
|
|
|
fclose(f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool ply_ping()
|
|
|
|
|
{
|
|
|
|
|
return (system("/bin/plymouth --ping") == 0);
|
|
|
|
@ -295,7 +275,6 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
|
|
|
|
|
if(!ply_quit(PLY_MODE_BOOT))
|
|
|
|
|
rv = 1;
|
|
|
|
|
restart_console_font();
|
|
|
|
|
clear_tty("/dev/tty7");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|