forked from pool/libvirt
51 lines
2.2 KiB
Diff
51 lines
2.2 KiB
Diff
Index: libvirt-0.7.1/src/xend_internal.c
|
|
===================================================================
|
|
--- libvirt-0.7.1.orig/src/xend_internal.c
|
|
+++ libvirt-0.7.1/src/xend_internal.c
|
|
@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain,
|
|
return -1;
|
|
xenUnifiedLock(priv);
|
|
xref = xenStoreDomainGetDiskID(domain->conn, domain->id,
|
|
- dev->data.disk->dst);
|
|
+ dev->data.disk->dst, class);
|
|
xenUnifiedUnlock(priv);
|
|
if (xref == NULL)
|
|
return -1;
|
|
Index: libvirt-0.7.1/src/xs_internal.c
|
|
===================================================================
|
|
--- libvirt-0.7.1.orig/src/xs_internal.c
|
|
+++ libvirt-0.7.1/src/xs_internal.c
|
|
@@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr
|
|
* 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;
|
|
@@ -984,7 +985,7 @@ xenStoreDomainGetDiskID(virConnectPtr co
|
|
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++) {
|
|
Index: libvirt-0.7.1/src/xs_internal.h
|
|
===================================================================
|
|
--- libvirt-0.7.1.orig/src/xs_internal.h
|
|
+++ libvirt-0.7.1/src/xs_internal.h
|
|
@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo
|
|
const char *mac);
|
|
char * xenStoreDomainGetDiskID(virConnectPtr conn,
|
|
int id,
|
|
- const char *dev);
|
|
+ const char *dev,
|
|
+ const char *class);
|
|
char * xenStoreDomainGetName(virConnectPtr conn,
|
|
int id);
|
|
int xenStoreDomainGetUUID(virConnectPtr conn,
|