Message ID | 1461682343-20597-9-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Apr 26, 2016 at 04:52:17PM +0200, Roger Pau Monne wrote: > It should be an enum, not an unsigned. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> > --- > Cc: Ian Jackson <ian.jackson@eu.citrix.com> > Cc: Wei Liu <wei.liu2@citrix.com> > --- > tools/libxl/xl_cmdimpl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 6346017..8ff54e1 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4254,7 +4254,7 @@ static void list_domains(bool verbose, bool context, bool claim, bool numa, > printf("\n"); > for (i = 0; i < nb_domain; i++) { > char *domname; > - unsigned shutdown_reason; > + libxl_shutdown_reason shutdown_reason; > domname = libxl_domid_to_name(ctx, info[i].domid); > shutdown_reason = info[i].shutdown ? info[i].shutdown_reason : 0; > printf("%-40s %5d %5lu %5d %c%c%c%c%c%c %8.1f", > -- > 2.6.4 (Apple Git-63) >
On 4/26/16 9:52 AM, Roger Pau Monne wrote: > It should be an enum, not an unsigned. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Doug Goldstein <cardoe@cardoe.com> I had to drop the shutdown_reason >= 0 check a few lines below in my version of this patch. But maybe its not necessary after all.
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 6346017..8ff54e1 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -4254,7 +4254,7 @@ static void list_domains(bool verbose, bool context, bool claim, bool numa, printf("\n"); for (i = 0; i < nb_domain; i++) { char *domname; - unsigned shutdown_reason; + libxl_shutdown_reason shutdown_reason; domname = libxl_domid_to_name(ctx, info[i].domid); shutdown_reason = info[i].shutdown ? info[i].shutdown_reason : 0; printf("%-40s %5d %5lu %5d %c%c%c%c%c%c %8.1f",
It should be an enum, not an unsigned. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)