Commit Graph

1023 Commits

Author SHA1 Message Date
Boris Astardzhiev
ae6b80f8b6 fs/fat: Avoid caculating the bogus directory entry address for the FAT root directory (since it has no directory entry). This change should have no effect, other than making the logic clearer. 2018-05-24 06:18:15 -06:00
Gregory Nutt
b3f20f8c5b fs/fat: In fs_stat(), when stat'ing the root directory, avoid calculating the address of the root directory entry. The calculation is bogus (but not harmful) because the root directory does not have a directory entry. Noted by Boris Astardzhiev. 2018-05-23 08:14:22 -06:00
Michael Jung
800da58e6c fs/nfs/rpc_clnt.c: Commit 091e3f7 broke the NFS client. sendto() can (correctly) no lnoger by used with a connected UDP socket. In that case, send() must be used instead. 2018-05-02 13:53:51 -06:00
Gregory Nutt
f5d0fc7447 fs/vfs and net/udp: Repartition logic of commit 0c963449d6, moving into net/udp. Add support to handle connected UDP sockets. The correct 'optimal blksize' to return is the MSS. The MTU is always too big. 2018-04-27 08:36:25 -06:00
Pelle Windestam
0c963449d6 fs/vfs: Added support for checking if a descriptor is a socket in fstat(). 2018-04-26 06:49:13 -06:00
Michał Łyszczek
94b4a86aa6 fs/vfs: Fix negative errno set in fs_open.c 2018-04-20 17:05:42 -06:00
Michał Łyszczek
8de51543a4 Fix a few compilation errors. 2018-04-20 15:55:16 -06:00
Michał Łyszczek
1d8fd9e034 fs/mount: Fix wrong size reported by df -h. Reason is that size in bytes is calculated always on uint32_t types and cards bigger than 4GB will overflow uint32_t type. Solution is to use uint64_t where possible. 2018-04-14 15:15:59 -06:00
Michał Łyszczek
ee6264df4e fs/smartfs: Fix a hardfault in SmartFS. Problem occurred when opening a file with O_CREAT (only) when the file arelready exists but has a size of zero. 2018-04-14 06:44:38 -06:00
Gregory Nutt
db3b507a41 tools/gencromfs.c: Was duplicating all mode bits in source directory in CROMFS directory. Some make no sense. In particular, all write-able bits are cleard unconditionally. Executable bits are still copying because there is really no way for the tool to know if the file is executable or not. 2018-03-24 15:05:22 -06:00
Gregory Nutt
67e0603b5a fs/cromfs: Block length only needs to be uint16_t, not uint32_t. Add pading to node structure to assue that alignment is the same on all platforms. tools/gencromfs.c: Fix the target offset of the '.' hard link. 2018-03-24 14:44:38 -06:00
Gregory Nutt
8b4b61f140 fs/cromfs: Fix a error in reading partial compressed blocks. The LZF decompressor does not support that operation. Instead we have to decompress full block into a temporary buffer and copy out the parts that we need. To compensate for the performance hit, a caching mechanism was added so that we do not have to read the same block repeatedly. Unrelated: Also updates some README files. 2018-03-24 11:30:35 -06:00
Gregory Nutt
012cd8a07a fs/cromfs: Yet another update to the README file. 2018-03-22 13:35:27 -06:00
Gregory Nutt
1d72f7afea fs/cromfs: Update README 2018-03-22 08:41:59 -06:00
Gregory Nutt
3b3ca1373c fs/cromfs: Update README 2018-03-22 08:11:28 -06:00
Gregory Nutt
e6cecb5a58 fs/cromfs: Add a README file. 2018-03-22 07:44:37 -06:00
Gregory Nutt
3ec02adee0 tools/genromfs.c: Improve check for empty directories. If the directory contains only unsupported, special files, then it is still empty. Fix some collection of statistics that was cause statfs() to return some incorrect values. Add logic to handle the case where the host and the target differ in endian-ness. fs/procfs: In show mountpoints, add support so that the CROMFS file system type is recognized. 2018-03-21 08:40:02 -06:00
Gregory Nutt
448fc7a6f2 fs/cromfs: Remove CONFIG_EXPERIMINTAL dependency. 2018-03-20 20:04:29 -06:00
Gregory Nutt
f2b72c344b fs/cromfs: Fix a loop condition that was causing errors on large files 2018-03-20 19:49:42 -06:00
Gregory Nutt
16d0a8c2d1 fs/cromfs: More directory traversal fixes. tools/gencromfs.c: Add ability use a callback with directory traversal. Not currently used but left in place in case it is needed in the future. 2018-03-20 16:20:31 -06:00
Gregory Nutt
aeeee54921 tools/gencromfs.c and fs/cromfs: More corrections to directory traversal logic. Still some bugs. 2018-03-20 14:30:05 -06:00
Gregory Nutt
22484386ee fs/cromfs and tools/gencromfs: Various fixes for traversal relative file paths. Biggest changes is in types used: Cannot use size_t or mode_t in common structures because they have different sizes on the (64-bit) host and the (32-bit) target. Use uint32_t instead of size_t for offsets. Use uint16_t instead of mode_t. 2018-03-20 12:37:01 -06:00
Gregory Nutt
87fd4e2916 fs/cromfs: Fix read logic. tools/genromfs.c: Last node in directory needs to have zero for peer offset. Still some issues with empty directories. 2018-03-20 10:37:42 -06:00
Gregory Nutt
eec44d1f01 This commit adds tools/gencromfs.c, a tool that can be used to generate CROMFS file system images.
Squashed commit of the following:

    tools/gencromfs.c:  Seems basically functional but has not has not yet been integrated with CROMFS.
    tools/gencromfs.c:  Revist previous commit.  Let's make no assumptions about the compatibility of the host system and NuttX.
    tools/gencromfs.c:  I think access mode bits are sufficiently standard that we can just copy them from the host.  This is don't mostly to pick up the executable bits and other conbinations of bits without doing a bit-for-bit decode.
    tools/gencromfs.c:  Code complete but only partially functional.
    tools/gencromfs.c:  type definitions must precede data definitions
    tools/gencromfs.c:  Adds a little more logic to gencromfs tools.  Still not complete but can traverse directories and generate directory and hard-link nodes.
    tools/gencromfs.c: Beginning of a genromfs tool that will eventually be used for generation of CROMFS file system images.
