anitazha / rpms / ndctl

Forked from rpms/ndctl a year ago
Clone

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

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