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-changelog

[Xen-changelog] [xen-unstable] libxl: make set_memory_target work on dom

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: make set_memory_target work on domains with no videoram
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 May 2010 13:20:49 -0700
Delivery-date: Tue, 04 May 2010 13:28:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1272972990 -3600
# Node ID 67303cccfb79206efd2975f9121807c95c05aa40
# Parent  df5fdbdfc4ce1adbc54776887a8fb4187ef58076
libxl: make set_memory_target work on domains with no videoram

If a domain has no videoram (say, dom0), then treat the size as 0 and
continue, rather than just failing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 tools/libxl/libxl.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -r df5fdbdfc4ce -r 67303cccfb79 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue May 04 12:33:14 2010 +0100
+++ b/tools/libxl/libxl.c       Tue May 04 12:36:30 2010 +0100
@@ -2292,9 +2292,7 @@ int libxl_set_memory_target(struct libxl
     char *dompath = libxl_xs_get_dompath(ctx, domid);
 
     videoram_s = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, 
"%s/memory/videoram", dompath));
-    if (!videoram_s)
-        return -1;
-    videoram = atoi(videoram_s);
+    videoram = videoram_s ? atoi(videoram_s) : 0;
 
     libxl_xs_write(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/memory/target", 
dompath), "%lu", target_memkb);
     rc = xc_domain_setmaxmem(ctx->xch, domid, target_memkb + 
LIBXL_MAXMEM_CONSTANT);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: make set_memory_target work on domains with no videoram, Xen patchbot-unstable <=