mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xl: hide xenstore-features behind option
In order to be able to use "xl info" before Xenstore has been started
or after it has crashed, hide obtaining the available Xenstore features
behind the new option "-x".
Fixes: ecce7970cf ("tools/xl: add available Xenstore features to xl info output")
Reported-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
1 parent
011a9e2566
commit
4efc1da300
3 files changed
+15
-5
No files matched your search
@@ -996,6 +996,10 @@ B<OPTIONS>
|
||||
|
||||
List host NUMA topology information
|
||||
|
||||
=item B<-x>, B<--xenstore>
|
||||
|
||||
Show Xenstore features available.
|
||||
|
||||
=back
|
||||
|
||||
=item B<top>
|
||||
|
||||
@@ -743,7 +743,7 @@ condition.
|
||||
=back
|
||||
|
||||
The features supported by the running Xenstore instance can be retrieved
|
||||
via the B<xl info> command in dom0.
|
||||
via the B<xl info -x> command in dom0.
|
||||
|
||||
The default value is B<0xffffffff>, meaning that all possible Xenstore
|
||||
features are visible by the guest.
|
||||
|
||||
+10
-4
@@ -353,7 +353,7 @@ static void output_xenstore_info(void)
|
||||
xs_close(xsh);
|
||||
}
|
||||
|
||||
static void print_info(int numa)
|
||||
static void print_info(int numa, bool xs)
|
||||
{
|
||||
output_nodeinfo();
|
||||
|
||||
@@ -365,7 +365,8 @@ static void print_info(int numa)
|
||||
}
|
||||
output_xeninfo();
|
||||
|
||||
output_xenstore_info();
|
||||
if (xs)
|
||||
output_xenstore_info();
|
||||
|
||||
maybe_printf("xend_config_format : 4\n");
|
||||
|
||||
@@ -631,14 +632,19 @@ int main_info(int argc, char **argv)
|
||||
int opt;
|
||||
static struct option opts[] = {
|
||||
{"numa", 0, 0, 'n'},
|
||||
{"xenstore", 0, 0, 'x'},
|
||||
COMMON_LONG_OPTS
|
||||
};
|
||||
int numa = 0;
|
||||
bool xs = false;
|
||||
|
||||
SWITCH_FOREACH_OPT(opt, "n", opts, "info", 0) {
|
||||
SWITCH_FOREACH_OPT(opt, "nx", opts, "info", 0) {
|
||||
case 'n':
|
||||
numa = 1;
|
||||
break;
|
||||
case 'x':
|
||||
xs = true;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -648,7 +654,7 @@ int main_info(int argc, char **argv)
|
||||
if (numa == 0 && argc > optind)
|
||||
info_name = argv[optind];
|
||||
|
||||
print_info(numa);
|
||||
print_info(numa, xs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||