Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/20267 )
Change subject: fixup! Add a convenient libflashrom interface ......................................................................
fixup! Add a convenient libflashrom interface
Update `enum flashrom_log_level` to match `enum msglevel` again.
They diverged already. Found by clang.
Change-Id: Icf175c5f2a415365bd756ca813e724f6797459b2 Signed-off-by: Nico Huber nico.huber@secunet.com Reviewed-on: https://review.coreboot.org/20267 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: David Hendricks david.hendricks@gmail.com --- M libflashrom.c M libflashrom.h 2 files changed, 6 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified David Hendricks: Looks good to me, approved
diff --git a/libflashrom.c b/libflashrom.c index 1176e02..962e96f 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -90,7 +90,7 @@ int ret; va_list args; va_start(args, fmt); - ret = global_log_callback(level, fmt, args); + ret = global_log_callback((enum flashrom_log_level)level, fmt, args); va_end(args); return ret; } diff --git a/libflashrom.h b/libflashrom.h index 09a88c4..c5d972e 100644 --- a/libflashrom.h +++ b/libflashrom.h @@ -29,10 +29,11 @@ /** @ingroup flashrom-general */ enum flashrom_log_level { /* This has to match enum msglevel. */ FLASHROM_MSG_ERROR = 0, - FLASHROM_MSG_INFO = 1, - FLASHROM_MSG_DEBUG = 2, - FLASHROM_MSG_DEBUG2 = 3, - FLASHROM_MSG_SPEW = 4, + FLASHROM_MSG_WARN = 1, + FLASHROM_MSG_INFO = 2, + FLASHROM_MSG_DEBUG = 3, + FLASHROM_MSG_DEBUG2 = 4, + FLASHROM_MSG_SPEW = 5, }; /** @ingroup flashrom-general */ typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format, va_list);