2018-03-20 07:31:13 -06:00
Gregory Nutt
0478b5bce4 Addes CROMFS prototype. CROMFS is a commpressed, in-memory read-only file system based on LZF.
Squashed commit of the following:

    fs/cromfs:  Now depends on EXPERIMENTAL because it is not yet verified.
    fs/cromfs:  This commit brings the CROMFS file system to code complete.  Still completely untested.  Next steps:  Need a tool to generate CROMFS file system images and a test case under apps/
    fs/cromfs:  Add logic to traverse the in-memory file system nodes.
    fs/cromfs:  Add initial support for an in-memory, compressed, read-only file system.
2018-03-19 07:08:40 -06:00
Dmitriy Linikov
f0ad45ee27 fs/mmap: Fixed compiler warning about access to uninitialized variable in rammap(...) 2018-03-15 14:44:34 -06:00
Gregory Nutt
b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -06:00
Gregory Nutt
b4f2b0dfc6 Remove all usage of printf() from the OS. That is not an acceptable context for the use of an application-oriented interface that depends on a task-specific file descriptor and C buffered I/O. 2018-03-03 15:20:21 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Gregory Nutt
885ab75045 drivers/lcd: Add support for creating display lists incrementally. 2018-02-17 14:48:18 -06:00
Gregory Nutt
1567b82429 Make sure that labeling is used consistently in all function headers (part 2). 2018-02-01 12:03:55 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
da50646bcf sched/wdog: wd_start() is an internal OS function and should not set the errno value. Reviewed and updated every call to wd_start() to verify if return value is used and if so if the errno value is accessed. 2018-01-31 10:09:14 -06:00
Gregory Nutt
a959d7fefa fs/aio: Fix one additional place where the errno variable is being accessed inappropriately. 2018-01-31 09:19:19 -06:00
Gregory Nutt
170a50c690 Squashed commit of the following:
sched/sched:  Correct some build issues introduced by last set of changes.
    sched/sched:  Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value.  All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
    sched/sched:  Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value.  Also renamed to nxsched_reprioritize() and sched_setpriority().
    sched/sched:  Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value.  All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
    sched/sched:  Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value.  All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
    sched/sched:  Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues).  All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
