1
Description: Undocumented changes
2
This patch contains undocumented changes accumulated during previous
3
versions of the Ubuntu plymouth package, that have not yet been split up
4
into individually-documented patches. Please try not to add further things
5
to this patch. Using quilt for new changes is recommended, but if you
6
don't, they'll end up in a separate debian-changes patch at the end of the
8
Last-Update: 2011-01-21
10
Index: plymouth/src/main.c
11
===================================================================
12
--- plymouth.orig/src/main.c
13
+++ plymouth/src/main.c
14
@@ -116,6 +116,7 @@ typedef struct
15
const char *default_tty;
18
+ ply_list_t *pending_messages;
21
static void show_splash (state_t *state);
22
@@ -182,8 +183,9 @@ on_update (state_t *state,
25
ply_trace ("updating status to '%s'", status);
26
- ply_progress_status_update (state->progress,
28
+ if (strncmp (status, "fsck:", 5))
29
+ ply_progress_status_update (state->progress,
31
if (state->boot_splash != NULL)
32
ply_boot_splash_update_status (state->boot_splash,
34
@@ -241,6 +243,25 @@ on_system_update (state_t *state,
38
+flush_pending_messages (state_t *state)
40
+ ply_list_node_t *node = ply_list_get_first_node (state->pending_messages);
41
+ while (node != NULL)
43
+ ply_list_node_t *next_node;
44
+ char *message = ply_list_node_get_data (node);
46
+ ply_trace ("displaying queued message");
48
+ ply_boot_splash_display_message (state->boot_splash, message);
49
+ next_node = ply_list_get_next_node (state->pending_messages, node);
50
+ ply_list_remove_node (state->pending_messages, node);
57
show_messages (state_t *state)
59
if (state->boot_splash == NULL) {
60
@@ -469,7 +490,7 @@ show_default_splash (state_t *state)
61
if (state->boot_splash == NULL) {
62
ply_trace ("Could not start default splash screen,"
63
"showing text splash screen");
64
- state->boot_splash = show_theme (state, PLYMOUTH_THEME_PATH "text/text.plymouth");
65
+ state->boot_splash = show_theme (state, PLYMOUTH_THEME_PATH "text.plymouth");
68
if (state->boot_splash == NULL) {
69
@@ -479,7 +500,8 @@ show_default_splash (state_t *state)
72
if (state->boot_splash == NULL) {
73
- ply_error ("plymouthd: could not start boot splash: %m");
74
+ if (errno != ENOENT)
75
+ ply_error ("plymouthd: could not start boot splash: %m");
79
@@ -566,8 +588,8 @@ on_display_message (state_t *state,
80
ply_boot_splash_display_message (state->boot_splash, message);
82
ply_trace ("not displaying message %s as no splash", message);
83
+ ply_list_append_data (state->messages, strdup (message));
85
- ply_list_append_data (state->messages, strdup (message));
89
@@ -806,6 +828,7 @@ prepare_logging (state_t *state)
90
if (state->number_of_errors > 0)
93
+ flush_pending_messages (state);
97
@@ -1988,6 +2011,7 @@ initialize_environment (state_t *state)
98
state->keystroke_triggers = ply_list_new ();
99
state->entry_triggers = ply_list_new ();
100
state->entry_buffer = ply_buffer_new ();
101
+ state->pending_messages = ply_list_new ();
102
state->messages = ply_list_new ();
104
if (!ply_is_tracing_to_terminal ())
105
Index: plymouth/src/plugins/splash/script/script-lib-image.c
106
===================================================================
107
--- plymouth.orig/src/plugins/splash/script/script-lib-image.c
108
+++ plymouth/src/plugins/splash/script/script-lib-image.c
109
@@ -200,7 +200,7 @@ static script_return_t image_text (scrip
111
alpha_obj = script_obj_hash_peek_element (state->local, "alpha");
113
- if (script_obj_is_number (alpha_obj))
114
+ if (alpha_obj && script_obj_is_number (alpha_obj))
115
alpha = CLAMP (script_obj_as_number (alpha_obj), 0, 1);
118
Index: plymouth/src/plugins/splash/script/script-lib-sprite.c
119
===================================================================
120
--- plymouth.orig/src/plugins/splash/script/script-lib-sprite.c
121
+++ plymouth/src/plugins/splash/script/script-lib-sprite.c
122
@@ -387,6 +387,45 @@ static script_return_t sprite_window_set
123
return script_return_obj_null ();
126
+static script_return_t sprite_window_get_bits_per_pixel (script_state_t *state,
129
+ script_lib_sprite_data_t *data = user_data;
130
+ ply_list_node_t *node;
132
+ script_obj_t *index_obj;
133
+ script_lib_display_t *display;
134
+ unsigned int bits_per_pixel;
136
+ index_obj = script_obj_hash_peek_element (state->local, "window");
140
+ index = script_obj_as_number (index_obj);
141
+ script_obj_unref(index_obj);
143
+ return script_return_obj_null ();
144
+ node = ply_list_get_nth_node (data->displays, index);
146
+ return script_return_obj_null ();
147
+ display = ply_list_node_get_data (node);
148
+ bits_per_pixel = ply_pixel_display_get_bits_per_pixel (display->pixel_display);
149
+ return script_return_obj (script_obj_new_number (bits_per_pixel));
152
+ bits_per_pixel = 0;
153
+ for (node = ply_list_get_first_node (data->displays);
155
+ node = ply_list_get_next_node (data->displays, node))
157
+ display = ply_list_node_get_data (node);
158
+ bits_per_pixel = ply_pixel_display_get_bits_per_pixel (display->pixel_display);
159
+ if (bits_per_pixel)
162
+ return script_return_obj (script_obj_new_number (bits_per_pixel));
165
static uint32_t extract_rgb_color (script_state_t *state)
167
uint8_t red = CLAMP (255 * script_obj_hash_get_number (state->local, "red"), 0, 255);
168
@@ -663,6 +702,12 @@ script_lib_sprite_data_t *script_lib_spr
171
script_add_native_function (window_hash,
173
+ sprite_window_get_bits_per_pixel,
177
+ script_add_native_function (window_hash,
178
"SetBackgroundTopColor",
179
sprite_window_set_background_top_color,
181
Index: plymouth/src/plugins/splash/text/plugin.c
182
===================================================================
183
--- plymouth.orig/src/plugins/splash/text/plugin.c
184
+++ plymouth/src/plugins/splash/text/plugin.c
185
@@ -464,8 +464,10 @@ add_text_display (ply_boot_splash_plugin
186
view = view_new (plugin, display);
188
terminal = ply_text_display_get_terminal (view->display);
189
- if (ply_terminal_open (terminal))
190
+ if (ply_terminal_open (terminal)) {
191
+ ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT);
192
ply_terminal_activate_vt (terminal);
195
ply_text_display_set_draw_handler (view->display,
196
(ply_text_display_draw_handler_t)
197
Index: plymouth/src/libply-splash-core/ply-renderer.c
198
===================================================================
199
--- plymouth.orig/src/libply-splash-core/ply-renderer.c
200
+++ plymouth/src/libply-splash-core/ply-renderer.c
201
@@ -353,6 +353,21 @@ ply_renderer_get_buffer_for_head (ply_re
206
+ply_renderer_get_bits_per_pixel_for_head (ply_renderer_t *renderer,
207
+ ply_renderer_head_t *head)
209
+ assert (renderer != NULL);
210
+ assert (renderer->plugin_interface != NULL);
211
+ assert (head != NULL);
213
+ if (!renderer->plugin_interface->get_bits_per_pixel_for_head)
216
+ return renderer->plugin_interface->get_bits_per_pixel_for_head (renderer->backend,
221
ply_renderer_flush_head (ply_renderer_t *renderer,
222
ply_renderer_head_t *head)
223
Index: plymouth/src/libply-splash-core/ply-renderer.h
224
===================================================================
225
--- plymouth.orig/src/libply-splash-core/ply-renderer.h
226
+++ plymouth/src/libply-splash-core/ply-renderer.h
227
@@ -64,6 +64,8 @@ const char *ply_renderer_get_device_name
228
ply_list_t *ply_renderer_get_heads (ply_renderer_t *renderer);
229
ply_pixel_buffer_t *ply_renderer_get_buffer_for_head (ply_renderer_t *renderer,
230
ply_renderer_head_t *head);
231
+unsigned int ply_renderer_get_bits_per_pixel_for_head (ply_renderer_t *renderer,
232
+ ply_renderer_head_t *head);
234
void ply_renderer_flush_head (ply_renderer_t *renderer,
235
ply_renderer_head_t *head);
236
Index: plymouth/src/libply-splash-core/ply-pixel-display.c
237
===================================================================
238
--- plymouth.orig/src/libply-splash-core/ply-pixel-display.c
239
+++ plymouth/src/libply-splash-core/ply-pixel-display.c
240
@@ -52,6 +52,7 @@ struct _ply_pixel_display
242
unsigned long height;
244
+ unsigned int bits_per_pixel;
246
ply_pixel_display_draw_handler_t draw_handler;
247
void *draw_handler_user_data;
248
@@ -80,6 +81,9 @@ ply_pixel_display_new (ply_renderer_t
249
display->height = size.height;
250
display->device_scale = ply_pixel_buffer_get_device_scale (pixel_buffer);
252
+ display->bits_per_pixel = ply_renderer_get_bits_per_pixel_for_head (renderer,
258
@@ -113,6 +117,12 @@ ply_pixel_display_get_device_scale (ply_
259
return display->device_scale;
263
+ply_pixel_display_get_bits_per_pixel (ply_pixel_display_t *display)
265
+ return display->bits_per_pixel;
269
ply_pixel_display_flush (ply_pixel_display_t *display)
271
Index: plymouth/src/libply-splash-core/ply-renderer-plugin.h
272
===================================================================
273
--- plymouth.orig/src/libply-splash-core/ply-renderer-plugin.h
274
+++ plymouth/src/libply-splash-core/ply-renderer-plugin.h
275
@@ -55,6 +55,8 @@ typedef struct
277
ply_pixel_buffer_t * (*get_buffer_for_head)(ply_renderer_backend_t * backend,
278
ply_renderer_head_t * head);
279
+ unsigned int (*get_bits_per_pixel_for_head)(ply_renderer_backend_t * backend,
280
+ ply_renderer_head_t * head);
282
ply_renderer_input_source_t * (*get_input_source)(ply_renderer_backend_t * backend);
283
bool (*open_input_source)(ply_renderer_backend_t *backend,
284
Index: plymouth/src/client/ply-boot-client.c
285
===================================================================
286
--- plymouth.orig/src/client/ply-boot-client.c
287
+++ plymouth/src/client/ply-boot-client.c
288
@@ -262,14 +262,30 @@ ply_boot_client_process_incoming_replies
292
- request_node = ply_list_get_first_node (client->requests_waiting_for_replies);
293
- assert (request_node != NULL);
294
+ if (!ply_read (client->socket_fd, byte, sizeof(uint8_t))) {
295
+ ply_error ("could not read response from boot status daemon");
299
- request = (ply_boot_client_request_t *) ply_list_node_get_data (request_node);
300
- assert (request != NULL);
301
+ for (request_node = ply_list_get_first_node (client->requests_waiting_for_replies);
302
+ ; request_node = ply_list_get_next_node (client->requests_waiting_for_replies, request_node)) {
303
+ assert (request_node != NULL);
304
+ request = (ply_boot_client_request_t *) ply_list_node_get_data (request_node);
305
+ assert (request != NULL);
307
- if (!ply_read (client->socket_fd, byte, sizeof(uint8_t)))
309
+ if (! strcmp (request->command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_PASSWORD)
310
+ || ! strcmp (request->command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_CACHED_PASSWORD)
311
+ || ! strcmp (request->command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUESTION)
312
+ || ! strcmp (request->command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_KEYSTROKE)) {
313
+ if (! memcmp (byte, PLY_BOOT_PROTOCOL_RESPONSE_TYPE_ANSWER, sizeof (uint8_t))
314
+ || ! memcmp (byte, PLY_BOOT_PROTOCOL_RESPONSE_TYPE_NO_ANSWER, sizeof (uint8_t)))
317
+ if (memcmp (byte, PLY_BOOT_PROTOCOL_RESPONSE_TYPE_ANSWER, sizeof (uint8_t))
318
+ && memcmp (byte, PLY_BOOT_PROTOCOL_RESPONSE_TYPE_NO_ANSWER, sizeof (uint8_t)))
323
if (memcmp (byte, PLY_BOOT_PROTOCOL_RESPONSE_TYPE_ACK, sizeof(uint8_t)) == 0) {
324
if (request->handler != NULL)
325
Index: plymouth/src/plugins/renderers/frame-buffer/plugin.c
326
===================================================================
327
--- plymouth.orig/src/plugins/renderers/frame-buffer/plugin.c
328
+++ plymouth/src/plugins/renderers/frame-buffer/plugin.c
329
@@ -637,6 +637,16 @@ get_buffer_for_head (ply_renderer_backen
330
return backend->head.pixel_buffer;
334
+get_bits_per_pixel_for_head (ply_renderer_backend_t *backend,
335
+ ply_renderer_head_t *head)
337
+ if (head != &backend->head)
340
+ return backend->bytes_per_pixel * 8;
344
has_input_source (ply_renderer_backend_t *backend,
345
ply_renderer_input_source_t *input_source)
346
@@ -753,6 +763,7 @@ ply_renderer_backend_get_interface (void
347
.flush_head = flush_head,
348
.get_heads = get_heads,
349
.get_buffer_for_head = get_buffer_for_head,
350
+ .get_bits_per_pixel_for_head = get_bits_per_pixel_for_head,
351
.get_input_source = get_input_source,
352
.open_input_source = open_input_source,
353
.set_handler_for_input_source = set_handler_for_input_source,
354
Index: plymouth/src/libply-splash-core/ply-pixel-display.h
355
===================================================================
356
--- plymouth.orig/src/libply-splash-core/ply-pixel-display.h
357
+++ plymouth/src/libply-splash-core/ply-pixel-display.h
358
@@ -49,6 +49,8 @@ void ply_pixel_display_free (ply_pixel_d
359
ply_renderer_t *ply_pixel_display_get_renderer (ply_pixel_display_t *display);
360
ply_renderer_head_t *ply_pixel_display_get_renderer_head (ply_pixel_display_t *display);
362
+unsigned int ply_pixel_display_get_bits_per_pixel (ply_pixel_display_t *display);
364
unsigned long ply_pixel_display_get_width (ply_pixel_display_t *display);
365
unsigned long ply_pixel_display_get_height (ply_pixel_display_t *display);
366
int ply_pixel_display_get_device_scale (ply_pixel_display_t *display);