Skip to content

Commit

Permalink
[MIPS] ELF handling - use SELFMAG instead of numeric constant
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Gorcunov <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
cyrillos authored and ralfbaechle committed May 12, 2008
1 parent ddc0d00 commit d303f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d303f4a

Please sign in to comment.