From: Simon Glass Date: Sat, 28 Jan 2023 22:00:16 +0000 (-0700) Subject: log: Add a category for filesystems X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4f6daaca0fa225e785bd8293d7c5c88d9ff0b1bd;p=u-boot.git 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 --- diff --git a/common/log.c b/common/log.c index 57b71ed1b3..7cfc49bc28 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 8ff2f6def0..00541ebc3a 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 #include #include diff --git a/include/log.h b/include/log.h index 8a7b961bbf..3bab40b617 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 */