igt_core: Fix logging to display extended line

line[strlen(line)] will always evaluate to NULL so line_continuation
was always true. That prevented the program name, pid and log level
ever being printed.
Changed to [strlen(line) - 1] so the last character before the null
terminator is compared with '\n' to determine line_continuation.

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Derek Morton 2015-12-23 15:34:48 +00:00 committed by Daniel Vetter
parent 51bb53663e
commit 8528b484e8

View File

@ -1748,7 +1748,7 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format,
goto out;
}
line_continuation = line[strlen(line)] != '\n';
line_continuation = line[strlen(line) - 1] != '\n';
/* append log buffer */
_igt_log_buffer_append(formatted_line);