summaryrefslogtreecommitdiff
path: root/src/libply-splash-core/ply-terminal.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2010-04-29 12:46:00 -0400
committerRay Strode <rstrode@redhat.com>2010-04-29 12:46:53 -0400
commitee41b742adad92eab2489be8e9cf96a0cbdae6ca (patch)
treee60a228599113be42bf56ad51395ab0cfbf2b276 /src/libply-splash-core/ply-terminal.c
parent54a498c82d0a34460638a2ef23f6b268c20f8e8a (diff)
[terminal] Add some debug spew
Diffstat (limited to 'src/libply-splash-core/ply-terminal.c')
-rw-r--r--src/libply-splash-core/ply-terminal.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/libply-splash-core/ply-terminal.c b/src/libply-splash-core/ply-terminal.c
index 8b099b87..92e4a442 100644
--- a/src/libply-splash-core/ply-terminal.c
+++ b/src/libply-splash-core/ply-terminal.c
@@ -346,7 +346,11 @@ get_active_vt (ply_terminal_t *terminal)
return -1;
if (terminal->initial_vt_number < 0)
- terminal->initial_vt_number = vt_state.v_active;
+ {
+ terminal->initial_vt_number = vt_state.v_active;
+ ply_trace ("Remembering that initial vt is %d",
+ terminal->initial_vt_number);
+ }
return vt_state.v_active;
}
@@ -761,7 +765,11 @@ ply_terminal_activate_vt (ply_terminal_t *terminal)
return true;
if (!set_active_vt (terminal, terminal->vt_number))
- return false;
+ {
+ ply_trace ("unable to set active vt to %d: %m",
+ terminal->vt_number);
+ return false;
+ }
return true;
}
@@ -800,16 +808,22 @@ ply_terminal_deactivate_vt (ply_terminal_t *terminal)
if (ply_terminal_is_active (terminal))
{
+ ply_trace ("Attempting to set active vt back to %d from %d",
+ terminal->initial_vt_number, old_vt_number);
if (!set_active_vt (terminal, terminal->initial_vt_number))
{
- ply_trace ("Couldn't number to initial VT");
+ ply_trace ("Couldn't move console to initial vt: %m");
return false;
}
}
+ else
+ {
+ ply_trace ("terminal for vt %d is inactive", terminal->vt_number);
+ }
if (!deallocate_vt (terminal, old_vt_number))
{
- ply_trace ("Couldn't deallocate vt %d", old_vt_number);
+ ply_trace ("couldn't deallocate vt %d: %m", old_vt_number);
return false;
}