mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-05 22:16:41 +00:00
Make sure all of our include files have proper guards.
... and make them all the same formatting too. Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
dc62a3c4dc
commit
1f1ec4cea8
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_HTTP_PROTOCOL_H__
|
#ifndef SHIM_HTTP_H
|
||||||
#define __EFI_HTTP_PROTOCOL_H__
|
#define SHIM_HTTP_H
|
||||||
|
|
||||||
#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \
|
#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \
|
||||||
{ \
|
{ \
|
||||||
@ -514,4 +514,4 @@ struct _EFI_HTTP_PROTOCOL {
|
|||||||
EFI_HTTP_POLL Poll;
|
EFI_HTTP_POLL Poll;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_HTTP_H */
|
||||||
|
@ -15,8 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
This Protocol is introduced in UEFI Specification 2.5
|
This Protocol is introduced in UEFI Specification 2.5
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#ifndef __EFI_IP4CONFIG2_PROTOCOL_H__
|
#ifndef SHIM_IP4CONFIG2_H
|
||||||
#define __EFI_IP4CONFIG2_PROTOCOL_H__
|
#define SHIM_IP4CONFIG2_H
|
||||||
|
|
||||||
#include <efiip.h>
|
#include <efiip.h>
|
||||||
|
|
||||||
@ -312,4 +312,4 @@ struct _EFI_IP4_CONFIG2_PROTOCOL {
|
|||||||
EFI_IP4_CONFIG2_UNREGISTER_NOTIFY UnregisterDataNotify;
|
EFI_IP4_CONFIG2_UNREGISTER_NOTIFY UnregisterDataNotify;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_IP4CONFIG2_H */
|
||||||
|
@ -12,8 +12,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#ifndef __EFI_IP6CONFIG_PROTOCOL_H__
|
#ifndef SHIM_IP6CONFIG_H
|
||||||
#define __EFI_IP6CONFIG_PROTOCOL_H__
|
#define SHIM_IP6CONFIG_H
|
||||||
|
|
||||||
#include <efiip.h>
|
#include <efiip.h>
|
||||||
|
|
||||||
@ -363,4 +363,4 @@ struct _EFI_IP6_CONFIG_PROTOCOL {
|
|||||||
EFI_IP6_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify;
|
EFI_IP6_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_IP6CONFIG_H */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __PASSWORD_CRYPT_H__
|
#ifndef SHIM_PASSWORDCRYPT_H
|
||||||
#define __PASSWORD_CRYPT_H__
|
#define SHIM_PASSWORDCRYPT_H
|
||||||
|
|
||||||
enum HashMethod {
|
enum HashMethod {
|
||||||
TRADITIONAL_DES = 0,
|
TRADITIONAL_DES = 0,
|
||||||
@ -24,4 +24,4 @@ EFI_STATUS password_crypt (const char *password, UINT32 pw_length,
|
|||||||
const PASSWORD_CRYPT *pw_hash, UINT8 *hash);
|
const PASSWORD_CRYPT *pw_hash, UINT8 *hash);
|
||||||
UINT16 get_hash_size (const UINT16 method);
|
UINT16 get_hash_size (const UINT16 method);
|
||||||
|
|
||||||
#endif /* __PASSWORD_CRYPT_H__ */
|
#endif /* SHIM_PASSWORDCRYPT_H */
|
||||||
|
@ -19,8 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __PE_IMAGE_H__
|
#ifndef SHIM_PEIMAGE_H
|
||||||
#define __PE_IMAGE_H__
|
#define SHIM_PEIMAGE_H
|
||||||
|
|
||||||
#include <wincert.h>
|
#include <wincert.h>
|
||||||
|
|
||||||
@ -786,4 +786,4 @@ typedef struct {
|
|||||||
EFI_IMAGE_OPTIONAL_HEADER_UNION *PEHdr;
|
EFI_IMAGE_OPTIONAL_HEADER_UNION *PEHdr;
|
||||||
} PE_COFF_LOADER_IMAGE_CONTEXT;
|
} PE_COFF_LOADER_IMAGE_CONTEXT;
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_PEIMAGE_H */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef SHIM_CONFIGTABLE_H
|
||||||
|
#define SHIM_CONFIGTABLE_H
|
||||||
|
|
||||||
/* definitions straight from TianoCore */
|
/* definitions straight from TianoCore */
|
||||||
|
|
||||||
typedef UINT32 EFI_IMAGE_EXECUTION_ACTION;
|
typedef UINT32 EFI_IMAGE_EXECUTION_ACTION;
|
||||||
@ -66,3 +69,4 @@ configtable_find_image(const EFI_DEVICE_PATH *DevicePath);
|
|||||||
int
|
int
|
||||||
configtable_image_is_forbidden(const EFI_DEVICE_PATH *DevicePath);
|
configtable_image_is_forbidden(const EFI_DEVICE_PATH *DevicePath);
|
||||||
|
|
||||||
|
#endif /* SHIM_CONFIGTABLE_H */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _SHIM_LIB_CONSOLE_H
|
#ifndef SHIM_CONSOLE_H
|
||||||
#define _SHIM_LIB_CONSOLE_H 1
|
#define SHIM_CONSOLE_H
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
console_get_keystroke(EFI_INPUT_KEY *key);
|
console_get_keystroke(EFI_INPUT_KEY *key);
|
||||||
@ -42,7 +42,7 @@ EFI_STATUS
|
|||||||
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
|
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
|
||||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||||
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
||||||
OUT BOOLEAN *GopUgaExists, OPTIONAL
|
OUT BOOLEAN *GopUgaExists, OPTIONAL
|
||||||
OUT BOOLEAN *StdInLocked OPTIONAL
|
OUT BOOLEAN *StdInLocked OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -97,4 +97,4 @@ extern VOID msleep(unsigned long msecs);
|
|||||||
* console */
|
* console */
|
||||||
extern UINT8 in_protocol;
|
extern UINT8 in_protocol;
|
||||||
|
|
||||||
#endif /* _SHIM_LIB_CONSOLE_H */
|
#endif /* SHIM_CONSOLE_H */
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
* See crypt_blowfish.c for more information.
|
* See crypt_blowfish.c for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CRYPT_BLOWFISH_H
|
#ifndef SHIM_CRYPT_BLOWFISH_H
|
||||||
#define _CRYPT_BLOWFISH_H
|
#define SHIM_CRYPT_BLOWFISH_H
|
||||||
|
|
||||||
char *crypt_blowfish_rn(const char *key, const char *setting,
|
char *crypt_blowfish_rn(const char *key, const char *setting,
|
||||||
char *output, int size);
|
char *output, int size);
|
||||||
#endif
|
|
||||||
|
#endif /* SHIM_CRYPT_BLOWFISH_H */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#ifndef _INC_EFIAUTHENTICATED_H
|
#ifndef SHIM_EFIAUTHENTICATED_H
|
||||||
#define _INC_EFIAUTHENTICATED_H
|
#define SHIM_EFIAUTHENTICATED_H
|
||||||
|
|
||||||
#include <wincert.h>
|
#include <wincert.h>
|
||||||
//***********************************************************************
|
//***********************************************************************
|
||||||
// Signature Database
|
// Signature Database
|
||||||
@ -219,4 +220,4 @@ typedef struct {
|
|||||||
#define OFFSET_OF_AUTHINFO2_CERT_DATA ((OFFSET_OF (EFI_VARIABLE_AUTHENTICATION_2, AuthInfo)) + \
|
#define OFFSET_OF_AUTHINFO2_CERT_DATA ((OFFSET_OF (EFI_VARIABLE_AUTHENTICATION_2, AuthInfo)) + \
|
||||||
(OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData)))
|
(OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData)))
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_EFIAUTHENTICATED_H */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef SHIM_ERRORS_H
|
||||||
|
#define SHIM_ERRORS_H
|
||||||
|
|
||||||
#include <efierr.h>
|
#include <efierr.h>
|
||||||
|
|
||||||
#ifndef EFI_INCOMPATIBLE_VERSION
|
#ifndef EFI_INCOMPATIBLE_VERSION
|
||||||
@ -7,3 +10,4 @@
|
|||||||
#define EFI_SECURITY_VIOLATION EFIERR(26)
|
#define EFI_SECURITY_VIOLATION EFIERR(26)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* SHIM_ERRORS_H */
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
|
#ifndef SHIM_LIB_EXECUTE_H
|
||||||
|
#define SHIM_LIB_EXECUTE_H
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
generate_path(CHAR16* name, EFI_LOADED_IMAGE *li,
|
generate_path(CHAR16* name, EFI_LOADED_IMAGE *li,
|
||||||
EFI_DEVICE_PATH **path, CHAR16 **PathName);
|
EFI_DEVICE_PATH **path, CHAR16 **PathName);
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
execute(EFI_HANDLE image, CHAR16 *name);
|
execute(EFI_HANDLE image, CHAR16 *name);
|
||||||
|
|
||||||
|
#endif /* SHIM_LIB_EXECUTE_H */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef SHIM_GUID_H
|
||||||
|
#define SHIM_GUID_H
|
||||||
|
|
||||||
#include <efi.h>
|
#include <efi.h>
|
||||||
|
|
||||||
extern EFI_GUID GV_GUID;
|
extern EFI_GUID GV_GUID;
|
||||||
@ -12,3 +15,5 @@ extern EFI_GUID EFI_CERT_SHA256_GUID;
|
|||||||
extern EFI_GUID MOK_OWNER;
|
extern EFI_GUID MOK_OWNER;
|
||||||
extern EFI_GUID SECURITY_PROTOCOL_GUID;
|
extern EFI_GUID SECURITY_PROTOCOL_GUID;
|
||||||
extern EFI_GUID SECURITY2_PROTOCOL_GUID;
|
extern EFI_GUID SECURITY2_PROTOCOL_GUID;
|
||||||
|
|
||||||
|
#endif /* SHIM_GUID_H */
|
||||||
|
@ -101,4 +101,4 @@ hexdump(UINT8 *data, UINTN size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* STATIC_HEXDUMP_H */
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
* Corporation.
|
* Corporation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _HTTPBOOT_H_
|
#ifndef SHIM_HTTPBOOT_H
|
||||||
#define _HTTPBOOT_H_
|
#define SHIM_HTTPBOOT_H
|
||||||
|
|
||||||
extern BOOLEAN find_httpboot(EFI_HANDLE device);
|
extern BOOLEAN find_httpboot(EFI_HANDLE device);
|
||||||
extern EFI_STATUS httpboot_fetch_buffer(EFI_HANDLE image, VOID **buffer,
|
extern EFI_STATUS httpboot_fetch_buffer(EFI_HANDLE image, VOID **buffer,
|
||||||
UINT64 *buf_size);
|
UINT64 *buf_size);
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_HTTPBOOT_H */
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef _NETBOOT_H_
|
#ifndef SHIM_NETBOOT_H
|
||||||
#define _NETBOOT_H_
|
#define SHIM_NETBOOT_H
|
||||||
|
|
||||||
extern BOOLEAN findNetboot(EFI_HANDLE image_handle);
|
extern BOOLEAN findNetboot(EFI_HANDLE image_handle);
|
||||||
|
|
||||||
extern EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle);
|
extern EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle);
|
||||||
|
|
||||||
extern EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz);
|
extern EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz);
|
||||||
#endif
|
|
||||||
|
#endif /* SHIM_NETBOOT_H */
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#ifndef SHIM_REPLACEMENTS_H
|
#ifndef SHIM_REPLACEMENTS_H
|
||||||
#define SHIM_REPLACEMENTS_H 1
|
#define SHIM_REPLACEMENTS_H
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VERIFIED_BY_NOTHING,
|
VERIFIED_BY_NOTHING,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _SHIM_LIB_SECURITY_POLICY_H
|
#ifndef SHIM_SECURITY_POLICY_H
|
||||||
#define _SHIM_LIB_SECURITY_POLICY_H 1
|
#define SHIM_SECURITY_POLICY_H
|
||||||
|
|
||||||
#if defined(OVERRIDE_SECURITY_POLICY)
|
#if defined(OVERRIDE_SECURITY_POLICY)
|
||||||
typedef EFI_STATUS (*SecurityHook) (void *data, UINT32 len);
|
typedef EFI_STATUS (*SecurityHook) (void *data, UINT32 len);
|
||||||
@ -12,4 +12,4 @@ void
|
|||||||
security_protocol_set_hashes(unsigned char *esl, int len);
|
security_protocol_set_hashes(unsigned char *esl, int len);
|
||||||
#endif /* OVERRIDE_SECURITY_POLICY */
|
#endif /* OVERRIDE_SECURITY_POLICY */
|
||||||
|
|
||||||
#endif /* SHIM_LIB_SECURITY_POLICY_H */
|
#endif /* SHIM_SECURITY_POLICY_H */
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
|
#ifndef SHIM_SHELL_H
|
||||||
|
#define SHIM_SHELL_H
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
argsplit(EFI_HANDLE image, int *argc, CHAR16*** ARGV);
|
argsplit(EFI_HANDLE image, int *argc, CHAR16*** ARGV);
|
||||||
|
|
||||||
|
#endif /* SHIM_SHELL_H */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef SHIM_SIMPLE_FILE_H
|
||||||
|
#define SHIM_SIMPLE_FILE_H
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
simple_file_open (EFI_HANDLE image, CHAR16 *name, EFI_FILE **file, UINT64 mode);
|
simple_file_open (EFI_HANDLE image, CHAR16 *name, EFI_FILE **file, UINT64 mode);
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -19,3 +22,5 @@ simple_file_selector(EFI_HANDLE *im, CHAR16 **title, CHAR16 *name,
|
|||||||
CHAR16 *filter, CHAR16 **result);
|
CHAR16 *filter, CHAR16 **result);
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
simple_volume_selector(CHAR16 **title, CHAR16 **selected, EFI_HANDLE *h);
|
simple_volume_selector(CHAR16 **title, CHAR16 **selected, EFI_HANDLE *h);
|
||||||
|
|
||||||
|
#endif /* SHIM_SIMPLE_FILE_H */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef SHIM_TPM_H
|
||||||
|
#define SHIM_TPM_H
|
||||||
|
|
||||||
#include <efilib.h>
|
#include <efilib.h>
|
||||||
|
|
||||||
#define EFI_TPM_GUID {0xf541796d, 0xa62e, 0x4954, {0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd }};
|
#define EFI_TPM_GUID {0xf541796d, 0xa62e, 0x4954, {0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd }};
|
||||||
@ -186,3 +189,5 @@ typedef UINT32 TCG_EVENTTYPE;
|
|||||||
#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)
|
#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)
|
||||||
|
|
||||||
#define PE_COFF_IMAGE 0x0000000000000010
|
#define PE_COFF_IMAGE 0x0000000000000010
|
||||||
|
|
||||||
|
#endif /* SHIM_TPM_H */
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include <efiauthenticated.h>
|
#ifndef SHIM_VARIABLES_H
|
||||||
|
#define SHIM_VARIABLES_H
|
||||||
|
|
||||||
|
#include <efiauthenticated.h>
|
||||||
#include <PeImage.h> /* for SHA256_DIGEST_SIZE */
|
#include <PeImage.h> /* for SHA256_DIGEST_SIZE */
|
||||||
|
|
||||||
#define certlist_for_each_certentry(cl, cl_init, s, s_init) \
|
#define certlist_for_each_certentry(cl, cl_init, s, s_init) \
|
||||||
@ -57,3 +59,5 @@ variable_enroll_hash(CHAR16 *var, EFI_GUID owner,
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
variable_create_esl(void *cert, int cert_len, EFI_GUID *type, EFI_GUID *owner,
|
variable_create_esl(void *cert, int cert_len, EFI_GUID *type, EFI_GUID *owner,
|
||||||
void **out, int *outlen);
|
void **out, int *outlen);
|
||||||
|
|
||||||
|
#endif /* SHIM_VARIABLES_H */
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#define VERSION "1.3.4"
|
|
||||||
|
|
||||||
static void
|
|
||||||
version(const char *progname)
|
|
||||||
{
|
|
||||||
printf("%s " VERSION "\n", progname);
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _INC_WINCERT_H
|
#ifndef SHIM_WINCERT_H
|
||||||
#define _INC_WINCERT_H
|
#define SHIM_WINCERT_H
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The WIN_CERTIFICATE structure is part of the PE/COFF specification.
|
/// The WIN_CERTIFICATE structure is part of the PE/COFF specification.
|
||||||
@ -30,4 +30,4 @@ typedef struct {
|
|||||||
} WIN_CERTIFICATE;
|
} WIN_CERTIFICATE;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif /* SHIM_WINCERT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user