[PATCH 1/2] [main] Fix parsing of plymouth:debug=file:

Colin Watson cjwatson at ubuntu.com
Wed Apr 28 05:27:59 PDT 2010


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


More information about the plymouth mailing list