Re: [Libvir] [PATCH] Have xen fv acknowledge boot tag

2008-03-07 Thread Daniel Veillard
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/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [Libvir] [PATCH] Have xen fv acknowledge boot tag

2008-03-06 Thread Cole Robinson
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


diff --git a/src/xend_internal.c b/src/xend_internal.c
index 8bbc28f..5de9930 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -1323,7 +1323,7 @@ xend_parse_sexp_desc_os(virConnectPtr xend, struct sexpr *node, virBufferPtr buf
 if (hvm)
 virBufferVSprintf(buf, loader%s/loader\n, loader);
 
-if (kernel) {
+if (kernel  (!loader || STRNEQ(kernel, loader))) {
 virBufferVSprintf(buf, kernel%s/kernel\n, kernel);
 if (initrd  initrd[0])
 virBufferVSprintf(buf, initrd%s/initrd\n, initrd);
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


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

2008-03-05 Thread Cole Robinson
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

diff --git a/src/xend_internal.c b/src/xend_internal.c
index 8bbc28f..ddd1888 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -1323,7 +1323,7 @@ xend_parse_sexp_desc_os(virConnectPtr xend, struct sexpr *node, virBufferPtr buf
 if (hvm)
 virBufferVSprintf(buf, loader%s/loader\n, loader);
 
-if (kernel) {
+if (kernel  STRNEQ(kernel, loader)) {
 virBufferVSprintf(buf, kernel%s/kernel\n, kernel);
 if (initrd  initrd[0])
 virBufferVSprintf(buf, initrd%s/initrd\n, initrd);
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [Libvir] [PATCH] Have xen fv acknowledge boot tag

2008-03-05 Thread Daniel Veillard
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/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list