diff options
author | smh <smh@FreeBSD.org> | 2016-01-28 12:11:42 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2016-01-28 12:11:42 +0000 |
commit | 634e73dbb861268bd122cc29b02b1a56df450dd6 (patch) | |
tree | 7fd1c618154ccfb649dc2a3ef4b6030c01df8f81 /sys/boot/efi/loader/main.c | |
parent | fe8f0aa165649acdaf27427ebefed487585a9d35 (diff) | |
download | FreeBSD-src-634e73dbb861268bd122cc29b02b1a56df450dd6.zip FreeBSD-src-634e73dbb861268bd122cc29b02b1a56df450dd6.tar.gz |
MFC r281169, r293724, r293796, r294029, r294041, r294058
MFC r281169 (by andrew):
Make global variabled only used in this file static
MFC r294058:
Make common boot file_loadraw name parameter const
MFC r294041:
Remove unused reg param from fdt_fixup_memory
MFC r293724:
Enable warnings in EFI boot code
MFC r293796:
Fix typo in libefi.c
MFC r294029:
Only build EFI components on supported compilers
Sponsored by: Multiplay
Diffstat (limited to 'sys/boot/efi/loader/main.c')
-rw-r--r-- | sys/boot/efi/loader/main.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/boot/efi/loader/main.c b/sys/boot/efi/loader/main.c index ec9f9af..46b7c06 100644 --- a/sys/boot/efi/loader/main.c +++ b/sys/boot/efi/loader/main.c @@ -67,6 +67,7 @@ main(int argc, CHAR16 *argv[]) EFI_LOADED_IMAGE *img; EFI_GUID *guid; int i, j, vargood; + UINTN k; /* * XXX Chicken-and-egg problem; we want to have console output @@ -154,10 +155,10 @@ main(int argc, CHAR16 *argv[]) archsw.arch_copyout = efi_copyout; archsw.arch_readin = efi_readin; - for (i = 0; i < ST->NumberOfTableEntries; i++) { - guid = &ST->ConfigurationTable[i].VendorGuid; + for (k = 0; k < ST->NumberOfTableEntries; k++) { + guid = &ST->ConfigurationTable[k].VendorGuid; if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) { - smbios_detect(ST->ConfigurationTable[i].VendorTable); + smbios_detect(ST->ConfigurationTable[k].VendorTable); break; } } @@ -241,8 +242,9 @@ command_memmap(int argc, char *argv[]) for (i = 0, p = map; i < ndesc; i++, p = NextMemoryDescriptor(p, dsz)) { - printf("%23s %012lx %012lx %08lx ", types[p->Type], - p->PhysicalStart, p->VirtualStart, p->NumberOfPages); + printf("%23s %012jx %012jx %08jx ", types[p->Type], + (uintmax_t)p->PhysicalStart, (uintmax_t)p->VirtualStart, + (uintmax_t)p->NumberOfPages); if (p->Attribute & EFI_MEMORY_UC) printf("UC "); if (p->Attribute & EFI_MEMORY_WC) @@ -283,9 +285,10 @@ guid_to_string(EFI_GUID *guid) static int command_configuration(int argc, char *argv[]) { - int i; + UINTN i; - printf("NumberOfTableEntries=%ld\n", ST->NumberOfTableEntries); + printf("NumberOfTableEntries=%lu\n", + (unsigned long)ST->NumberOfTableEntries); for (i = 0; i < ST->NumberOfTableEntries; i++) { EFI_GUID *guid; @@ -379,9 +382,8 @@ command_nvram(int argc, char *argv[]) CHAR16 *data; EFI_STATUS status; EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; - UINTN varsz, datasz; + UINTN varsz, datasz, i; SIMPLE_TEXT_OUTPUT_INTERFACE *conout; - int i; conout = ST->ConOut; |