Clean up config and init.

This commit is contained in:
Chris Johns 2016-01-17 07:54:30 +11:00 committed by Amar Takhar
parent 8ca13ed19f
commit 62d03a1324

View File

@ -108,7 +108,7 @@ provided an alias for ``usercmd`` named ``userecho``.
#define CONFIGURE_SHELL_MOUNT_MSDOS #define CONFIGURE_SHELL_MOUNT_MSDOS
#include <rtems/shellconfig.h> #include <rtems/shellconfig.h>
Notice in the above example, that the user wrote the*main* for their command Notice in the above example, that the user wrote the *main* for their command
(e.g. ``main_usercmd``) which looks much like any other ``main()``. They then (e.g. ``main_usercmd``) which looks much like any other ``main()``. They then
defined a ``rtems_shell_cmd_t`` structure named ``Shell_USERCMD_Command`` which defined a ``rtems_shell_cmd_t`` structure named ``Shell_USERCMD_Command`` which
describes that command. This command definition structure is registered into describes that command. This command definition structure is registered into
@ -321,15 +321,15 @@ others - to indicate a failure condition
This service creates a task with the specified characteristics to run the RTEMS This service creates a task with the specified characteristics to run the RTEMS
Shell attached to the specified ``devname``. Shell attached to the specified ``devname``.
.. note:: **NOTES:**
This method invokes the ``rtems_task_create`` and ``rtems_task_start`` This method invokes the ``rtems_task_create`` and ``rtems_task_start``
directives and as such may return any status code that those directives may directives and as such may return any status code that those directives may
return. return.
There is one POSIX key necessary for all shell instances together and one There is one POSIX key necessary for all shell instances together and one POSIX
POSIX key value pair per instance. You should make sure that your RTEMS key value pair per instance. You should make sure that your RTEMS configuration
configuration accounts for these resources. accounts for these resources.
rtems_shell_login_check - Default login check handler rtems_shell_login_check - Default login check handler
----------------------------------------------------- -----------------------------------------------------
@ -342,8 +342,8 @@ rtems_shell_login_check - Default login check handler
.. code:: c .. code:: c
bool rtems_shell_login_check( bool rtems_shell_login_check(
const char \*user, const char *user,
const char \*passphrase const char *passphrase
); );
**DIRECTIVE STATUS CODES:** **DIRECTIVE STATUS CODES:**
@ -356,26 +356,25 @@ rtems_shell_login_check - Default login check handler
This function checks if the specified passphrase is valid for the specified This function checks if the specified passphrase is valid for the specified
user. user.
.. note:: **NOTES:**
As a side-effect if the specified passphrase is valid for the specified As a side-effect if the specified passphrase is valid for the specified user,
user, this function: this function:
- performs a filesystem change root operation to the directory of the - performs a filesystem change root operation to the directory of the specified
specified user if the directory path is non-empty, user if the directory path is non-empty,
- changes the owner of the current shell device to the UID of the specified - changes the owner of the current shell device to the UID of the specified
user, user,
- sets the real and effective UID of the current user environment to the - sets the real and effective UID of the current user environment to the UID of
UID of the specified user, the specified user,
- sets the real and effective GID of the current user environment to the - sets the real and effective GID of the current user environment to the GID of
GID of the specified user, and the specified user, and
- sets the supplementary group IDs of the current user environment to the - sets the supplementary group IDs of the current user environment to the
supplementary group IDs of the specified user. supplementary group IDs of the specified user.
In case the filesystem change root operation fails, then the environment
setup is aborted and ``false`` is returned.
In case the filesystem change root operation fails, then the environment setup
is aborted and ``false`` is returned.