diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index a484d26844b..67f09f817b8 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -57,7 +57,7 @@ static bool option_full_decode = true; static bool option_print_all_bb = false; static bool option_print_offsets = true; static bool option_dump_kernels = false; -static enum { COLOR_AUTO, COLOR_ALWAYS, COLOR_NEVER } option_color; +static enum decode_color option_color; static char *xml_path = NULL; static uint32_t @@ -75,7 +75,7 @@ print_register(struct intel_spec *spec, const char *name, uint32_t reg) if (reg_spec) { intel_print_group(stdout, reg_spec, 0, ®, 0, - option_color == COLOR_ALWAYS); + option_color == DECODE_COLOR_ALWAYS); } } @@ -862,11 +862,11 @@ main(int argc, char *argv[]) switch (c) { case 'c': if (optarg == NULL || strcmp(optarg, "always") == 0) - option_color = COLOR_ALWAYS; + option_color = DECODE_COLOR_ALWAYS; else if (strcmp(optarg, "never") == 0) - option_color = COLOR_NEVER; + option_color = DECODE_COLOR_NEVER; else if (strcmp(optarg, "auto") == 0) - option_color = COLOR_AUTO; + option_color = DECODE_COLOR_AUTO; else { fprintf(stderr, "invalid value for --color: %s", optarg); exit(EXIT_FAILURE); @@ -925,13 +925,13 @@ main(int argc, char *argv[]) } } - if (option_color == COLOR_AUTO) - option_color = isatty(1) ? COLOR_ALWAYS : COLOR_NEVER; + if (option_color == DECODE_COLOR_AUTO) + option_color = isatty(1) ? DECODE_COLOR_ALWAYS : DECODE_COLOR_NEVER; if (isatty(1) && pager) setup_pager(); - if (option_color == COLOR_ALWAYS) + if (option_color == DECODE_COLOR_ALWAYS) batch_flags |= INTEL_BATCH_DECODE_IN_COLOR; if (option_full_decode) batch_flags |= INTEL_BATCH_DECODE_FULL; diff --git a/src/intel/tools/aubinator_error_decode_lib.h b/src/intel/tools/aubinator_error_decode_lib.h index b1b5094e7f9..2d1c4be16a0 100644 --- a/src/intel/tools/aubinator_error_decode_lib.h +++ b/src/intel/tools/aubinator_error_decode_lib.h @@ -7,6 +7,12 @@ #include "intel/common/intel_engine.h" +enum decode_color { + DECODE_COLOR_AUTO, + DECODE_COLOR_ALWAYS, + DECODE_COLOR_NEVER +}; + int ring_name_to_class(const char *ring_name, enum intel_engine_class *class); void