"in_protocol" is used in more than shim.o; make it not static.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2017-11-02 18:05:12 -04:00
parent b9e81483bb
commit 97a3f6cf94
5 changed files with 9 additions and 5 deletions

View File

@ -38,8 +38,6 @@
#include "Ip4Config2.h" #include "Ip4Config2.h"
#include "Ip6Config.h" #include "Ip6Config.h"
extern UINT8 in_protocol;
#define perror(fmt, ...) ({ \ #define perror(fmt, ...) ({ \
UINTN __perror_ret = 0; \ UINTN __perror_ret = 0; \
if (!in_protocol) \ if (!in_protocol) \

View File

@ -93,4 +93,8 @@ extern EFI_STATUS print_crypto_errors(EFI_STATUS rc, char *file, const char *fun
extern VOID msleep(unsigned long msecs); extern VOID msleep(unsigned long msecs);
/* This is used in various things to determine if we should print to the
* console */
extern UINT8 in_protocol;
#endif /* _SHIM_LIB_CONSOLE_H */ #endif /* _SHIM_LIB_CONSOLE_H */

View File

@ -489,3 +489,7 @@ msleep(unsigned long msecs)
{ {
uefi_call_wrapper(BS->Stall, 1, msecs); uefi_call_wrapper(BS->Stall, 1, msecs);
} }
/* This is used in various things to determine if we should print to the
* console */
UINT8 in_protocol = 0;

1
shim.c
View File

@ -62,7 +62,6 @@ static EFI_STATUS (EFIAPI *entry_point) (EFI_HANDLE image_handle, EFI_SYSTEM_TAB
static CHAR16 *second_stage; static CHAR16 *second_stage;
static void *load_options; static void *load_options;
static UINT32 load_options_size; static UINT32 load_options_size;
static UINT8 in_protocol;
#define perror(fmt, ...) ({ \ #define perror(fmt, ...) ({ \
UINTN __perror_ret = 0; \ UINTN __perror_ret = 0; \

3
tpm.c
View File

@ -4,8 +4,7 @@
#include <stdint.h> #include <stdint.h>
#include "tpm.h" #include "tpm.h"
#include "console.h"
extern UINT8 in_protocol;
#define perror(fmt, ...) ({ \ #define perror(fmt, ...) ({ \
UINTN __perror_ret = 0; \ UINTN __perror_ret = 0; \