Don't expose module_list

This commit is contained in:
topjohnwu
2020-05-18 05:36:02 -07:00
parent c3e045e367
commit 4497e0aaca
4 changed files with 21 additions and 25 deletions

View File

@@ -25,7 +25,7 @@ using namespace std;
#define TYPE_CUSTOM (1 << 5) /* custom node type overrides all */
#define TYPE_DIR (TYPE_INTER|TYPE_SKEL|TYPE_ROOT)
vector<string> module_list;
static vector<string> module_list;
class node_entry;
class dir_node;
@@ -671,10 +671,7 @@ static void collect_modules() {
void handle_modules() {
prepare_modules();
collect_modules();
// Execute module scripts
LOGI("* Running module post-fs-data scripts\n");
exec_module_script("post-fs-data", module_list);
exec_module_scripts("post-fs-data");
// Recollect modules (module scripts could remove itself)
module_list.clear();
@@ -699,3 +696,7 @@ void foreach_modules(const char *name) {
}
}
}
void exec_module_scripts(const char *stage) {
exec_module_scripts(stage, module_list);
}