[libvirt] [PATCH] daemon: Portable auto-detection of driver module directory

Daniel P. Berrange berrange at redhat.com
Thu Aug 2 14:02:59 UTC 2012


On Thu, Aug 02, 2012 at 03:47:32PM +0200, Jiri Denemark wrote:
> When running libvirtd from a build directory on a system with unmodified
> libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for
> "/daemon/.libs/libvirtd" in addition to "lt-libvirtd".
> ---
>  daemon/libvirtd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index ffbe067..a316427 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -972,7 +972,8 @@ int main(int argc, char **argv) {
>      virLogSetFromEnv();
>  
>  #ifdef WITH_DRIVER_MODULES
> -    if (strstr(argv[0], "lt-libvirtd")) {
> +    if (strstr(argv[0], "lt-libvirtd") ||
> +        strstr(argv[0], "/daemon/.libs/libvirtd")) {
>          char *tmp = strrchr(argv[0], '/');
>          if (!tmp) {
>              fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);
ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list