The behavior of the %p printf() specifier is implementation
dependent. The behavior varies on RTEMS between printf() and
printk(). This change prints an address as a uintptr_t to
ensure formatting is consistent. It also adjusts the output
width based on target architecture pointer size.
Updates rtems/docs/rtems-docs#163
The briefs of the libmisc files named a topic, not the content of the
file. Four shell briefs named the wrong command. The file
main_blksync.c said "RM Shell Command Implementation". The files
main_id.c, main_time.c and shellconfig.c named ls and debugrfs. Four
string conversion sources named the conversion, for example "Convert
String to Unsigned Long".
Write every brief in the style of the tree. A source brief starts with
"This source file contains". A command brief names the command the file
provides. A header brief starts with "This header file provides". Put
@file, @ingroup and @brief in this order in every block.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Fifty-five shell files had no Doxygen block. Seventeen of them hold a
command and 38 hold the imported utility code the commands use. Doxygen
listed none of them.
Give each file a block with @file, @ingroup and @brief. The brief names
the command or the utility the file provides.
Every file in cpukit outside contrib has a Doxygen block. The block of
cfsetspeed.c does not open with two asterisks. The next commit repairs
it.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Two of the 124 shell sources named a group. The other 122 gave Doxygen
no place to file them, so the shell groups listed two files.
Point each command at RTEMSImplShellCommands and each infrastructure
file at RTEMSImplShell. The imported utility code joins
RTEMSImplShellUtilities.
Fifty-five files still have no Doxygen block. Most of them hold the
imported utility code. A later commit adds the blocks.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Five files named a group which no file defines. The names
RTEMSLibdebugger, Flash, RTEMSGenericIODevAPI and SPIBus had no
definition. One shell command left the @ingroup argument empty.
Point each file at the group which covers it. The headers flashdev.h
and iodev.h define a group of their own, so they name it.
Only the two C++ headers still name an undefined group.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Six group names in libfs reached no group. The names libfs_msdos,
libfs_dosfs, FatFS and LibFSIMFS had no definition. The groups
libfs_ff and libfs_ffo had a definition with no parent. Nineteen files
in defaults wrote the group title after the group name, so Doxygen
looked for the groups File, System and Operations as well.
Point the DOS file system files at DOSFS and delete the two dead group
definitions in dosfs. Point the FatFS files at RTEMSImplFATFS and
imfs_init.c at IMFS. Drop the group title from the @ingroup lines in
defaults.
The file ioman.c implements rtems_io_register_name(), so it joins
RTEMSImplClassicIO with the other I/O manager directives. The file
imfs_eval_devfs.c joins IMFS with its neighbour imfs_eval.c.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Eight components had no Doxygen group. Their files could not join a
group which reaches RTEMSImpl:
- the PCI bus support
- the driver manager
- the debugger server
- the trace buffer generator support
- the monitor
- the capture engine
- the FTP daemon
- the shell
The header rtems-trace-buffer-vars.h also named the group Shell, which
no file defines.
Define one group for each component. Give the shell two subgroups, one
for the commands and one for the utility code which the commands use.
Point rtems-trace-buffer-vars.h at RTEMSImplTrace.
The other files join these groups in later commits.
Updates #5717.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The shell main loop used a single result variable both to record whether
the previous login/command attempt succeeded and to decide whether
the loop should continue.
When the login function failed after repeated incorrect passwords,
result became false, and the loop condition then exited the shell
regardless of the forever flag being set.
Track login failures separately with a new login_failed flag,
and use it alongside result in the loop condition so that
a failed login correctly falls through to a new login attempt when
forever is set, matching the documented behavior of that flag.
Other exit paths EOF, explicit logout and exit are unaffected.
This warning occurs when comparing a signed variable to an unsigned one.
This is frequently an int or ssize_t variable compared to a uint32_t or
size_t. Sometimes the size_t is from a sizeof() use.
This warning indicates the potential for using a local variable which
is not guaranteed to be preserved across a setjmp()/longjmp() pair.
In this case, it was a false positive and the warning was disabled.
Updates #5364.
The sizeof(ino_t) can potentially vary based on the target. This
resulted in -Wformat warnings. Add PRIdino_t in <rtems/inttypes.h>
to have a portable format specifier.
Closes#5393.
Address missing field initializer warnings.
These were all rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization. The initialization was changed to using named
fields.
Updates #5325.
The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
Many files in this directory were by persons and organizations
that have previously given relicensing permission. git history
was used to confirm authorship and contributions on files which
had unclear or missing copyrights.
Update #3053.
This is an update of many lingering embedded brains GmbH licenses from
the RTEMS License to the 2-BSD license where possible depending on the
joint copyrights.
Updates #3053.
The error message produced by attempting to use a large value as the
data to be written can be nonsensical for some inputs. This updates the
error message and the usage text to make expectations more clear.
Closes#2147
This removes the carriage return printed before the shell prompt as it
can cause other output to be overwritten unexpectedly. This was
discovered when using the "cat" shell command on a file whose content
contained no trailing \n\r and was short enough to be entirely swallowed
by the prompt.
- change type unsigned to uint64_t, it might overflowed if
the size is greater the 4GB.
- increase buffer size is to eliminate the compiler's warning
that the buffer might be too small
This adds an environment variable that can be used to enable or disable
window size retrieval for the RTEMS shell. This will also disable window
size retrieval upon failure while allowing the user to re-enable it.
On systems that don't provide a proper terminal or have broken window
size detection, the RTEMS shell can take a long time execute commands if
the kernel tick interval is longer than 1ms. This updates the shell
window size retrieval timeout code to account for the kernel tick
interval bringing the experienced timeout from 12.5ms to 1.25ms when
using the default kernel tick interval (10ms).