BASE: Make --list-engines show list of truly compiled engines

After plugins were split, we were showing list of detection plugins
which is misleading, since all of them are always included.
This commit is contained in:
Eugene Sandulenko 2021-04-14 15:04:37 +02:00
parent a138c0b646
commit 1774094089
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -835,10 +835,11 @@ static void listEngines() {
printf("Engine ID Engine Name \n"
"--------------- ------------------------------------------------------\n");
const PluginList &plugins = EngineMan.getPlugins();
const PluginList &plugins = EngineMan.getPlugins(PLUGIN_TYPE_ENGINE);
for (PluginList::const_iterator iter = plugins.begin(); iter != plugins.end(); ++iter) {
const MetaEngineDetection &metaEngine = (*iter)->get<MetaEngineDetection>();
printf("%-15s %s\n", metaEngine.getEngineId(), metaEngine.getName());
const Plugin *p = EngineMan.findPlugin((*iter)->getName());
printf("%-15s %s\n", p->get<MetaEngineDetection>().getEngineId(), p->get<MetaEngineDetection>().getName());
}
}