When rm -r is passed with no address specified, it will automatically recursively unlink all files under the root path ('/') until unlinking to the mounted folder causes the unlink to fail. In this change, rm -r without a specified path will prompt for missing arguments
Current implementation is broken, in this patch ECHO is
disabled by termios.
This patch works with https://github.com/apache/nuttx/pull/8950
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Adjust the test considering the POSIX-compliant behavior of the
NuttX's FIFO (mkfifo), which should block `open` for read-only
and write-only. This test's result is expected to be the same with
any other POSIX-compliant system.
This commit also:
* Fix redirect test;
* Use pthread instead `task_create` to be able to run this test
on POSIX-compliant systems;
* General fixes regarding formatting and error messages;
Usage:
iperf -s --rpmsg <name>
iperf -c <cpu> --rpmsg <name>
Note:
RPMsg with SOCK_DGRAM (`-u`) doesn't have server mode (bind) yet, iperf
may not work in this case before rpsock is enhanced.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Usage:
iperf -s --local <path>
iperf -c <path> --local || iperf -c <whatever> --local <path>
Can combine with other options, e.g. '-u' will result in local
UDP (DGRAM).
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
We'll add local/rpmsg sockets later, they're mainly different in
sockaddr, we can reuse other current logic.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Argtable's builtin glossary can produce same output and we do not need
to maintain two sets of help string. Then we're easier to add more
options to iperf.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
The logic that handles back-quotes was faulty, i.e. example command
set FOO `ls -l` would be split into two tokens as follows:
- set FOO `ls
- -l`
This results in nsh: `: no matching ` error, this fixes that issue.
This adds support for more complex alias handling, such as:
$ alias ls='ls -l'
Previously such an alias was not split into the command verb and the
argument correctly, instead the full alias string was handled as the
verb, which obviously fails.
This commit fixes this by expanding the alias, checking whether it has
arguments and if so, it merges the expanded alias + the old command line
together, resulting in a completely new command line.
Example (assuming the alias above has been created):
$ ls /bin
Results in a new command line: "ls -l /bin" which is then parsed and
executed.
switchboot <image path>
Switch to the updated or specified boot system. This command depends on
hardware support CONFIG_BOARDCTL_SWITCH_BOOT. `<image path>` point to a
partion or file which contain the firmware to boot.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
boot [<image path> [<header size>]]
Boot a new firmware image. This command depends on hardware support
CONFIG_BOARDCTL_BOOT_IMAGE. <image path> may point to a partion or file
which contain the firmware to boot. The optional, numeric argument
<header size> may be useful for skipping metadata information preprended
to the firmware image.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
CONFIG_FILE_STREAMS now defaults to 'n' when DEFAULT_SMALL is enabled. This
is a good change, but this source file fails to compile when file streams
are disabled.
Fix this by using dprintf.