summaryrefslogtreecommitdiff
path: root/cpukit/libmisc/shell (follow)
AgeCommit message (Collapse)Author
2020-09-28Fixing bug in line editing of the shell with CTRL-U.Frank Kühndel
This patch fixes a tiny bug in the command line editing of the RTEMS shell. Typing CTRL-U in the shell should remove all characters left of the cursor. After pressing CTRL-U, the current implementation does wrongly place the cursor at the end of the line instead at its beginning. To reproduce the bug, start the shell and type 'abc123' (no <RETURN>): > ~/src/rtems $ qemu-system-arm -net none -nographic -M realview-pbx-a9 \ -m 256M -kernel build/arm/realview_pbx_a9_qemu/testsuites/libtests/dl10.exe > *** BEGIN OF TEST libdl (RTL) 10 *** > *** TEST VERSION: 6.0.0.d9bdf166644f612dd628fe4951c12c6f8e94ba5f > *** TEST STATE: USER_INPUT > *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP > *** TEST TOOLS: 10.2.1 20200904 \ (RTEMS 6, RSB 31f936a7b74d60bda609a9960c6e1a705ba54974, Newlib a0d7982) > RTL (libdl) commands: dl, rtl > > RTEMS Shell on /dev/foobar. Use 'help' to list commands. > SHLL [/] # abc123 Then move the cursor onto the '1' by hitting three times the <ARROW-LEFT> key. Next type <CTRL>-U: > SHLL [/] # 123 Note that the cursor is at the end of the line (after '3') instead of correctly at the beginning (on the '1'), now. Continuing typing 'echo ' incorrectly results in the output: > SHLL [/] # 123echo 123 The patch changes this behavior so that the cursor in the second last step will be on the '1' and typing 'echo ' will then correctly reflected as: > SHLL [/] # echo 123 Close #4097.
2020-08-20dd(1): Use a local swapbytes() function.eadler
swab(3) has restrict qualifiers for src and dst. Avoid relying on undefined overlapping swab behavior. Obtained From: OpenBSD
2020-08-08shell: Only clear std handles when the shell task exitsChris Johns
Clearing the std file handles when the main loop exited crashes telnetd as it reuses its session threads.
2020-05-06rtems: Add rtems_get_copyright_notice()Sebastian Huber
Update #3973.
2020-05-06Use rtems_get_version_string()Sebastian Huber
Update #3970.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-04-15libmisc/shell: Fix the handling of joel scripts in telnetChris Johns
- Fix the passing of std[in/out] to child threads - Fix deleting of managed memory in the key destructor - Only set the key in the main loop thread - Only allocate a shell env outside of the main loop - Fix memory leak if the task start fails - Remove error level from shell env, it cannot be returned this way. Add exit_code but the API is broken so it cannot be returned. Closes #3859
2019-11-19Move feature macro before "config.h" includeSebastian Huber
This allows to use header includes in "config.h" to reduce the build configuration checks. Update #3818.
2019-05-14shell: Avoid rtems_error()Sebastian Huber
Do not use the rtems_error() function since this function pulls in exit() and abort(). The abort() function pulls in raise() which pulls in the whole POSIX signals support. This change saves about 16KiB of text/rodata on ARM Thumb-2 systems.
2019-03-14main_edit.c: Use strncpy() to eliminate potential buffer overflow.Joel Sherrill
2019-03-14Remove superfluous <rtems/system.h> includesSebastian Huber
2019-03-08shell: Correct argument order of `mfill`Jonathan Brandmeyer
Close #3720.
2019-01-10Fix format warnings due to ino_t changesSebastian Huber
2019-01-07Fix format warningsSebastian Huber
2018-12-27drvmgr: Improve LP64 compatibilitySebastian Huber
2018-11-09rtems: Deprecate region_information_blockSebastian Huber
The region_information_block typedef as no corresponding API. It has no proper namespace prefix. A user can do nothing with it. Close #3591.
2018-10-09shell: Use #include "..." for local header filesSebastian Huber
Update #3375.
2018-10-02Use rtems_task_exit()Sebastian Huber
Update #3530. Update #3533.
2018-03-12shell: Fix rtems_shell_init_env()Sebastian Huber
Do not discard a user provided task name in rtems_shell_init_env().
2018-01-25Remove make preinstallChris Johns
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
2018-01-02sparc: Remove <bsp.h> from PCI shell commandSebastian Huber
Update #3254. Update #3260.
2017-12-13shell: Include <rtems/shell.h>Sebastian Huber
Prepare for header file move to common include directory. Update #3254.
2017-09-28shell: Fix missing prototype warningSebastian Huber
2017-08-25Include missing <limits.h>Sebastian Huber
Update #2132.
2017-08-25Include missing <string.h>Sebastian Huber
Update #2133.
2017-08-22heap: Fix integer typesSebastian Huber
Update #3082.
2017-08-14libmisc/shell: Make some internal shell functions public.Chris Johns
- Add 'rtems_shell_init_environment()' so a user can create the shell environment without needing to run a shell. - Move 'rtems_shell_lookup_topic', 'rtems_shell_can_see_cmd', and 'rtems_shell_execute_cmd' from the internal interface to the public interface. Closes #3096.
2017-06-07Do not include <sys/ioctl.h> in kernel-spaceSebastian Huber
Update #2833.
2017-05-02shell: Fix format specifiersSebastian Huber
2017-04-18rtems/inttypes.h: New file. Uses contents from cpukitJoel Sherrill
Provide extentions to <inttpes.h> PRIxxx constants for more POSIX types. Start with existing definitions found in RTEMS Project owned code in cpukit/. updates #2983.
2017-02-15shell: Fix warningsSebastian Huber
2017-02-14shell: Fix warningsSebastian Huber
2017-01-24Use <sys/endian.h>Sebastian Huber
Update #2803.
2016-06-22Move printer initialization to separate headerSebastian Huber
The RTEMS print user need to know nothing about a particular printer implementation. In particular get rid of the <stdio.h> include which would be visible via <rtems.h>.
2016-06-06shell: Add rtems_shell_wait_for_explicit_input()Alexander Krutwig
2016-05-31shell: Add CPUINFO commandSebastian Huber
Update #2723.
2016-05-25cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns
This change adds rtems_printf and related functions and wraps the RTEMS print plugin support into a user API. All references to the plugin are removed and replaced with the rtems_printer interface. Printk and related functions are made to return a valid number of characters formatted and output. The function attribute to check printf functions has been added to rtems_printf and printk. No changes to remove warrnings are part of this patch set. The testsuite has been moved over to the rtems_printer. The testsuite has a mix of rtems_printer access and direct print control via the tmacros.h header file. The support for begink/endk has been removed as it served no purpose and only confused the code base. The testsuite has not been refactored to use rtems_printf. This is future work.
2016-04-12shell: Fix warning visible with latest NewlibSebastian Huber
Works also with previous Newlib versions.
2016-03-24shell/hexdump-odsyntax.c: Add define of _GNU_SOURCE to avoid warningsJoel Sherrill
2016-03-24shell/hexdump-conv.c: Disable sccsid to avoid unused warningJoel Sherrill
2016-03-24libmisc/shell/main_hexdump.c: Disable unused copyright stringJoel Sherrill
2015-12-15libmisc: Include missing header file, fix warningsNick Withers
2015-10-26basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber
2015-04-17DRVMGR: KEY_TYPE now a enum drvmgr_ktDaniel Hellstrom
2015-04-17DRVMGR: added drvmgr shell commandDaniel Hellstrom
2015-04-17LIBPCI: added PCI shell commandDaniel Hellstrom
2015-04-03shell/main_rtrace.c: Fix warningJoel Sherrill
2015-03-31libmisc/shell: Add the rtrace command for buffered tracing support.Chris Johns
The rtrace command interfaces to the RTEMS Trace Linker's trace buffering data allowing users to capture and report trace data.
2015-03-24shell/utils-cp.c: Avoid redefinition of TIMESPEC_TO_TIMEVALJoel Sherrill