* include/grub/misc.h (ALIGN_UP_OVERHEAD): New define.
* grub-core/loader/i386/linux.c (grub_cmd_initrd): Align initrds at 4. * grub-core/loader/i386/pc/linux.c (grub_cmd_initrd): Likewise. * grub-core/loader/ia64/efi/linux.c (grub_cmd_initrd): Likewise. * grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise. * grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise. * grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
This commit is contained in:
parent
90eeab76b0
commit
1a2fd1e674
8 changed files with 29 additions and 6 deletions
|
@ -44,6 +44,7 @@
|
|||
|
||||
#define ALIGN_UP(addr, align) \
|
||||
((addr + (typeof (addr)) align - 1) & ~((typeof (addr)) align - 1))
|
||||
#define ALIGN_UP_OVERHEAD(addr, align) ((-(addr)) & ((typeof (addr)) (align) - 1))
|
||||
#define ALIGN_DOWN(addr, align) \
|
||||
((addr) & ~((typeof (addr)) align - 1))
|
||||
#define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue