Commit Graph

1162 Commits

Author SHA1 Message Date
Joel Sherrill
211acc10da cpukit/shell/edit: Address -Wsign-compare warnings
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.
2026-01-28 13:19:23 -06:00
Kinsey Moore
7e5d1a851a cpukit/libmisc/monitor: Resolve function cast warning
Wrap rtems_monitor_config_dump to match the required function signature.
2026-01-27 12:44:03 -06:00
Joel Sherrill
3a61921132 mp misc: Address build failures and warnings
Changes required to build with RTEMS_MULTIPROCESSING and
associated tests without warnings.
2026-01-27 18:20:55 +00:00
Joel Sherrill
63c93acec1 cpukit/libmisc/shell/main_mknod.c: Address -Wclobbered warning
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.
2026-01-23 17:43:20 -06:00
Joel Sherrill
5e80d1077b cpukit/libmisc/untar/untar.c: Correct third argument
The call to Untar_FromMemory_Print() on line 400 was passing
false as the third argument. "rtems_printer *" was expected.
In C previous to C23, false was a macro defined as 0 and could
be converted to a pointer. In C23, false, true, and bool are keywords.
2026-01-14 16:27:07 -06:00
Joel Sherrill
cc9aa4b748 ino_t printf() cases: Add PRIdinod_t for ino_t format specifier
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.
2025-12-04 18:41:19 -06:00
Joel Sherrill
136f739ff9 cpukit/.../rtems-fdt/rtems-fdt-shell.c: Fix format specifier warning
This was using a * to specify the field width. The value passed
should be an int.
2025-12-04 17:56:14 -06:00
Joel Sherrill
c06fb873eb fdt/rtems-fdt-shell.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
c957d1a202 bspcmdline_getparam.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
3c2592be04 cpukit/libmisc/shell: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
f6c6b309eb cpukit/libmisc/shell/main_pci.c: Add field in shell_pci_modifier table
This file had a table supporting the command line options.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
f519633d0d cpukit/.../shell: Address missing field initializer warnings
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.
2025-10-14 14:23:59 -05:00
Joel Sherrill
34f9c5690d cpukit: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
32170f83a8 cpukit/libmisc/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.

libmisc/shell was in a previous patch.
2025-09-26 22:38:34 +00:00
Joel Sherrill
94d9749222 cpukit/libmisc/shell/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
53d6794ea5 cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c: Correct file header
The @file block was below the license and should have been above it.
2025-09-26 22:38:34 +00:00
Joel Sherrill
788f4ee4b8 cpukit/libmisc/shell/hexdump-parse.c: Fix fall through warning
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.
2025-09-26 16:43:25 -05:00
Joel Sherrill
106363b29d cpukit/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Gedare Bloom
948bbec7f6 shell: add noreturn attribute to err.h 2025-09-18 14:14:15 -06:00
Aaron Nyholm
f93f3b87c8 flashdev: Added missing copyright 2025-09-09 16:09:49 +00:00
Joel Sherrill
017ec9440e cpukit/libmisc/regulator/regulator.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and
size of each element argument.
2025-09-04 15:43:45 +00:00
Joel Sherrill
51a2ee5e33 cpukit/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
ea86780bdf cpukit/libmisc: Move SPDX line to top of file
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.
2025-08-11 19:06:32 +00:00
Amar Takhar
5fa8c7b52d readme: Add source locations for RTEMS Shell
If you have any ideas about the missing ones let us know.

