[libvirt] [PATCH]: Fix "virsh attach-disk" and "virsh attach-interface"

Chris Lalancette clalance at redhat.com
Tue Aug 5 10:02:47 UTC 2008


With the recent refactoring of the domain code, plus the changes with the Xend
code, a couple of bugs were introduced into the attach-disk and attach-interface
functionality.  This patch fixes 3 bugs:

1)  In xenDaemonAttachDevice(), there is a switch statement to determine which
of the xenDaemonFormatSxpr{Disk,Net} functions to call.  Unfortunately, the case
statements are all missing the corresponding "break", so we always fall-through
to the default error case.  This patch just adds the appropriate break statements.

2)  (minor) In xenDaemonDomainDefineXML (that's a mouthful!), there is a stray
"fprintf".  This is now converted to a proper virXendError().

3)  xenDaemonFormatSxpr{Disk,Net} were adding an extra (device to the front of
the sexpr expressions that xend did not expect (this is Xend on RHEL 5.2).
Because of this, the attaches would fail.  The patch fixes this by removing the
(device from the front, which makes attach-disk and attach-interface work again.

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-xend-internal.patch
Type: text/x-patch
Size: 2098 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080805/e2f8fa93/attachment-0001.bin>


More information about the libvir-list mailing list