Commit Graph

967 Commits

Author SHA1 Message Date
chao.an
4adb83c754 nshlib: remove the dependency of date on RTC
Change-Id: I98bd022fdc901ecb4e2e45a0faf779d83c260844
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-18 07:35:40 -06:00
Alan C. Assis
6e403fc343 Fix remaining issues with nxstyle 2020-04-16 20:39:47 -06:00
Alan C. Assis
d10eb2ae3a Fix nxstyle issue for Juha patch 2020-04-16 20:39:47 -06:00
Juha Niskanen
89b981bdb6 nshlib/nsh_codeccmd.c: fix potential NULL dereference and check malloc return values 2020-04-16 20:39:47 -06:00
Xiang Xiao
8fd8aad5c4 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-13 08:32:42 -06:00
Xiang Xiao
5720d72b71 apps: Fix the nightly build warning
src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  461 |           iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
      |                              ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  460 |           iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
      |                              ~~~~~~~~^

nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
 static inline bool nsh_addrconv(FAR const char *hwstr,
                    ^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
 static inline void nsh_sethwaddr(FAR const char *ifname,
                    ^

nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
 static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
                     ^

In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 #define NOSUCHLINE         STATIC+40, _("No such line")
                                     ^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
                           FS_putChars(STDCHANNEL, (NOSUCHLINE));
                                                    ^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
 static const uint8_t g_vt100_colormap[8] =
                      ^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
2020-04-13 08:32:42 -06:00
chao.an
9968461c2b nsh/command: do not show the module application in built-in list
Change-Id: Ia6dd5dcf7d7eb829fde67c522f7ee2155a4051ce
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-03 15:59:45 +09:00
Xiang Xiao
b92a10ad74 nshlib/nsh_netcmds.c: fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-30 09:43:49 -06:00
Xiang Xiao
8da81578b0 nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iac7a9a6b871d473e4720db1d6cbfeea3dc9796a0
2020-03-30 09:43:49 -06:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Gregory Nutt
da31673ddf Run nxstyle against all modified .c and .h files 2020-03-22 08:23:28 -05:00
Gregory Nutt
1a9444a68b Remove support for CONFIG_FS_WRITABLE and CONFIG_FS_READABLE 2020-03-22 08:23:28 -05:00
YAMAMOTO Takashi
e1d9e82273 nshlib: Fix a few strange whitespace in command help text 2020-03-18 00:39:17 -05:00
YAMAMOTO Takashi
382284b43c nsh_dbgcmds.c: Appease nxstyle complaints 2020-03-17 21:45:37 -06:00
YAMAMOTO Takashi
2b47187a83 nsh_command.c: Appease nxstyle complaints 2020-03-17 21:45:37 -06:00
Xiang Xiao
5f273b2c5c nshlib: cmd_nfsmount support the mount with TCP protocol
And make TCP as the default like Linux
2020-02-27 12:53:54 -06:00
Xiang Xiao
26a5fb0e74 nshlib: cmd_nfsmount support the mount through domain name
Change-Id: I9e4bfd6aee9ac4bd625e3bc66b6e196b013ca172
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-27 12:49:54 -06:00
Xiang Xiao
11fedb6b95 nshlib: cmd_nfsmount should try IPv6 then IPv4 if dual stack is enabled
Change-Id: I0126a97a74008a860beeff363090ee6933286d45
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-27 12:49:54 -06:00
chao.an
86bfe13399 net/bringup: late net init after nsh script done 2020-02-26 16:11:44 +00:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
chao.an
9a28ccf836 nsh/parse: try the builtin configuration first
In the case of enable the BUILTIN_APPS/FILE_APPS at the same time, try the builtin list first to ensure that the relevant configuration(stacksize, priority) can be set normally.
2020-02-21 07:40:47 -06:00
Xiang Xiao
eb8678cfeb Remove CONFIG_DEV_LOWCONSOLE from source code
Follow the nuttx side change
2020-02-18 13:13:29 -06:00
YAMAMOTO Takashi
afa51c2e00 Fix documentation typos 2020-02-14 16:08:07 +08:00
Gregory Nutt
724a34bd3b Run all files modified by pr45 through nxstyle. 2020-02-03 07:38:57 -06:00
Xiang Xiao
37135e5dfe telnetd should listen both IPv4 and IPv6 for the dual stack
Change-Id: Ic1c2878f2eda721ccdf667b0a634289c643f5220
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-03 07:17:22 -06:00
Xiang Xiao
c44f271195 Fix ret undefined error in nsh_telnetlogin when CONFIG_NSH_LOGIN_PLATFORM enable
Change-Id: Ib1fa8ba6879a5b330201f1144a2e5827cc4b1d0a
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-03 07:17:22 -06:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
fd3775e068 Remove CONFIG_TIME_EXTENDED conditioning
Remove CONFIG_TIME_EXTENDED related stuff since kernel remove this option
2020-01-23 08:36:03 -06:00
Alin Jerpelea
5c936ce0e4 Various fixes (#6)
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h affected by this PR through nxstyle.

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    * system/usbmsc: Fix accessing uninitialized pointer
    * fsutils/inifile: Fix a memory leak in inifile error case
    * fsutils/mksmartfs: Fix uninitialized return code
    * system/zmodem: Fix a compile error in zmodem debug enabled
    * nshlib/nsh_fscmds.c: Add syntax check to cp command

    If the destication of NutShell cp command is the same with the source,
    it may cause the file corruption. Add the syntax check of argument to
    avoid this problem.
2020-01-07 09:01:23 -06:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Gregory Nutt
0536c5b523 apps/nshlib/nsh_parse.c: Correct an error found in build testing. Commit 2a462c78aa was insufficient. It was a mistake to revert Xiang's change of commit 9defae8af6. But we are on a different vector now. 2019-12-24 12:18:30 -06:00
Gregory Nutt
2a462c78aa nshlib/nsh_parse.c: Replacement implementation for 9defae8af6. This addes conditional compilation on the definition of g_nullstring[] to avoid the warning. Suggested by SUZUKI Y <NBG03015@nifty.ne.jp> 2019-12-19 07:59:30 -06:00
Gregory Nutt
6bfd6166dd Revert "apps/nshlib/nsh_parse.c: Fix warning: 'g_nullstring defined but not used'. Use directly since the usage is triggered by a complex Kconfig combination."
Per SUZUKI Y <NBG03015@nifty.ne.jp>, changing:

-      return (FAR char *)g_nullstring;
+      return "";

causes a bad return value because "" lies on the stack.

This reverts commit 9defae8af6.
2019-12-19 07:52:00 -06:00
Xiang Xiao
9defae8af6 apps/nshlib/nsh_parse.c: Fix warning: 'g_nullstring defined but not used'. Use directly since the usage is triggered by a complex Kconfig combination. 2019-12-18 09:43:31 -06:00
Xiang Xiao
5ec8fc9427 apps/nshlib/nsh_fileapps.c: nsh_fileapp() should return 1 if the application task was spawned successfully but returned failure exit status. For example, nsh shouldn't output "/bin/ping: command not found":
nsh> /bin/ping
ERROR: Missing required <ip-address> argument
...
nsh: /bin/ping: command not found
2019-12-10 10:05:51 -06:00
Gregory Nutt
77a3b08302 apps/nshlib/nsh_parse.c: Ensure /bin/ping and ping work at the same time. Don't skip nsh_builtin even CONFIG_NSH_FILE_APPS or CONFIG_FS_BINFS equal y. 2019-12-10 08:40:29 -06:00
Gregory Nutt
e89a1aa54d README.txt: Update to include a description of the 'dmesg' command which was apparently never documented. 2019-11-21 12:23:50 -06:00
Juha Niskanen
eaeb6cc105 nshlib/Kconfig: Add missing NSH_DISABLE_DMESG, typos. 2019-11-08 07:52:22 -06:00
Dave Marples
dbd4e67241 apps/system/cle/cle.c: This commit modifies the cle to use the streams file interface more consistently and has removed the observed race conditions. It was previously a mix of streams and fileio. It also simplifies the VT100 cursor position handling. 2019-11-04 11:35:18 -06:00
Gregory Nutt
75c9ed72d1 apps/nshlib/README.txt: Update README to at least mention the new pmconfig command. 2019-11-04 07:48:51 -06:00
ligd
42aaecf1d1 apps/nshlib: Add new NSH command, 'pmconfig'. 2019-11-04 07:44:33 -06:00
Gregory Nutt
eca2171ab5 apps/nshlib/nsh_netcmds.c: Fix some alignment in output of 'arp -t' command. 2019-11-03 20:10:56 -06:00
Gregory Nutt
b65c3dac0e netutils/netlib/netlib_getarptab.c: Misc fixes from initial testing with the 'arp -t' commeand. 2019-11-03 19:29:20 -06:00
Gregory Nutt
400995dec6 nshlib/nsh_netcmds.c: Add a -t option to the arp command which will enable printing the entire ARP table. 2019-11-03 16:19:14 -06:00
Gregory Nutt
29160741d8 apps/nshlib/README.txt: Update to include the new rptun command. 2019-11-03 09:50:13 -06:00
Gregory Nutt
c3dd0b9c06 apps/nshlib/README.txt: Update to include the new rptun command. 2019-11-03 09:44:02 -06:00
ligd
611bc6c139 apps/nshlib: Add rptun cmd for boot remote core. 2019-11-03 09:36:49 -06:00
Xiang Xiao
93017735ef apps/nshlib/nsh.h: nsh: Remove the redundant check for netcmd. Checking FS_PROCFS and FS_PROCFS_EXCLUDE_NET is enough and make the type of network device could be shown by ifconfig. 2019-11-03 09:33:57 -06:00
Gregory Nutt
0dde32fb43 nshlib/nsh_romfsetc.c and graphics/traveler/trv_romfs.c: Replace direct calls to romdisk_register() with indirect calls via boardioctl(BOARDIOC_ROMDISK). This not only fixes the violation of the portable POSIX OS interface, but also permits use of ROM disks in PROTECTED and KERNEL modes. There are still multiple illegal calls to romdisk_register() from code under apps/examples. These all must also be converted to use boardioctl(BOARDIOC_ROMDISK) someday. 2019-10-26 13:47:03 -06:00
Gregory Nutt
06acc559a1 apps/nshlib: Tighten up some of the conditional logic for mkrd. 2019-10-26 12:26:16 -06:00
Gregory Nutt
e0dff13094 apps/nshlib/Kconfig and examples/mount/Kconfig: Automatically select CONFIG_DRVR_MKRD is it is needed by the configuration. 2019-10-26 11:45:00 -06:00
Gregory Nutt
0bc798c7a9 apps/examples/mount: Replace illegal call to ramdisk_register() with a call to boardctl(BOARDIOC_MKRD). 2019-10-26 10:22:34 -06:00
Gregory Nutt
c8a066f699 apps/nshlib/nsh_fscmds.c: The NSH mkrd command was in violation of the NuttX portable POSIX interface. it was calling the internal OS function ramdisk_register() directly. No only is this a violation of the interface specification, but also prevents use of mkrd in PROTECTED or KERNEL buils.
With this commit, the NSH mkrd command now used the BOARDIOC_MKRD boardctl() command.  This command is availabe in all build modes.  The effect of this change is to move the hear of the NSH mkrd command into to OS and provide user-space access via boardctl().
2019-10-26 09:42:51 -06:00
Xiang Xiao
403b4a0178 In all Make.defs files, append CONFIGURED_APPS with the consistent ifeq/ifneq. 2019-10-17 11:42:49 -06:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Dave Marples
b4134a674d nshlib/ and system/cle: Add basic color support to the CLE editor. 2019-10-12 00:47:29 +08:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Xiang Xiao
63c3772888 CONFIG_BUILD_LOADABLE: Check the kernel function callable by BUILD_KERNEL instead of BUILD_LOADABLE since BUILD_LOADABLE could be turned on even with BUILD_FLAT. 2019-10-03 14:10:32 -06:00
Gregory Nutt
3457c30c33 apps/nshlib: Fix some typos and minor coding staqndard problems. 2019-09-12 15:38:53 -06:00
Gregory Nutt
ac61c18fcc Move apps/builtins/builtin_forindex.c to nuttx/libs/libc/builtin since it is required by kernel logic as well. Other changes account for movement of builtin.h from nuttx/include/nuttx/binfmt/built.h to nuttx/include/lib/builtin.h. 2019-08-23 09:12:45 -06:00
Gregory Nutt
e6ba3ccff8 Update comments, README's, etc. to reflect changes to nuttx/boards directory reorganization. 2019-08-09 08:40:22 -06:00
Gregory Nutt
dd36f7ca4d Fix paths in README.txt files which have changed due to the restructuring of nuttx/boards directory. 2019-08-05 10:22:56 -06:00
Gregory Nutt
2a8dccb75d Change name configs/ to boards/ in comments, Documentation, Tools, etc. 2019-08-05 07:33:16 -06:00
Gregory Nutt
49e08ca3a9 apps/nshlib/nsh_fsutils.c: As noted by David S. Alessio, 'cat' should not output any additional newline at the end of the cat'ed file content. This was done to assure that the NSH prompt was presented on a new line. However, that is not the correct behavior of 'cat' per the IEEE std: "The standard output shall contain the sequence of bytes read from the input files. Nothing else shall be written to the standard output." Reference: https://pubs.opengroup.org/onlinepubs/009695399/utilities/cat.html
This commit changes the function nsh_catfile() which underlies the 'cat' command and well as other NSH commands.  Although this is the correct behavior for 'cat' it may not be the correct behavor for other commands implemented via nsh_catfile().  That remains to be determined.
2019-07-29 20:49:39 -06:00
Gregory Nutt
24e590b072 apps/nshlib/nsh_ddcmd.c: Seemingly nonsense change but somehow works around a compilation error using the ZDS-II toolchain. It was claiming that vtbl was undefined indd_outfopen(). 2019-06-03 11:32:56 -06:00
Gregory Nutt
8c36ec3f33 nshlib/nsh_parse.c: Fix a warning about an uninitialized variable from the ZDS-II compiler. 2019-06-03 09:29:44 -06:00
Gregory Nutt
6c815a8d48 apps/nshlib/nsh_ddcmd.c: Cosmetic edition of FAR 2019-06-03 09:19:09 -06:00
Gregory Nutt
7409dd57bb Fix a warning found in build testing. 2019-05-22 08:22:12 -06:00
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
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
Gregory Nutt
3e396d8e4e apps/nshlib: Fix a copy paste error introduced in commit 9a42be5e9b 2018-09-02 15:33:22 -06:00
Gregory Nutt
9a42be5e9b apps/nshlib: When using waitpid() to wait for a built-in application or a file application to exit. Add the WUNTRACED options to so the the waitpid() call will also be awakened if the waited-for task is stopped as well. 2018-09-02 14:19:30 -06:00
Juha Niskanen
cef306e335 apps/nshlib/nsh_console.c: Do not dereference NULL 'pstate' 2018-08-29 06:18:30 -06:00
Gregory Nutt
c4512f5ddf apps/nshlib: Fix problem in last commit. CONFIG_BOARDCTL_FINALINIT=y is an insufficient condition for calling boardctl(BOARDIOC_FINALINIT, 0). Also need CONFIG_NSH_ARCHINIT=y. 2018-08-28 15:48:51 -06:00
ligd
93f1c13b62 apps/: Call BOARDIOC_FINALINIT after start-up script (or immediately after BOARIOC_INIT is there is no start-up script). 2018-08-28 15:44:03 -06:00
Gregory Nutt
bb4c5c49ef Replace usage of SIGKILL with SIGINIT 2018-08-28 12:02:26 -06:00
anchao
3c2396116d apps/nshlib/Kconfig: Move 'option modules' from NSH_FILE_APPS to BUILD_LOADABLE 2018-08-27 07:04:29 -06:00
ligd
d36e1c87fe apps/nshlib: Add control-C support for terminating built-in and exec'ed file tasks. 2018-08-26 07:48:38 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
Xiang Xiao
dbf152cbeb apps/nshlib: (1) NSH prompt string is now configurable. nsh> is still the default. (2) Increase the default configuration for the maximum number of command line arguments to 7 (CONFIG_NSH_MAXARGUMENTS). This is needed for 'mount' with the -o option. 2018-08-23 07:34:30 -06:00
Xiang Xiao
8116d10da3 apps/fsutils/mksmartfs: Add a check to see if the SmartFS is already formatted. apps/nshlib: Add a force flag (-f) to mksmartfs. SmartFS will be formatted only if (1) the FLASH does not already hold a SmartFS, or (2) the force flag is set 2018-08-23 07:14:30 -06:00
ligd
bee98898f0 apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument 2018-08-23 06:21:47 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
Gregory Nutt
32f50985a6 Fix references to examples/nsh left in previous commit. 2018-08-18 09:33:25 -06:00
Gregory Nutt
a57610c2c4 Remove trailing spaces at the end of lines. 2018-08-13 07:47:26 -06:00
Gregory Nutt
f2ef84f048 apps/nshlib: Back out 516a743344. While the change is fuly functional and adds a pleasing symmetry to the control commands, it is also redundant and serves no real purpose other than requiring more FLASH. 2018-08-12 06:15:29 -06:00
Gregory Nutt
f759ad3196 Backs out most of commit 093391fcff. I was confused. I re-emplemented a feature that already existed. Silly me. 2018-08-11 10:47:46 -06:00
Gregory Nutt
a7f4a9db23 Revert "apps/nshlib/nsh_command.c: Update help text."
This reverts commit 0511002543.
2018-08-11 10:39:48 -06:00
Gregory Nutt
0511002543 apps/nshlib/nsh_command.c: Update help text. 2018-08-11 10:34:57 -06:00
Gregory Nutt
093391fcff apps/nshlib/nsh_test.c: The test command will now accept '!' inversion when used in the form: [ ! <expression> ]. 2018-08-11 10:20:03 -06:00
Gregory Nutt
ff192a4a58 apps/nshlib: I was able to cause an assertion with some typos in an testing the 'fi' command. Not an important thing, but this will protect against the assertion. 2018-08-11 09:30:53 -06:00
Gregory Nutt
5cfe9c2787 Update README file. 2018-08-11 08:21:52 -06:00
Gregory Nutt
516a743344 apps/nshlib: Extend Beat Küng's commit 888ad352eb so that inverted logic may also be used in repeat and while loops. 2018-08-11 07:53:22 -06:00
Beat Küng
888ad352eb Merged in bkueng/nuttx-apps (pull request #150)
nsh: add inverted logic support in the form of 'if ! <cmd>'

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-11 13:14:41 +00:00
Gregory Nutt
303629dbe4 apps/nshlib: Small parsing improvement plus some added comments. 2018-08-06 15:52:02 -06:00
Gregory Nutt
cb556d6236 apps/nshlib: Add parsing support for back-slash quoted characters. Currenlty only implemented properly if CONFIG_NSH_ARGCAT is also selected. This commit is in response to Bitbucket Issue 11 opened by Maciej Wójcik 2018-08-06 13:28:31 -06:00
Gregory Nutt
922283ee5d Squashed commit of the following:
Merged in masayuki2009/nuttx.apps/loadable_app (pull request #148)

    loadable app support

    * apps: Introduce a build system for loadable apps for nsh.

        This PR consits of following changes. (NOTE: Changes to each
        application will be provided separately)

        apps/nshlib/Kconfig:
        Add 'option modules' to NSH_FILE_APPS so that a user can change
        an application configuration to tristate (y/n/m)

        apps/Make.defs:
        Override COMPILE and COMPILEXX macros to compile loadable apps.
        To make loadable apps, -DLOADABLE_APP is added to the flags.
        Also, introduce ELFLD to link a lodable app.
        Please note that the variable 'LOADABLE' must be defined in
        each application Makefile if you want to make a loadable app.

        apps/Application.mk:
        Add .build target in case of 'LOADABLE=y' which is used to
        link a final loadable application and install the app to
        apps/bin.

        apps/Makefile:
        Add SYMTABSRC and SYMTABOBJ variables for loadable apps which
        will be generated under the apps directory.
        Add make_symbols target which will be called when all applications
        are installed to generate symtab_app.c which is used for
        nsh to inform symbol information to the NuttX kernel.

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    * apps/examples/hello: Apply changes to support a lodable app.

        Kconfig:
        Change the application state from bool to tristate

        Make.defs:
        Change the condition to build. By default, the application is
        not selected (i.e. 'n'), so if other states (i.e. y/m) are
        selected, the application will be compiled.

        Makefile:
        If the application is specified to 'm', the variable 'LOADABLE'
        must be defined here. Also note that other variables (PRIORITY
        and STACKSIZE) can only be used for built-in apps.

        hello_main.c
        Add LOADABLE_APP condition to main().

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    * apps/examples/helloxx: Apply changes to support a lodable app.

        Kconfig:
        Change the application state from bool to tristate

        Make.defs:
        Change the condition to build. By default, the application is
        not selected (i.e. 'n'), so if other states (i.e. y/m) are
        selected, the application will be compiled.

        Makefile:
        If the application is specified to 'm', the variable 'LOADABLE'
        must be defined here. Also note that other variables (PRIORITY
        and STACKSIZE) can only be used for built-in apps.

        helloxx_main.c
        Add LOADABLE_APP condition to main().

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-03 12:05:01 -06:00
Gregory Nutt
3403b1b0e9 apps/nshlib/README.txt: Clarify arguments to the mkrd command. 2018-06-22 11:35:44 -06:00
Gregory Nutt
36d6348368 apps/nslib: Try to eliminate and uninitialized variable warning. 2018-06-17 15:37:42 -06:00
Beat Küng
c6697c150d Merged in bkueng/nuttx-apps (pull request #138)
nsh_parse.c: fix 'while' and 'until' loop condition

The loop condition logic was inverted:
  while true; do echo "test"; done
would exit immediately, while using 'until' would stay in the loop.
This is the opposite of how it is supposed to work.
The reason is that 'state' was set wrong because 'whilematch' is a bool.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-06-06 12:50:41 +00:00
Boris Astardzhiev
940b7f8a3e apps/nshlib/nsh.h: Fix typo.. #undef not #undefine. 2018-05-14 07:24:46 -06:00
Boris Astardzhiev
2c2fc512d6 nshlib/nsh_fscmds.c: Add the -r option which can be used to specify the number of entries in the FAT12/FAT16 root directory. 2018-05-11 09:50:54 -06:00
Juha Niskanen
052a7009b3 Merged in juniskane/apps_upstream/echo_fix_pr (pull request #135)
apps/nshlib: Fix echo command with zero arguments, broken after commit 8ecf618

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-19 04:12:51 +00:00
Juha Niskanen
c4ca133b6f apps/nshlib: Remove non-existent CONFIG_NSH_TMPDIR from README.txt 2018-04-17 05:54:00 -06:00
Gregory Nutt
0094b411da apps/netutils/netlib: Various fixes needed to get a clean netlib build with Bluetooth only. 2018-04-03 10:01:55 -06:00
Gregory Nutt
467a7980f0 apps/nshlib/: In netcommds.c, the UNUSED() macro may be applied to an undefined symbol when IPv6 is enabled but IPv4 is not. 2018-03-31 09:27:52 -06:00
Gregory Nutt
bb6877ed78 apps/nshlib: Fix compile error when CONFIG_NSH_DISABLESCRIPT is not defined. The field np_flags does not exist if scripting is disabled. 2018-01-22 08:32:40 -06:00
Gregory Nutt
e2e53117a5 Remove some section headers when the sections are empty. 2018-01-13 08:35:44 -06:00
Gregory Nutt
661718ee19 apps/nshlib: Add irqinfo command. 2018-01-12 17:58:44 -06:00
Gregory Nutt
d96c236b31 Revert "apps/nshlib: restore space delimiter that was removed in last change to the NSH echo command."
This reverts commit 7cdf9b07d8.
2018-01-10 07:53:03 -06:00
Gregory Nutt
7cdf9b07d8 apps/nshlib: restore space delimiter that was removed in last change to the NSH echo command. 2018-01-10 07:46:24 -06:00
Gregory Nutt
99512b90db apps/nshlib: truncate command will now use ftruncate (vs. truncate) if it had to create the file with creat(). 2018-01-10 07:26:21 -06:00
Masayuki Ishikawa
8ecf618a4d apps/nshlib: Add support for '-n' option to the echo command. 2018-01-10 07:26:20 -06:00
Masayuki Ishikawa
bd6bf35ffd nshlib/nsh_telnetd.c: Add support for telnet character mode.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-10 07:15:16 +09:00
Gregory Nutt
7a2aac8876 apps/nshlib: Add support for a truncate command. This will be used to test the new ftruncate file system support. 2018-01-04 12:52:17 -06:00
Gregory Nutt
626f41084b apps/nshlib: Correct error introduced to conditional compilation 2017-11-14 08:42:16 -06:00
Gregory Nutt
e37f4b7004 apps/nshlib: Big simplification of last change. /proc/kmm, umm, and progmem have been replaced with a single procfs file called /proc/meminfo. The NSH free command now degenerates to a simple dump of /proc/meminfo. 2017-11-13 13:35:04 -06:00
Gregory Nutt
0cda4cec15 apps/nshlib: The free commands no longer used mallinfo() to get the state of the use heap. Two reasons: That is not useful information in the kernel build. And (2) there are other memory resources of interest in other configurations such as the Kernel heap in PROTECTED and KERNEL builds, and the prog mem uses when FLASH is used to hold modifiable data. The free command has been extended to just dump the content of procfs entries and to include all of these other memory resources of the procfs entries are available. 2017-11-13 12:55:03 -06:00
Dmitriy Linikov
dea8d93f64 Merged in hardlulz/modem-3.0-nuttx-apps/fix-compile-nsh_routecmds (pull request #118)
Fixed the compilation of nsh_routecmds.c, broken after commit 6b9d23c6aa

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-03 12:28:19 +00:00
Gregory Nutt
7556eb3814 nshlib/: Fix some botched conditional compilation. 2017-11-02 17:13:49 -06:00
DL
bf209bcf1d Fixed misprint in cmd_wget 2017-11-01 06:18:40 +03:00
Gregory Nutt
ef353ed632 Fix parsing of empty strings when CONFIG_NSH_CMDPARMS is not defined. Problem noted by Juha Niskanen. 2017-10-27 06:41:26 -06:00
Gregory Nutt
62f7838c5e nshlib: Tighten up some conditional logic 2017-10-26 16:07:42 -06:00
Gregory Nutt
40d9701ea0 nshlib: Remove a dangling function that is no longer used after last mount/df chagnes 2017-10-26 13:38:30 -06:00
Gregory Nutt
1f1d114901 Update some comments 2017-10-26 13:31:57 -06:00
Gregory Nutt
3788928cbf nshlib: df command no long uses the non-standard OS interface foreach_mountpoint(). No simply cats /proc/fs/blocks or /proc/fs/usage. 2017-10-26 13:28:37 -06:00
Gregory Nutt
20076688c2 nshlib: mount command no long uses the non-standard OS interface foreach_mountpoint(). No simply cats /proc/fs/mount when there are no arguments to the mount command. 2017-10-26 12:17:03 -06:00
Anthony Merlino
a8bf5718f5 apps/nshlib: ifconfig improvements 2017-10-24 17:26:17 -06:00
Gregory Nutt
749ea9e881 This commit removes the ping6 command from NSH and replaces it with the apps/system/ping6 built-in command. The NSH ping6 command had to be removed because it violated the portable POSIX OS interface. The apps/system/ping6 command uses the sem-standard IPPROTO_ICMP6 socket interface.
Squashed commit of the following:

    apps/system ping and ping6:  Fix a backward test.
    apps/system/ping6: ping6 logic now builds without error.
    apps/system/ping and ping6:  Minor clean-up to configuration settings.
    apps/system/ping6:  Minor clean-up to be able to configure CONFIG_SYSTEM_PING6
    apps/nshlib:  Remove support for ping6 from NSH.
    apps/system/ping6:  Add IPPROTO_ICMPv6 ping6.  Initial commit is simply a clone of the IPPROTO_ICMP ping logic.
    Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET.
2017-10-24 11:19:41 -06:00
Gregory Nutt
bccf0092a4 nshlib: Remove some dangling IPv4 ping logic. system/ping: Add DNS hostname support. 2017-10-23 09:59:03 -06:00
Gregory Nutt
ed9dd1db53 Update a README.txt file 2017-10-23 09:22:42 -06:00
Gregory Nutt
c1ec7db8a9 This commite eliminates the ping command from NSH and replaces it with a ping 'built-in' at apps/system/ping. The original NSH version of ping violated the portable POSIX interface and, hence, had to be removed. The new system/ping command uses the new IPPROTO_ICMP AF_INET datagram sockets to implement ping.
Squashed commit of the following:

    apps/system/ping:  Fix some timing issues.
    apps/system/ping:  A few timing related corrections.
    apps/nshlib:  Remove support for the NSH 'ping' command.  The implementation of that command violated the portable POSIX interface and has been replaced with a ping 'built-in' command at apps/system/ping.
    apps/system/ping:  Add larger payload.  Verify content of echoed payload.
    apps/system/ping:  Various fixes for a clean compile
    system/ping: Add new build structure for system ping command.
2017-10-23 08:50:01 -06:00
Gregory Nutt
35ec1b9244 Squashed commit of the following:
apps/fsutils/mkfatfs:  New user-space fatfs appears to work fine.
    apps/fsutils/mkfatfs:  Move mkfatfs from the OS to here.  Not fully integrated on the intial commit.
2017-10-20 12:35:19 -06:00
Gregory Nutt
976ce0550c NSH: eliminate a warning 2017-09-27 12:05:19 -06:00
Masayuki Ishikawa
4822878990 nshlib/nsh_netcmds.c: Fix a compilation error when IPv4/IPv6 dual stack is enabled 2017-09-26 11:28:40 +09:00
Bruno Herrera
3fe720d1e2 Fixes for problems found by Coverity in the apps/ repository:
nshlib/nsh_parse.c: Avoid truncating the strcmp result into a unsigned char variable.

    nshlib/nsh_netcmds.c: Check for valid hostip before using it.

    nshlib/nsh_ddcmd.c: Fix resouce leak when 'if=' or 'of=' params are repeated in the command line.  For example:

       dd if=/dev/null if=/dev/zero of=/dev/null or
       dd if=/dev/zero of=/dev/zero of=/dev/null
2017-09-25 07:34:34 -06:00
Gregory Nutt
cdf0528933 examples/dac: Lets use printf instead of _info in application code. 2017-09-01 07:39:39 -06:00
Gregory Nutt
3367bde8fe NSH: Add conditions so that ifconfig and ifup will not be disabled if we are using only PF_IEEE802154 2017-08-21 09:32:07 -06:00
Gregory Nutt
41ce937ed0 Changes to netlib and nsh so that you build build with PF_IEEE802154 enabled and 6LoWPAN disabled. 2017-08-20 09:09:47 -06:00
Gregory Nutt
767b29335c Eliminate some warnings found in build testing. 2017-08-13 12:25:22 -06:00
Gregory Nutt
7a8561728c The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree. 2017-08-13 11:03:17 -06:00
Gregory Nutt
a66da34f18 All Makefiles: Add .PRECIOUS: apps/libapps.a to every Makefile. Hopefully this will end awkward problems when you Control-C out of a build and libapps.a is deleted. 2017-08-13 09:35:14 -06:00
Gregory Nutt
970e98a902 Additional changes associated with last commit. 2017-08-12 12:11:22 -06:00
Gregory Nutt
90ebda9120 Eliminate another warning about an unused function 2017-08-12 12:09:01 -06:00
Gregory Nutt
1cdf4ad8d1 Fix a warning found in build testing 2017-08-12 11:14:30 -06:00
Gregory Nutt
7a7c7ee93a Update README and fix some conditional compilation from the last commit. 2017-08-11 15:56:53 -06:00
Gregory Nutt
5dcf5620e3 NSH Library: Add a route command that will dump the content of routing table. 2017-08-11 15:33:26 -06:00
Gregory Nutt
1e23b30afe more issues with last change: netmask must be in network order. 2017-08-10 16:08:09 -06:00
Gregory Nutt
654d526a69 NSH addroute/delroute: Fix an indexing problem introduced with previous commit. 2017-08-10 11:40:12 -06:00
Gregory Nutt
52e4da1e41 NSH addroute and delroute: All expression of the netmask in IPv4 CIDR or IPv6 slash notation. This really reduces the pain of using the commands, especially for IPv6. 2017-08-10 10:30:20 -06:00
Gregory Nutt
f58768db3d NSH library: Update addroute and delroute command. The would support either IPv4 or IPv6, but not both. 2017-08-10 09:15:44 -06:00
Gregory Nutt
3b8c97747d netutils/netlib: Fix netlib_nodaddrconv() so that its return type is the same as other address conversion functions. NSH: Correct parsing of ifconfig so that you can specify the HW address without specifying the IP address. 2017-08-02 14:30:34 -06:00
Gregory Nutt
d6050d70a2 NSH library: Extend ifconfig command so that it can set variable length packet radio addresss. 2017-08-02 13:13:19 -06:00
Gregory Nutt
c343fc618e apps/netutils/netlib: Add support for PktRadio IOCTL commands. 2017-08-02 12:40:50 -06:00
Gregory Nutt
7d0037b08a NSH: Misc changes needed for PktRadio support. 2017-07-30 16:03:56 -06:00
Gregory Nutt
7441c5422f Socket I/F: Cleanup for good CONFIG_NET_PKT build. 2017-07-14 13:43:04 -06:00
Masayuki Ishikawa
ef04aeaead NSH library: Fix build break in nsh_command.c with IPv4/IPv6 dual stack. 2017-07-04 10:13:26 +09:00
Gregory Nutt
d81d9c419b Eliminat a warning when both Ethernet and 6LoWPAN are enabled; improve some naming. 2017-07-02 11:28:12 -06:00
Gregory Nutt
28415d662b netutils/telnetd and users of telnetd: Add support for IPv6. 2017-06-27 09:14:13 -06:00
Gregory Nutt
98204bad94 system/telnet: POLL must not be disabled in configuration. Telnet client port argument is no optional. 2017-06-27 07:46:16 -06:00
Gregory Nutt
9091716419 revise some of the state handling in the previous commit. 2017-06-26 18:16:05 -06:00
Gregory Nutt
342de81641 NSH library: Add a Telnetd command. This is needed when network initialization is deferred. In that case, telnet daemon cannot be started until the network is finally initialized. The telnetd command was added just for that case: So that the telnet daemon can be started from the NSH command line after the network is configured. 2017-06-26 18:00:13 -06:00
Gregory Nutt
d5a897fa1b Merge branch 'master' of bitbucket.org:nuttx/apps into ieee802154 2017-06-19 13:35:34 -06:00
Gregory Nutt
2f975e8f06 nshlib: fix size of 6LoWPAN extended address. 2017-06-19 09:47:17 -06:00
Oleg Evseev
f13d4125a4 Merged in lukegluke/apps (pull request #91)
fix copy-paste typo in nsh_usbconsole.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-19 15:29:09 +00:00
Oleg Evseev
8ee1e79d03 fix copy-paste typo in nsh_usbconsole.c 2017-06-19 15:05:06 +00:00
Gregory Nutt
2bb14d854d L should be capitalized in 6LoWPAN 2017-06-18 16:02:11 -06:00
Gregory Nutt
2e4740e6bb i8sak: Missing newline in fprintf output 2017-06-18 11:28:36 -06:00
Gregory Nutt
9485744265 NSH network initialization: Do not set the IP address for 6loWPAN. The 6loWPAN stack uses IP address that derive from the ieee 802.15.4 addressing and cannot be (safely) configured by the user. 2017-06-17 11:31:04 -06:00
Gregory Nutt
22d9c69d87 NSH network configuration: Re-factor a function that has gotten too big and too complex. 2017-06-17 10:37:31 -06:00
Gregory Nutt
033b42789b NSH: Fix some ieee 802.15.4 initialization logic. It should not set the saddr or panid; those cannot be hard-coded but must come from the coordinator. 2017-06-17 10:04:18 -06:00
Masayuki Ishikawa
41dee001ad Merge branch 'master' into bug_fix_by_sony 2017-05-22 09:13:02 +09:00
Gregory Nutt
4e7b17d783 Fix some typos in comments. 2017-05-21 12:05:07 -06:00
Gregory Nutt
8c1446671c apps/nshlib: Add a new option CONFIG_NSH_NETLOCAL that will suppress some built in operations and will support manual configuration of a wireless network 2017-05-21 12:00:55 -06:00
Simon Piriou
523d7645c4 wapi: add basic wapi_event_stream_extract implementation 2017-05-21 16:24:49 +02:00
Nobutaka Toyoshima
3a8cfb6c04 nshlib: Fix a resource leak in cmd_hexdump()
Jira: PDFW15IS-265
Coverity-ID: 10786
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-20 17:57:03 +09:00
Sebastien Lorquet
ea1025ead2 DHCPC: Remove hard-coded interface device. Now passed as a parameter to dhcpc_open(). 2017-05-19 15:31:22 -06:00
Sebastien Lorquet
297844b1ce Fix comments formatting 2017-05-19 17:50:26 +02:00
Sebastien Lorquet
aefddc3648 Second batch of changes (no problems) 2017-05-19 17:37:17 +02:00
Gregory Nutt
13911d9b17 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:40:03 -06:00
Gregory Nutt
1bad025c81 Cosmetic changes to comments 2017-05-11 07:46:08 -06:00
Gregory Nutt
5fbf2fd8d1 NSH wireless setup: Move call to nsh_associate(). It should be possible to associate with an AP when DHCPC is disabled. 2017-05-09 06:39:08 -06:00
Gregory Nutt
8380447e1a Merge remote-tracking branch 'origin/master' into ieee802154 2017-05-08 14:31:54 -06:00
Gregory Nutt
0376019c35 WPA associate: NSH was not setting the algorithm parameter. 2017-05-08 13:28:08 -06:00
Gregory Nutt
6ec8e56f89 Merge remote-tracking branch 'origin/master' into ieee802154 2017-05-06 11:30:48 -06:00
Gregory Nutt
40a1fbf498 Forgot to add a file in the last commit. 2017-05-06 11:28:56 -06:00
Gregory Nutt
a0915850b9 wireless/wapi: wpa_driver_wext_associate() now accepts a configuration parameter that can be used to specify the wireless properties. nshlib: NSH now has configuration options to select the wireless properties. It builds the configuration structure and passes this to wpa_driver_wext_associate() so that it will setwork the network as configured. 2017-05-06 11:28:11 -06:00
Gregory Nutt
44ace8e1cc 6loWPAN: Replace some Rime address naming with more consistent short/exended address terminology 2017-05-04 08:21:12 -06:00
Simon Piriou
33027bd66e wireless/wext: Add drivers_wext from the WPA supplicant; Integrate into NSH 2017-05-02 09:43:48 -06:00
Gregory Nutt
a5c439777d nshlib/nsh_netinit.c: If IEEE802.11 selected use wlan0 instead of eth0 for network device name. 2017-05-02 08:26:21 -06:00
Gregory Nutt
5b7f2b0ce2 Eliminate a warning 2017-04-29 08:52:10 -06:00
Gregory Nutt
08b2fee0fb NSH: Needs to include tftp.h if TFTP no disabled 2017-04-29 08:42:26 -06:00
Ian McAfee
8007332ab1 I need to look at the registers that are at or around 0xe000ef90. Using mw and xd, I see that nsh does not support pointers greater than 0x7fffffff. A quick look at the source shows that the pointers for those two commands are set with calls to strtol() rather than strtoul(). Changing the two pointer-setting instances to strtoul() fixes the problem, at least for my architecture/config. 2017-04-26 17:54:56 -06:00
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