[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 12/23] tools/xl: Print domain capabilities with verbose
Capabilities are show like this (long lines trimmed): xl list --verbose Name Security Label Capabilities Domain-0 - hardware xenstore dom0less-1 - - dom0less-2 - privileged Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx> --- docs/man/xl.1.pod.in | 3 ++- tools/xl/xl_info.c | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index fe38724b2b..8e253180a7 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -313,7 +313,8 @@ Also displays the security labels. =item B<-v>, B<--verbose> -Also displays the domain UUIDs, the shutdown reason and security labels. +Also displays the domain UUIDs, the shutdown reason, security labels, +and capabilities. =item B<-c>, B<--cpupool> diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c index 72e87eac46..3e3a793e12 100644 --- a/tools/xl/xl_info.c +++ b/tools/xl/xl_info.c @@ -384,7 +384,7 @@ static void list_domains(bool verbose, bool context, bool claim, bool numa, libxl_physinfo_init(&physinfo); printf("Name ID Mem VCPUs\tState\tTime(s)"); - if (verbose) printf(" UUID Reason-Code\tSecurity Label"); + if (verbose) printf(" UUID Reason-Code\tSecurity Label Capabilities"); if (context && !verbose) printf(" Security Label"); if (claim) printf(" Claimed"); if (cpupool) printf(" Cpupool"); @@ -443,6 +443,28 @@ static void list_domains(bool verbose, bool context, bool claim, bool numa, putchar(' '); print_bitmap(nodemap.map, physinfo.nr_nodes, stdout); } + if (verbose) { + bool cap = false; + + if ( info[i].privileged ) + { + cap = true; + printf(" privileged"); + } + if ( info[i].hardware ) + { + cap = true; + printf(" hardware"); + } + if ( info[i].never_stop ) + { + cap = true; + printf(" xenstore"); + } + if ( !cap ) + printf(" %17s", "-"); + } + putchar('\n'); } -- 2.48.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |