[PATCH i-g-t v2 25/39] lib/chamelium/v3: Provide access to port_mapping via method call

Louis Chauvet louis.chauvet at bootlin.com
Tue Jul 9 15:34:41 UTC 2024


Since the chamelium_rpc structure is private, this commit introduces a
method to access the port mapping.

Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
---
 lib/chamelium/v3/igt_chamelium.c | 5 +++++
 lib/chamelium/v3/igt_chamelium.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
index 26f6b83cd10a..fb559f29a72e 100644
--- a/lib/chamelium/v3/igt_chamelium.c
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -364,6 +364,11 @@ void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium)
 	free(chamelium);
 }
 
+struct igt_list_head *chamelium_v3_get_port_mapping(struct igt_chamelium_v3 *chamelium)
+{
+	return &chamelium->port_mapping;
+}
+
 /**
  * __chamelium_rpc - Call a remote function on the chamelium
  *
diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
index 3aaf51dd38db..b29221c460f0 100644
--- a/lib/chamelium/v3/igt_chamelium.h
+++ b/lib/chamelium/v3/igt_chamelium.h
@@ -45,6 +45,7 @@ struct igt_chamelium_v3 *chamelium_v3_init(char *url);
 struct igt_chamelium_v3 *chamelium_v3_init_from_config(void);
 
 void chamelium_v3_fill_port_mapping(struct igt_chamelium_v3 *chamelium);
+struct igt_list_head *chamelium_v3_get_port_mapping(struct igt_chamelium_v3 *chamelium);
 
 void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium);
 

-- 
2.44.2



More information about the igt-dev mailing list