diff mbox series

[ndctl,06/10] cxl/list: Auto-enable 'single' mode for port listings

Message ID 165118383246.1676208.2097194779584921177.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 2124f62aad2fcc00def36d119cfcdee22a7961e9
Headers show
Series CXL topology unit test | expand

Commit Message

Dan Williams April 28, 2022, 10:10 p.m. UTC
The --single parameter instructs the filter code to gate listing of
ancestor ports. However, that behavior can be inferred by attempts to list
a port without the --ports option, i.e. make:

    cxl list -p $port

...equivalent to:

    cxl list -P -S -p $port

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 cxl/list.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/cxl/list.c b/cxl/list.c
index 1e9d441190a0..940782d33a10 100644
--- a/cxl/list.c
+++ b/cxl/list.c
@@ -104,6 +104,7 @@  int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
 			error("please specify entities to list, e.g. using -m/-M\n");
 			usage_with_options(u, options);
 		}
+		param.single = true;
 	}
 
 	log_init(&param.ctx, "cxl list", "CXL_LIST_LOG");