diff options
author | Sean Anderson <seanga2@gmail.com> | 2020-10-28 02:55:25 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-30 17:55:26 +0300 |
commit | a02f84ee9c6f42137671b74ec3bb9d159b10b7ee (patch) | |
tree | 05b1ca63f85ab40f1c47d17a8a8d51385f735d0e /common | |
parent | 3102c1d2c21762889e90ec68fd0b3ce5209528a6 (diff) | |
download | u-boot-a02f84ee9c6f42137671b74ec3bb9d159b10b7ee.tar.xz |
log: Add function to create a filter with flags
This function exposes a way to specify flags when creating a filter.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/log.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/log.c b/common/log.c index c5de99a8d1..b7b144fa5d 100644 --- a/common/log.c +++ b/common/log.c @@ -246,8 +246,9 @@ int _log(enum log_category_t cat, enum log_level_t level, const char *file, return 0; } -int log_add_filter(const char *drv_name, enum log_category_t cat_list[], - enum log_level_t max_level, const char *file_list) +int log_add_filter_flags(const char *drv_name, enum log_category_t cat_list[], + enum log_level_t max_level, const char *file_list, + int flags) { struct log_filter *filt; struct log_device *ldev; @@ -261,6 +262,7 @@ int log_add_filter(const char *drv_name, enum log_category_t cat_list[], if (!filt) return -ENOMEM; + filt->flags = flags; if (cat_list) { filt->flags |= LOGFF_HAS_CAT; for (i = 0; ; i++) { |