]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Replace numbers with grub_memory_type_t enums
authorAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 27 Nov 2015 16:52:16 +0000 (19:52 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 27 Nov 2015 16:52:16 +0000 (19:52 +0300)
grub-core/kern/ieee1275/init.c
grub-core/loader/sparc64/ieee1275/linux.c

index d5bd74d3552b00d512d2865a7cb161b9447f65f3..4303509f20a68a54d7a745b6ed4b505e879f4fcc 100644 (file)
@@ -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))
index 63d6a1f3336295528bce162c6a517a2e2577e4ef..346d9538e3b7f35c4956b65c58e8574c4528c3fc 100644 (file)
@@ -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;