Commit Graph

519 Commits

Author SHA1 Message Date
Gregory Nutt
ad608c705c nshlib: nsh_netcmds.c should include netlib.h even if neither TCP nor UDP are enabled 2017-04-25 08:25:23 -06:00
Gregory Nutt
c2bdd49421 netlib and NSH: Add logic to set the IEEE802.15.4 PAN ID. 2017-04-19 18:10:39 -06:00
Masayuki Ishikawa
6b75120352 NSH library: Fix open flags in nsh_codeccmd.c
Jira: PDFW15IS-2824
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-19 16:12:44 +09:00
Gregory Nutt
775d1052a5 NSH set command: Eliminate useless argc check of SCRIPTS are enabled but ENVIRONMENT is disabled 2017-04-09 12:03:18 -06:00
Gregory Nutt
169bcab331 NSH: Eliminate warning about unused variable. 2017-04-09 11:54:59 -06:00
Gregory Nutt
8369052a22 NSH library: Extend ifconfig to support 6loWPAN. Adapt to some changes in configuration variable usage. 2017-04-08 12:21:40 -06:00
Gregory Nutt
194c2d86a8 6loWPAN: Add network IOCTL support to set the node address 2017-04-06 16:00:41 -06:00
David Sidrane
35cf98d4df Print expanded variables if -x 2017-04-05 18:31:47 -06:00
David Sidrane
d03aa9112e Added support for set [{+|-}{e|x|xe|ex}] [<name> <value>]
Set the 'exit on error control' and/or 'print a trace' of commands when parsing scripts in NSH.  The settinngs are in effect from the point of exection, until they are changed again, or in the case of the init script, the settings are returned to the default settings when it exits.

Included child scripts will run with the parents settings and changes made in the child script will effect the parent on return.

Use 'set -e' to enable and 'set +e' to disable (ignore) the exit condition on commands. The default is -e. Errors cause script to exit.

Use 'set -x' to enable and 'set +x' to disable (silence) printing a trace of the script commands as they are ececuted. The default is +x. No printing of a trace of script commands as they are executed.
2017-04-05 18:25:59 -06:00
Gregory Nutt
eef0161dd4 examples/nettest: Trying to adapt to use for testing 6loWPAN. 2017-04-03 15:33:39 -06:00
Gregory Nutt
efa2de16a4 NSH: Fix some warnings about integer/pointer casts of different sizes (probably only effects 64-bit simulation) 2017-04-03 09:26:10 -06:00
Jussi Kivilinna
3e2743e826 nshlib: fix building when CONFIG_NET_USRSOCK enabled with other link-layer 2017-03-31 09:10:55 -06:00
Tomasz Wozniak
71b45ed2c2 built-in libc defect workaround: replace '%6.6u' format with an equivalent '%06u' 2017-03-21 09:39:51 +01:00
Gregory Nutt
2ef46ce4ba NSH library: In nsh_argexand(), if CONFIG_NSH_ARGCAT is defined but CONFIG_NSH_CMDPARMS defined and/or CONFIG_DISABLE_ENVIRON not defined, then there is a situation that causes an infinite loop in the parser. Noted by Freddie Chopin. 2017-03-09 08:07:22 -06:00
Alan Carvalho de Assis
8e7ed15cce NSHLIB uname command: Eliminate 'defined but not used' warning in some configurations 2017-03-07 15:36:18 -06:00
Alan Carvalho de Assis
d506939b59 NSHLIB ps command: Eliminate 'defined but not used' warning in some configurations 2017-03-07 15:10:17 -06:00
Gregory Nutt
a7e34f3b97 Make use of FAR storage class consistent 2017-02-27 07:54:21 -06:00
Gregory Nutt
fa4b047d35 Fix typo in last commit 2017-02-27 07:49:49 -06:00
Gregory Nutt
590791e12d NSH: Eliminate a warning when all memory inspection commands are disabled. 2017-02-27 07:30:52 -06:00
Gregory Nutt
bab5df0966 Eliminate a warning about an unused variable. 2017-02-27 07:30:52 -06:00
Gregory Nutt
81645fe18f strcasecmp, strncasecmp, bzero, bcmp, and bcopy should be defined in strings.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead. 2017-02-16 15:58:15 -06:00
Gregory Nutt
740b528199 apps/examples/stat: Add a simple test for stat(), fstat(), and statfs(). 2017-02-13 14:08:19 -06:00
Gregory Nutt
bf9ca8868e NSH: Both arguments of 'ln' command may be relative paths 2017-02-07 07:56:54 -06:00
Gregory Nutt
1a696b0367 Fix a memory leak in the 'ln' command when a failure occurs. 2017-02-06 10:20:29 -06:00
Gregory Nutt
7a0e08c37b NSH: Add readlink command. 2017-02-05 10:35:11 -06:00
Gregory Nutt
bb81a3d11d NSH ls command: if node is a symobolic link, use readlink() to get and the display the target of the symblic link. 2017-02-03 14:13:25 -06:00
Gregory Nutt
9fbca32710 Soft links: Fixed logic in RTOS. Remove NSH kludge of last commit. 2017-02-03 13:23:27 -06:00
Gregory Nutt
51f71304d1 NSH: Extend ls command to show type of symbolic link. 2017-02-03 11:21:37 -06:00
Gregory Nutt
2ac55ec4e7 NSH: Add support for the 'ln' command. 2017-02-02 19:40:59 -06:00
Gregory Nutt
d195751a90 Update NSH and examples/modules for changes in kernel module interface. 2017-01-22 15:11:49 -06:00
Masayuki Ishikawa
4bf85f7c7b NSH: dd command will show statistics 2016-12-19 18:33:34 -06:00
Gregory Nutt
9b951b4dd8 apps/nshlib: nsh_getdirpath(), use snprint instead of sprintf to avoid possibility of buffer overrun. Noted by Chung Hwan Kim. 2016-10-11 17:35:31 -06:00
Gregory Nutt
2c8ac4440a apps/nshlib: Don't try to flush output streams if stdio buffered I/O is not supported. 2016-10-06 08:36:15 -06:00
Alan Carvalho de Assis
cdedb412ed apps/nshlib: Add printf command to NSH, e.g., controlling /dev/userleds from command line: nsh> printf \x01 > /dev/userleds 2016-10-01 07:44:15 -06:00
Neil Hancock
7fc401d3c1 Correct an assertion 2016-09-12 07:26:37 -06:00
Aleksandr Vyhovanec
e832e73b99 nshlib/: Fix missing semicolon; include string.h. 2016-09-05 07:05:17 -06:00
Gregory Nutt
8cfa1dbd3b The previous commit was reverted. My concern was misplaced: There is a guard boolean to prevent running the init script more than once. This comment just restores some of the good cosmetic changes that were included in the reverted commit. 2016-08-25 14:28:25 -06:00
Gregory Nutt
4eda22b4db Revert "This commit adds nsh_consolechild(). I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session. That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library: Mounting, reading, and running the start-up script, configuring USB tracing. Some of those actions will cause failures if attempted twice."
This reverts commit 4d364d836a.
2016-08-25 14:19:36 -06:00
Gregory Nutt
4d364d836a This commit adds nsh_consolechild(). I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session. That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library: Mounting, reading, and running the start-up script, configuring USB tracing. Some of those actions will cause failures if attempted twice.
Here are some offenders: examples/cc3000/shell.c, examples/nsh/nsh_main.c, examples/nxterm/nxterm_main.c, and examples/pty_test/pty_test.c.  It is possible that for some of those, that represents the first call to nsh_consolemain().  But probably not.

