Commit Graph

967 Commits

Author SHA1 Message Date
Junbo Zheng
79e770b0c6 apps/nshlib: add the missing FAR macro for all source files
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-22 14:22:13 +08:00
Junbo Zheng
45ef7f948f apps/nshlib: fix CI error
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/nshlib/nsh_proccmds.c:574:40: error: Operator/assignment must be preceded with whitespace
Error: Process completed with exit code 1.

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
Junbo Zheng
06f39d10f1 apps/nshlib: add uptime command support
run uptime command on sim:
nsh>
nsh>
nsh> uptime
19:35:01 up  1:40, load average: 0.00, 0.00, 0.00
nsh>
nsh>
nsh> uptime -s
2022-09-16 17:54:26
nsh>
nsh>
nsh> uptime -p
up 1 hour, 40 minutes
nsh>
nsh>
nsh> uptime -h
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> uptime -abc
uptime: invalid option -- -abc
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> date
Fri, Sep 16 19:35:18 2022
nsh>
nsh>

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
Junbo Zheng
732450d42a apps/nshlib: correct commands with alphabet order in kconfig
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-16 15:59:30 +08:00
chao an
e6e4661131 nshlib/netcmd: add sanity check for netdev
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 23:01:18 +08:00
Fotis Panagiotopoulos
1c7839c28c Fixed compiler warnings. 2022-08-30 12:10:49 +08:00
liyi
7035546422 fix use of addroute/delroute
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-27 23:50:46 +08:00
Fotis Panagiotopoulos
0cdb2cfa48 Fixed compiler warnings. 2022-08-23 01:39:59 +08:00
Huang Qi
511d9d59de nshlib: Disable dmesg if RAMLOG_SYSLOG disabled
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-22 13:56:54 +08:00
baggio63446333
0d3a2bbae8 nshlib: Change ELF priority and stack size based on builtin list
When an application is used as a loadable ELF module, the priority and
stack size of the application task is always fixed at the default values.

This commit changes to get the priority and stack size of the application
from the bulitin list. If it is not on the list, it still works as before.
2022-08-16 23:19:00 +08:00
Masayuki Ishikawa
3f70a78dd3 nshlib: Make nsh_telnetmain() in public
Summary:
- This commit makes nsh_telnetmain() in public so that we can
  call it from applications.
- Also, CONFIG_NSH_DISABLE_TELNETSTART is introduced so that
  we can disable nsh_telnetstart()

Impact:
- nsh with telnet daemon

