Commit Graph

6798 Commits

Author SHA1 Message Date
Huang Qi
3a28933ca8 nshlib: Don't show passwd in telnet login
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>
2023-04-22 12:47:16 +08:00
dependabot[bot]
5abae22fd4 build(deps): bump github/super-linter from 4 to 5
Bumps [github/super-linter](https://github.com/github/super-linter) from 4 to 5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/v4...v5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-22 01:32:50 +08:00
Tiago Medicci Serrano
0a9b983e90 apps/examples/pipe: check POSIX-compliant behavior of NuttX's FIFOs
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;
2023-04-22 01:28:25 +08:00
Zhe Weng
f2819b71e5 netutils/iperf: Support RPMsg socket test
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>
2023-04-22 01:16:49 +08:00
Zhe Weng
213219f30a netutils/iperf: Support local socket test
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>
2023-04-22 01:16:49 +08:00
Zhe Weng
411c98acec netutils/iperf: Split out sockaddr from general logic
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>
2023-04-22 01:16:49 +08:00
Zhe Weng
e3e3cc28a6 netutils/iperf: Use argtable's builtin glossary to print usage
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>
2023-04-22 01:16:49 +08:00
Ville Juven
4ce809e7d4 nsh/nsh_parse: Fix handling of back-quotes
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.
2023-04-19 03:12:18 +08:00
Petro Karashchenko
700b0ed235 netutils/netlib: fix typos in comments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
a926c8bf12 include/netutils: fix code alignments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
f7448f848b netutils/webserver: improve modularity of httpd single server
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
f15605da2f nuttx: add missing FAR and CODE
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
chenrun1
69d5f960fc system/ramspeed:Fix the problem that irq_disable is often opened.
Fix the problem that "when repeat_num!=0, there is no break, so irq_disable will be configured to true by default".
2023-04-19 03:10:05 +08:00
Petro Karashchenko
4159fa197b testing/ostest: make sure that pthread_rwlock timeout test is executed properly
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-17 15:54:32 +02:00
Petro Karashchenko
2655f80dd7 testing/ostest: fix tasks priority assignment in nested signal test
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-17 15:54:32 +02:00
raiden00pl
6b35ff323a github/linters/setup.cfg: ignore E203 for flake8 to fix compatibility issues with black
For more details, see https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
2023-04-17 01:47:31 -07:00
Ville Juven
0914c20c0d nsh/alias: Add support for alias arguments
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.
2023-04-17 15:09:38 +09:00
simbit18
90c963677c apps/examples/wgetjson/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
9201c3e8e1 apps/examples/djoystick/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
a7889e122c apps/examples/ajoystick/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
c99a1fd2a5 apps/examples/pty_test/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
1fb35350b9 apps/examples/ipforward/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
c647fc63de apps/examples/sht3x/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
simbit18
d4ac7cc816 apps/examples/ina219/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-04-14 11:04:06 +03:00
raiden00pl
9f3f6a4b3b system/usbmsc: set stack size to DEFAULT_TASK_STACKSIZE 2023-04-07 13:45:07 +03:00
Xiang Xiao
1d3e6510e6 nshlib: Add switchboot command
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>
2023-04-07 13:44:49 +03:00
Xiang Xiao
aa99d267b7 Change the private default signal number to 32
and remove the unused private signal number macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Xiang Xiao
417b87a0a0 testing/ostest: Remove the unreal used SIG_WAITCANCEL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Xiang Xiao
3ac86cc6f1 testing/ostest: Define the private used signal to SIGRTMIN
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Fotis Panagiotopoulos
b93aa0cb8d ostest: Fixed use of uninitialized variable. 2023-04-05 03:57:00 +03:00
zhengjunbo1
f58c87e7ed nshlib/README.md: add uptime command description
Signed-off-by: zhengjunbo1 <zhengjunbo1@xiaomi.com>
2023-04-04 12:19:15 -04:00
Xiang Xiao
49418d6de5 nshlib: Align the command table
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-04 13:53:28 +03:00
Xiang Xiao
4f7dd7be7c nshlib: Add boot command
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>
2023-04-04 13:53:28 +03:00
Ville Juven
c694d8d90f system/composite_main.c: Convert fprintf -> dprintf
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.
2023-04-03 21:33:19 +03:00
wangchen
93105568c0 examples/ftpd: Add support for choosing address family
choose the network protocol (ipv4 or ipv6) to bind network in setting ftpd

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-03 16:18:15 +03:00
simbit18
75ddde9c56 apps/examples/mqttc/Makefile: Add missing Apache Foundation copyright header
Add missing Apache Foundation copyright header
2023-04-03 16:14:35 +03:00
Masayuki Ishikawa
125cf7abe2 nshlib: Fix the ps command format
Summary:
- I noticed that the ps command shows the wrong format due to
  recent changes on sigmask length from 32bits to 64bits
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with sabre-6quad:smp on qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-03-29 14:50:26 +03:00
Xiang Xiao
fd9c92e2e9 system/cu: Move fd_std_tty, g_tio_std and g_tio_dev to cu_globals_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-29 14:50:11 +03:00
Gustavo Henrique Nihei
d650d3276f luamodules: Fix implicit declaration warning for strncasecmp
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gustavo Henrique Nihei
ce68d7a738 examples/popen: Fix NxStyle long line warning
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gustavo Henrique Nihei
efb4e0bc91 Add another batch of missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gregory Nutt
a1bca5070c Changes to apps needed by nutts PR 8885
ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.

There is no particular impact from this PR.  This PR is the result of impact from nuttx 8885.

Tested with nuttx 8885
2023-03-27 16:58:52 +03:00
Petro Karashchenko
75b4720a6e industry/scpi: fix compilation of SCPI library
Expose SCPI library API to application

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-27 09:15:48 +02:00
Xiang Xiao
35edbf02f5 system/cu: Remove the duplicated SIGINT definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-26 09:12:45 -06:00
Petro Karashchenko
6833a8c0cc netutils/pppd: fix indentations in ppp.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
Petro Karashchenko
07d229f514 canutils: fix indentation in Kconfig files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
simbit18
386e077525 apps/system/ymodem/Makefile: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
simbit18
1adc70fe43 apps/system/ymodem/Make.defs: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
simbit18
e533df52cc apps/testing/smart_test/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-24 15:04:43 -03:00
simbit18
ef7e2a8636 apps/wireless/ieee802154/libutils/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-24 15:04:43 -03:00