Replace numbers with grub_memory_type_t enums

This commit is contained in:
Andrei Borzenkov committed 2015-11-27 19:52:16 +03:00
1 parent a261842785
commit f4c143789a
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -166,7 +166,7 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type,
{ {
unsigned long *total = data; unsigned long *total = data;
if (type != 1) if (type != GRUB_MEMORY_AVAILABLE)
return 0; return 0;
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM)) if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM))
+2 -2
View File
@@ -196,7 +196,7 @@ alloc_phys_choose (grub_uint64_t addr, grub_uint64_t len,
struct alloc_phys_ctx *ctx = data; struct alloc_phys_ctx *ctx = data;
grub_addr_t end = addr + len; grub_addr_t end = addr + len;
if (type != 1) if (type != GRUB_MEMORY_AVAILABLE)
return 0; return 0;
addr = ALIGN_UP (addr, FOUR_MB); addr = ALIGN_UP (addr, FOUR_MB);
@@ -430,7 +430,7 @@ static int
get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__ ((unused)), get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__ ((unused)),
grub_memory_type_t type, void *data __attribute__ ((unused))) grub_memory_type_t type, void *data __attribute__ ((unused)))
{ {
if (type != 1) if (type != GRUB_MEMORY_AVAILABLE)
return 0; return 0;
if (addr < phys_base) if (addr < phys_base)
phys_base = addr; phys_base = addr;