mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 12:55:43 +08:00
Revert "This commit adds nsh_consolechild(). I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session. That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library: Mounting, reading, and running the start-up script, configuring USB tracing. Some of those actions will cause failures if attempted twice."
This reverts commit 4d364d836a
.
This commit is contained in:
@@ -115,21 +115,16 @@ void nsh_initialize(void);
|
||||
* Name: nsh_consolemain
|
||||
*
|
||||
* Description:
|
||||
* This interfaces may be to called or started with task_start to start a
|
||||
* This interfaces maybe to called or started with task_start to start a
|
||||
* single an NSH instance that operates on stdin and stdout. This
|
||||
* function does not return.
|
||||
*
|
||||
* This function performs all basic, one-time initialization logic as
|
||||
* configured. This includes such things as mounting the romfs /etc/
|
||||
* file system and running the initialization script, setting up USB
|
||||
* tracing options. It should be spawned only once for this reason.
|
||||
*
|
||||
* This function handles generic /dev/console character devices, or
|
||||
* special USB console devices. The USB console requires some special
|
||||
* operations to handle the cases where the session is lost when the
|
||||
* USB device is unplugged and restarted when the USB device is plugged
|
||||
* in again.
|
||||
*
|
||||
*
|
||||
* Input Parameters:
|
||||
* Standard task start-up arguments. These are not used. argc may be
|
||||
* zero and argv may be NULL.
|
||||
@@ -143,35 +138,6 @@ void nsh_initialize(void);
|
||||
|
||||
int nsh_consolemain(int argc, char *argv[]);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nsh_consolechild
|
||||
*
|
||||
* Description:
|
||||
* This interfaces maybe to called or started with task_start to start a
|
||||
* single a new NSH instance that operates on stdin and stdout. This
|
||||
* function does not normally return (see below).
|
||||
*
|
||||
* This function equivalent to nsh_consolemain(), except it assumes that
|
||||
* all one-time, NSH has already been perfroemd by nsh_consolemain(). It
|
||||
* simply startes a NSH session with no re-initialization.
|
||||
*
|
||||
* Like nsh_consolmain(), this functions handles generic /dev/console
|
||||
* character devices (see nsh_usbconsole.c and usb_usbkeyboard for other
|
||||
* versions for special USB console devices).
|
||||
*
|
||||
* Input Parameters:
|
||||
* Standard task start-up arguments. These are not used. argc may be
|
||||
* zero and argv may be NULL.
|
||||
*
|
||||
* Returned Values:
|
||||
* This function does not normally return. exit() is usually called to
|
||||
* terminate the NSH session. This function will return in the event of
|
||||
* an error. In that case, a non-zero value is returned (EXIT_FAILURE=1).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nsh_consolechild(int argc, char *argv[]);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nsh_telnetstart
|
||||
*
|
||||
|
Reference in New Issue
Block a user