Commit Graph

128 Commits

Author SHA1 Message Date
Gregory Nutt
a627561c8f apps/fsutils/ipcfg: Add support for IPv6 2020-10-05 00:07:05 +08:00
Gregory Nutt
707e827ded ipcfg: Add hooks for future IPv6 support.
This commit adds structures, modifies function prototypes, and renames data to support the future addition of IPv6 support.  This commit does NOT add that IPv6, only the hooks for backward compatible future support.
2020-10-02 12:30:47 -07:00
David Sidrane
ff866b9527 fsutils:ipcfg Fix fd propagation as return value in bin mode
With CONFIG_IPCFG_BINARY lit. ipcfg_open needs to return
   the fd or an -errno. It was returning OK not the fd.
2020-09-30 14:09:18 -06:00
David Sidrane
17c34df3b9 fsutils:ipcfg Fix range checking for PRTOCOL in bin mode 2020-09-30 14:09:18 -06:00
Gregory Nutt
5e1ba408b4 Add IPv4 Configuration File Access Helper
This commit adds support to access an IPv4 Configuration file similar to the Linux dhpc.client ipfcg file.  This version, tailored for deeply embedded systems supports several options to tailor the file and file access to different environments.  It supports:

- Writable as well as read-only configuration files.
- ASCII human readable files as well as smaller binary files.
- It supports using character driver access to constrained media (such as EEPROM).
- Add examples/ipcfg to exercise IPv4 Configuration File support
2020-09-29 12:24:07 -07:00
Xiang Xiao
e6c5ff9208 Remove the unnecessary touch and clean from Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 19:10:19 +01:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Gregory Nutt
b2d8c501f6 Remove use of set_errno() from application code.
The normal assignment errno = errcode should work fine now.
2020-05-07 22:23:19 +01:00
Xiang Xiao
7a99d62ca1 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaox
iang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
8a1f5ee34c debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
e72608e0d8 Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-02 09:45:44 -06: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
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
f28eca9dbc Make.defs: Use complete include path 2020-02-19 12:56:10 -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
573f07f3e4 fix passwd.h:103:30: warning: passwd_verify with no effect [-Wunused-value]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-09 07:44:21 -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
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
Xiang Xiao
598420a477 fsutils/passwd/passwd_lock.c: Use named semaphore by checking CONFIG_FS_NAMED_SEMAPHORES instead of CONFIG_KERNEL_BUILD. 2019-10-04 08:49:11 -06: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
735644766f apps/fsutils/passwd: Handle the improved the format of the /etc/passwd format. It is now a little similar to other systems. 2019-08-03 10:37:27 -06:00
Nathan Hartman
d6a3beadfb Remove 'executable' bit on several files 2019-08-01 14:19:02 -06:00
Michał Łyszczek
4ab6042a31 apps/fsutils/inih: New package. inih (INI Not Invented Here) is a simple .INI file parser written in C. https://github.com/benhoyt/inih 2019-02-18 07:41:12 -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
305278d1ae Application.mk: Fix some issues when building directories such as fsutils/mkfatfs that have not mainobj. In this case, the MAINSRC is undefined and it would generate a bad linker command line. 2018-09-04 13:00:03 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -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
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
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
a57610c2c4 Remove trailing spaces at the end of lines. 2018-08-13 07:47:26 -06:00
Gregory Nutt
822291b6e1 apps/fsutils/mkfatfs: Add some comments. Clean up some coding style issues. 2018-07-22 08:48:38 -06:00
Gregory Nutt
d365707d68 Add definitions for the FAT boot record (FBR). 2018-07-22 08:38:06 -06:00
Gregory Nutt
6916fa028b fs/fat: Clean up some name BS_ and MBR_ refer to the same record and should use the same naming (MBR_). 2018-07-22 06:58:09 -06:00
Gregory Nutt
878fa8afd5 Squashed commit of the following:
cosmetic

    import/:  Add Makefile.symtab which can be used to compile the dynamically created symbol table C file.

    Add tools/mksymtab.sh
