From c134dbfeaa1f24c892919b483c3fc00a05822efb Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Fri, 13 Jan 2017 17:56:17 +1100 Subject: vpd: add vpd_valid() to check keyword VPD blobs Adds a function to check whether a blob is a valid IBM ASCII keyword VPD blob. This allows us to recognise when we do and do not have a VPD blob and act accordingly. Signed-off-by: Oliver O'Halloran [stewart@linux.vnet.ibm.com: check if initial 0x84 exists. Spotted by Vasant] Signed-off-by: Stewart Smith --- include/vpd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/vpd.h') diff --git a/include/vpd.h b/include/vpd.h index bc60d81..02bbde2 100644 --- a/include/vpd.h +++ b/include/vpd.h @@ -34,6 +34,8 @@ const void *vpd_find(const void *vpd, size_t vpd_size, const char *record, const char *keyword, uint8_t *sz); +bool vpd_valid(const void *vvpd, size_t vpd_size); + /* Add model property to dt_root */ void add_dtb_model(void); -- cgit v1.1