You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/19 16:15:30 UTC

[incubator-nuttx-apps] branch master updated (650b58d -> a82d74b)

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

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


    from 650b58d  nshlib: Fix nxstyle warning
     new b1b45de  Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"
     new a82d74b  nshlib: Call BOARDIOC_FINALINIT in nsh_telnetstart if CONFIG_NSH_CONSOLE not define

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:
 nshlib/nsh_altconsole.c  |  6 ++++++
 nshlib/nsh_consolemain.c |  6 ++++++
 nshlib/nsh_script.c      |  6 ------
 nshlib/nsh_telnetd.c     | 10 +++++++++-
 nshlib/nsh_usbconsole.c  |  6 ++++++
 5 files changed, 27 insertions(+), 7 deletions(-)


[incubator-nuttx-apps] 02/02: nshlib: Call BOARDIOC_FINALINIT in nsh_telnetstart if CONFIG_NSH_CONSOLE not define

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

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

commit a82d74b8a1d7a219bc63bbf51f3b490a0f064f24
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 23:05:09 2020 +0800

    nshlib: Call BOARDIOC_FINALINIT in nsh_telnetstart if CONFIG_NSH_CONSOLE not define
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 nshlib/nsh_telnetd.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c
index b2a75dc..057175c 100644
--- a/nshlib/nsh_telnetd.c
+++ b/nshlib/nsh_telnetd.c
@@ -259,13 +259,21 @@ int nsh_telnetstart(sa_family_t family)
 
       /* Execute the startup script.  If standard console is also defined,
        * then we will not bother with the initscript here (although it is
-       * safe to call nshinitscript multiple times).
+       * safe to call nsh_initscript multiple times).
        */
 
 #if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_CONSOLE)
       nsh_initscript(vtbl);
 #endif
 
+      /* Perform architecture-specific final-initialization(if configured) */
+
+#if defined(CONFIG_NSH_ARCHINIT) && \
+    defined(CONFIG_BOARDCTL_FINALINIT) && \
+    !defined(CONFIG_NSH_CONSOLE)
+      boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
       /* Configure the telnet daemon */
 
       config.d_port      = HTONS(CONFIG_NSH_TELNETD_PORT);


[incubator-nuttx-apps] 01/02: Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"

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

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

commit b1b45de3db7ccfb706b8e2e9613afefd6ac963c3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 19 22:54:05 2020 +0800

    Revert "nshlib: Move BOARDIOC_FINALINIT into nsh_initscript"
    
    This reverts commit ac5632fc504f4e66b61131047326e78c16210d5c.
---
 nshlib/nsh_altconsole.c  | 6 ++++++
 nshlib/nsh_consolemain.c | 6 ++++++
 nshlib/nsh_script.c      | 6 ------
 nshlib/nsh_usbconsole.c  | 6 ++++++
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/nshlib/nsh_altconsole.c b/nshlib/nsh_altconsole.c
index c0570c7..b2c4a4c 100644
--- a/nshlib/nsh_altconsole.c
+++ b/nshlib/nsh_altconsole.c
@@ -294,6 +294,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* First map stderr and stdout to alternative devices */
 
   ret = nsh_clone_console(pstate);
diff --git a/nshlib/nsh_consolemain.c b/nshlib/nsh_consolemain.c
index 59b5d7e..3c27581 100644
--- a/nshlib/nsh_consolemain.c
+++ b/nshlib/nsh_consolemain.c
@@ -104,6 +104,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* Execute the session */
 
   ret = nsh_session(pstate, true);
diff --git a/nshlib/nsh_script.c b/nshlib/nsh_script.c
index 35231a3..740e0da 100644
--- a/nshlib/nsh_script.c
+++ b/nshlib/nsh_script.c
@@ -196,12 +196,6 @@ int nsh_initscript(FAR struct nsh_vtbl_s *vtbl)
 
       vtbl->np.np_flags = NSH_NP_SET_OPTIONS_INIT;
 #endif
-
-#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
-      /* Perform architecture-specific final-initialization (if configured) */
-
-      boardctl(BOARDIOC_FINALINIT, 0);
-#endif
     }
 
   return ret;
diff --git a/nshlib/nsh_usbconsole.c b/nshlib/nsh_usbconsole.c
index b018773..700a10f 100644
--- a/nshlib/nsh_usbconsole.c
+++ b/nshlib/nsh_usbconsole.c
@@ -326,6 +326,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
   netinit_bringup();
 #endif
 
+#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
+  /* Perform architecture-specific final-initialization (if configured) */
+
+  boardctl(BOARDIOC_FINALINIT, 0);
+#endif
+
   /* Now loop, executing creating a session for each USB connection */
 
   for (; ; )