From: Uma Sharma <uma.sharma523@gmail.com>
To: George.Dunlap@eu.citrix.com
Cc: Ian.Jackson@citrix.com, Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: [OPW PATCH] tools/xl: Call init function for libxl_bitmap
Date: Sun, 19 Oct 2014 20:21:01 +0530 [thread overview]
Message-ID: <5443cfde.0286440a.434c.1100@mx.google.com> (raw)
This patch calls init function for libxl_bitmap in
main_cpupoolnumasplit() and vcpuset()
tools/libxl/xl_cmdimpl.c
IDL generated libxl types should be used only after calling the init
function even if the variable is simply being passed by reference as
an output parameter to a libxl function
Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
--
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 988ee28..d68223f 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4843,7 +4843,8 @@ static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host)
char *endptr;
unsigned int max_vcpus, i;
libxl_bitmap cpumap;
-
+
+ libxl_bitmap_init(&cpumap);
max_vcpus = strtoul(nr_vcpus, &endptr, 10);
if (nr_vcpus == endptr) {
fprintf(stderr, "Error: Invalid argument.\n");
@@ -7254,7 +7255,8 @@ int main_cpupoolnumasplit(int argc, char **argv)
}
ret = 0;
-
+
+ libxl_bitmap_init(&cpumap);
poolinfo = libxl_list_cpupool(ctx, &n_pools);
if (!poolinfo) {
fprintf(stderr, "error getting cpupool info\n");
next reply other threads:[~2014-10-19 14:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 14:51 Uma Sharma [this message]
2014-10-20 15:23 ` [OPW PATCH] tools/xl: Call init function for libxl_bitmap Wei Liu
2014-10-29 17:52 ` Dario Faggioli
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=5443cfde.0286440a.434c.1100@mx.google.com \
--to=uma.sharma523@gmail.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.