[console] Function in degraded mode when closed

Not all machines will have /dev/tty0.  Those that
don't should still work.
This commit is contained in:
Ray Strode 2009-10-29 17:11:00 -04:00
parent 0980923c85
commit ee7588b9d4
2 changed files with 6 additions and 5 deletions

View file

@ -190,10 +190,12 @@ static void
ply_console_watch_for_vt_changes (ply_console_t *console)
{
assert (console != NULL);
assert (console->fd >= 0);
struct vt_mode mode = { 0 };
if (console->fd < 0);
return;
if (console->is_watching_for_vt_changes)
return;
@ -349,7 +351,9 @@ ply_console_set_active_vt (ply_console_t *console,
int vt_number)
{
assert (console != NULL);
assert (vt_number > 0);
if (vt_number <= 0)
return false;
if (vt_number == console->active_vt)
return true;

View file

@ -1293,9 +1293,6 @@ check_for_consoles (state_t *state,
!ply_console_open (state->console))
{
ply_trace ("could not open /dev/tty0");
ply_console_free (state->console);
state->console = NULL;
return;
}
remaining_command_line = state->kernel_command_line;