[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 10 of 11 v4] xl: add node-affinity to the output of `xl list`



On Fri, 2013-03-15 at 02:30 +0000, Dario Faggioli wrote:
> Node-affinity is now something that is under (some) control of the
> user, so show it upon request as part of the output of `xl list'
> by the `-n' option.
> 
> Re the patch, the print_bitmap() related hunk is _mostly_ code motion,
> although there is a very minor change in the code, basically to allow
> using the function for printing both cpu and node bitmaps (as, in case
> all bits are sets, it used to print "any cpu", which doesn't fit the
> nodemap case).
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Acked-by: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
[...]
>              if (rc < 0)
> -                printf("  -");
> +                printf("                -");
>              else {
> -                printf("  %s", buf);
> +                printf(" %16s", buf);
>                  free(buf);

If you do end up respinning for any reason then this could be made less
manual/error prone by using "%16s" even in the "-" case. Might even be
possible to combine the whole lot, since free(NULL) is safe:
        printf(" %16s", rc < 0 : "" ? buf);
        free(buf);
(assuming buf == NULL whenever rc < 0, I didn't check)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.