mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
xen: Return tap2 for tap2 disks
For some versions of Xen the difference between "tap" and "tap2" is important. When converting back from xen-sxpr to libvirt-xml, that information is lost, which breaks re-defining the domain using that data. Explicitly return "tap2" for disks defined as "device/tap2". Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
parent
c2969ec7ae
commit
c490b469ce
@ -397,6 +397,11 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (sexpr_lookup(node, "device/tap2") &&
|
||||
STRPREFIX(src, "tap:")) {
|
||||
if (!(disk->driverName = strdup("tap2")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
if (VIR_ALLOC_N(disk->driverName, (offset-src)+1) < 0)
|
||||
goto no_memory;
|
||||
if (virStrncpy(disk->driverName, src, offset-src,
|
||||
@ -406,6 +411,7 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||
src);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
src = offset + 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user