render / rpms / libvirt

Forked from rpms/libvirt 11 months ago
Clone
Daniel P. Berrange 511f6c
From: Daniel P. Berrange <berrange@redhat.com>
Daniel P. Berrange 511f6c
Date: Tue, 10 Mar 2009 10:32:24 +0000 (+0000)
Daniel P. Berrange 511f6c
Subject: Fix Xen block detach with newer Xend (Cole RobinSon / Tomohiro Takahashi)
Daniel P. Berrange 511f6c
X-Git-Url: http://git.et.redhat.com/?p=libvirt.git;a=commitdiff_plain;h=33813a932d58c17441203d0e581eba91369a71e0
Daniel P. Berrange 511f6c
Daniel P. Berrange 511f6c
Fix Xen block detach with newer Xend (Cole RobinSon / Tomohiro Takahashi)
Daniel P. Berrange 511f6c
---
Daniel P. Berrange 511f6c
Daniel P. Berrange 511f6c
diff --git a/src/xend_internal.c b/src/xend_internal.c
Daniel P. Berrange 511f6c
index f9f2cb3..772f3f4 100644
Daniel P. Berrange 511f6c
--- a/src/xend_internal.c
Daniel P. Berrange 511f6c
+++ b/src/xend_internal.c
Daniel P. Berrange 511f6c
@@ -5566,7 +5566,12 @@ virDomainXMLDevID(virDomainPtr domain,
Daniel P. Berrange 511f6c
     char *xref;
Daniel P. Berrange 511f6c
 
Daniel P. Berrange 511f6c
     if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
Daniel P. Berrange 511f6c
-        strcpy(class, "vbd");
Daniel P. Berrange 511f6c
+        if (dev->data.disk->driverName &&
Daniel P. Berrange 511f6c
+            STREQ(dev->data.disk->driverName, "tap"))
Daniel P. Berrange 511f6c
+            strcpy(class, "tap");
Daniel P. Berrange 511f6c
+        else
Daniel P. Berrange 511f6c
+            strcpy(class, "vbd");
Daniel P. Berrange 511f6c
+
Daniel P. Berrange 511f6c
         if (dev->data.disk->dst == NULL)
Daniel P. Berrange 511f6c
             return -1;
Daniel P. Berrange 511f6c
         xenUnifiedLock(priv);