log: Add a category for filesystems
authorSimon Glass <sjg@chromium.org>
Sat, 28 Jan 2023 22:00:16 +0000 (15:00 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 6 Feb 2023 18:04:53 +0000 (13:04 -0500)
Sometimes it is useful to log things related to filesystems. Add a new
category and place it at the top of one of the FAT files.

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

index 57b71ed..7cfc49b 100644 (file)
@@ -30,6 +30,7 @@ static const char *const log_cat_name[] = {
        "acpi",
        "boot",
        "event",
+       "fs",
 };
 
 _Static_assert(ARRAY_SIZE(log_cat_name) == LOGC_COUNT - LOGC_NONE,
index 8ff2f6d..00541eb 100644 (file)
@@ -5,6 +5,8 @@
  * R/W (V)FAT 12/16/32 filesystem implementation by Donggeun Kim
  */
 
+#define LOG_CATEGORY LOGC_FS
+
 #include <common.h>
 #include <command.h>
 #include <config.h>
index 8a7b961..3bab40b 100644 (file)
@@ -100,6 +100,8 @@ enum log_category_t {
        LOGC_BOOT,
        /** @LOGC_EVENT: Related to event and event handling */
        LOGC_EVENT,
+       /** @LOGC_FS: Related to filesystems */
+       LOGC_FS,
        /** @LOGC_COUNT: Number of log categories */
        LOGC_COUNT,
        /** @LOGC_END: Sentinel value for lists of log categories */