From cdcad98655dd5e92d3a4b404f68c2892be977327 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 10 Jun 2021 05:52:20 +0200 Subject: [PATCH] hal_debug.h: move into include directory, HAL entries highlighted Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/0e96b7865f4e6f5995951f7adb09f661a8f9e39f Author: Thilo Graf Date: 2021-06-10 (Thu, 10 Jun 2021) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- common/hal_debug.cpp | 10 +++++----- {common => include}/hal_debug.h | 0 2 files changed, 5 insertions(+), 5 deletions(-) rename {common => include}/hal_debug.h (100%) diff --git a/common/hal_debug.cpp b/common/hal_debug.cpp index 376b160..1c8b183 100644 --- a/common/hal_debug.cpp +++ b/common/hal_debug.cpp @@ -28,7 +28,7 @@ static const char *hal_facility[] = void _hal_info(int facility, const void *func, const char *fmt, ...) { /* %p does print "(nil)" instead of 0x00000000 for NULL */ - fprintf(stderr, "[HAL:%08lx:%s] ", (long) func, hal_facility[facility]); + fprintf(stderr, "[\033[36mHAL:\033[0m %08lx:%s] ", (long) func, hal_facility[facility]); va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); @@ -39,12 +39,12 @@ void _hal_info(int facility, const void *func, const char *fmt, ...) void _hal_debug(int facility, const void *func, const char *fmt, ...) { if (debuglevel < 0) - fprintf(stderr, "hal_debug: debuglevel not initialized!\n"); + fprintf(stderr, "[\033[36mHAL:\033[0m hal_debug] debuglevel not initialized!\n"); if (!((1 << facility) & debuglevel)) return; - fprintf(stderr, "[HAL:%08lx:%s] ", (long)func, hal_facility[facility]); + fprintf(stderr, "[\033[36mHAL:\033[0m %08lx:%s] ", (long)func, hal_facility[facility]); va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); @@ -62,7 +62,7 @@ void hal_debug_init(void) if (debuglevel == 0) { - fprintf(stderr, "libstb-hal debug options can be set by exporting HAL_DEBUG.\n"); + fprintf(stderr, "[\033[36mHAL:\033[0m hal_debug] libstb-hal debug options can be set by exporting HAL_DEBUG.\n"); fprintf(stderr, "The following values (or bitwise OR combinations) are valid:\n"); while (hal_facility[i]) { @@ -73,7 +73,7 @@ void hal_debug_init(void) } else { - fprintf(stderr, "libstb-hal debug is active for the following components:\n"); + fprintf(stderr, "\033[36mHAL:\033[0m hal_debug] libstb-hal debug is active for the following components:\n"); while (hal_facility[i]) { if (debuglevel & (1 << i)) diff --git a/common/hal_debug.h b/include/hal_debug.h similarity index 100% rename from common/hal_debug.h rename to include/hal_debug.h