diff options
Diffstat (limited to 'kexec/fs2dt.c')
-rw-r--r-- | kexec/fs2dt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c index 5d933c8..1f5b0cf 100644 --- a/kexec/fs2dt.c +++ b/kexec/fs2dt.c @@ -697,8 +697,7 @@ static void add_boot_block(char **bufp, off_t *sizep) unsigned long tlen, toff; char *buf; - len = sizeof(bb[0]); - len += 7; len &= ~7; + len = _ALIGN(sizeof(bb[0]), 8); bb->off_mem_rsvmap = cpu_to_be32(len); @@ -721,7 +720,7 @@ static void add_boot_block(char **bufp, off_t *sizep) len = propnum(""); bb->dt_strings_size = cpu_to_be32(len); - len += 3; len &= ~3; + len = _ALIGN(len, 4); bb->totalsize = cpu_to_be32(be32_to_cpu(bb->off_dt_strings) + len); bb->magic = cpu_to_be32(0xd00dfeed); |