Description: Backported debugging fixes Backport debugging fixes from upstream: - Fix parsing of plymouth:debug=file: - Handle plymouth:splash or plymouth:debug as last argument Author: Colin Watson Forwarded: yes Last-Update: 2011-01-21 Index: b/src/main.c =================================================================== --- a/src/main.c +++ b/src/main.c @@ -224,10 +224,8 @@ 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); @@ -1547,8 +1545,8 @@ 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; @@ -1564,12 +1562,8 @@ 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)