Module names are not needed in libc/modlib when the module library is used only for shared library support.

This commit is contained in:
Gregory Nutt
2017-01-29 12:23:24 -06:00
parent 86bdd0a4c7
commit 2c45f482b1
9 changed files with 36 additions and 46 deletions
+6 -6
View File
@@ -173,8 +173,8 @@ static void mod_dumpinitializer(mod_initializer_t initializer,
*
* Input Parameters:
*
* filename - Full path to the module binary to be loaded
* modulename - The name that can be used to refer to the module after
* filename - Full path to the module binary to be loaded
* modname - The name that can be used to refer to the module after
* it has been loaded.
*
* Returned Value:
@@ -185,14 +185,14 @@ static void mod_dumpinitializer(mod_initializer_t initializer,
*
****************************************************************************/
FAR void *insmod(FAR const char *filename, FAR const char *modulename)
FAR void *insmod(FAR const char *filename, FAR const char *modname)
{
struct mod_loadinfo_s loadinfo;
FAR struct module_s *modp;
mod_initializer_t initializer;
int ret;
DEBUGASSERT(filename != NULL && modulename != NULL);
DEBUGASSERT(filename != NULL && modname != NULL);
sinfo("Loading file: %s\n", filename);
/* Get exclusive access to the module registry */
@@ -201,7 +201,7 @@ FAR void *insmod(FAR const char *filename, FAR const char *modulename)
/* Check if this module is already installed */
if (modlib_registry_find(modulename) != NULL)
if (modlib_registry_find(modname) != NULL)
{
modlib_registry_unlock();
ret = -EEXIST;
@@ -229,7 +229,7 @@ FAR void *insmod(FAR const char *filename, FAR const char *modulename)
/* Save the module name in the registry entry */
strncpy(modp->modulename, modulename, MODULENAME_MAX);
strncpy(modp->modname, modname, MODLIB_NAMEMAX);
/* Load the program binary */
+1 -1
View File
@@ -147,7 +147,7 @@ static int modprocfs_callback(FAR struct module_s *modp, FAR void *arg)
priv = (FAR struct modprocfs_file_s *)arg;
linesize = snprintf(priv->line, MOD_LINELEN, "%s,%p,%p,%p,%u,%p,%lu,%p,%lu\n",
modp->modulename, modp->initializer,
modp->modname, modp->initializer,
modp->modinfo.uninitializer, modp->modinfo.arg,
modp->modinfo.nexports, modp->alloc,
(unsigned long)modp->textsize,