From: Daniel P. Berrange Date: Tue, 10 Mar 2009 10:32:24 +0000 (+0000) Subject: Fix Xen block detach with newer Xend (Cole RobinSon / Tomohiro Takahashi) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4dfb7e8b2e48b626fe9dcb4a20281eb99acc689f;p=libvirt.git Fix Xen block detach with newer Xend (Cole RobinSon / Tomohiro Takahashi) --- diff --git a/ChangeLog b/ChangeLog index 94f1cad022..e6047663d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 10 10:29:46 GMT 2009 Daniel P. Berrange + + * src/xend_internal.c: Fix tap vs vbd type for block detach + (Cole Robinson / Takahashi Tomohiro) + Fri Mar 6 15:42:46 CET 2009 Daniel Veillard * src/cgroup.c src/cgroup.h src/lxc_driver.c: allows to get diff --git a/src/xend_internal.c b/src/xend_internal.c index f9f2cb30a3..772f3f45fc 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -5566,7 +5566,12 @@ virDomainXMLDevID(virDomainPtr domain, char *xref; if (dev->type == VIR_DOMAIN_DEVICE_DISK) { - strcpy(class, "vbd"); + if (dev->data.disk->driverName && + STREQ(dev->data.disk->driverName, "tap")) + strcpy(class, "tap"); + else + strcpy(class, "vbd"); + if (dev->data.disk->dst == NULL) return -1; xenUnifiedLock(priv);