]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 57b71ed1b365c438f9f1625273abadbe77270076..7cfc49bc28a58035991c18f65143ba4a76d42d28 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 8ff2f6def083809b54cd4000b44d474355fd4c3f..00541ebc3a4a8a5b75480d04558b0c23cff66d07 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 8a7b961bbfbfb75163f3871dc2f44c26a9b982a7..3bab40b617158a9ce21a3ff75d13a254226c7f7b 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 */