anitazha / rpms / ndctl

Forked from rpms/ndctl a year ago
Clone

Blame SOURCES/0160-cxl-list-Auto-enable-single-mode-for-port-listings.patch

e0018b
From 2124f62aad2fcc00def36d119cfcdee22a7961e9 Mon Sep 17 00:00:00 2001
e0018b
From: Dan Williams <dan.j.williams@intel.com>
e0018b
Date: Thu, 28 Apr 2022 15:10:32 -0700
e0018b
Subject: [PATCH 160/217] cxl/list: Auto-enable 'single' mode for port listings
e0018b
e0018b
The --single parameter instructs the filter code to gate listing of
e0018b
ancestor ports. However, that behavior can be inferred by attempts to list
e0018b
a port without the --ports option, i.e. make:
e0018b
e0018b
    cxl list -p $port
e0018b
e0018b
...equivalent to:
e0018b
e0018b
    cxl list -P -S -p $port
e0018b
e0018b
Link: https://lore.kernel.org/r/165118383246.1676208.2097194779584921177.stgit@dwillia2-desk3.amr.corp.intel.com
e0018b
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
e0018b
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
e0018b
---
e0018b
 cxl/list.c | 1 +
e0018b
 1 file changed, 1 insertion(+)
e0018b
e0018b
diff --git a/cxl/list.c b/cxl/list.c
e0018b
index 1e9d441..940782d 100644
e0018b
--- a/cxl/list.c
e0018b
+++ b/cxl/list.c
e0018b
@@ -104,6 +104,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
e0018b
 			error("please specify entities to list, e.g. using -m/-M\n");
e0018b
 			usage_with_options(u, options);
e0018b
 		}
e0018b
+		param.single = true;
e0018b
 	}
e0018b
 
e0018b
 	log_init(&param.ctx, "cxl list", "CXL_LIST_LOG");
e0018b
-- 
e0018b
2.27.0
e0018b