[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH, v2] Introduce --enable-binfmt-misc configure op
From: |
andrzej zaborowski |
Subject: |
Re: [Qemu-devel] [PATCH, v2] Introduce --enable-binfmt-misc configure option |
Date: |
Mon, 10 Nov 2008 14:03:16 +0100 |
2008/11/1 Kirill A. Shutemov <address@hidden>:
> It makes qemu compatible with binfmt_misc's flags 'P' and 'O'.
>
> 'P' - preserve-argv[0]. Legacy behavior of binfmt_misc is to overwrite the
> original argv[0] with the full path to the binary. When this flag is
> included, binfmt_misc will add an argument to the argument vector for
> this purpose, thus preserving the original argv[0].
>
> 'O' - open-binary. Legacy behavior of binfmt_misc is to pass the full path
> of the binary to the interpreter as an argument. When this flag is
> included, binfmt_misc will open the file for reading and pass its
> descriptor as an argument, instead of the full path, thus allowing
> the interpreter to execute non-readable binaries.
>
> Signed-off-by: Kirill A. Shutemov <address@hidden>
> ---
> configure | 86
> ++++++++++++++++++++++++++----------------------
> linux-user/linuxload.c | 7 +---
> linux-user/main.c | 39 ++++++++++++++++++++-
> linux-user/qemu.h | 2 +-
> 4 files changed, 87 insertions(+), 47 deletions(-)
>
> diff --git a/configure b/configure
> index ccc4ae0..c7e2732 100755
> --- a/configure
> +++ b/configure
> @@ -114,6 +114,7 @@ aio="yes"
> nptl="yes"
> mixemu="no"
> bluez="yes"
> +binfmt_misc="no"
>
> # OS specific
> targetos=`uname -s`
> @@ -355,6 +356,8 @@ for opt do
> ;;
> --disable-aio) aio="no"
> ;;
> + --enable-binfmt-misc) binfmt_misc="yes"
> + ;;
I don't know what binfmt-misc is good for, but there's nothing in the
new code that must be done in compile time, I think the #ifdef could
just be an if ().