Ian Ray | c0293da | 2017-08-22 09:03:54 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 General Electric Company |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include "common.h" |
| 8 | |
| 9 | /* |
| 10 | * Read VPD from given data, verify content, and call callback |
| 11 | * for each vital product data block. |
| 12 | * |
| 13 | * Returns Non-zero on error. Negative numbers encode errno. |
| 14 | */ |
| 15 | int vpd_reader( |
| 16 | size_t size, |
| 17 | uint8_t * data, |
| 18 | void * userdata, |
| 19 | int (*fn)( |
| 20 | void * userdata, |
| 21 | uint8_t id, |
| 22 | uint8_t version, |
| 23 | uint8_t type, |
| 24 | size_t size, |
| 25 | uint8_t const * data)); |