Added needed casts

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-13 13:41:15 +01:00
parent 73f6ce4ab2
commit 37480ee490

View file

@ -40,7 +40,8 @@ grub_relocator_new (void)
ret->postchunks = ~(grub_addr_t) 0;
ret->relocators_size = grub_relocator_jumper_size;
grub_dprintf ("relocator", "relocators_size=%ld\n", ret->relocators_size);
grub_dprintf ("relocator", "relocators_size=%lu\n",
(unsigned long) ret->relocators_size);
return ret;
}
@ -103,7 +104,8 @@ get_best_header (struct grub_relocator *rel,
hb = h;
hbp = hp;
*best_addr = addr;
grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
grub_dprintf ("relocator", "picked %p/%lx\n", hb,
(unsigned long) addr);
}
}
else
@ -146,7 +148,8 @@ get_best_header (struct grub_relocator *rel,
hb = h;
hbp = hp;
*best_addr = addr;
grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
grub_dprintf ("relocator", "picked %p/%lx\n", hb,
(unsigned long) addr);
}
}
}
@ -221,7 +224,8 @@ malloc_in_range (struct grub_relocator *rel,
hb = get_best_header (rel, start, end, align, size, rb, &hbp, &best_addr,
from_low_priv, collisioncheck);
grub_dprintf ("relocator", "best header %p/%lx\n", hb, best_addr);
grub_dprintf ("relocator", "best header %p/%lx\n", hb,
(unsigned long) best_addr);
if (!hb)
{
@ -421,14 +425,16 @@ grub_relocator_alloc_chunk_addr (struct grub_relocator *rel, void **src,
rel->highestnonpostaddr = start + size;
}
grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
grub_dprintf ("relocator", "relocators_size=%ld\n",
(unsigned long) rel->relocators_size);
if (start < target)
rel->relocators_size += grub_relocator_backward_size;
if (start > target)
rel->relocators_size += grub_relocator_forward_size;
grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
grub_dprintf ("relocator", "relocators_size=%ld\n",
(unsigned long) rel->relocators_size);
chunk->src = start;
chunk->target = target;
@ -486,7 +492,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, void **src,
adjust_limits (rel, &min_addr2, &max_addr2, min_addr, max_addr);
grub_dprintf ("relocator", "Adjusted limits from %lx-%lx to %lx-%lx\n",
min_addr, max_addr, min_addr2, max_addr2);
(unsigned long) min_addr, (unsigned long) max_addr,
(unsigned long) min_addr2, (unsigned long) max_addr2);
do
{
@ -573,7 +580,7 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr,
grub_addr_t rels0;
grub_dprintf ("relocator", "Preparing relocs (size=%ld)\n",
rel->relocators_size);
(unsigned long) rel->relocators_size);
if (!malloc_in_range (rel, 0, ~(grub_addr_t)0 - rel->relocators_size + 1,
grub_relocator_align,