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

Re: [Xen-devel] [PATCH] tools: adjust --datadir option passed to qemu-upstream's configure script



On Mon, 4 Jun 2012, Jan Beulich wrote:
> Passing $(SHAREDIR)/qemu-xen isn't compatible with the way
> os-posix.c:os_find_datadir() works. While one would generally expect
> that function to honour the --datadir configure option, fixing this is
> quite a bit more involved than simply adjusting the configure options
> to match the function's behavior (in that, for an installed binary, it
> looks in $bindir/../share/qemu). Afaict, so far this can have worked
> only by virtue of what CONFIG_QEMU_DATADIR points to being populated
> due to (presumably) some other qemu instance being installed on
> people's systems (but being absent when running qemu-system-i386 from
> the dist/ portion of the build tree).
> 
> Signed-off-by: Jan Beulich <JBeulich@xxxxxxxx>
> 
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -155,7 +155,7 @@ subdir-all-qemu-xen-dir subdir-install-q
>               --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
>               -L$(XEN_ROOT)/tools/xenstore" \
>               --bindir=$(LIBEXEC) \
> -             --datadir=$(SHAREDIR)/qemu-xen \
> +             --datadir=$(dir $(LIBEXEC))share/qemu \
>               --disable-kvm \
>               --python=$(PYTHON) \
>               $(IOEMU_CONFIGURE_CROSS); \
> 
> 
> 
> 

This is a QEMU bug, so I would rather fix it there.
In fact the fix could be as simple as the appended patch.
Does it work for you?

diff --git a/os-posix.c b/os-posix.c
index dc4a6bb..d0c873d 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -136,6 +136,9 @@ char *os_find_datadir(const char *argv0)
             g_free(res);
             res = NULL;
         }
+    } else {
+        g_free(res);
+        res = NULL;
     }
 
     return res;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.