apps/examples/elf, module, posix_spawn: Correct naming of global variables that violations the naming requirements of the coding standard.

This commit is contained in:
Gregory Nutt 2018-07-12 09:53:38 -06:00
parent db9c56e723
commit 654ee7e6f9
8 changed files with 22 additions and 22 deletions

View File

@ -164,8 +164,8 @@ static char fullpath[128];
* Symbols from Auto-Generated Code
****************************************************************************/
extern const struct symtab_s exports[];
extern const int nexports;
extern const struct symtab_s g_exports[];
extern const int g_nexports;
/****************************************************************************
* Private Functions
@ -343,7 +343,7 @@ int elf_main(int argc, char *argv[])
*/
args[0] = NULL;
ret = exec(filename, args, exports, nexports);
ret = exec(filename, args, g_exports, g_nexports);
mm_update(&g_mmstep, "after exec");

View File

@ -38,7 +38,7 @@ for var in $varlist; do
done
echo ""
echo "const struct symtab_s exports[] = "
echo "const struct symtab_s g_exports[] = "
echo "{"
for var in $varlist; do
@ -47,5 +47,5 @@ done
echo "};"
echo ""
echo "const int nexports = sizeof(exports) / sizeof(struct symtab_s);"
echo "const int g_nexports = sizeof(g_exports) / sizeof(struct symtab_s);"

View File

@ -38,7 +38,7 @@ for var in $varlist; do
done
echo ""
echo "const struct symtab_s mod_exports[] = "
echo "const struct symtab_s g_mod_exports[] = "
echo "{"
for var in $varlist; do
@ -47,5 +47,5 @@ done
echo "};"
echo ""
echo "const int mod_nexports = sizeof(mod_exports) / sizeof(struct symtab_s);"
echo "const int g_mod_nexports = sizeof(g_mod_exports) / sizeof(struct symtab_s);"

View File

@ -114,8 +114,8 @@ static const char g_write_string[] = "Hi there, installed driver\n";
* Symbols from Auto-Generated Code
****************************************************************************/
extern const struct symtab_s mod_exports[];
extern const int mod_nexports;
extern const struct symtab_s g_mod_exports[];
extern const int g_mod_nexports;
/****************************************************************************
* Public Functions
@ -140,8 +140,8 @@ int module_main(int argc, char *argv[])
/* Set the OS symbol table indirectly through the boardctl() */
symdesc.symtab = (FAR struct symtab_s *)mod_exports;
symdesc.nsymbols = mod_nexports;
symdesc.symtab = (FAR struct symtab_s *)g_mod_exports;
symdesc.nsymbols = g_mod_nexports;
ret = boardctl(BOARDIOC_OS_SYMTAB, (uintptr_t)&symdesc);
if (ret < 0)
{

View File

@ -38,7 +38,7 @@ for var in $varlist; do
done
echo ""
echo "const struct symtab_s exports[] = "
echo "const struct symtab_s g_exports[] = "
echo "{"
for var in $varlist; do
@ -47,5 +47,5 @@ done
echo "};"
echo ""
echo "const int nexports = sizeof(exports) / sizeof(struct symtab_s);"
echo "const int g_nexports = sizeof(g_exports) / sizeof(struct symtab_s);"

View File

@ -160,8 +160,8 @@ static char * const g_argv[4] =
* Symbols from Auto-Generated Code
****************************************************************************/
extern const struct symtab_s exports[];
extern const int nexports;
extern const struct symtab_s g_exports[];
extern const int g_nexports;
/****************************************************************************
* Private Functions
@ -300,8 +300,8 @@ int spawn_main(int argc, char *argv[])
/* Make sure that we are using our symbol tablee */
symdesc.symtab = (FAR struct symtab_s *)exports; /* Discard 'const' */
symdesc.nsymbols = nexports;
symdesc.symtab = (FAR struct symtab_s *)g_exports; /* Discard 'const' */
symdesc.nsymbols = g_nexports;
(void)boardctl(BOARDIOC_APP_SYMTAB, (uintptr_t)&symdesc);
/*************************************************************************

View File

@ -44,7 +44,7 @@ for var in $varlist; do
done
echo ""
echo "const struct symtab_s sot_exports[] = "
echo "const struct symtab_s g_sot_exports[] = "
echo "{"
for var in $varlist; do
@ -53,5 +53,5 @@ done
echo "};"
echo ""
echo "const int sot_nexports = sizeof(sot_exports) / sizeof(struct symtab_s);"
echo "const int g_sot_nexports = sizeof(g_sot_exports) / sizeof(struct symtab_s);"

View File

@ -99,8 +99,8 @@
* Symbols from Auto-Generated Code
****************************************************************************/
extern const struct symtab_s sot_exports[];
extern const int sot_nexports;
extern const struct symtab_s g_sot_exports[];
extern const int g_sot_nexports;
/****************************************************************************
* Public Functions
@ -126,7 +126,7 @@ int sotest_main(int argc, char *argv[])
/* Set the shared library symbol table */
ret = dlsymtab((FAR struct symtab_s *)sot_exports, sot_nexports);
ret = dlsymtab((FAR struct symtab_s *)g_sot_exports, g_sot_nexports);
if (ret < 0)
{
fprintf(stderr, "ERROR: dlsymtab failed: %d\n", ret);