[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when i
From: |
gang . chen . 5i5j |
Subject: |
[Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed |
Date: |
Thu, 10 Sep 2015 13:43:47 +0800 |
From: Chen Gang <address@hidden>
If qemu sets interp_prfix via command line '-L' instead of environments
variable QEMU_LD_PREFIX, it will cause syscall execve() failed. Because
the 2nd qemu has no command line '-L'.
So qemu need always set QEMU_LD_PREFIX when interp_prefix is changed.
Signed-off-by: Chen Gang <address@hidden>
---
linux-user/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/main.c b/linux-user/main.c
index 06dd296..2f31ea6 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3539,7 +3539,11 @@ static void handle_arg_stack_size(const char *arg)
static void handle_arg_ld_prefix(const char *arg)
{
+ char *buf = g_strdup_printf("QEMU_LD_PREFIX=%s", arg);
+
interp_prefix = strdup(arg);
+ (void) envlist_setenv(envlist, buf);
+ g_free(buf);
}
static void handle_arg_pagesize(const char *arg)
--
1.9.1
- [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed,
gang . chen . 5i5j <=