Smbios: add struct layout check

This commit is contained in:
李通洲
2024-05-10 22:46:10 +08:00
parent 08a940bfd4
commit fef3100fd7
7 changed files with 29 additions and 13 deletions
+5 -2
View File
@@ -18,13 +18,16 @@ typedef struct FFSmbiosSystemInfo
uint8_t ClockSeqHiAndReserved;
uint8_t ClockSeqLow;
uint8_t Node[6];
} UUID; // varies
} __attribute__((__packed__)) UUID; // varies
uint8_t WakeUpType; // enum
// 2.4+
uint8_t SKUNumber; // string
uint8_t Family; // string
} FFSmbiosSystemInfo;
} __attribute__((__packed__)) FFSmbiosSystemInfo;
static_assert(offsetof(FFSmbiosSystemInfo, Family) == 0x1A,
"FFSmbiosSystemInfo: Wrong struct alignment");
const char* ffDetectHost(FFHostResult* host)
{