summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-06-04 14:20:18 -0400
committerRay Strode <rstrode@redhat.com>2008-06-04 15:05:19 -0400
commit34d6c76b2f003dbd0f49d2470ec74c4e342bcd0d (patch)
tree518b0acb4f99b8d7db4eb55ea2008267eace2eb1 /src/main.c
parentcd9a67bcafc84056f345ba40141c3e52539de7d0 (diff)
downloadplymouth-34d6c76b2f003dbd0f49d2470ec74c4e342bcd0d.tar.gz
plymouth-34d6c76b2f003dbd0f49d2470ec74c4e342bcd0d.tar.xz
plymouth-34d6c76b2f003dbd0f49d2470ec74c4e342bcd0d.zip
Change window to take a vt number instead of a tty device file
We are going to want to change to the vt of the tty that we're using for the window. This means we need to know the vt number instead of the device file. From the number we can derive the device filename.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index ec58aff..6b8f77c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -180,12 +180,12 @@ on_escape_pressed (state_t *state)
static ply_window_t *
create_window (state_t *state,
- const char *tty)
+ int vt_number)
{
ply_window_t *window;
- ply_trace ("creating window for %s", tty);
- window = ply_window_new (tty);
+ ply_trace ("creating window on vt %d", vt_number);
+ window = ply_window_new (vt_number);
ply_trace ("attaching window to event loop");
ply_window_attach_to_event_loop (window, state->loop);
@@ -448,7 +448,7 @@ main (int argc,
return EX_UNAVAILABLE;
}
- state.window = create_window (&state, "/dev/tty1");
+ state.window = create_window (&state, 1);
ply_trace ("entering event loop");
exit_code = ply_event_loop_run (state.loop);