[PATCH 01/13] log: Add a category for filesystems
Simon Glass
sjg at chromium.org
Sat Jan 28 23:00:16 CET 2023
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 at chromium.org>
---
common/log.c | 1 +
fs/fat/fat_write.c | 2 ++
include/log.h | 2 ++
3 files changed, 5 insertions(+)
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 */
--
2.39.1.456.gfc5497dd1b-goog
More information about the U-Boot
mailing list