History

efi: Fix build error due to enum collision between efi.h and ima.h

The following commit: a893ea15d764 ("tpm: move tpm_chip definition to include/linux/tpm.h") introduced a build error when both IMA and EFI are enabled: In file included from ../security/integrity/ima/ima_fs.c:30: ../security/integrity/ima/ima.h:176:7: error: redeclaration of enumerator "NONE" What happens is that both headers (ima.h and efi.h) defines the same 'NONE' constant, and it broke when they started getting included from the same file: Rework to prefix the EFI enum with 'EFI_*'.

Anders Roxell committed 7 years ago

Commit 5c418dc1 parent 69c1f393 files · +39 −39Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/efi.h+13−13
@@ -1719,19 +1719,19 @@ extern int efi_tpm_eventlog_init(void); · 1718 unmodified lines
17191719 * fault happened while executing an efi runtime service.
17201720 */
17211721 enum efi_rts_ids {
1722− NONE,
1723− GET_TIME,
1724− SET_TIME,
1725− GET_WAKEUP_TIME,
1726− SET_WAKEUP_TIME,
1727− GET_VARIABLE,
1728− GET_NEXT_VARIABLE,
1729− SET_VARIABLE,
1730− QUERY_VARIABLE_INFO,
1731− GET_NEXT_HIGH_MONO_COUNT,
1732− RESET_SYSTEM,
1733− UPDATE_CAPSULE,
1734− QUERY_CAPSULE_CAPS,
1722+ EFI_NONE,
1723+ EFI_GET_TIME,
1724+ EFI_SET_TIME,
1725+ EFI_GET_WAKEUP_TIME,
1726+ EFI_SET_WAKEUP_TIME,
1727+ EFI_GET_VARIABLE,
1728+ EFI_GET_NEXT_VARIABLE,
1729+ EFI_SET_VARIABLE,
1730+ EFI_QUERY_VARIABLE_INFO,
1731+ EFI_GET_NEXT_HIGH_MONO_COUNT,
1732+ EFI_RESET_SYSTEM,
1733+ EFI_UPDATE_CAPSULE,
1734+ EFI_QUERY_CAPSULE_CAPS,
17351735 };
17361736
17371737 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t