mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
fix the detach-disk command when using Xen tap devices
* src/xs_internal.[ch]: patch from Saori Fukuta to fix the detach-disk command when using Xen tap devices. * docs/libvir.html: typo fix from Jim Meyering Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Fri Dec 14 16:36:02 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/xs_internal.[ch]: patch from Saori Fukuta to fix the
|
||||||
|
detach-disk command when using Xen tap devices.
|
||||||
|
* docs/libvir.html: typo fix from Jim Meyering
|
||||||
|
|
||||||
Wed Dec 12 16:42:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
Wed Dec 12 16:42:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
Fix virBufferEscapeString escaping of '<'
|
Fix virBufferEscapeString escaping of '<'
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ href="http://kvm.qumranet.com/">KVM</a> and
|
|||||||
<p>Here is the list of official releases, however since it is early on in the
|
<p>Here is the list of official releases, however since it is early on in the
|
||||||
development of libvirt, it is preferable when possible to just use the <a
|
development of libvirt, it is preferable when possible to just use the <a
|
||||||
href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
|
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||||
|
|
||||||
|
|
||||||
<h3>0.3.3: Sep 30 2007</h3>
|
<h3>0.3.3: Sep 30 2007</h3>
|
||||||
|
|||||||
@@ -920,23 +920,43 @@ xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev) {
|
|||||||
|
|
||||||
snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id);
|
snprintf(dir, sizeof(dir), "/local/domain/0/backend/vbd/%d", id);
|
||||||
list = xs_directory(priv->xshandle, 0, dir, &num);
|
list = xs_directory(priv->xshandle, 0, dir, &num);
|
||||||
if (list == NULL)
|
if (list != NULL) {
|
||||||
return(NULL);
|
for (i = 0; i < num; i++) {
|
||||||
for (i = 0; i < num; i++) {
|
snprintf(path, sizeof(path), "%s/%s/%s", dir, list[i], "dev");
|
||||||
snprintf(path, sizeof(path), "%s/%s/%s", dir, list[i], "dev");
|
val = xs_read(priv->xshandle, 0, path, &len);
|
||||||
val = xs_read(priv->xshandle, 0, path, &len);
|
if (val == NULL)
|
||||||
if (val == NULL)
|
break;
|
||||||
break;
|
if ((devlen != len) || memcmp(val, dev, len)) {
|
||||||
if ((devlen != len) || memcmp(val, dev, len)) {
|
free (val);
|
||||||
free(val);
|
} else {
|
||||||
} else {
|
ret = strdup(list[i]);
|
||||||
ret = strdup(list[i]);
|
free (val);
|
||||||
free(val);
|
free (list);
|
||||||
break;
|
return (ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
free (list);
|
||||||
}
|
}
|
||||||
free(list);
|
snprintf(dir, sizeof(dir), "/local/domain/0/backend/tap/%d", id);
|
||||||
return(ret);
|
list = xs_directory(priv->xshandle, 0, dir, &num);
|
||||||
|
if (list != NULL) {
|
||||||
|
for (i = 0; i < num; i++) {
|
||||||
|
snprintf(path, sizeof(path), "%s/%s/%s", dir, list[i], "dev");
|
||||||
|
val = xs_read(priv->xshandle, 0, path, &len);
|
||||||
|
if (val == NULL)
|
||||||
|
break;
|
||||||
|
if ((devlen != len) || memcmp(val, dev, len)) {
|
||||||
|
free (val);
|
||||||
|
} else {
|
||||||
|
ret = strdup(list[i]);
|
||||||
|
free (val);
|
||||||
|
free (list);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free (list);
|
||||||
|
}
|
||||||
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *xenStoreDomainGetName(virConnectPtr conn,
|
char *xenStoreDomainGetName(virConnectPtr conn,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ char * xenStoreDomainGetNetworkID(virConnectPtr conn,
|
|||||||
const char *mac);
|
const char *mac);
|
||||||
char * xenStoreDomainGetDiskID(virConnectPtr conn,
|
char * xenStoreDomainGetDiskID(virConnectPtr conn,
|
||||||
int id,
|
int id,
|
||||||
const char *mac);
|
const char *dev);
|
||||||
char * xenStoreDomainGetName(virConnectPtr conn,
|
char * xenStoreDomainGetName(virConnectPtr conn,
|
||||||
int id);
|
int id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user