From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Fam Zheng" <famz@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Alex Bligh" <alex@alex.org.uk>,
"Miroslav Rezanina" <mrezanin@redhat.com>,
"Lluís Vilanova" <vilanova@ac.upc.edu>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v19 11/11] module: Pass argv[0] along the module load path
Date: Sun, 09 Feb 2014 07:46:03 +0100 [thread overview]
Message-ID: <52F7242B.3070408@redhat.com> (raw)
In-Reply-To: <CAFEAcA-AKLNek58xqaESSACWDgpS+HTFtx5scwv5Ra+Ef4RKwg@mail.gmail.com>
Il 09/02/2014 01:18, Peter Maydell ha scritto:
> Haven't checked it yet. I just don't really see what the point is
> in having a huge amount of OS specific code to do something
> which we already do in a portable way. It might be nice to abstract
> out stashing initial-argv0 and adding a utility function for it.
>
> If we do want to use OS-specific code, then we should be
> consistent, ie change the datadir lookup to use it.
It is using it already. argv[0] is just a fallback, and Fam's patches
moved the OS-specific code of os_find_datadir out of it so that module
loading could reuse it.
I think there are cases where argv[0] cannot work, such as using the
exec system call to invoke QEMU, and specifying a different argv[0] than
the actually executed file; or invoking a non-installed QEMU executable
by putting its directory in the PATH. They are probably not happening
in practice, but they are there.
Paolo
next prev parent reply other threads:[~2014-02-09 6:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 4:40 [Qemu-devel] [PATCH v19 11/11] module: Pass argv[0] along the module load path Fam Zheng
2014-02-08 14:12 ` Paolo Bonzini
2014-02-08 15:16 ` Fam Zheng
2014-02-08 17:16 ` Andreas Färber
2014-02-08 17:24 ` Alexander Graf
2014-02-08 17:46 ` Peter Maydell
2014-02-08 23:36 ` Paolo Bonzini
2014-02-09 0:18 ` Peter Maydell
2014-02-09 6:46 ` Paolo Bonzini [this message]
2014-02-09 9:16 ` Fam Zheng
2014-02-09 11:48 ` Peter Maydell
2014-02-09 12:13 ` Fam Zheng
2014-02-09 9:26 ` Fam Zheng
2014-02-09 10:00 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F7242B.3070408@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex@alex.org.uk \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mrezanin@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.