[Libvir] [PATCH] Have xen fv acknowledge <boot> tag

https://bugzilla.redhat.com/show_bug.cgi?id=428868 Defining a xen fullvirt guest with a <boot dev="{hd,cdrom,etc.}"> tag currently ignores this tag and forces in a kernel tag. Dan pointed out the fix in the bz, which I verified does the trick. Patch attached. Thanks, Cole

On Wed, Mar 05, 2008 at 05:26:47PM -0500, Cole Robinson wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=428868
Defining a xen fullvirt guest with a <boot dev="{hd,cdrom,etc.}"> tag currently ignores this tag and forces in a kernel tag. Dan pointed out the fix in the bz, which I verified does the trick.
Patch attached.
Hum, I get a segfault in make check when trying this patch, /bin/sh: line 4: 32579 Segmentation fault abs_top_builddir=`pwd`/'..' abs_top_srcdir=`pwd`/'..' PATH="$abs_top_builddir/qemud:$PATH" ${dir}$tst FAIL: sexpr2xmltest it's a bit late tonight for a debugging session, I will look at it tomorrow if you don't find it. Should be easy but in: if ((kernel) && (STRNEQ(kernel, loader))) { ... } else { if (hvm) { I assume you want to go into that 'else' if kernel and loader are the same string, but there is apparently a side effect at least in some case hit by the regression tests, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard wrote:
On Wed, Mar 05, 2008 at 05:26:47PM -0500, Cole Robinson wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=428868
Defining a xen fullvirt guest with a <boot dev="{hd,cdrom,etc.}"> tag currently ignores this tag and forces in a kernel tag. Dan pointed out the fix in the bz, which I verified does the trick.
Patch attached.
Hum, I get a segfault in make check when trying this patch, /bin/sh: line 4: 32579 Segmentation fault abs_top_builddir=`pwd`/'..' abs_top_srcdir=`pwd`/'..' PATH="$abs_top_builddir/qemud:$PATH" ${dir}$tst FAIL: sexpr2xmltest it's a bit late tonight for a debugging session, I will look at it tomorrow if you don't find it. Should be easy but in:
if ((kernel) && (STRNEQ(kernel, loader))) { ... } else { if (hvm) {
I assume you want to go into that 'else' if kernel and loader are the same string, but there is apparently a side effect at least in some case hit by the regression tests,
Daniel
Yeah it was basically just poor checking. If there was no loader tag, loader == NULL, which caused STRNEQ to segfault. Corrected patch attached. I verified all the tests passed as expected. - Cole

On Thu, Mar 06, 2008 at 11:37:19AM -0500, Cole Robinson wrote:
Yeah it was basically just poor checking. If there was no loader tag, loader == NULL, which caused STRNEQ to segfault. Corrected patch attached. I verified all the tests passed as expected.
Okay, I see, applied, I just fully parenthesized the expression, and commited to CVS, thanks a lot ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Cole Robinson
-
Daniel Veillard