aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2023-01-28 15:00:16 -0700
committerTom Rini2023-02-06 13:04:53 -0500
commit4f6daaca0fa225e785bd8293d7c5c88d9ff0b1bd (patch)
treef5eea03baf9710eeb208992dae416b67199b7502
parent3574eb8229fd36b96b29adf0891272e16930e24a (diff)
log: Add a category for filesystems
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>
-rw-r--r--common/log.c1
-rw-r--r--fs/fat/fat_write.c2
-rw-r--r--include/log.h2
3 files changed, 5 insertions, 0 deletions
diff --git a/common/log.c b/common/log.c
index 57b71ed1b36..7cfc49bc28a 100644
--- a/common/log.c
+++ b/common/log.c
@@ -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,
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 8ff2f6def08..00541ebc3a4 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -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>
diff --git a/include/log.h b/include/log.h
index 8a7b961bbfb..3bab40b6171 100644
--- a/include/log.h
+++ b/include/log.h
@@ -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 */