fix
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=46
This commit is contained in:
parent
04e51158a3
commit
a791f80260
@ -1,4 +1,4 @@
|
|||||||
From e2e0df8cf7c45e148e96d3d7c5aeb6d70fd0c966 Mon Sep 17 00:00:00 2001
|
From 3ee42b48dd69ca6f4cf35a065628088bbdf7fa4f Mon Sep 17 00:00:00 2001
|
||||||
From: Alexander Graf <agraf@suse.de>
|
From: Alexander Graf <agraf@suse.de>
|
||||||
Date: Thu, 2 Feb 2012 18:02:33 +0100
|
Date: Thu, 2 Feb 2012 18:02:33 +0100
|
||||||
Subject: [PATCH] linux-user: binfmt: support host binaries
|
Subject: [PATCH] linux-user: binfmt: support host binaries
|
||||||
@ -8,11 +8,11 @@ trying to run, let's just use that instead as it will be a lot faster.
|
|||||||
|
|
||||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||||
---
|
---
|
||||||
linux-user/binfmt.c | 26 ++++++++++++++++++++++++++
|
linux-user/binfmt.c | 27 +++++++++++++++++++++++++++
|
||||||
1 files changed, 26 insertions(+), 0 deletions(-)
|
1 files changed, 27 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c
|
diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c
|
||||||
index cd1f513..b9e225f 100644
|
index cd1f513..74f5741 100644
|
||||||
--- a/linux-user/binfmt.c
|
--- a/linux-user/binfmt.c
|
||||||
+++ b/linux-user/binfmt.c
|
+++ b/linux-user/binfmt.c
|
||||||
@@ -5,6 +5,9 @@
|
@@ -5,6 +5,9 @@
|
||||||
@ -25,7 +25,7 @@ index cd1f513..b9e225f 100644
|
|||||||
|
|
||||||
int main(int argc, char **argv, char **envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
@@ -28,6 +31,29 @@ int main(int argc, char **argv, char **envp)
|
@@ -28,6 +31,30 @@ int main(int argc, char **argv, char **envp)
|
||||||
binfmt[0] = '\0';
|
binfmt[0] = '\0';
|
||||||
/* Now argv[0] is the real qemu binary name */
|
/* Now argv[0] is the real qemu binary name */
|
||||||
|
|
||||||
@ -39,7 +39,8 @@ index cd1f513..b9e225f 100644
|
|||||||
+ goto skip;
|
+ goto skip;
|
||||||
+ }
|
+ }
|
||||||
+ guestarch++;
|
+ guestarch++;
|
||||||
+ hostbin = malloc(strlen(argv[1] + strlen("/emul/-for-/" ARCH_NAME) + 1));
|
+ hostbin = malloc(strlen(argv[1] + strlen("/emul/-for-/" ARCH_NAME) +
|
||||||
|
+ strlen(guestarch) + 1));
|
||||||
+ sprintf(hostbin, "/emul/" ARCH_NAME "-for-%s/%s", guestarch, argv[1]);
|
+ sprintf(hostbin, "/emul/" ARCH_NAME "-for-%s/%s", guestarch, argv[1]);
|
||||||
+ if (!access(hostbin, X_OK)) {
|
+ if (!access(hostbin, X_OK)) {
|
||||||
+ /*
|
+ /*
|
||||||
|
Loading…
Reference in New Issue
Block a user