提交 18351e0f 编写于 作者: D Daniel Veillard

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

  doing a bit of cleanup too
Daniel
上级 cce70e01
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>
* src/virsh.c: add #include <locale.h> to be able to compile without
......
......@@ -656,7 +656,7 @@ virXen_getdomaininfolist(int handle, int first_domain, int maxids,
if (mlock(XEN_GETDOMAININFOLIST_DATA(dominfos),
XEN_GETDOMAININFO_SIZE * maxids) < 0) {
virXenError(VIR_ERR_XEN_CALL, " locking",
sizeof(xen_v0_getdomaininfo) * maxids);
XEN_GETDOMAININFO_SIZE * maxids);
return (-1);
}
if (hypervisor_version > 1) {
......@@ -696,10 +696,10 @@ virXen_getdomaininfolist(int handle, int first_domain, int maxids,
if (ret == 0)
ret = op.u.getdomaininfolist.num_domains;
}
if (mlock(XEN_GETDOMAININFOLIST_DATA(dominfos),
XEN_GETDOMAININFO_SIZE * maxids) < 0) {
if (munlock(XEN_GETDOMAININFOLIST_DATA(dominfos),
XEN_GETDOMAININFO_SIZE * maxids) < 0) {
virXenError(VIR_ERR_XEN_CALL, " release",
sizeof(xen_v0_getdomaininfo));
XEN_GETDOMAININFO_SIZE * maxids);
ret = -1;
}
return(ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册