summaryrefslogtreecommitdiffstats
path: root/common/binfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/binfmt.c')
-rw-r--r--common/binfmt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/binfmt.c b/common/binfmt.c
index 1846477206..6a1e9fc83e 100644
--- a/common/binfmt.c
+++ b/common/binfmt.c
@@ -15,9 +15,13 @@ static LIST_HEAD(binfmt_hooks);
static int binfmt_run(char *file, int argc, char **argv)
{
struct binfmt_hook *b;
- enum filetype type = file_name_detect_type(file);
+ enum filetype type;
int ret;
+ ret = file_name_detect_type(file, &type);
+ if (ret)
+ return ret;
+
list_for_each_entry(b, &binfmt_hooks, list) {
if (b->type != type)
continue;