[igt-dev] [PATCH i-g-t 7/7] tools/intel_guc_logger: Update to include non-verbose log level
Michał Winiarski
michal.winiarski at intel.com
Tue Feb 27 12:59:04 UTC 2018
We're now controlling the GuC extra "default log" as another log level,
let's reflect that in the tool.
Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
---
tools/intel_guc_logger.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
index cd411e3c..2ff7eddd 100644
--- a/tools/intel_guc_logger.c
+++ b/tools/intel_guc_logger.c
@@ -37,6 +37,8 @@
#define DEFAULT_OUTPUT_FILE_NAME "guc_log_dump.dat"
#define CONTROL_FILE_NAME "i915_guc_log_relay"
#define LOG_LEVEL_FILE_NAME "i915_guc_log_level"
+#define GUC_LOG_LEVEL_MIN 0
+#define GUC_LOG_LEVEL_MAX 5
bool stop_logging;
@@ -281,7 +283,8 @@ process_command_line(int argc, char **argv, struct guc_logger_options *opts)
switch (c) {
case 'v':
opts->verbosity = atoi(optarg);
- if (opts->verbosity < 0 || opts->verbosity > 4) {
+ if (opts->verbosity < GUC_LOG_LEVEL_MIN ||
+ opts->verbosity > GUC_LOG_LEVEL_MAX) {
fprintf(stderr, "invalid input for -v option\n");
goto out;
}
--
2.14.3
More information about the igt-dev
mailing list