You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/17 02:21:46 UTC

[incubator-nuttx-apps] branch master updated (7847c1f -> bde687b)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


    from 7847c1f  example/posix_spawn: Ensure argv has filename and NULL terminator
     new ff48ece  Fix few typos in builtin/ and sotest_main example.
     new bde687b  examples/elf: Drop the 0x when printing pointers.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 builtin/exec_builtin.c           | 4 ++--
 examples/elf/tests/hello/hello.c | 6 +++---
 examples/sotest/sotest_main.c    | 8 +++-----
 3 files changed, 8 insertions(+), 10 deletions(-)

[incubator-nuttx-apps] 01/02: Fix few typos in builtin/ and sotest_main example.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit ff48ece8fb204d8bba92fc484c1ab01daacacca4
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Sat Jun 5 17:36:13 2021 +0100

    Fix few typos in builtin/ and sotest_main example.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 builtin/exec_builtin.c        | 4 ++--
 examples/sotest/sotest_main.c | 8 +++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/builtin/exec_builtin.c b/builtin/exec_builtin.c
index 58141fb..1cacdd4 100644
--- a/builtin/exec_builtin.c
+++ b/builtin/exec_builtin.c
@@ -45,7 +45,7 @@
  * Input Parameter:
  *   filename  - Name of the linked-in binary to be started.
  *   argv      - Argument list
- *   redirfile - If output if redirected, this parameter will be non-NULL
+ *   redirfile - If output is redirected, this parameter will be non-NULL
  *               and will provide the full path to the file.
  *   oflags    - If output is redirected, this parameter will provide the
  *               open flags to use.  This will support file replacement
@@ -53,7 +53,7 @@
  *
  * Returned Value:
  *   This is an end-user function, so it follows the normal convention:
- *   Returns the PID of the exec'ed module.  On failure, it.returns
+ *   Returns the PID of the exec'ed module.  On failure, it returns
  *   -1 (ERROR) and sets errno appropriately.
  *
  ****************************************************************************/
diff --git a/examples/sotest/sotest_main.c b/examples/sotest/sotest_main.c
index f1f8a67..0620e6b 100644
--- a/examples/sotest/sotest_main.c
+++ b/examples/sotest/sotest_main.c
@@ -159,12 +159,10 @@ int main(int argc, FAR char *argv[])
 
 #if CONFIG_MODLIB_MAXDEPEND > 0
   /* Install the first test shared library.  The first shared library only
-   * verifies that symbols exported be one shared library can be used to
+   * verifies that symbols exported by one shared library can be used to
    * resolve undefined symbols in a second shared library.
    */
 
-  /* Install the second test shared library  */
-
   handle1 = dlopen(BINDIR "/modprint", RTLD_NOW | RTLD_LOCAL);
   if (handle1 == NULL)
     {
@@ -261,7 +259,7 @@ int main(int argc, FAR char *argv[])
   ret = dlclose(handle2);
   if (ret < 0)
     {
-      fprintf(stderr, "ERROR: rmmod(handle2) failed: %d\n", ret);
+      fprintf(stderr, "ERROR: dlclose(handle2) failed: %d\n", ret);
       exit(EXIT_FAILURE);
     }
 
@@ -271,7 +269,7 @@ int main(int argc, FAR char *argv[])
   ret = dlclose(handle1);
   if (ret < 0)
     {
-      fprintf(stderr, "ERROR: rmmod(handle1) failed: %d\n", ret);
+      fprintf(stderr, "ERROR: dlclose(handle1) failed: %d\n", ret);
       exit(EXIT_FAILURE);
     }
 #endif

[incubator-nuttx-apps] 02/02: examples/elf: Drop the 0x when printing pointers.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit bde687bac0d2a1e7c876797f8e502a829962c2af
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Thu Jun 17 00:07:54 2021 +0100

    examples/elf: Drop the 0x when printing pointers.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 examples/elf/tests/hello/hello.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/elf/tests/hello/hello.c b/examples/elf/tests/hello/hello.c
index dc5f392..41b3cfc 100644
--- a/examples/elf/tests/hello/hello.c
+++ b/examples/elf/tests/hello/hello.c
@@ -42,14 +42,14 @@ int main(int argc, char **argv)
   /* Print arguments */
 
   printf("argc\t= %d\n", argc);
-  printf("argv\t= 0x%p\n", argv);
+  printf("argv\t= %p\n", argv);
 
   for (i = 0; i < argc; i++)
     {
       printf("argv[%d]\t= ", i);
       if (argv[i])
         {
-          printf("(0x%p) \"%s\"\n", argv[i], argv[i]);
+          printf("(%p) \"%s\"\n", argv[i], argv[i]);
         }
       else
         {
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
         }
     }
 
-  printf("argv[%d]\t= 0x%p\n", argc, argv[argc]);
+  printf("argv[%d]\t= %p\n", argc, argv[argc]);
   printf("Goodbye, world!\n");
   return 0;
 }