Testing:
- Tested with sabre-6quad:netknsh (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-09 23:17:25 +08:00
Peter van der Perk
dcd60a2abe Use thread-safe ntoa functions
NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Use thread-safe ntoa functions

NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-04 23:18:06 +08:00
liyi
c5102fe504 ifconfig support set IPv6 DNS server
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-04 19:47:15 +08:00
ligd
75155532b6 pmconfig: update pmconfig dump
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-30 03:15:01 +08:00
ligd
a109a6e58b rptun_ping: add sleep param to rptun_ping
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-30 03:15:01 +08:00
Jiuzhu Dong
ab43c625d1 nshlib/ps: update config MM_BACKTRACE to int type
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 02:43:28 +08:00
Jiuzhu Dong
45615a8d9d nshlib/dmesg: update config about enable dmesg
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 08:27:48 +02:00
anjiahao
beb9188cee nshlib:support nsh can redirect
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-22 13:52:34 +08:00
Fotis Panagiotopoulos
2d2e36c5e9 Fixed heap information output in nsh ps command. 2022-07-22 00:03:41 +08:00
Fotis Panagiotopoulos
d7ec4e51b5 nsh: Fixed typos in comments. 2022-07-22 00:03:22 +08:00
anjiahao
dbfe5fb573 cmd_reset_cause:remove ouput space.
can use ouput string set a env to argv
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 21:13:11 +08:00
anjiahao
29be9e3d1b apps:fix reset cuase wraming
nsh_syscmds.c:352:40: error: passing argument 2 of 'boardctl' makes integer from pointer without a cast [-Werror=int-conversion]
352 |   ret = boardctl(BOARDIOC_RESET_CAUSE, &cause);
    |                                        ^~~~~~
    |                                        |
    |                                        struct boardioc_reset_cause_s *
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 19:41:05 +08:00
Denis Tolstov
5ae2e1034b nshlib/netcmds: Decouple nslookup from netdb_dnsclient
Allow disabling nslookup even when not using dnsclient.
2022-07-20 15:54:52 +08:00
Xiang Xiao
c252ec1481 Add printflike to all printf like functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:09:10 +03:00
pengyiqiang
71ea8b052d nshlib/nsh_ddcmd: calculate time difference with microsecond precision
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-07-17 14:06:40 +08:00
zhuyanlin
23584669c5 pmconfig: add last state and modify current state to next state
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-05-22 22:00:11 +08:00
Jiuzhu Dong
1444e0dc76 apps/nshlib: fix unreachable code about i++
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-05-07 08:36:42 +03:00
Jiuzhu Dong
1f093da6a4 Revert "apps/nshlib: fix unreachable code about i++"
This reverts commit 467de8ca83.
2022-05-07 08:36:42 +03:00
Jiuzhu Dong
b3a5b56ff3 apps/nshlib: fix warning by tool converity report
uninit_use_in_call addr before call netlib_set_ipv4addr at line 780

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-05-07 10:30:47 +08:00
Jiuzhu Dong
234e297cd9 apps/nshlib: fix warning by tools converity report
uninit_use_in_call inaddr.sin_zero before call
netlib_set_arpmapping

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-05-07 10:30:47 +08:00
Jiuzhu Dong
467de8ca83 apps/nshlib: fix unreachable code about i++
Report by the tool coverity

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-05-07 10:30:47 +08:00
zhuyanlin
a5a4c561fb pmconfig: add mulit domain support
pmconfig [domain]
pmconfig relax/stay state [domain]

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-28 00:36:36 +08:00
Alin Jerpelea
d60fb1168d nxstyle fixes
fixes for nxstyle errors reported by CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-22 11:14:17 +08:00
Alin Jerpelea
54ce2e0ab9 nshlib: Add Apache License
The initial contribution was missing a license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-22 11:14:17 +08:00
Ville Juven
0957a740cb nshlib/nsh_fileapps.c: Pass global environ instead of NULL for posix_spawnp
Now that the environ pointer is a list of pointers-to-string, it can be
passed to the standard posix_spawn function as-is.
2022-04-21 20:58:05 +08:00
Jiuzhu Dong
9f79bf183a nsh/script: support rc.sysinit script
Follow: http://glennastory.net/boot/sysinit.html

This is first script that init runs is rc.sysinit. This
script does serval initialization tasks about basic service.

The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(Peripherals driver, core driver, ...)->
	run rcS script(mount fs, run service) ->
	    board_appinitialize->

After this patch:
The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(core driver,...)->
	run rc.sysinit script(mount fs, run core service) ->
	    board_appinitialize(Peripherals driver)->
		run rcS script(run other service)->

So, Peripheral drivers can do more with the file system and
core services.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-21 12:54:24 +03:00
田昕
cc7653b8c7 fix resetcause nsh command print
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-04-14 16:43:45 +03:00
YAMAMOTO Takashi
c7fcffd09a nshlib/nsh_fscmds.c: Make losetup command take optional sector size 2022-04-11 22:19:19 +08:00
Jiuzhu Dong
63f28099e3 nsh/timedatectl: add timedatectl to get/set TZ
follow https://man7.org/linux/man-pages/man1/timedatectl.1.html

nsh> timedatectl
      TimeZone: CST, 28800
    Local time: Sat, Apr 02 05:59:43 2022 CST
Universal time: Fri, Apr 01 21:59:43 2022 GMT
      RTC time: Sun, Apr 01 21:59:42 2022

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 02:52:11 +08:00
ligd
470174260c rptun: update rptun cmd usage
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
f5d2c64556 rptun: add rptun ping support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
622784be89 rptun cmd: add broadcast rptun cmd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
e0e5652de4 rptun: add rptun dump support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
d5aae96523 apps: add rptun reset /dev/rptun/xx cmd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
c57677c3ce apps: add rptun /dev/rptun/xx panic cmd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
Jiuzhu Dong
de61706552 nsh/memdump: support dynamic turn on/off backtrace in heap
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 13:31:28 +08:00
田昕
cbc9163266 apps/nsh:add resetcause command
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-31 12:09:24 +03:00
ligd
9730eaad9e nsh: sh_main also support isctty = true
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 22:47:37 +03:00
ligd
d6a187efed nshlib: merge nsh_getdirpath() to nsh_fsutils.c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 02:36:13 +08:00
Petro Karashchenko
d868387148 fsutils/passwd: fix out of bounds array access during password encryption
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-28 22:11:01 +08:00
Petro Karashchenko
566be8c7b1 definitions: unify MAX and MIN macro definitions
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 23:20:17 +08:00
anjiahao
7d10751037 nshlib/nsh_fscmds:use strchr instead of strstr
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-03-16 20:05:51 +08:00
anjiahao
eabba4ca20 cmd_mkdir:support mkdir opthon -p
use "mkdir -p /test/test" to ceate a dir

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-03-16 13:53:45 +08:00
Petro Karashchenko
f9baa422c1 style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-09 10:37:33 +08:00
Xiang Xiao
aac20c317c Fix compiler warning
chrono_main.c: In function 'chrono_main':
Error: chrono_main.c:396:11: error: 'strncpy' output truncated before terminating nul copying 7 bytes from a string of the same length [-Werror=stringop-truncation]
  396 |           strncpy(str, "00:00.0", 7);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
Error: chrono_main.c:434:25: error: '%02ld' directive writing between 2 and 9 bytes into a region of size 8 [-Werror=format-overflow=]
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |                         ^~~~~
chrono_main.c:434:24: note: directive argument in the range [-35791394, 35791394]
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |                        ^~~~~~~~~~~~~~~~~~~
chrono_main.c:434:24: note: directive argument in the range [-59, 59]
chrono_main.c:434:24: note: directive argument in the range [-21, 21]
chrono_main.c:434:11: note: 'sprintf' output between 8 and 18 bytes into a destination of size 8
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435 |                   (priv->ts_end.tv_nsec / 100000000));
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nsh_routecmds.c: In function 'cmd_delroute':
Error: nsh_routecmds.c:611:11: error: 'memset' forming offset [16, 27] is out of the bounds [0, 16] of object 'inaddr' with type 'union <anonymous>' [-Werror=array-bounds]
  611 |           memset(&inaddr.ipv6, 0, sizeof(struct sockaddr_in6));
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nsh_routecmds.c:491:5: note: 'inaddr' declared here
  491 |   } inaddr;
      |     ^~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 13:34:28 +02:00
