]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
* src/xen_internal.c: Daniel Berrange fixed some mlock size problem
authorDaniel Veillard <veillard@redhat.com>
Mon, 2 Oct 2006 22:13:12 +0000 (22:13 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 2 Oct 2006 22:13:12 +0000 (22:13 +0000)
  doing a bit of cleanup too
Daniel

ChangeLog
src/xen_internal.c

index 7bd42555b994e495ce658fed21c85b90db5b34b5..56400f1050940f44fb92a9163337507d52ec51ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * src/virsh.c: add #include <locale.h> to be able to compile without
index c267a8fb2ca6225be23ecb74e247f2adcab4cd02..44f18eafca290ae389c710382c7a55c5c65730dc 100644 (file)
@@ -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);