Replace numbers with grub_memory_type_t enums
This commit is contained in:
parent
a261842785
commit
f4c143789a
2 changed files with 3 additions and 3 deletions
|
@ -166,7 +166,7 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type,
|
|||
{
|
||||
unsigned long *total = data;
|
||||
|
||||
if (type != 1)
|
||||
if (type != GRUB_MEMORY_AVAILABLE)
|
||||
return 0;
|
||||
|
||||
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM))
|
||||
|
|
|
@ -196,7 +196,7 @@ alloc_phys_choose (grub_uint64_t addr, grub_uint64_t len,
|
|||
struct alloc_phys_ctx *ctx = data;
|
||||
grub_addr_t end = addr + len;
|
||||
|
||||
if (type != 1)
|
||||
if (type != GRUB_MEMORY_AVAILABLE)
|
||||
return 0;
|
||||
|
||||
addr = ALIGN_UP (addr, FOUR_MB);
|
||||
|
@ -430,7 +430,7 @@ static int
|
|||
get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__ ((unused)),
|
||||
grub_memory_type_t type, void *data __attribute__ ((unused)))
|
||||
{
|
||||
if (type != 1)
|
||||
if (type != GRUB_MEMORY_AVAILABLE)
|
||||
return 0;
|
||||
if (addr < phys_base)
|
||||
phys_base = addr;
|
||||
|
|
Loading…
Reference in a new issue