summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2008-06-11 17:09:19 -0400
committerPeter Jones <pjones@vroomfondel.internal.datastacks.com>2008-06-12 13:17:49 -0400
commit3737f21226c3306948f13ad4a6a2110e55c483a5 (patch)
tree6979b3f66087ed95d32bbc7ac700d93c68495a96
parent835e591f40ed93d6e399318fc85c5160e455660a (diff)
downloadplymouth-3737f21226c3306948f13ad4a6a2110e55c483a5.tar.gz
plymouth-3737f21226c3306948f13ad4a6a2110e55c483a5.tar.xz
plymouth-3737f21226c3306948f13ad4a6a2110e55c483a5.zip
Don't treat "vga=791" the same thing as " 1 ". Also, change the chroot logging.
-rw-r--r--src/main.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 3bc8aa0..d3510a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -106,9 +106,10 @@ static void
on_newroot (state_t *state,
const char *root_dir)
{
- ply_trace ("new root mounted, switching to it");
+ ply_trace ("new root mounted at \"%s\", switching to it", root_dir);
chdir(root_dir);
chroot(".");
+ chdir("/");
}
static void
@@ -338,16 +339,23 @@ plymouth_should_be_running (state_t *state)
ply_trace ("checking if plymouth should be running");
const char const *strings[] = {
- " single ", " single", "single ",
- " 1 ", " 1", "1 ",
- " init=",
+ " single ", " single", "^single ",
+ " 1 ", " 1", "^1 ",
+ " init=", "^init=",
NULL
};
int i;
for (i = 0; strings[i] != NULL; i++)
{
- if (strstr (state->kernel_command_line, strings[i]) != NULL)
+ int cmp;
+ if (strings[0] == '^')
+ cmp = strncmp(state->kernel_command_line, strings+1,
+ strlen(strings+1)) == 0;
+ else
+ cmp = strstr (state->kernel_command_line, strings[i]) != NULL;
+
+ if (cmp)
{
ply_trace ("kernel command line has option \"%s\"", strings[i]);
return false;