From: Colin Guthrie Date: Thu, 15 Dec 2011 10:27:51 +0000 (+0000) Subject: main: Fix parsing of plymouth.debug=stream: argument. X-Git-Tag: 0.8.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8f2e2b11f219e72fdef924b1f259628fa56e5a9;p=thirdparty%2Fplymouth.git main: Fix parsing of plymouth.debug=stream: argument. It did not terminate at space so the log file to use was not properly defined and any additional kernel command line args were added to the end of the file name. --- diff --git a/src/main.c b/src/main.c index e230c58b..9565a3e7 100644 --- a/src/main.c +++ b/src/main.c @@ -1797,6 +1797,12 @@ check_verbosity (state_t *state) if (stream != NULL) { + char *end; + + stream = strdup (stream); + end = stream + strcspn (stream, " \n"); + *end = '\0'; + ply_trace ("streaming debug output to %s instead of screen", stream); fd = open (stream, O_RDWR | O_NOCTTY | O_CREAT, 0600); @@ -1808,6 +1814,7 @@ check_verbosity (state_t *state) { ply_logger_set_output_fd (ply_logger_get_error_default (), fd); } + free (stream); } } else