@@ -336,6 +336,26 @@ OPTIONS
--region::
Specify the region name to filter the emitted regions.
+-v::
+--verbose::
+ Increase verbosity of the output. This can be specified
+ multiple times to be even more verbose on the
+ informational and miscellaneous output, and can be used
+ to override omitted flags for showing specific
+ information. Note that cxl list --verbose --verbose is
+ equivalent to cxl list -vv, and likewise
+ cxl list --verbose --verbose --verbose is equivalent to
+ cxl list -vvv.
+ - *-v*
+ Enable --memdevs, --regions, --buses,
+ --ports, --decoders, and --targets.
+ - *-vv*
+ Everything *-v* provides, plus include
+ disabled devices with --idle.
+ - *-vvv*
+ Everything *-vv* provides, plus enable
+ --health and --partition.
+
--debug::
If the cxl tool was built with debug enabled, turn on debug
messages.
@@ -26,6 +26,7 @@ struct cxl_filter_params {
bool human;
bool health;
bool partition;
+ int verbose;
struct log_ctx ctx;
};
@@ -52,6 +52,8 @@ static const struct option options[] = {
"include memory device health information"),
OPT_BOOLEAN('I', "partition", ¶m.partition,
"include memory device partition information"),
+ OPT_INCR('v', "verbose", ¶m.verbose,
+ "increase output detail"),
#ifdef ENABLE_DEBUG
OPT_BOOLEAN(0, "debug", &debug, "debug list walk"),
#endif
@@ -106,6 +108,25 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
param.memdevs = true;
}
+ switch (param.verbose){
+ default:
+ case 3:
+ param.health = true;
+ param.partition = true;
+ /* fallthrough */
+ case 2:
+ param.idle = true;
+ /* fallthrough */
+ case 1:
+ param.buses = true;
+ param.ports = true;
+ param.decoders = true;
+ param.targets = true;
+ /* fallthrough */
+ case 0:
+ break;
+ }
+
log_init(¶m.ctx, "cxl list", "CXL_LIST_LOG");
if (debug) {
cxl_set_log_priority(ctx, LOG_DEBUG);