Send plymouth mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freedesktop.org/mailman/listinfo/plymouth
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of plymouth digest..."
Today's Topics:
1. [PATCH 13/21] [frame-buffer] don't run on non-virtual
terminals (Scott James Remnant)
2. [PATCH 14/21] [x11] ignore terminal completely
(Scott James Remnant)
3. [PATCH 11/21] [terminal] move terminal opening into
renderers/plugins (Scott James Remnant)
4. Re: [PATCH 10/21] [terminal] don't treat ttySx as VT (Ray Strode)
----------------------------------------------------------------------
Message: 1
Date: Thu, 18 Mar 2010 04:48:03 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 13/21] [frame-buffer] don't run on non-virtual
terminals
To: [email protected]
Message-ID:
<bf28ac21c5b613b97661966f19f0e4e5e0810c86.1268889867.git.sc...@ubuntu.com>
We only need support DRM on virtual terminals, those that are not
such as serial consoles, can be trivially skipped.
---
src/plugins/renderers/frame-buffer/plugin.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/plugins/renderers/frame-buffer/plugin.c
b/src/plugins/renderers/frame-buffer/plugin.c
index 62ce3da..570b21a 100644
--- a/src/plugins/renderers/frame-buffer/plugin.c
+++ b/src/plugins/renderers/frame-buffer/plugin.c
@@ -349,6 +349,13 @@ open_device (ply_renderer_backend_t *backend)
return false;
}
+ if (!ply_terminal_is_vt (backend->terminal))
+ {
+ ply_trace ("terminal is not a VT");
+ ply_terminal_close (backend->terminal);
+ return false;
+ }
+
ply_terminal_watch_for_active_vt_change (backend->terminal,
(ply_terminal_active_vt_changed_handler_t)
on_active_vt_changed,
--
1.7.0
------------------------------
Message: 2
Date: Thu, 18 Mar 2010 04:49:28 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 14/21] [x11] ignore terminal completely
To: [email protected]
Message-ID:
<309ba512e319da30d46d0636919aa58dbf5e6022.1268889867.git.sc...@ubuntu.com>
The X11 renderer doesn't need a terminal at all, so we ignore it
completely.
---
src/plugins/renderers/x11/plugin.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/plugins/renderers/x11/plugin.c
b/src/plugins/renderers/x11/plugin.c
index 042bdc9..a280bc7 100644
--- a/src/plugins/renderers/x11/plugin.c
+++ b/src/plugins/renderers/x11/plugin.c
@@ -56,7 +56,6 @@
#include "ply-logger.h"
#include "ply-rectangle.h"
#include "ply-region.h"
-#include "ply-terminal.h"
#include "ply-renderer.h"
#include "ply-renderer-plugin.h"
@@ -83,7 +82,6 @@ struct _ply_renderer_backend
ply_event_loop_t *loop;
ply_renderer_input_source_t input_source;
ply_list_t *heads;
- ply_terminal_t *terminal;
ply_fd_watch_t *display_watch;
@@ -112,7 +110,6 @@ create_backend (const char *device_name,
backend->loop = ply_event_loop_get_default ();
backend->heads = ply_list_new ();
backend->input_source.key_buffer = ply_buffer_new ();
- backend->terminal = terminal;
return backend;
}
@@ -231,11 +228,6 @@ map_to_device (ply_renderer_backend_t *backend)
ply_list_node_t *node;
assert (backend != NULL);
- /* Prevent other parts of plymouth from trying to use
- * the terminal, since X draws to it.
- */
- ply_terminal_ignore_mode_changes (backend->terminal, true);
-
node = ply_list_get_first_node (backend->heads);
while (node != NULL)
{
@@ -304,8 +296,6 @@ unmap_from_device (ply_renderer_backend_t *backend)
node = next_node;
}
-
- ply_terminal_ignore_mode_changes (backend->terminal, false);
}
static void
--
1.7.0
------------------------------
Message: 3
Date: Thu, 18 Mar 2010 04:45:01 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 11/21] [terminal] move terminal opening into
renderers/plugins
To: [email protected]
Message-ID:
<8316a149afb7fc2e1b7cbdf9af91d682b6f3cca2.1268889867.git.sc...@ubuntu.com>
Move the responsibility to actually open the terminal to the renderers
and text/details plugin, this allows the X11 renderer to not actually
open the terminal - and thus not crash the X server.
---
src/main.c | 19 +------------------
src/plugins/renderers/drm/plugin.c | 6 ++++++
src/plugins/renderers/frame-buffer/plugin.c | 6 ++++++
src/plugins/splash/details/plugin.c | 4 ++++
src/plugins/splash/text/plugin.c | 4 ++++
5 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/src/main.c b/src/main.c
index 35c287f..7c67c76 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1004,22 +1004,12 @@ static void
add_display_and_keyboard_for_terminal (state_t *state,
const char *tty_name)
{
- ply_terminal_t *terminal;
ply_text_display_t *display;
ply_keyboard_t *keyboard;
ply_trace ("adding display and keyboard for %s", tty_name);
- terminal = ply_terminal_new (tty_name);
-
- if (!ply_terminal_open (terminal))
- {
- ply_trace ("could not open terminal '%s': %m", tty_name);
- ply_terminal_free (terminal);
- return;
- }
-
- state->terminal = terminal;
+ state->terminal = ply_terminal_new (tty_name);
ply_terminal_activate_vt (state->terminal);
@@ -1071,13 +1061,6 @@ add_default_displays_and_keyboard (state_t *state)
terminal = ply_terminal_new (state->default_tty);
- if (!ply_terminal_open (terminal))
- {
- ply_trace ("could not open terminal '%s': %m", state->default_tty);
- ply_terminal_free (terminal);
- return;
- }
-
renderer = ply_renderer_new (NULL, terminal);
if (!ply_renderer_open (renderer))
diff --git a/src/plugins/renderers/drm/plugin.c
b/src/plugins/renderers/drm/plugin.c
index 21d727d..f4e3dde 100644
--- a/src/plugins/renderers/drm/plugin.c
+++ b/src/plugins/renderers/drm/plugin.c
@@ -496,6 +496,12 @@ open_device (ply_renderer_backend_t *backend)
if (!load_driver (backend))
return false;
+ if (!ply_terminal_open (backend->terminal))
+ {
+ ply_trace ("could not open terminal: %m");
+ return false;
+ }
+
ply_terminal_watch_for_active_vt_change (backend->terminal,
(ply_terminal_active_vt_changed_handler_t)
on_active_vt_changed,
diff --git a/src/plugins/renderers/frame-buffer/plugin.c
b/src/plugins/renderers/frame-buffer/plugin.c
index 3152bf7..62ce3da 100644
--- a/src/plugins/renderers/frame-buffer/plugin.c
+++ b/src/plugins/renderers/frame-buffer/plugin.c
@@ -343,6 +343,12 @@ open_device (ply_renderer_backend_t *backend)
return false;
}
+ if (!ply_terminal_open (backend->terminal))
+ {
+ ply_trace ("could not open terminal: %m");
+ return false;
+ }
+
ply_terminal_watch_for_active_vt_change (backend->terminal,
(ply_terminal_active_vt_changed_handler_t)
on_active_vt_changed,
diff --git a/src/plugins/splash/details/plugin.c
b/src/plugins/splash/details/plugin.c
index 47dbbad..d6980cf 100644
--- a/src/plugins/splash/details/plugin.c
+++ b/src/plugins/splash/details/plugin.c
@@ -197,9 +197,13 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
ply_text_display_t *display)
{
view_t *view;
+ ply_terminal_t *terminal;
view = view_new (plugin, display);
+ terminal = ply_text_display_get_terminal (view->display);
+ ply_terminal_open (terminal);
+
ply_list_append_data (plugin->views, view);
}
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 61dafa9..228e271 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -479,9 +479,13 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
ply_text_display_t *display)
{
view_t *view;
+ ply_terminal_t *terminal;
view = view_new (plugin, display);
+ terminal = ply_text_display_get_terminal (view->display);
+ ply_terminal_open (terminal);
+
ply_text_display_set_draw_handler (view->display,
(ply_text_display_draw_handler_t)
on_draw, view);
--
1.7.0
------------------------------
Message: 4
Date: Thu, 18 Mar 2010 14:20:34 -0400
From: Ray Strode <[email protected]>
Subject: Re: [PATCH 10/21] [terminal] don't treat ttySx as VT
To: Scott James Remnant <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=UTF-8
Hi,
> + ?if ((major_number == TTY_MAJOR) && (minor_number < 64))
> ? ? terminal->vt_number = minor_number;
> ? else
> ? ? terminal->vt_number = -1;
Should probably use:
MAX_NR_CONSOLES
instead.
------------------------------
_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth
End of plymouth Digest, Vol 17, Issue 11
****************************************