diff options
author | Kay Sievers <kay@vrfy.org> | 2013-03-01 12:22:41 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-03-01 12:22:41 +0100 |
commit | 1958eea0fff3374dd87fe2c13a393348b78a7e86 (patch) | |
tree | c2d91c461219e35b767f0ccf52ba2ed6ba3f61d1 /src | |
parent | 0f6722200832f7ef61f05c9bc28d68f64a0da98e (diff) |
remove stringify(), we have config.h now
Diffstat (limited to 'src')
-rw-r--r-- | src/efi/gummiboot.c | 15 | ||||
-rw-r--r-- | src/setup/setup.c | 5 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index 956a002..bafaad8 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -23,11 +23,8 @@ * -- Albert Einstein */ -#include "efi.h" -#include "efilib.h" - -#define _stringify(s) #s -#define stringify(s) _stringify(s) +#include <efi.h> +#include <efilib.h> #ifndef EFI_OS_INDICATIONS_BOOT_TO_FW_UI #define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001ULL @@ -38,7 +35,7 @@ #endif /* magic string to find in the binary image */ -static const char __attribute__((used)) magic[] = "#### LoaderInfo: gummiboot " stringify(VERSION) " ####"; +static const char __attribute__((used)) magic[] = "#### LoaderInfo: gummiboot " VERSION " ####"; /* * Allocated random UUID, intended to be shared across tools that implement @@ -468,7 +465,7 @@ static VOID dump_status(Config *config, CHAR16 *loaded_image_path) { uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); - Print(L"gummiboot version: " stringify(VERSION) "\n"); + Print(L"gummiboot version: " VERSION "\n"); Print(L"loaded image: %s\n", loaded_image_path); Print(L"UEFI version: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff); Print(L"firmware vendor: %s\n", ST->FirmwareVendor); @@ -911,7 +908,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, clearline+1); break; case 'v': - status = PoolPrint(L"gummiboot " stringify(VERSION) ", UEFI %d.%02d, %s %d.%02d", + status = PoolPrint(L"gummiboot " VERSION ", UEFI %d.%02d, %s %d.%02d", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff, ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); break; @@ -1855,7 +1852,7 @@ EFI_STATUS EFIAPI efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { InitializeLib(image, sys_table); init_usec = time_usec(); efivar_set_time_usec(L"LoaderTimeInitUSec", init_usec); - efivar_set(L"LoaderInfo", L"gummiboot " stringify(VERSION), FALSE); + efivar_set(L"LoaderInfo", L"gummiboot " VERSION, FALSE); s = PoolPrint(L"%s %d.%02d", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); efivar_set(L"LoaderFirmwareInfo", s, FALSE); FreePool(s); diff --git a/src/setup/setup.c b/src/setup/setup.c index 214aa6e..49a4537 100644 --- a/src/setup/setup.c +++ b/src/setup/setup.c @@ -40,9 +40,6 @@ #include "efivars.h" -#define _stringify(s) #s -#define stringify(s) _stringify(s) - #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) #define streq(a,b) (strcmp((a),(b)) == 0) @@ -1294,7 +1291,7 @@ static int parse_argv(int argc, char *argv[]) { return 0; case ARG_VERSION: - printf(stringify(VERSION) "\n"); + printf(VERSION "\n"); return 0; case ARG_PATH: |