Add comment about why we bother to use endian macros here, and why we

must use bitfields.
This commit is contained in:
imp 2019-03-19 15:03:20 +00:00
parent 9485b14635
commit 148c0d4211

View File

@ -259,6 +259,14 @@ typedef struct {
extern uint32_t pci_numdevs;
/*
* The bitfield has to be stable an match the fields below (so that
* match_flag_vendor must be bit 0) so we have to do the endian
* dance. We can't use enums or #define constants because then the
* the macros for subsetting matches wouldn't work. These tables
* are parsed by devmatch and others to connect modules with
* devices on the PCI bus.
*/
struct pci_device_table {
#if BYTE_ORDER == LITTLE_ENDIAN
uint16_t