2018-01-30 11:08:18 -06:00
Juha Niskanen
83a87e08e8 fs/userfs: use correct req type in userfs_truncate, remove use of undeclared buf 2018-01-22 07:14:54 -06:00
DL
7d1f133774 Fixed misprint in smartfs_utils.c 2018-01-17 15:57:06 +03:00
Jussi Kivilinna
bb7703dc8c fs/smartfs: Fix inverted ifdef for CONFIG_SMARTFS_USE_SECTOR_BUFFER in smartfs_extendfile() 2018-01-16 07:17:35 -06:00
Gregory Nutt
0080225473 sched/irq: Add a configuration option to show interrupt information via a procfs file. 2018-01-12 18:26:46 -06:00
Gregory Nutt
335d1e0030 fs/procfs: Fix an error in a common function that manages read data. 2018-01-12 18:26:45 -06:00
Gregory Nutt
ed18e427f3 Squashed commit of the following:
configs/flipnclick-sam3x:  Add support for the 4 user-controllable LEDs on the board.
    configs/flipnclick-sam3x:  Add board support for the Mikroe Flip&Click SAM3X.
    configs/arduino-due:  Update this old configuration so that it is structured a little more like recent board support.
2018-01-06 17:06:50 -06:00
Gregory Nutt
0253c974b2 Squashed commit of the following:
fs/nxffs:  Giving up on truncate() support in NXFFS for now.  There is too much that has to be done to make that work.
    configs/sim:  Add support for testing NXFFS.
2018-01-06 13:32:32 -06:00
Gregory Nutt
17cedb6b20 Squashed commit of the following:
fs/smartfs:  Add logic needed to ftruncate to shrink a file to any arbitrary size.
    fs/smartfs:  Repartition some functionality to better fit in new ftruncate features.
2018-01-06 10:43:18 -06:00
Aleksandr Vyhovanec
8b97ea95c7 Merged in AVyhovanec/nuttx (pull request #564)
FAT. Effectively handles the situation when a new file position is within the current sector.

* Find begin of the next token

* EOL

* revert

* Accelerates the work of the FS with a multitude of operations to write small pieces of data within the current sector.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-01-05 20:52:53 +00:00
Gregory Nutt
49775ea801 fs/fat: Fix a bug in the FAT ftruncate logic. 2018-01-05 11:56:39 -06:00
Gregory Nutt
376e30dab4 net/route: Fix a couple of compile-related issues that have crept in sense the last time the file-based routing table was used. 2018-01-05 08:57:22 -06:00
Gregory Nutt
fb73006a4b These changes implemnt FAT file shrinkage as needed to fully support ftruncate().
Squashed commit of the following:

    fs/fat:  Resolves issues with truncating the cluster chain when shrinking files via ftruncate().
    fs/fat:  First cut at implementation file shrinkage logic needed to support ftruncate().  Certainly shrinks the file size but it does not appear to correctly disconnect the cluster chains.
    fs/fat:  Restructure some functions in files to better support forthcoming file shrinkage logic.  Put framework for file shrinkage in place.  That logic is incomplete on initial commit.
2018-01-04 19:08:43 -06:00
Gregory Nutt
5d1a91fd8e configs/lpcxpresso-lpc5428/fb: Should disable pixel depths that are not being used. 2018-01-04 16:40:31 -06:00
Gregory Nutt
42701f99fa fs/nxffs: truncate method is implementated in a separate file and should have been in a previous commit. 2018-01-04 11:01:23 -06:00
Gregory Nutt
39fe6a0dff Squashed commit of the following:
fs/nxffs:  Add partial implementation of the truncate method:  It extend files, but cannot yet shrink them.
    fs/smartfs:  Add partial implementation of the truncate method:  It extend files, but cannot yet shrink them.
    fs/fat:  Add partial implementation of the truncate method:  It extend files, but no yet shrink them.
    fs/nfs:  Add support for the truncate method to the NFS file system.
2018-01-04 10:54:54 -06:00