From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
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, 9 Feb 2014 00:18:35 +0000 [thread overview]
Message-ID: <CAFEAcA-AKLNek58xqaESSACWDgpS+HTFtx5scwv5Ra+Ef4RKwg@mail.gmail.com> (raw)
In-Reply-To: <52F6BF85.8080504@redhat.com>
On 8 February 2014 23:36, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 08/02/2014 18:46, Peter Maydell ha scritto:
>> It's not obvious why
>> the block layer should be handing argv0 around through bdrv_init
>> in order to (re-?) initialise modules.
>
> The executable directory is not found once and for all, it's recomputed on
> any call to module_load or os_find_datadir.
That's why we call os_find_datadir exactly once. That we're
doing the lookup on each call to module_load is kind of what
I'm suggesting is wrong...
> But I think this is pointless anyway. The OS knows the executable file
> name, and the right thing to do is to extend support for finding the
> executable to all supported OSes. It's a pity that glib doesn't have a
> function anyway.
>
> Peter, does the patch using the Apple-specific function to find the
> executable work?
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.
thanks
-- PMM
next prev parent reply other threads:[~2014-02-09 0:19 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 [this message]
2014-02-09 6:46 ` Paolo Bonzini
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=CAFEAcA-AKLNek58xqaESSACWDgpS+HTFtx5scwv5Ra+Ef4RKwg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex@alex.org.uk \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mrezanin@redhat.com \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).