2009-10-16 06:31:39 +02:00
|
|
|
Index: libvirt-0.7.2/src/xen/xend_internal.c
|
2008-11-21 15:32:50 +01:00
|
|
|
===================================================================
|
2009-10-16 06:31:39 +02:00
|
|
|
--- libvirt-0.7.2.orig/src/xen/xend_internal.c
|
|
|
|
+++ libvirt-0.7.2/src/xen/xend_internal.c
|
|
|
|
@@ -5896,7 +5896,7 @@ virDomainXMLDevID(virDomainPtr domain,
|
2008-11-21 15:32:50 +01:00
|
|
|
return -1;
|
2009-04-24 23:15:55 +02:00
|
|
|
xenUnifiedLock(priv);
|
2008-11-21 15:32:50 +01:00
|
|
|
xref = xenStoreDomainGetDiskID(domain->conn, domain->id,
|
|
|
|
- dev->data.disk->dst);
|
|
|
|
+ dev->data.disk->dst, class);
|
2009-04-24 23:15:55 +02:00
|
|
|
xenUnifiedUnlock(priv);
|
2008-11-21 15:32:50 +01:00
|
|
|
if (xref == NULL)
|
|
|
|
return -1;
|
2009-10-16 06:31:39 +02:00
|
|
|
Index: libvirt-0.7.2/src/xen/xs_internal.c
|
2008-11-21 15:32:50 +01:00
|
|
|
===================================================================
|
2009-10-16 06:31:39 +02:00
|
|
|
--- libvirt-0.7.2.orig/src/xen/xs_internal.c
|
|
|
|
+++ libvirt-0.7.2/src/xen/xs_internal.c
|
|
|
|
@@ -968,7 +968,8 @@ xenStoreDomainGetNetworkID(virConnectPtr
|
2008-11-21 15:32:50 +01:00
|
|
|
* freed by the caller.
|
|
|
|
*/
|
|
|
|
char *
|
|
|
|
-xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) {
|
|
|
|
+xenStoreDomainGetDiskID(virConnectPtr conn, int id,
|
|
|
|
+ const char *dev, const char *class) {
|
|
|
|
char dir[80], path[128], **list = NULL, *val = NULL;
|
|
|
|
unsigned int devlen, len, i, num;
|
|
|
|
char *ret = NULL;
|
2009-10-16 06:31:39 +02:00
|
|
|
@@ -986,7 +987,7 @@ xenStoreDomainGetDiskID(virConnectPtr co
|
2008-11-21 15:32:50 +01:00
|
|
|
if (devlen <= 0)
|
|
|
|
return (NULL);
|
|
|
|
|
|
|
|
- snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id);
|
|
|
|
+ snprintf(dir, sizeof(dir), "/local/domain/0/backend/%s/%d", class, id);
|
|
|
|
list = xs_directory(priv->xshandle, 0, dir, &num);
|
|
|
|
if (list != NULL) {
|
|
|
|
for (i = 0; i < num; i++) {
|
2009-10-16 06:31:39 +02:00
|
|
|
Index: libvirt-0.7.2/src/xen/xs_internal.h
|
2008-11-21 15:32:50 +01:00
|
|
|
===================================================================
|
2009-10-16 06:31:39 +02:00
|
|
|
--- libvirt-0.7.2.orig/src/xen/xs_internal.h
|
|
|
|
+++ libvirt-0.7.2/src/xen/xs_internal.h
|
2009-04-24 23:15:55 +02:00
|
|
|
@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo
|
2008-11-21 15:32:50 +01:00
|
|
|
const char *mac);
|
|
|
|
char * xenStoreDomainGetDiskID(virConnectPtr conn,
|
|
|
|
int id,
|
|
|
|
- const char *dev);
|
|
|
|
+ const char *dev,
|
|
|
|
+ const char *class);
|
|
|
|
char * xenStoreDomainGetName(virConnectPtr conn,
|
|
|
|
int id);
|
2009-01-29 01:42:42 +01:00
|
|
|
int xenStoreDomainGetUUID(virConnectPtr conn,
|