Gregory Nutt
dd35a7cacc
apps/: Removed all references to CONFIG_DISABLE_POLL. The standard POSIX poll() can not longer be disabled.
2019-05-21 19:08:12 -06:00
Valmantas Paliksa
5cad41c973
apps/nshlib: Fix all places where cle() and readline() are used. readline() returns EOF on a failure. cle() returns a negated errno value. Checking only for EOF causes failues to be missed (and infinite loops ensuing).
2019-05-21 08:43:09 -06:00
Gregory Nutt
8f5944c4a8
Squashed commit of the following:
...
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
2019-04-29 14:53:38 -06:00
Gregory Nutt
94a0d92b54
This commit removes the private network initialization logic from NSH and puts in a common location at apps/netutils/netinit. Now that netork initialization logic can be used by applications that do not include NSH.
...
Squashed commit of the following:
apps/nshlib: Remove NSH initialization. Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).
apps/netutils/netinit: Clone network initialization logic from NSH to this directory so that it can be available for general use.
2019-04-29 10:22:56 -06:00
raiden00pl
0a6726bc3e
Merged in raiden00/apps (pull request #174 )
...
Small fixes
examples/pca9635/pca9635_main.c: fix compilation
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 11:33:21 +00:00
Valmantas Palikša
5484407877
nshlib/nsh_timcmds.c: Initialized struct tm cause 'date -s' to fail.
2019-03-18 08:04:40 -06:00
Gregory Nutt
b2f46360de
apps/: Remove/replace all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0. That value is always greater than zero now. In places just replace with #ifdef CONFIG_NET.
2019-02-11 16:23:55 -06:00
Gregory Nutt
fe41f72a95
Fix typo found in building testing. There will probably be a few more.
2019-02-11 13:25:48 -06:00
Gregory Nutt
9db029e318
The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0
2019-02-11 13:10:10 -06:00
Gregory Nutt
b1352458ab
apps/nshlib/nsh_netinit.c: Update for changes to signal notification structures.
2019-01-27 16:45:56 -06:00
David Sidrane
7db2a352fb
nshlib/nsh_console.h: Fix copy paste errors. Some Kconfig configuration names needed CONFIG_ prefix.
2019-01-24 06:36:26 -06:00
Gregory Nutt
6fb399fd65
Update README
2019-01-19 08:54:01 -06:00
Masayuki Ishikawa
060a8fff4b
Merged in masayuki2009/nuttx.apps/fix_redirection_error (pull request #167 )
...
apps/nshlib: Fix buffer overrun when redirected to a file.
SAVE_SIZE must be the same as sizeof(struct serialsave_s)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-19 12:38:49 +00:00
Anthony Merlino
7cde7e921d
Merged in antmerlino/apps/addroute-default-gw (pull request #166 )
...
addroute: Adds command for setting default gateway. addroute default <ipaddr> <interface>
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-13 14:20:15 +00:00
Ken Pettit
e08d100919
apps/nshlib/nsh_parse.c: Fixes an error in the NSH parser. There was a bug when executing an nsh shell script which contains a redirection. When the command in the script is executed, it sets the vtbl->np.np_redirect flag (as it should), but then doesn't restore it, leaving it set at the end of the script execution. Then the vtbl->np.np_redirect flag is set when the 'sh' command completes, causing a restore from un-initialized variables, thus leading to a crash. See the code snippet below for an example test case.
...
Test case:
NuttShell (NSH)
nsh> mkrd -s 1024 40
nsh> mkfatfs /dev/ram0
nsh> mount -t vfat /dev/ram0 /tmp
nsh> echo "echo 1 > /dev/null" > /tmp/test.sh
nsh> cat /tmp/test.sh
echo 1 > /dev/null
nsh> sh /tmp/test.sh
...
The nsh prompt doesn't get printed. You can type a couple of commands, but then the system will crash because of bad pointers.
2019-01-12 10:56:48 -06:00
Gregory Nutt
eaec674e7b
apps/nshlib/nsh_command.c: In all multi-column help output, make the number of rows presented dependent upon the maximum width of the widest column.
2019-01-11 09:21:59 -06:00
Gregory Nutt
d789194836
apps/nshlib/nsh_command.c: In all multi-column help output, calculate an optimal column width rather than using a hard-coded width that may or may not be appropriate.
2019-01-11 08:59:36 -06:00
Gregory Nutt
806ba4ee83
apps/nshlib/nsh_command.c: Fix a few long lines
2019-01-11 07:39:23 -06:00
Ken Pettit
a6d056cf76
apps/nshlib/nsh_command.c: display built-in apps using multi-column mode like the nsh commands
2019-01-11 07:35:04 -06:00
Gregory Nutt
3257ea42d5
apps/nshlib/nsh_parrse.c: Correct some coding standard problems in last PR.
2019-01-06 10:00:19 -06:00
Daniel Agar
c700bf9739
Merged in dagar/nuttx-apps/pr-nshlib (pull request #163 )
...
[WIP] nshlib add var expansion in nsh parse
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-06 15:52:18 +00:00
GregoryN
3bf4b6d245
Merged altconsole into master
2018-12-08 18:53:54 -06:00
David Sidrane
8eb249eea5
apps/nshlib/nsh_romfsetc.c: Add support for CROMFS start-up script
2018-12-06 15:41:18 -06:00
Alan Carvalho de Assis
368f14852e
apps/nshlib: Change the way SLCD is supported. Works better
2018-11-30 18:05:18 -06:00
Lwazi Dube
2b8685b63f
wireless/bluetooth/btsak/btsak_main.c: Fix address parsing
2018-11-30 06:28:36 -06:00
Gregory Nutt
c0f64622e4
nshlib/nsh_slcd.c: Use file descriptor zero for the NSH console.
2018-11-30 06:18:44 -06:00
Alan Carvalho de Assis
c21d640eaf
apps/nshlib: Add support to use SLCD as NSH Console
2018-11-29 18:42:02 -06:00
Lwazi Dube
6af45bdee0
wireless/bluetooth/btsak: Fix some errors in btsak
2018-11-27 08:02:43 -06:00
Xiang Xiao
2db0252e61
nshlib/nsh_envcmds.c: Fix warning g_oldpwd defined but not used [-Wunused-const-variable]
2018-11-07 11:28:28 -06:00
Xiang Xiao
6aee984c91
nshlib/nsh_netinit.c: Move call netlib_icmpv6_autoconfiguration() into nsh_net_bringup() like DHCP
2018-11-07 11:25:39 -06:00
Xiang Xiao
173c985395
nshlib/nsh_fsutils.c: nsh_catfile() should not append '\n' if the last char in file is already '\n'
2018-11-07 11:23:07 -06:00
ligd
19dc7cd3b3
nshlib/nsh_console.c: Add fflush to nsh_consolewrite(). This resolves this problem:
...
> cat /dev/ttyCP &
> echo ls >/dev/ttyCP
Can't get the 'ls' result immediately, because 'cat' cmd uses nsh_consolewrite() and that uses fwrite with no fflush. We can get the 'ls' result after type '\n', because nsh will fflush output when get '\n'.
2018-11-07 11:18:03 -06:00
Gregory Nutt
b5e032e050
apps/nshlib/README.txt: Another trivial update.
2018-10-02 13:47:16 -06:00
Gregory Nutt
3a474c573c
apps/nshlib/README.txt: Trivial correction in comparison to Bash behavior.
2018-10-02 12:15:07 -06:00
Gregory Nutt
cf6c6a9556
apps/nshlib: If CONFIG_NSH_VARS=y, the NSH 'set' command with not argument will list all of the local NSH variables.
2018-10-02 11:54:18 -06:00
Gregory Nutt
cb982ea8df
apps/nshlib: Eliminate more new warnings found in build testing.
2018-10-02 11:16:15 -06:00
Gregory Nutt
2bc4d1e8e2
apps/nshlib/nsh_parse.c: Fix a warning (really a bug) detected in build testing.
2018-10-02 11:08:17 -06:00
Gregory Nutt
7f7b728231
apps/nshlib/nsh_parse.c: Correct an error in conditional compilation found in build testing.
2018-10-02 10:21:33 -06:00
Gregory Nutt
8b01ea4434
Update a README/Improve some C comments.
2018-10-02 06:53:16 -06:00
Gregory Nutt
65e0b791b7
apps/nshlib/nsh_envcmds.c: Once an NSH variable has been promoted to an environment variable, subsequent set operations should act on the environment variable rather than creating a new NSH variable that shadows the environment variable.
2018-10-01 16:22:04 -06:00
Gregory Nutt
ee01445aa2
apps/nshlib: Fix an incorrect usage of a configuration variable in a previous commit.
2018-10-01 15:44:41 -06:00
Gregory Nutt
23b32baf98
apps/nshlib: Update README.txt
2018-10-01 14:28:07 -06:00
Gregory Nutt
15da89649d
Damn. Forgot to add a file before the last commit.. AGAIN.
2018-10-01 13:31:06 -06:00
Gregory Nutt
e9edfd064f
apps/nshlib: Add support for NSH local variables if CONFIG_NSH_VARS are set. These are like environment variables but are local to NSH. The importance of this is that these variables are *not* inherited when NSH creates a new task. The new command 'export' was added. In this case, the NSH variable will be promoted to an environment variable and will then be inherited by any tasks executed by NSH.
2018-10-01 13:30:25 -06:00
Gregory Nutt
d376723ad2
Trivial typo fix
2018-09-30 11:16:10 -06:00
Gregory Nutt
14a262001d
apps/nshlib: Add support for the 'env' command.
2018-09-30 10:55:23 -06:00
Gregory Nutt
4bbfdbb9fa
nshlib/, examples/: Update to show newer file system object types returned by stat().
2018-09-22 13:24:24 -06:00
Eunbong Song
2985d3f42b
apps/nshlib: Correct maximum number of arguments that can be provided to the mksmartfs command.
2018-09-18 07:24:24 -06:00
Gregory Nutt
42e99d59ce
Correct some network-related configuration variable names. All *_MTU defines were changes to *_PKTSIZE gut that was not reflected in apps/
2018-09-14 07:06:06 -06:00
Gregory Nutt
c5edf40542
apps/examples/udpblaster: Add option to use poll() on output (only). Also picks up some fixes to various typographical errors.
2018-09-14 06:59:23 -06:00