This also reformats other areas using mdformat since it was used for the tables.
2025-08-01 09:10:55 +10:00
Amar Takhar
3fcf78156d cpukit: Remove utf8proc and add to build
This also moves the header from <utf8proc/utf8proc.h> to <utf8proc.h>  This
follows what the upstream project uses and keeps us from having to modify
upstream source to put it in a subdirectory.
2025-07-31 18:07:34 -05:00
Amar Takhar
e9870fa74f cpukit: Remove uuid and add to build
Did the best I could handling the location of uuid.h
2025-07-31 18:01:42 -05:00
lei huang
e1ce81a868 cpukit/shell: Fix NULL Pointer Dereference in Shell Memory Dump Commands 2025-07-15 19:05:58 -05:00
Joel Sherrill
e255c2888a libnetwork references misc: Remove libnetwork references
The legacy network stack has been moved to a separate package.
Remove references to it in odd places.
2025-07-15 22:36:46 +00:00
Amar Takhar
662ad275f7 ascii: Remove non-ASCII characters from names
There are only the 3 names in our entire source that use non-ASCII characters.
Our documentation can still use any type of character.  We want to limit source
to ASCII for safety reasons.
2025-05-22 19:35:12 +00:00
Joel Sherrill
b6534f3047 testsuites/validation/tc-score-thread.c: Fix warning on assignment
GCC 14 is much pickier and turns some warnings into errors.
This is one example that cross BSPs and architectures.
2025-03-14 07:25:27 +00:00
Joel Sherrill
68baf9eead libmisc/shell/*: Relicense to 2-BSD
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.
2025-03-01 20:21:56 +00:00
Gedare Bloom
0149e6e749 spdx: add 2-BSD SPDX tags on relicensed files
Updates the recently merged relicensed files with the 2-Clause BSD
SPDX annotation.

Closes #5208.
2025-03-01 04:14:54 +00:00
Gedare Bloom
8e6ded473c rtems: update licenses to 2BSD
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.
2025-02-10 15:44:09 +00:00
Sebastian Huber
294761ca8d posix: Improve clock_gettime()
Return CPU usage values for CLOCK_PROCESS_CPUTIME_ID and
CLOCK_THREAD_CPUTIME_ID.
2025-02-10 15:37:18 +00:00
Gedare Bloom
23fa41ecae cpukit: relicense shell and telnetd files
These files are mostly authored by Fernando Ruiz Casas.

Updates #3053.
2025-02-07 15:01:13 +00:00
Kinsey Moore
ea9ae3445d cpukit/shell: Improve medit documentation
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
2025-02-07 00:31:40 +00:00
Zhaoyue Wang
3d96772258 cpukit/libmisc: fix flag in capture.c
The RTEMS_CAPTURE_OVERFLOW is an overflow flag for each CPU, and its
value is the same as RTEMS_CAPTURE_INIT. Executing rtems_capture_flush
will set the RTEMS_CAPTURE_INIT flag to 0 in the global flags.
2025-01-21 21:58:49 +00:00
Chris Johns
133b335bae cpukit/libmisc/rtems-fdt: Add shell read and write handler support
The handlers allow indirect access to FDT resources registered with the
shell.

Closes #5152
2024-11-16 17:40:05 +11:00
yang.zhang
6f604aec83 libmisc/shell: Only restore terminal settings on exit when captured
Signed-off-by: yang.zhang <zhangyang01@kylinos.cn>
2024-11-15 00:35:26 +00:00
Chris Johns
d6f3cd72ee libmisc/rtems-fdt: Path find need a sorted index table
Sort the index table so the bubble search works.
2024-11-08 03:28:23 +00:00
Aaron Nyholm
87c725b6ed flashdev: Add sector IOCTLs
Added new IOCTLs to flashdev to get sector info.
Updated flashdev shell command and flashdev test with new IOCTLs.
2024-11-06 22:35:20 +00:00
Chris Johns
a1c3d4ba8e version: Add the release label interfaces
- Mark the VC key interfaces as deprecated in doxygen

Updates #5037
2024-10-30 22:40:15 +00:00
Kinsey Moore
d0e9ec85b0 cpukit/libmisc/shell: Remove shell prompt carriage return
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.
2024-10-25 02:44:37 +00:00
Sebastian Huber
4c75bd88f3 Revert "libmisc/stackchk: Change stack checker reporter function signatures"
This reverts commit c1aa06dbd2.

Extending the rtems_stack_checker_info like this breaks the existing
visitor API used by rtems_stack_checker_iterate().  After review, using
an information structure contradicts the intention of the reporter to
allow a minimal reporting.  Filling up the information structure with
all the details would pull in several dependencies, like
_Thread_Get_name().  The API should be improved to provide the user with
the necessary information from the TCB without having to access members
directly.
2024-10-19 15:43:07 +00:00
Mohamed Hassan
c1aa06dbd2 libmisc/stackchk: Change stack checker reporter function signatures
This helps in abstraction by encapsulating unnecessary data to be revealed to the user
2024-10-16 04:30:45 +00:00
shuhua hua
bcd4b83e16 Ignore empty user names as input
* To unify the surrounding coding style
2024-10-15 13:11:42 +00:00
zhengxiaojun
29a0d99bfd cpukit/libmisc/shell:fix command df overflow
- 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
2024-09-13 21:30:43 +00:00
Mohamed Hassan
e91c136f67 libmisc/stackchk: fix Doxygen file comment
revert back to the original RTEMS Doxygen guidelines by adding @file and @ingroup
2024-09-13 00:56:13 +00:00
Sebastian Huber
a9bff015f6 stackchk: Avoid implementation header in API
Update #5047.
2024-09-12 02:26:15 +00:00
Kinsey Moore
bcf0cee545 cpukit/stackchk: Explicitly cast from void* to uintptr_t 2024-09-06 01:15:21 +00:00