fix bug for module

Signed-off-by: Mupceet <laiguizhong@huawei.com>
This commit is contained in:
Mupceet 2022-06-29 13:57:03 +08:00
parent ffc886a66a
commit 7f29d67491
3 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ static int ModuleMgrCmdInstall(int id, const char *name, int argc, const char **
static int ModuleMgrCmdUninstall(int id, const char *name, int argc, const char **argv)
{
INIT_ERROR_CHECK(argv != NULL && argc >= 1, return -1, "Invalid install parameter");
ModuleMgrUninstall(NULL, argv[0]);
ModuleMgrUninstall(defaultModuleMgr, argv[0]);
return 0;
}

View File

@ -109,7 +109,7 @@ static void *moduleInstall(MODULE_ITEM *module, int argc, const char *argv[])
return NULL;
}
} else {
if (snprintf_s(path, sizeof(path), sizeof(path) - 1, "/system/" MODULE_LIB_NAME "/%s/%s" MODULE_SUFFIX_D,
if (snprintf_s(path, sizeof(path), sizeof(path) - 1, "/system/" MODULE_LIB_NAME "/%s/lib%s" MODULE_SUFFIX_D,
module->moduleMgr->name, module->name) < 0) {
return NULL;
}

View File

@ -26,7 +26,7 @@ static int bootchartEarlyHook(const HOOK_INFO *info, void *cookie)
return 0;
}
InitModuleMgrInstall("libbootchart");
InitModuleMgrInstall("bootchart");
PLUGIN_LOGI("bootchart enabled.");
return 0;
}