On 04/02/2012 01:57 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
>
> * daemon/libvirtd.c: Set custom driver module dir if the current
> binary name is 'lt-libvirtd' (indicating execution directly
> from GIT checkout)
> * src/driver.c, src/driver.h, src/libvirt_driver_modules.syms: Add
> virDriverModuleInitialize to allow driver module location to
> be changed
>
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
> daemon/libvirtd.c | 6 ++++++
> src/driver.c | 18 ++++++++++++++++--
> src/driver.h | 1 +
> src/libvirt_driver_modules.syms | 1 +
> 4 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index dfab810..ead160e 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -1341,6 +1341,12 @@ int main(int argc, char **argv) {
> /* initialize early logging */
> virLogSetFromEnv();
>
> +#ifdef WITH_DRIVER_MODULES
> + if (strstr(argv[0], "lt-libvirtd") &&
> + (access("./.git", R_OK) >= 0 || access("../.git", R_OK) >= 0))
This won't work for builds in deep VPATH (mkdir -p deep/build) or
sibling VPATH (mkdir ../build) locations. Can we come up with a
solution that doesn't limit us to just in-tree and one-deep directory
builds?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature