qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v19 11/11] module: Pass argv[0] along the module


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]