Use posix keys for current shell environment instead of task variables. With
this patch the shell needs one posix-key and one posix-key-value-pair
configured.
Update documentation for the shell.
Adapt samples/fileio:
- Add necessary objects.
- Add login function and custom device name for better testing of the shell.
Control the help command break with the SHELL_LINES evironment variable
where the numeric value is the number of lines to break on. If the
value is 0 the output is not broken. The default is 16 lines.
Add shell documentation for the help command.
In case the length of cwd path plus the userScriptName exceeds
PATH_MAX (255), the strncat calls will overflow scriptFile. Also
check for getcwd failure.
Move implementation specific parts of message.h and message.inl into new
header file messageimpl.h. The message.h contains now only the
application visible API.
Delete fattype parameter of msdos_format_request_param_t because the FAT
type is determined by cluster and disk size.
Estimate FAT type and re-evaluate FAT type after exact parameter
determination.
Add skip_alignment parameter of msdos_format_request_param_t. Delete
cluster_align parameter of msdos_format_request_param_t.
By default the FAT, data cluster, and root directory for FAT12 and FAT16
is aligned on a cluster boundary to optimize performance.
Format changes throughout.
Emacs style keystrokes Ctrl-B, F, G, P, N, T and U are now supported as they
are in bash. Also, commands invoked from the history are moved up in the
history buffer when they are executed. Thus, the most recently executed
command is always just one up-arrow (or Ctrl-P) keystroke away.
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
o A new data structure rtems_filesystem_global_location_t was
introduced to be used for
o the mount point location in the mount table entry,
o the file system root location in the mount table entry,
o the root directory location in the user environment, and
o the current directory location in the user environment.
During the path evaluation global start locations are obtained to
ensure that the current file system instance will be not unmounted in
the meantime.
o The user environment uses now reference counting and is protected
from concurrent access.
o The path evaluation process was completely rewritten and simplified.
The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
method. Recursive calls in the path evaluation have been replaced
with iteration to avoid stack overflows. Only the evaluation of
symbolic links is recursive. No dynamic memory allocations and
intermediate buffers are used in the high level path evaluation. No
global locks are held during the file system instance specific path
evaluation process.
o Recursive symbolic link evaluation is now limited by
RTEMS_FILESYSTEM_SYMLOOP_MAX. Applications can retrieve this value
via sysconf().
o The device file system (devFS) uses now no global variables and
allocation from the workspace. Node names are allocated from the
heap.
o The upper layer lseek() performs now some parameter checks.
o The upper layer ftruncate() performs now some parameter checks.
o unmask() is now restricted to the RWX flags and protected from
concurrent access.
o The fchmod_h and rmnod_h file system node handlers are now a file
system operation.
o The unlink_h operation has been removed. All nodes are now destroyed
with the rmnod_h operation.
o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
operations.
o The path evaluation and file system operations are now protected by
per file system instance lock and unlock operations.
o Fix and test file descriptor duplicate in fcntl().
o New test fstests/fsnofs01.
"medit" overran the argument list, choking on the NULL pointer
following the last argument.
Note that "medit" still only does byte-sized accesses, which limits
its usefulness on most systems.
Author: Werner Almesberger <werner@almesberger.net>
Signed-off-by: Sebastien Bourdeauducq <sebastien@milkymist.org>
* libmisc/shell/main_mdump.c: Reworked to fix bugs in handling of the
length argument and to provide an "ldump" command. This file now also
supports the "wdump" command. In addition, an RTEMS API function called
rtems_mdump() is provided to allow easy dumping from application code.
* libmisc/shell/main_mwdump.c: Obsolete file.
* libmisc/Makefile.am: Removed main_mwdump.c
* libmisc/shell/shellconfig.h: Added "ldump" command.
* shell/memory.t: Added documentation for the "ldump" command
Signed-off-by: Ric Claus <claus@SLAC.Stanford.edu>
rtems_shell_help static.
* libmisc/shell/main_hexdump.c: Make main_hexdump static.
* libmisc/shell/main_id.c: Make rtems_shell_main_id static.
* libmisc/shell/main_ifconfig.c: Make rtems_shell_main_ifconfig static.
* libmisc/shell/main_ln.c: Make rtems_shell_main_ln static.
* libmisc/shell/main_logoff.c: Make rtems_shell_main_logoff static.
* libmisc/shell/main_ls.c: Make rtems_shell_main_ls static.
* libmisc/shell/main_mallocinfo.c: Include <rtems/libcsupport.h>.
Remove private decls of malloc_info,
rtems_shell_print_unified_work_area_message.
Make rtems_shell_main_malloc_info static.
* libmisc/shell/main_medit.c: Remove private decl of
rtems_shell_main_mdump.
Make rtems_shell_main_medit static.
* libmisc/shell/main_mfill.c: Make rtems_shell_main_mfill static.
* libmisc/shell/main_mkdir.c: Make rtems_shell_main_mkdir static.
* libmisc/shell/main_mknod.c: Make rtems_shell_main_mknod static.
* libmisc/shell/main_mmove.c: Remove private decl of
rtems_shell_main_mdump.
Make rtems_shell_main_mmove static.
* libmisc/shell/main_mount.c: Make rtems_shell_main_mount static.
* libmisc/shell/main_msdosfmt.c: Make rtems_shell_main_msdos_format
static.
* libmisc/shell/main_mv.c: Include "internal.h".
Make rtems_shell_mv_exit, rtems_shell_main_mv static.
Remove private decls of strmode rtems_shell_main_cp,
rtems_shell_main_rm.
* libmisc/shell/main_mwdump.c: Make rtems_shell_main_mwdump static.
* libmisc/shell/main_netstats.c: Make rtems_shell_main_netstats
static.
* libmisc/shell/main_perioduse.c: Make rtems_shell_main_perioduse
static.
* libmisc/shell/main_pwd.c: Make rtems_shell_main_pwd static.
* libmisc/shell/main_rm.c: Include "internal.h".
Make rtems_shell_rm_exit static.
Remove private decl of strmode.
* libmisc/shell/main_rmdir.c: Make rtems_shell_main_rmdir static.
libmisc/shell/main_route.c: Make rtems_shell_main_route static.
* libmisc/shell/main_setenv.c: Make rtems_shell_main_setenv static.
* libmisc/shell/main_sleep.c: Make rtems_shell_main_sleep static.
* libmisc/shell/main_stackuse.c: Make rtems_shell_main_stackuse static.
* libmisc/shell/main_time.c: Make rtems_shell_main_time static.
* libmisc/shell/main_tty.c: Make rtems_shell_main_tty static.
* libmisc/shell/main_umask.c: Make rtems_shell_main_umask static.
* libmisc/shell/main_unmount.c: Make rtems_shell_main_unmount
static.
* libmisc/shell/main_unsetenv.c: Make rtems_shell_main_unsetenv
static.
* libmisc/shell/main_whoami.c: Make rtems_shell_main_whoami static.
* libmisc/shell/main_wkspaceinfo.c: Make
rtems_shell_main_wkspace_info static.
PR 1924/cpukit
* sapi/include/rtems/config.h: New fields stack_space_size,
unified_work_area, and stack_allocator_avoids_work_space in
rtems_configuration_table.
* sapi/include/confdefs.h: Removed rtems_unified_work_area (this is
now part of the Configuration). Separate work space and stack space
estimate. Added CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
configuration option.
* libmisc/shell/main_wkspaceinfo.c, score/src/wkspace.c,
libcsupport/src/malloc_initialize.c: Update due to API changes.
* libblock/src/nvdisk-sram.c, libi2c/libi2c.c,
libmisc/shell/main_msdosfmt.c: Eliminate use of GNU old-style field
designator extension as recommended by clang.