aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/vpd/vpd.h
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-09-27 16:21:22 +0200
committerNico Huber <nico.h@gmx.de>2020-12-27 15:33:24 +0000
commitc00ffef47c342cc65a5fed11ba2adc0d28da7129 (patch)
tree482ca0492850851705c90ec82ec04ee2b3473d26 /src/drivers/vpd/vpd.h
parentbdb37982d617a5275fe980eec6d86a4072f31340 (diff)
vpd: Add vpd_get_int() function
Change-Id: I1c1b5710a5236fe4a3bdda1fc978393e636e9817 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45773 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/vpd/vpd.h')
-rw-r--r--src/drivers/vpd/vpd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/vpd/vpd.h b/src/drivers/vpd/vpd.h
index 25e0aed4ee..817867aba4 100644
--- a/src/drivers/vpd/vpd.h
+++ b/src/drivers/vpd/vpd.h
@@ -50,4 +50,13 @@ const void *vpd_find(const char *key, int *size, enum vpd_region region);
bool vpd_get_bool(const char *key, enum vpd_region region,
uint8_t *val);
+/*
+ * Find value of integer type by vpd key.
+ *
+ * Expects to find a decimal string, trailing chars are ignored.
+ * Returns true if the key is found and the value is not too long and
+ * starts with a decimal digit.
+ */
+bool vpd_get_int(const char *key, enum vpd_region region, int *val);
+
#endif /* __VPD_H__ */