MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_plugin_libs

Function get_plugin_libs

dpdk/usertools/dpdk-pmdinfo.py:166–179  ·  view source on GitHub ↗

Look into the provided binaries for DPDK_PLUGIN_PATH and scan the path for files.

(binaries: Iterable[Path])

Source from the content-addressed store, hash-verified

164
165# ----------------------------------------------------------------------------
166def get_plugin_libs(binaries: Iterable[Path]) -> Iterator[Path]:
167 """
168 Look into the provided binaries for DPDK_PLUGIN_PATH and scan the path
169 for files.
170 """
171 for b in binaries:
172 for p in get_elf_strings(b, ".rodata", "DPDK_PLUGIN_PATH="):
173 plugin_path = p.strip()
174 logging.debug("discovering plugins in %s", plugin_path)
175 for root, _, files in os.walk(plugin_path):
176 for f in files:
177 yield Path(root) / f
178 # no need to search in other binaries.
179 return
180
181
182# ----------------------------------------------------------------------------

Callers 1

parse_pmdinfoFunction · 0.85

Calls 1

get_elf_stringsFunction · 0.85

Tested by

no test coverage detected