mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[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>
This commit is contained in:
@@ -133,6 +133,17 @@ struct pci_vpd {
|
||||
struct pci_vpd_cache cache;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user