Xiang Xiao
d4290b3e93 Fix error: 'memset' forming offset [16, 27] is out of the bounds [0, 16] of object 'inaddr' with type 'union <anonymous>'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-05 17:02:43 +01:00
Xiang Xiao
82b94fc76f Simplify DEFAULT_SMALL usage in Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 22:46:47 +08:00
anjiahao
4680a25a8c cmd_dd:if read nbyte less than bs,must write nbyte
if a file size is 10
use dd if=a of=b bs = 8
b file size will 16, is a error
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-02-24 10:21:33 -03:00
Jiuzhu Dong
283b1a4dfc nshlib/cmd_memdump: support new command: memdump
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-24 02:16:00 +08:00
Jiuzhu Dong
372621ed06 nshlib/ps: support display heap info for every task by cmd ps
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-24 02:16:00 +08:00
Xiang Xiao
0b722cc864 nshlib: Remove format variable from date_showtime
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
4cc0c755bf Remove CONFIG_CLOCK_MONOTONIC special code
since this opion doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
f6f4bbff3a Replace EXIT_SUCCESS with 0 for BOARDIOC_[POWEROFF|RESET]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-29 12:44:41 +01:00
Fotis Panagiotopoulos
6daec61423 Typo fix. 2022-01-28 00:02:08 +08:00
Norman Rasmussen
374cb9230a Fix boarctl typos 2022-01-16 08:07:47 +01:00
Fotis Panagiotopoulos
bc5d8034f1 Typo fixes. 2022-01-06 10:30:41 +08:00
Norman Rasmussen
6285990a5c Remove trailing whitespace from commands as parameters 2022-01-01 22:18:07 +08:00
Norman Rasmussen
92287e2b14 Fix some edge case bugs in nsh_parse
- Handle nsh_filecat returning NULL on failure
- Background and redirect must be restored after an empty line
- Output redirection should be removed from argv like background
2022-01-01 22:18:07 +08:00
Norman Rasmussen
41ce7d40f6 Fix incorrect argument count error message
The `too many arguments` and `missing required argument(s)` messages
should be switched in order for the correct message to be shown to the
user.
2021-12-31 20:54:05 +08:00
Xiang Xiao
66dbaa4539 Replace self defined macros with NET_SOCK_[FAMILY|TYPE|PROTOCOL]
NET_SOCK_* is defined by nuttx/net/netconfig.h and then can be shared

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 16:04:29 -03:00
ligd
a4dd508c9c nshlib/nsh_proccmds.c: update ps_callback when get Group
Cause of "Group:" always have in file "status"

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-11 11:13:04 -03:00
Xiang Xiao
850c036c58 nshlib/stdsession: Handle the command arguments in any order
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-09 13:39:10 -03:00
Xiang Xiao
ad09ca2a80 nshlib: sync nsh_stdsession.c with nsh_session.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-09 13:39:10 -03:00
Xiang Xiao
a0f773b318 nshlib/nsh_session: Handle the command arguments in any order
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-09 09:35:40 -03:00
Xiang Xiao
991e491c94 nsh: Remove the duplicated NSH_MMCSDMINOR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-08 10:43:47 -03:00
Xiang Xiao
35e442d08c system/readline: Move READLINE_HAVE_EXTMATCH inside SYSTEM_READLINE section
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-08 10:43:47 -03:00
Xiang Xiao
8b447704d3 nshlib: Disable Individual commands when DEFAULT_SMALL equals y
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-07 13:17:52 +01:00
anjiahao
80dcc185f3 echo: support echo opthon -e
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-21 23:33:09 -05:00
Jiuzhu Dong
5a5448df04 nsh: fix compile break about closing CONFIG_NSH_DISABLESCRIPT
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:37:19 +08:00
Jiuzhu Dong
16c9068d5f nsh: fix compile break about closing CONFIG_NSH_DISABLEBG
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:36:54 +08:00
Juha Niskanen
b283289986 apps: fix miscellaneous typos
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-26 11:39:28 -07:00
SPRESENSE
8e0892b2f2 nshlib: Fix write buffer position in nsh cp command
The iobuffer for write buffer position need to be update if write
API cannot write data at once.
2021-08-19 08:31:34 -07:00
Xiang Xiao
d4d2f13f89 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 11:04:35 +02:00
Xiang Xiao
967f526850 Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 16:42:32 +02:00
Jiuzhu Dong
32e7a7fde0 nshlib: support c++ access nsh api
N/A

