aboutsummaryrefslogtreecommitdiffstats
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorArnaud Patard <arnaud.patard@rtp-net.org>2009-06-19 10:39:36 +0300
committerRiku Voipio <riku.voipio@iki.fi>2009-07-08 17:01:08 +0300
commitfd4d81dd04b4e606ce40a41d66368ba77c77c753 (patch)
tree54b9de691a9fe2a0d5b87fdf5d6922825b13cdbf /linux-user/main.c
parente8d2a88755b849bdadaf80d19e342eade3c017bc (diff)
linux-user: increment MAX_ARG_PAGES
There's a error When doing something like that : find / -type f -print0 | xargs -0 echo [ done in a arm chroot with qemu-arm and linux binfmt stuff or with find / -type f -print0 | qemu-arm -L <path> <path>/usr/bin/xargs -0 echo ] Doing this outsite qemu is fine. The problem was the huge number of parameters. Increasing MAX_ARG_PAGES is fixing that. While I was at it, I've modified linux-user/main.c to report error code of loader_exec. It helps to debug/know what's wrong. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 7eabd0c22..345d338a1 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);
}