]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
log: Add a new category for tests
authorSimon Glass <sjg@chromium.org>
Mon, 28 Oct 2024 12:47:52 +0000 (13:47 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 4 Nov 2024 03:27:12 +0000 (21:27 -0600)
In some core test code, no existing categories make sense. Add a new one
for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/log.c
include/log.h

index b83a661890019afb1cccd284e399e27807e6120f..c9fe35230d60a2ec55548fada28d0dcc7555c52b 100644 (file)
@@ -32,6 +32,7 @@ static const char *const log_cat_name[] = {
        "fs",
        "expo",
        "console",
+       "test",
 };
 
 _Static_assert(ARRAY_SIZE(log_cat_name) == LOGC_COUNT - LOGC_NONE,
index bf81a27011ff70d4ed9930e5bd94a5c20f4e9100..4f6d6a2c2cf8c31b372667d43e48e75ad42e5d27 100644 (file)
@@ -106,6 +106,8 @@ enum log_category_t {
        LOGC_EXPO,
        /** @LOGC_CONSOLE: Related to the console and stdio */
        LOGC_CONSOLE,
+       /** @LOGC_TEST: Related to testing */
+       LOGC_TEST,
        /** @LOGC_COUNT: Number of log categories */
        LOGC_COUNT,
        /** @LOGC_END: Sentinel value for lists of log categories */