tools/xl: Call init function for libxl_bitmap
PATCH 1/1 tools/xl: Call init function for libxl_bitmap
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
--
tools/libxl/xl_cmdimpl.c +4 -2
@@ -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" );
Quoted 8 lines · Uma Sharma
This patch calls init function for
libxl_bitmapinmain_cpupoolnumasplit()andvcpuset()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 functionSigned-off-by Uma Sharma <[email protected]>
Presumably you're going to post a small series for your previous patch and this one. Please carry this tag over.
Quoted 25 lines
--
tools/libxl/xl_cmdimpl.c +4
-2@@ -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" );
Quoted 14 lines · Wei Liu
Quoted 8 lines · Uma Sharma
This patch calls init function for
libxl_bitmapinmain_cpupoolnumasplit()andvcpuset()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 functionSigned-off-by Uma Sharma <[email protected]>Acked-by Wei Liu <[email protected]>Quoted 1 line
tools/libxl/xl_cmdimpl.c +0
-0
Quoted 8 lines
tools/libxl/xl_cmdimpl.c static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host) · line 4847
Quoted 7 lines
tools/libxl/xl_cmdimpl.c +2
-1@@ -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);
This is introducing some white space damaging, IMO.
In fact, it seems you are removing a black line, i.e., a line which was *totally* empty, as it should be, with one which has _only_ 4 white spaces.
That's kind of common while working on patches, I know, but it's not what we want.
To avoid sending patches suffering from this issue, you certainly can configure your editor to properly deal with the Xen coding style. What I also find really useful is that, if looking at the patch with git show' or stg show', the trailing white spaces are marked in red (yes, you probably need to configure git for that, but, if you're lucky, that's already the default for your dev environment).
Quoted 8 lines
tools/libxl/xl_cmdimpl.c int main_cpupoolnumasplit(int argc, char **argv) · line 7259
Quoted 7 lines
tools/libxl/xl_cmdimpl.c +2
-1@@ -7254,7 +7255,8 @@ int main_cpupoolnumasplit(int argc, char **argv) } ret =0 ; - + +libxl_bitmap_init (&cpumap);
Same here.
TBH, I'm a bit confused, and am not sure if this is the actual latest version of this patch. If it's not, sorry for the noise.
Regards,
Dario
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel