From 4c984bff17c3058a9b776bdb2b3ce724fee12156 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 12 Feb 2012 20:34:12 +0100 Subject: [PATCH] debug: rename from TRIPLE_DEBUG to HAL_DEBUG the old variable is still usable as a fallback Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/6c29c65cd78fb67a8bfd99b9b00783f6635529b0 Author: Stefan Seyfried Date: 2012-02-12 (Sun, 12 Feb 2012) ------------------ This commit was generated by Migit --- common/lt_debug.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/lt_debug.cpp b/common/lt_debug.cpp index 831d265..570e369 100644 --- a/common/lt_debug.cpp +++ b/common/lt_debug.cpp @@ -49,7 +49,9 @@ void _lt_debug(int facility, const void *func, const char *fmt, ...) void lt_debug_init(void) { int i = 0; - char *tmp = getenv("TRIPLE_DEBUG"); + char *tmp = getenv("HAL_DEBUG"); + if (! tmp) + *tmp = getenv("TRIPLE_DEBUG"); /* backwards compatibility... */ if (! tmp) debuglevel = 0; else @@ -57,7 +59,7 @@ void lt_debug_init(void) if (debuglevel == 0) { - fprintf(stderr, "libtriple debug options can be set by exporting TRIPLE_DEBUG.\n"); + fprintf(stderr, "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 (lt_facility[i]) { fprintf(stderr, "\tcomponent: %s 0x%02x\n", lt_facility[i], 1 << i); @@ -65,7 +67,7 @@ void lt_debug_init(void) } fprintf(stderr, "\tall components: 0x%02x\n", (1 << i) - 1); } else { - fprintf(stderr, "libtriple debug is active for the following components:\n"); + fprintf(stderr, "libstb-hal debug is active for the following components:\n"); while (lt_facility[i]) { if (debuglevel & (1 << i)) fprintf(stderr, "%s ", lt_facility[i]);