2018-07-15 11:21:53 -06:00
Dmitriy Linikov
2f2fb92ae3 Merged in hardlulz/modem-3.0-nuttx-apps/fix-sem-EINTR (pull request #133)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:37:32 +00:00
Gregory Nutt
35da4e7fd4 fsutils/mkfatfs: Remove more unused macros 2017-11-02 19:03:50 -06:00
Gregory Nutt
92a44978db fsutils/mkfatfs: Remove some unused macros 2017-11-02 19:02:04 -06:00
Gregory Nutt
782526aa21 apps/fsutils/mkfatfs: When fsutils/mkfats was split off from the operating system, there were a few dangling things left. Some references to functions in the OS (which are not available in the protected and kernel modes) and several types and function prototeypes that don't exist is apps/fsutils/mkfatfs. 2017-11-02 18:45:55 -06:00
Gregory Nutt
602261bacb apps/fsutils/mkfatfs: Add a file that was part of a previous commit (but I missed it). 2017-10-21 08:51:45 -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
928443e385 examples/ostest: sem_open() now returns SEM_FAILED in the event of a failure. 2017-09-08 10:15:46 -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
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
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
Sebastien Lorquet
2cbad44f1d This is the Pokemon patch to change all includes fronm <apps/bla/bla.h> to "bla/bla.h" 2016-07-11 10:11:18 -06:00
Gregory Nutt
586b0aa7e0 Change names of *dbg() * *err() 2016-06-11 15:51:27 -06:00
Gregory Nutt
344c92e2a4 Replace all occurrences of vdbg with vinfo 2016-06-11 11:55:38 -06:00
Sebastien Lorquet
7ca5478da3 Rearrange to eliminate Kmenu files 2016-06-09 08:59:16 -06:00
Sebastien Lorquet
e725f5e9e1 Another changed needed with last Kmenu-related changes 2016-06-06 09:42:29 -06:00
Sebastien Lorquet
880661a284 merge upstream 2016-06-06 11:25:29 +02:00
Gregory Nutt
d06b721ba2 Fix new dependencies for flash_eraseall 2016-06-03 09:11:22 -06:00
Gregory Nutt
2541a4cb13 apps/fsutils/flash_eraseall: Add MDIOC_BULKERASE IOCTL wrapper function 2016-06-03 07:58:54 -06:00
Sebastien Lorquet
a9aa753fa4 Recursive Kconfig autogeneration 2016-06-02 16:34:00 +02:00
Sebastien Lorquet
bfff5e7179 Add empty preconfig rules to 'leaf' makefiles 2016-06-02 16:24:30 +02:00
Sebastien Lorquet
bfff7dc4ca add kmenu files 2016-06-02 15:23:50 +02:00
Gregory Nutt
1decdb2afc Password file is not in base64, not hex 2016-01-21 16:26:44 -06:00
Gregory Nutt
64f484d71a Move include/inifile.h to include/fsutils/inifile.h 2016-01-20 18:45:03 -06:00
Gregory Nutt
27a55f36d6 Move system/inifile to fsutils/inifile 2016-01-20 17:10:55 -06:00
Gregory Nutt
29d65eb866 apps/fsutils/passwd: Fix a few more errors found in integration 2016-01-20 14:41:27 -06:00
Gregory Nutt
681bfa2605 NSH: Add logic for the case where the passwd file is read-only. ROMFS image needs to be marked as const, or it will end up in RAM. 2016-01-20 13:05:25 -06:00
Gregory Nutt
5aa177e03b apps/fsutils/passwd: Fix numerous errors found during testing 2016-01-20 09:36:07 -06:00
Gregory Nutt
8630130299 Remove dangle whitespace at the end of the line and some files with carriage returns in them 2016-01-19 19:22:45 -06:00
Gregory Nutt
c98e51a31d apps/fsutils/passwd: Add a password fila management library 2016-01-19 19:19:04 -06:00
Ken Pettit
ad48d89fe2 mksmartfs: Move into apps/fsutils from kernel, now uses only open and ioctl. Add configuration option to supported multiple root directories. From Ken Petit 2015-11-23 06:59:56 -06:00