From: Cyrill Gorcunov Date: Sun, 4 May 2008 16:50:02 +0000 (+0100) Subject: [MIPS] ELF handling - use SELFMAG instead of numeric constant X-Git-Tag: v2.6.26-rc3~131^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d303f4a1a09b18e9689aa896bbc23879130b1da8;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [MIPS] ELF handling - use SELFMAG instead of numeric constant Signed-off-by: Cyrill Gorcunov Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index fa67e40..2794501 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -845,7 +845,7 @@ static int vpe_elfload(struct vpe * v) /* Sanity checks against insmoding binaries or wrong arch, weird elf version */ - if (memcmp(hdr->e_ident, ELFMAG, 4) != 0 + if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 || (hdr->e_type != ET_REL && hdr->e_type != ET_EXEC) || !elf_check_arch(hdr) || hdr->e_shentsize != sizeof(*sechdrs)) { @@ -1114,7 +1114,7 @@ static int vpe_release(struct inode *inode, struct file *filp) return -ENODEV; hdr = (Elf_Ehdr *) v->pbuffer; - if (memcmp(hdr->e_ident, ELFMAG, 4) == 0) { + if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) { if (vpe_elfload(v) >= 0) { vpe_run(v); } else {