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.
This commit is contained in:
Colin Guthrie 2011-12-15 10:27:51 +00:00 committed by Ray Strode
parent 3f0cf34885
commit b8f2e2b11f

View file

@ -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