mirror of
https://github.com/systemd/systemd
synced 2024-11-05 18:25:39 +00:00
boot: Make OFFSETOF lowercase
This is more in line with the userspace offsetof.
This commit is contained in:
parent
245e9d55ae
commit
7700e9ba15
4 changed files with 7 additions and 7 deletions
|
@ -26,7 +26,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(
|
|||
assert(description);
|
||||
|
||||
desc_len = StrSize(description);
|
||||
tcg_event = xallocate_zero_pool(OFFSETOF(TCG_PCR_EVENT, Event) + desc_len);
|
||||
tcg_event = xallocate_zero_pool(offsetof(TCG_PCR_EVENT, Event) + desc_len);
|
||||
*tcg_event = (TCG_PCR_EVENT) {
|
||||
.EventSize = desc_len,
|
||||
.PCRIndex = pcrindex,
|
||||
|
@ -57,9 +57,9 @@ static EFI_STATUS tpm2_measure_to_pcr_and_event_log(
|
|||
assert(description);
|
||||
|
||||
desc_len = StrSize(description);
|
||||
tcg_event = xallocate_zero_pool(OFFSETOF(EFI_TCG2_EVENT, Event) + desc_len);
|
||||
tcg_event = xallocate_zero_pool(offsetof(EFI_TCG2_EVENT, Event) + desc_len);
|
||||
*tcg_event = (EFI_TCG2_EVENT) {
|
||||
.Size = OFFSETOF(EFI_TCG2_EVENT, Event) + desc_len,
|
||||
.Size = offsetof(EFI_TCG2_EVENT, Event) + desc_len,
|
||||
.Header.HeaderSize = sizeof(EFI_TCG2_EVENT_HEADER),
|
||||
.Header.HeaderVersion = EFI_TCG2_EVENT_HEADER_VERSION,
|
||||
.Header.PCRIndex = pcrindex,
|
||||
|
|
|
@ -129,7 +129,7 @@ static inline BOOLEAN verify_pe(const struct PeFileHeader *pe) {
|
|||
static inline UINTN section_table_offset(const struct DosFileHeader *dos, const struct PeFileHeader *pe) {
|
||||
assert(dos);
|
||||
assert(pe);
|
||||
return dos->ExeHeader + OFFSETOF(struct PeFileHeader, OptionalHeader) + pe->FileHeader.SizeOfOptionalHeader;
|
||||
return dos->ExeHeader + offsetof(struct PeFileHeader, OptionalHeader) + pe->FileHeader.SizeOfOptionalHeader;
|
||||
}
|
||||
|
||||
static void locate_sections(
|
||||
|
|
|
@ -566,7 +566,7 @@ EFI_STATUS get_file_info_harder(
|
|||
EFI_FILE_INFO **ret,
|
||||
UINTN *ret_size) {
|
||||
|
||||
UINTN size = OFFSETOF(EFI_FILE_INFO, FileName) + 256;
|
||||
UINTN size = offsetof(EFI_FILE_INFO, FileName) + 256;
|
||||
_cleanup_freepool_ EFI_FILE_INFO *fi = NULL;
|
||||
EFI_STATUS err;
|
||||
|
||||
|
@ -610,7 +610,7 @@ EFI_STATUS readdir_harder(
|
|||
* the specified buffer needs to be freed by caller, after final use. */
|
||||
|
||||
if (!*buffer) {
|
||||
sz = OFFSETOF(EFI_FILE_INFO, FileName) /* + 256 */;
|
||||
sz = offsetof(EFI_FILE_INFO, FileName) /* + 256 */;
|
||||
*buffer = xallocate_pool(sz);
|
||||
*buffer_size = sz;
|
||||
} else
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
/* This TPM PCR is where most Linux infrastructure extends the initrd binary images into, and so do we. */
|
||||
#define TPM_PCR_INDEX_INITRD 4
|
||||
|
||||
#define OFFSETOF(x,y) __builtin_offsetof(x,y)
|
||||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
|
||||
#define UINTN_MAX (~(UINTN)0)
|
||||
#define INTN_MAX ((INTN)(UINTN_MAX>>1))
|
||||
|
|
Loading…
Reference in a new issue