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 1/2] [main] Fix parsing of plymouth:debug=file:
(Colin Watson)
2. [PATCH 2/2] [main] Handle plymouth:splash or plymouth:debug
as last argument (Colin Watson)
3. [PATCH] [details] Handle NULL boot_buffer (Colin Watson)
----------------------------------------------------------------------
Message: 1
Date: Wed, 28 Apr 2010 13:27:59 +0100
From: Colin Watson <[email protected]>
Subject: [PATCH 1/2] [main] Fix parsing of plymouth:debug=file:
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Short-circuit evaluation meant that the path variable was never set if
plymouth:debug=file: was used. Switch the ordering around to fix this.
---
src/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 03a8a6a..9bd66a0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1541,8 +1541,8 @@ check_verbosity (state_t *state)
path = NULL;
if ((strstr (state->kernel_command_line, " plymouth:debug ") != NULL)
|| (strstr (state->kernel_command_line, "plymouth:debug ") != NULL)
- || (strstr (state->kernel_command_line, " plymouth:debug") != NULL)
- || (path = strstr (state->kernel_command_line, " plymouth:debug=file:"))
!= NULL)
+ || (path = strstr (state->kernel_command_line, " plymouth:debug=file:"))
!= NULL
+ || (strstr (state->kernel_command_line, " plymouth:debug") != NULL))
{
#ifdef LOG_TO_DEBUG_FILE
int fd;
--
1.7.0.4
------------------------------
Message: 2
Date: Wed, 28 Apr 2010 13:28:34 +0100
From: Colin Watson <[email protected]>
Subject: [PATCH 2/2] [main] Handle plymouth:splash or plymouth:debug
as last argument
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
If plymouth:splash or plymouth:debug is the last argument in
/proc/cmdline, then it will be terminated with '\n' rather than ' '.
Handle this.
---
src/main.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/main.c b/src/main.c
index 9bd66a0..13fed2b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -221,10 +221,8 @@ find_override_splash (state_t *state)
char *end;
splash_string = strdup (splash_string + strlen ("plymouth:splash="));
- end = strstr (splash_string, " ");
-
- if (end != NULL)
- *end = '\0';
+ end = splash_string + strcspn (splash_string, " \n");
+ *end = '\0';
ply_trace ("Splash is configured to be '%s'", splash_string);
@@ -1558,12 +1556,8 @@ check_verbosity (state_t *state)
path += strlen (" plymouth:debug=file:");
debug_buffer_path = strdup (path);
- end = strstr (debug_buffer_path, " ");
-
- if (end != NULL)
- *end = '\0';
-
- debug_buffer_path = path;
+ end = debug_buffer_path + strcspn (debug_buffer_path, " \n");
+ *end = '\0';
}
if (debug_buffer == NULL)
--
1.7.0.4
------------------------------
Message: 3
Date: Wed, 28 Apr 2010 13:31:39 +0100
From: Colin Watson <[email protected]>
Subject: [PATCH] [details] Handle NULL boot_buffer
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet). Handle this gracefully rather than segfaulting.
---
src/plugins/splash/details/plugin.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/plugins/splash/details/plugin.c
b/src/plugins/splash/details/plugin.c
index 05eddc6..fd8d2b8 100644
--- a/src/plugins/splash/details/plugin.c
+++ b/src/plugins/splash/details/plugin.c
@@ -250,9 +250,12 @@ show_splash_screen (ply_boot_splash_plugin_t *plugin,
detach_from_event_loop,
plugin);
- size = ply_buffer_get_size (boot_buffer);
+ if (boot_buffer)
+ {
+ size = ply_buffer_get_size (boot_buffer);
- write_on_views (plugin, ply_buffer_get_bytes (boot_buffer), size);
+ write_on_views (plugin, ply_buffer_get_bytes (boot_buffer), size);
+ }
return true;
}
--
1.7.0.4
------------------------------
_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth
End of plymouth Digest, Vol 18, Issue 3
***************************************