Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17790
b: refs/heads/master
c: 845884d
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Jan 10, 2006
1 parent b7bd533 commit 2484650
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 082f2c1cc7aa7aabdbf5235b788ff42e10abb399
refs/heads/master: 845884d332c060b0dfc54ba5a580d0f1a99c58a2
17 changes: 10 additions & 7 deletions trunk/fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,19 +442,22 @@ static int load_flat_file(struct linux_binprm * bprm,
flags = ntohl(hdr->flags);
rev = ntohl(hdr->rev);

if (flags & FLAT_FLAG_KTRACE)
printk("BINFMT_FLAT: Loading file: %s\n", bprm->filename);

if (strncmp(hdr->magic, "bFLT", 4) ||
(rev != FLAT_VERSION && rev != OLD_FLAT_VERSION)) {
if (strncmp(hdr->magic, "bFLT", 4)) {
/*
* because a lot of people do not manage to produce good
* flat binaries, we leave this printk to help them realise
* the problem. We only print the error if its not a script file
*/
if (strncmp(hdr->magic, "#!", 2))
printk("BINFMT_FLAT: bad magic/rev (0x%x, need 0x%x)\n",
rev, (int) FLAT_VERSION);
printk("BINFMT_FLAT: bad header magic\n");
return -ENOEXEC;
}

if (flags & FLAT_FLAG_KTRACE)
printk("BINFMT_FLAT: Loading file: %s\n", bprm->filename);

if (rev != FLAT_VERSION && rev != OLD_FLAT_VERSION) {
printk("BINFMT_FLAT: bad flat file version 0x%x (supported 0x%x and 0x%x)\n", rev, FLAT_VERSION, OLD_FLAT_VERSION);
return -ENOEXEC;
}

Expand Down

0 comments on commit 2484650

Please sign in to comment.