aubinator: honor --color option when printing the header

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Scott D Phillips 2017-11-28 15:52:08 -08:00 committed by Jordan Justen
parent 161a97c3d5
commit 4f0a2ff4c1
1 changed files with 5 additions and 1 deletions

View File

@ -192,8 +192,12 @@ handle_trace_header(uint32_t *p)
gen_batch_decode_ctx_init(&batch_ctx, &devinfo, outfile, batch_flags,
xml_path, get_gen_batch_bo, NULL);
char *color = GREEN_HEADER, *reset_color = NORMAL;
if (option_color == COLOR_NEVER)
color = reset_color = "";
fprintf(outfile, "%sAubinator: Intel AUB file decoder.%-80s%s\n",
GREEN_HEADER, "", NORMAL);
color, "", reset_color);
if (input_file)
fprintf(outfile, "File name: %s\n", input_file);