diff --git a/linux-user/main.c b/linux-user/main.c index 7eabd0c22f3549c0463476a4f9af69e10279186b..345d338a1e0b8b8456c23281a1c2ec13e0bfead0 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2372,6 +2372,7 @@ int main(int argc, char **argv, char **envp) envlist_t *envlist = NULL; const char *argv0 = NULL; int i; + int ret; if (argc <= 1) usage(); @@ -2576,9 +2577,10 @@ int main(int argc, char **argv, char **envp) env->opaque = ts; task_settid(ts); - if (loader_exec(filename, target_argv, target_environ, regs, - info, &bprm) != 0) { - printf("Error loading %s\n", filename); + ret = loader_exec(filename, target_argv, target_environ, regs, + info, &bprm); + if (ret != 0) { + printf("Error %d while loading %s\n", ret, filename); _exit(1); } diff --git a/linux-user/qemu.h b/linux-user/qemu.h index e04a31c69cd56b37b0368a2d91f58bd789ee2426..83ad443c235311fdbb1c5aa45d84ba4b73073aae 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -140,7 +140,7 @@ extern const char *qemu_uname_release; * and envelope for the new program. 32 should suffice, this gives * a maximum env+arg of 128kB w/4KB pages! */ -#define MAX_ARG_PAGES 32 +#define MAX_ARG_PAGES 33 /* * This structure is used to hold the arguments that are