2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-08-22 06:03:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 General Electric Company
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2018-10-17 08:33:30 +00:00
|
|
|
struct vpd_cache;
|
|
|
|
|
2017-08-22 06:03:54 +00:00
|
|
|
/*
|
2018-10-17 08:33:30 +00:00
|
|
|
* Read VPD from given data, verify content, call callback for each vital
|
|
|
|
* product data block.
|
|
|
|
*
|
|
|
|
* cache: structure used by process block to store VPD information
|
|
|
|
* process_block: callback called for each VPD data block
|
2017-08-22 06:03:54 +00:00
|
|
|
*
|
|
|
|
* Returns Non-zero on error. Negative numbers encode errno.
|
|
|
|
*/
|
2018-10-17 08:33:30 +00:00
|
|
|
int read_vpd(struct vpd_cache *cache,
|
|
|
|
int (*process_block)(struct vpd_cache *,
|
|
|
|
u8 id, u8 version, u8 type,
|
|
|
|
size_t size, u8 const *data));
|