Commit Graph

35 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
Fotis Panagiotopoulos
0cdb2cfa48 Fixed compiler warnings. 2022-08-23 01:39:59 +08: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
anjiahao
80dcc185f3 echo: support echo opthon -e
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-21 23:33:09 -05: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
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
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
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
GregoryN
3bf4b6d245 Merged altconsole into master 2018-12-08 18:53:54 -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
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
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
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
14a262001d apps/nshlib: Add support for the 'env' command. 2018-09-30 10:55:23 -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
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
Masayuki Ishikawa
8ecf618a4d apps/nshlib: Add support for '-n' option to the echo command. 2018-01-10 07:26:20 -06: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
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
082b452016 Move string trimming logic in nsh_fsutils.c as nsh_trimspaces() 2015-11-28 15:01:00 -06:00
Gregory Nutt
f2ea88fc9e NSH: Like bash, NSH set command should strip off any leading or trailing whitespace 2015-11-23 11:18:32 -06:00
Gregory Nutt
e9447c6058 Standardize nameing of the pre-processor definitiongs group header 2015-10-02 14:06:11 -06:00
Gregory Nutt
dfeb2b1910 README and other cosmetic updates 2014-01-04 08:38:05 -06:00
Gregory Nutt
4bb75f9a3f More ARMv7-A files that are just copies of the ARMv4/5 files for now 2013-07-19 11:43:04 -06:00
patacongo
1b756ca24e Improve NFS retry logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4845 42af7a65-404d-4744-a932-0658087f49c3
2012-06-14 23:27:02 +00:00
patacongo
f392209c72 NSH now uses the new Telnet daemon and built-in tasks started by NSH can be used over Telnet
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4361 42af7a65-404d-4744-a932-0658087f49c3
2012-02-02 16:04:09 +00:00
patacongo
75ce6ddea3 Fix error in strrch()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3501 42af7a65-404d-4744-a932-0658087f49c3
2011-04-13 22:47:04 +00:00
patacongo
a05c1d4bc2 Update documentation, change CONFIG_EXAMPLES_NSH to CONFIG_NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3394 42af7a65-404d-4744-a932-0658087f49c3
2011-03-18 20:35:31 +00:00
patacongo
4923fdabc1 Move NSH to apps/ as library
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3393 42af7a65-404d-4744-a932-0658087f49c3
2011-03-18 19:46:25 +00:00