Change-Id: I90de4a4ce1f089a2db2e3b81f83f7b39434d6421
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-12 04:43:36 -07:00
ligd
faa243844d apps: add variable to identify main shell
Change-Id: Ifecfbb58b3c2cdbeae900eb2eeb2b641155a7580
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 09:09:31 -07:00
liuhaitao
4b8e0fde62 nshlib: Add 'rm -r' recursive remove directory support
Change-Id: Iafecb0a25cc9d091a1aee8f381b217e67d6e3925
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-01 14:55:04 -07:00
Xiang Xiao
99e1674912 Call posix_spawn with filename as the first argv entry
pair with the kernel side change to follow the standard defintion:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-14 07:12:54 -06:00
Alin Jerpelea
395b0094a5 nshlib: nxstyle fixes
fixes for errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Alin Jerpelea
4f3f62c8fc nshlib: update licenses to Apache
Gregory Nutt is has submitted the SGA

Uros Platise has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Xiang Xiao
d9c1c5bbc8 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:04:34 -07:00
David Sidrane
eef3e1e009 nshlib/vars: Add assert header 2021-06-08 13:19:50 -05:00
Alin Jerpelea
129aa55a36 nshlib: update licenses to Apache
Gregory Nutt is has submitted the SGA

Alan Carvalho de Assis has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-08 08:43:15 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Xiang Xiao
8e06d060c2 nsh/date: Support -u option
user can use both UTC and local time now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 11:10:31 +01:00
RoCorbera
42f4565129 nsh kill cmd can be executed with no signal option.
SIGTERM is the default signal, as in unix kill command.
nsh> kill [-<signal>] <pid>
2021-06-01 15:57:13 -03:00
Xiang Xiao
98de0d6a68 nsh: Add debug.h inclusion in nsh_command.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 16:05:07 +09:00
Xiang Xiao
1ee948e0c8 Include assert.h for DEBUGASSERT caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:34:37 +09:00
chao.an
8721bc6847 nshlib: Fix the build break in nsh_telnetd.c when CONFIG_NSH_CONSOLE=n
set the config:
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_CONSOLE=n

nsh_telnetd.c: In function 'nsh_telnetstart':
nsh_telnetd.c:267:22: error: 'vtbl' undeclared (first use in this function)
  267 |       nsh_initscript(vtbl);
      |                      ^~~~

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-07 10:53:25 -07:00
chao.an
a5337af484 nsh/telnetd: bringup the network before telnetd init
bringup the network before telnetd init if without NSH_CONSOLE

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-06 19:14:47 -07:00