[libcamera-devel] [PATCH 1/2] libcamera: ipa_manager: Only parse IPA modules

Kieran Bingham kieran.bingham at ideasonboard.com
Mon May 1 17:55:06 CEST 2023


Ensure that when we iterate the libcamera libdir we only select shared
objects which are expected to be IPA modules, with an ipa_ prefix.

Any shared object not matching this filter is ignored and not processed
by the IPA Manager.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/libcamera/ipa_manager.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 030ef43fb994..c0c2f027e902 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -206,6 +206,10 @@ void IPAManager::parseDir(const char *libDir, unsigned int maxDepth,
 		if (strcmp(&ent->d_name[offset], ".so"))
 			continue;
 
+		/* Ignore any modules which are not IPAs. */
+		if (strncmp(ent->d_name, "ipa_", 4) != 0)
+			continue;
+
 		files.push_back(std::string(libDir) + "/" + ent->d_name);
 	}
 
-- 
2.34.1



More information about the libcamera-devel mailing list