WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] fix xc_domain_memory_increase_reservation return val

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix xc_domain_memory_increase_reservation return value
From: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Date: Wed, 29 Jun 2005 17:25:57 +0800
Delivery-date: Wed, 29 Jun 2005 09:25:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
in xc_domain_memory_increase_reservation, when do_dom_mem_op return 0,
it shall also return -1,I met this problem when I try to allocate
domain memory.


Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>

diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-06-29 17:16:11 +08:00
+++ b/tools/libxc/xc_domain.c   2005-06-29 17:16:11 +08:00
@@ -243,7 +243,7 @@
     if (err == mem_kb / 4)
         return 0;

-    if (err > 0) {
+    if (err >= 0) {
         errno = ENOMEM;
         err = -1;
     }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix xc_domain_memory_increase_reservation return value, Xiaofeng Ling <=