diff options
| author | Michael Brown | 2011-01-11 02:37:27 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-01-19 14:52:55 +0100 |
| commit | 267ef3179177cc345e5c1a550cd187a6e5cc8e69 (patch) | |
| tree | 7de20f107dd50bc3bd6d72dd99b0b8ad68266a2f /src/include | |
| parent | [nvo] Allow resizing of non-volatile stored option blocks (diff) | |
| download | ipxe-267ef3179177cc345e5c1a550cd187a6e5cc8e69.tar.gz ipxe-267ef3179177cc345e5c1a550cd187a6e5cc8e69.tar.xz ipxe-267ef3179177cc345e5c1a550cd187a6e5cc8e69.zip | |
[pci] Allow pci_vpd_init() return status to be ignored
Most xxx_init() functions are void functions with no failure cases.
Allow pci_vpd_init() to be used in the same way. (Subsequent calls to
pci_vpd_read() etc. will fail if pci_vpd_init() fails.)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/pcivpd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/ipxe/pcivpd.h b/src/include/ipxe/pcivpd.h index 8b973ea1c..469ec29f8 100644 --- a/src/include/ipxe/pcivpd.h +++ b/src/include/ipxe/pcivpd.h @@ -134,6 +134,17 @@ struct pci_vpd { }; /** + * Check for presence of PCI VPD + * + * @v vpd PCI VPD + * @ret is_present VPD is present + */ +static inline __attribute__ (( always_inline )) int +pci_vpd_is_present ( struct pci_vpd *vpd ) { + return ( vpd->cap != 0 ); +} + +/** * Check if PCI VPD read cache is valid * * @v vpd PCI VPD |
