SHA256
1
0
forked from pool/libvirt
libvirt/xen-tap2-support.patch

31 lines
1.4 KiB
Diff

Index: libvirt-0.8.0/src/xen/xend_internal.c
===================================================================
--- libvirt-0.8.0.orig/src/xen/xend_internal.c
+++ libvirt-0.8.0/src/xen/xend_internal.c
@@ -1593,7 +1593,8 @@ xenDaemonParseSxprDisks(virDomainDefPtr
but blktap disks ended up in a differently named
(device (tap ....)) block.... */
if (sexpr_lookup(node, "device/vbd") ||
- sexpr_lookup(node, "device/tap")) {
+ sexpr_lookup(node, "device/tap") ||
+ sexpr_lookup(node, "device/tap2")) {
char *offset;
const char *src = NULL;
const char *dst = NULL;
@@ -1604,10 +1605,14 @@ xenDaemonParseSxprDisks(virDomainDefPtr
src = sexpr_node(node, "device/vbd/uname");
dst = sexpr_node(node, "device/vbd/dev");
mode = sexpr_node(node, "device/vbd/mode");
- } else {
+ } else if (sexpr_lookup(node, "device/tap")) {
src = sexpr_node(node, "device/tap/uname");
dst = sexpr_node(node, "device/tap/dev");
mode = sexpr_node(node, "device/tap/mode");
+ } else {
+ src = sexpr_node(node, "device/tap2/uname");
+ dst = sexpr_node(node, "device/tap2/dev");
+ mode = sexpr_node(node, "device/tap2/mode");
}
if (VIR_ALLOC(disk) < 0)