From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xensource.com>,
Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Subject: [PATCH] libxl: make set_memory_target work on domains with no videoram
Date: Fri, 30 Apr 2010 16:04:17 -0700 [thread overview]
Message-ID: <4BDB61F1.9090101@goop.org> (raw)
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@citrix.com>
diff -r 0ea790d96997 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Apr 30 14:46:55 2010 -0700
+++ b/tools/libxl/libxl.c Fri Apr 30 15:59:25 2010 -0700
@@ -2292,9 +2292,10 @@
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);
+ if (videoram_s)
+ videoram = atoi(videoram_s);
+ else
+ videoram = 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);
next reply other threads:[~2010-04-30 23:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 23:04 Jeremy Fitzhardinge [this message]
2010-05-01 8:49 ` [PATCH] libxl: make set_memory_target work on domains with no videoram Vincent Hanquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BDB61F1.9090101@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=vincent.hanquez@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.