mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 02:14:24 +00:00
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>
This commit is contained in:
parent
e8d2a88755
commit
fd4d81dd04
@ -2372,6 +2372,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
envlist_t *envlist = NULL;
|
envlist_t *envlist = NULL;
|
||||||
const char *argv0 = NULL;
|
const char *argv0 = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (argc <= 1)
|
if (argc <= 1)
|
||||||
usage();
|
usage();
|
||||||
@ -2576,9 +2577,10 @@ int main(int argc, char **argv, char **envp)
|
|||||||
env->opaque = ts;
|
env->opaque = ts;
|
||||||
task_settid(ts);
|
task_settid(ts);
|
||||||
|
|
||||||
if (loader_exec(filename, target_argv, target_environ, regs,
|
ret = loader_exec(filename, target_argv, target_environ, regs,
|
||||||
info, &bprm) != 0) {
|
info, &bprm);
|
||||||
printf("Error loading %s\n", filename);
|
if (ret != 0) {
|
||||||
|
printf("Error %d while loading %s\n", ret, filename);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ extern const char *qemu_uname_release;
|
|||||||
* and envelope for the new program. 32 should suffice, this gives
|
* and envelope for the new program. 32 should suffice, this gives
|
||||||
* a maximum env+arg of 128kB w/4KB pages!
|
* 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
|
* This structure is used to hold the arguments that are
|
||||||
|
Loading…
Reference in New Issue
Block a user