Nico Huber merged this change.

View Change

Approvals: build bot (Jenkins): Verified David Hendricks: Looks good to me, approved
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(-)

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);

To view, visit change 20267. To unsubscribe, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf175c5f2a415365bd756ca813e724f6797459b2
Gerrit-Change-Number: 20267
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>