lightningd/plugin.c: Add specific function to give the directory for built-in plugins.

This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-07-29 16:20:49 +08:00
committed by neil saitug
parent 3dafddd717
commit 3df2333d5d
4 changed files with 28 additions and 7 deletions

View File

@@ -1526,6 +1526,16 @@ struct log *plugin_get_log(struct plugin *plugin)
return plugin->log;
}
void plugins_set_builtin_plugins_dir(struct plugins *plugins,
const char *dir)
{
/*~ The builtin-plugins dir does not need to exist, but
* we would error those anyway for our important built-in
* plugins.
*/
add_plugin_dir(plugins, dir, true);
}
struct plugin_destroyed {
const struct plugin *plugin;
};
@@ -1536,6 +1546,7 @@ static void mark_plugin_destroyed(const struct plugin *unused,
pd->plugin = NULL;
}
struct plugin_destroyed *plugin_detect_destruction(const struct plugin *plugin)
{
struct plugin_destroyed *pd = tal(NULL, struct plugin_destroyed);