* src/xen_internal.c: Daniel Berrange fixed some mlock size problem

doing a bit of cleanup too
Daniel
This commit is contained in:
Daniel Veillard 2006-10-02 22:13:12 +00:00
parent cce70e0132
commit 18351e0ffc
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Mon Oct 2 23:16:06 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: Daniel Berrange fixed some mlock size problem
doing a bit of cleanup too
Fri Sep 29 17:31:36 CEST 2006 Daniel Veillard <veillard@redhat.com> Fri Sep 29 17:31:36 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: add #include <locale.h> to be able to compile without * src/virsh.c: add #include <locale.h> to be able to compile without

View File

@ -656,7 +656,7 @@ virXen_getdomaininfolist(int handle, int first_domain, int maxids,
if (mlock(XEN_GETDOMAININFOLIST_DATA(dominfos), if (mlock(XEN_GETDOMAININFOLIST_DATA(dominfos),
XEN_GETDOMAININFO_SIZE * maxids) < 0) { XEN_GETDOMAININFO_SIZE * maxids) < 0) {
virXenError(VIR_ERR_XEN_CALL, " locking", virXenError(VIR_ERR_XEN_CALL, " locking",
sizeof(xen_v0_getdomaininfo) * maxids); XEN_GETDOMAININFO_SIZE * maxids);
return (-1); return (-1);
} }
if (hypervisor_version > 1) { if (hypervisor_version > 1) {
@ -696,10 +696,10 @@ virXen_getdomaininfolist(int handle, int first_domain, int maxids,
if (ret == 0) if (ret == 0)
ret = op.u.getdomaininfolist.num_domains; ret = op.u.getdomaininfolist.num_domains;
} }
if (mlock(XEN_GETDOMAININFOLIST_DATA(dominfos), if (munlock(XEN_GETDOMAININFOLIST_DATA(dominfos),
XEN_GETDOMAININFO_SIZE * maxids) < 0) { XEN_GETDOMAININFO_SIZE * maxids) < 0) {
virXenError(VIR_ERR_XEN_CALL, " release", virXenError(VIR_ERR_XEN_CALL, " release",
sizeof(xen_v0_getdomaininfo)); XEN_GETDOMAININFO_SIZE * maxids);
ret = -1; ret = -1;
} }
return(ret); return(ret);