Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 599350 Details for
Bug 702702
app-emulation/qemu-4.2.0 patches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make O flag require P
linux-user-make-binfmt-flag-O-require-P.patch (text/plain), 1.79 KB, created by
Joakim Tjernlund
on 2019-12-13 16:09:14 UTC
(
hide
)
Description:
Make O flag require P
Filename:
MIME Type:
Creator:
Joakim Tjernlund
Created:
2019-12-13 16:09:14 UTC
Size:
1.79 KB
patch
obsolete
>From 1e7783247e729fac401014964b61277227178fce Mon Sep 17 00:00:00 2001 >From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com> >Date: Mon, 14 Jul 2014 20:17:28 +0200 >Subject: [PATCH] linux-user: make binfmt flag O require P > >QEMU can autodetect if it is started from Linux binfmt loader >when binfmt flag O is on. >Use that and require binfmt flag P as well which will enable QEMU >to pass in correct argv0 to the application. > >Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com> >--- ./linux-user/main.c.org 2019-12-13 16:43:04.064311077 +0100 >+++ ./linux-user/main.c 2019-12-13 16:54:08.389729542 +0100 >@@ -544,7 +544,7 @@ > exit(exitcode); > } > >-static int parse_args(int argc, char **argv) >+static int parse_args(int argc, char **argv, int assume_P_flag) > { > const char *r; > int optind; >@@ -560,7 +560,18 @@ > arginfo->handle_opt(r); > } > } >- >+ if (assume_P_flag) { >+ /* Assume started by binmisc and binfmt P flag is set */ >+ if (argc < 3) { >+ fprintf(stderr, "%s: Please use me through binfmt with P flag\n", >+ argv[0]); >+ exit(1); >+ } >+ /* filename = argv[1]; for QEMU < 4.2 */ >+ exec_path = argv[1]; >+ /* Next argv must be argv0 for the app */ >+ return 2; >+ } > optind = 1; > for (;;) { > if (optind >= argc) { >@@ -659,7 +670,8 @@ > qemu_add_opts(&qemu_trace_opts); > qemu_plugin_add_opts(); > >- optind = parse_args(argc, argv); >+ execfd = qemu_getauxval(AT_EXECFD); >+ optind = parse_args(argc, argv, execfd > 0); > > if (!trace_init_backends()) { > exit(1); >@@ -682,7 +694,6 @@ > > init_qemu_uname_release(); > >- execfd = qemu_getauxval(AT_EXECFD); > if (execfd == 0) { > execfd = open(exec_path, O_RDONLY); > if (execfd < 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 702702
:
599348
| 599350