diff options
Diffstat (limited to 'kexec/arch/sh/kexec-netbsd-sh.c')
-rw-r--r-- | kexec/arch/sh/kexec-netbsd-sh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/sh/kexec-netbsd-sh.c b/kexec/arch/sh/kexec-netbsd-sh.c index 8e80486..8a7e75e 100644 --- a/kexec/arch/sh/kexec-netbsd-sh.c +++ b/kexec/arch/sh/kexec-netbsd-sh.c @@ -121,7 +121,7 @@ int netbsd_sh_load(int argc, char **argv, const char *buf, off_t UNUSED(len), size = bbs; } - size = (size + psz - 1) & ~(psz - 1); + size = _ALIGN(size, psz); memset(&img[bbs], 0, size-bbs); add_segment(info, img, size, start, size); start += size; @@ -132,7 +132,7 @@ int netbsd_sh_load(int argc, char **argv, const char *buf, off_t UNUSED(len), if (miniroot) { miniroot_buf = slurp_file(miniroot, &miniroot_length); howto_value |= 0x200; - size = (miniroot_length + psz - 1) & ~(psz - 1); + size = _ALIGN(miniroot_length, psz); add_segment(info, miniroot_buf, size, start, size); start += size; } |