To give other initialization options, I added nsh_consolechild() which is identical to nsh_consolemain() other than it omits all of the one-time initialization.  Of course, you would not get the result that you wanted if nsh_consolechild() were called without nsh_consolemain().
2016-08-25 14:14:23 -06:00
Gregory Nutt
e39cfc97c7 Add logic to support an NSH-specific system command 2016-08-25 11:34:36 -06:00
Mateusz Szafoni
6ff8074532 apps/nshlib/nsh_syscmds.c: missing semicolon 2016-08-25 14:26:33 +02:00
Gregory Nutt
c9378ef87e Fix hex representation of IP address. Also noted by Michał Łyszczek 2016-08-19 06:35:29 -06:00
Gregory Nutt
b9d56991f3 Update some comments. Remove trailing whitespace noted by Michał Łyszczek 2016-08-19 06:25:42 -06:00
Gregory Nutt
823b8c3981 FIFO_SIZE vs PIPE_SIZE 2016-08-04 16:25:47 -06:00
Gregory Nutt
fff8a91e52 Oops, wrong kind of comments 2016-08-04 13:32:19 -06:00
Gregory Nutt
e4914622b3 NSH: cmd_mkfifo depend son CONFIG_DEV_PIPE_SIZE > 0 2016-08-04 12:57:02 -06:00
Gregory Nutt
d5b7268d95 ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers. 2016-07-20 14:02:41 -06:00
Gregory Nutt
7d517413cb Things that use mkfifo() and pipe() depend on CONFIG_PIPES 2016-07-20 10:46:05 -06:00
Gregory Nutt
b1230ce87a NSH: Eliminate a warning about discarding const 2016-07-15 08:31:47 -06:00
David Alessio
f48b3c73b0 When Priority Inheritance is enabled, the format of /proc/<PID>/status changes to show both the current priority and the thread’s base priority. This messes up the format of cmd_ps.
The attached patch fixes cmd_ps to ignore the base priority.
2016-07-15 07:01:02 -06:00