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
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
Gregory Nutt
e4652bd3dc
Squashed commit of the following:
...
fs: Add truncate() support for userfs
fs/unionfs: Add truncate() support to the unionfs
fs/tmpfs: Add ftruncate() support to tmpfs
syscall/: Add system call support for ftruncate()
net/route: Adding ftruncate() support eliminates an issue in file-based routing table management.
fs: Add basic framework to support truncate() and ftruncate(). The infrastructure is complete. Now, however, the actual implementation of ftruncate() will have to be done for each file system.
2018-01-03 16:03:56 -06:00
Gregory Nutt
91f48701ae
arch/arm/src/sam34: Fix some compile warnings that I introduced with a possibly overzealous recent change.
2017-12-17 17:43:20 -06:00
Gregory Nutt
8057af6724
fs/fat: Still trying to eliminate warnings in all configurations.
2017-12-17 17:10:37 -06:00
Gregory Nutt
cf8a7bebf6
Eliminate another warning.
2017-12-17 16:47:49 -06:00
Gregory Nutt
f96478bb99
fs/fat: Don't warn about the CONFIG_FAT_MAXFNAME being too large if long file name support is not implemented.
2017-12-17 16:41:26 -06:00
Gregory Nutt
9638f3f065
fs/fat: CONFIG_FAT_MAXFNAME may not exceed NAME_MAX (CONFIG_NAME_MAX)
2017-12-15 06:19:14 -06:00
Gregory Nutt
9b31a81b00
Squashed commit of the following:
...
fs/fat: Remove mkfatfs from the OS. This is a user-space application and belongs in apps, not in the OS.
2017-10-20 12:36:25 -06:00
Jussi Kivilinna
d02c0c05ae
FS FAT: Fix hard-fault when listing contents of FAT root
2017-10-13 07:54:40 -06:00
Gregory Nutt
9568600ab1
Squashed commit of the following:
...
This commit backs out most of commit b4747286b1
. That change was added because sem_wait() would sometimes cause cancellation points inappropriated. But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.
In the OS, all calls to sem_wait() changed to nxsem_wait(). nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.
In all OS functions (not libraries), change sem_wait() to nxsem_wait(). This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.
sched/semaphore: Add the function nxsem_wait(). This is a new internal OS interface. It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615
Squashed commit of the following:
...
sched/semaphore: Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable. Changed all references to sem_post in the OS to nxsem_post().
sched/semaphore: Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable. Changed all references to sem_destroy() in the OS to nxsem_destroy().
libc/semaphore and sched/semaphore: Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable. Changed all references to sem_setprotocol in the OS to nxsem_setprotocol(). sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552
Squashed commit of the following:
...
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Masayuki Ishikawa
99bdab3ac3
FAT: Fix 'Missing unlock' in fs_fat32.c
...
Jira: PDFW15IS-265
Coverity-ID: 10590 10589
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-22 14:44:24 +09:00
Gregory Nutt
40f8e8b41f
Fix some backward DEBUGASSERT tests in ROMFS and FAT.
2017-02-13 14:06:39 -06:00
Gregory Nutt
34f1b333b1
FAT: Fix some errors that I introduced in my review of Alan's patch. My screw-up, not Alan's. Sorry.
2017-02-13 12:43:35 -06:00
Alan Carvalho de Assis
a73651c8ca
fstat: Add fstat() support to FAT.
2017-02-13 12:21:06 -06:00
Gregory Nutt
7d91fabf01
fstat: Add skeleton implmentations of fstat() in all file systems.
2017-02-12 13:42:27 -06:00
Gregory Nutt
bd7d3a92f5
Add logic to VFS rename: If target of rename exists and is a directory, then the source file should be moved 'under' the target directory. POSIX also requires that if the target is a file, then that old file must be deleted.
2017-02-11 11:18:30 -06:00
Gregory Nutt
45fd98da88
Add macros support that will eventually allow dynamic allocation of strings need to support soft links.
2017-02-05 14:25:45 -06:00
Gregory Nutt
8f2c7198ed
inode_find: Now takes struct inode_desc_s type as input. This was necessary before that structure includes some data storage. It was used within inode_find(), but that means that the life of the data was the life of inode_find(). That data must persist longer. It is now provided by the caller so that the life of the data persists for the entire life of the caller.
2017-02-05 09:51:42 -06:00
Gregory Nutt
0c9935f8ac
FS: Remove inode_find_nofollow. Instead provide a bool nofollow argument to inode_find.
2017-02-04 11:46:54 -06:00
Gregory Nutt
610afe9cd9
FAT performance improvement. In large files, seeking to a position fromt he beginning of the file can be very time consuming. ftell does lssek(fd, 0, SET_CURR). In that case, that is wasted time since we are going to seek to the same position. This fix short-circutes fat_seek() in all cases where we attempt to seek to curren position. Suggested by Nate Weibley
2016-08-03 13:32:52 -06:00
Gregory Nutt
ad2f7b0119
fs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
2016-06-11 17:14:02 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
9008308b64
Remove some block comments before empty code sections
2016-04-11 18:16:04 -06:00
Gregory Nutt
b6f5ffa9a8
CDC/AC: too man right parentheses if IFLOW_CONTROL enabled
2016-02-24 11:54:02 -06:00
Gregory Nutt
0682671ffe
Update Kconfig help comments
2016-02-23 06:38:51 -06:00
Gregory Nutt
c620b321b1
FAT: Add a new configuration option to decouple the logic that retries the direct transfer from the logic that enables DMA memory allocators.
2016-02-22 18:25:58 -06:00
Gregory Nutt
7c44444883
FAT: Add an option to force all transfers to be performed indirectly through the FAT file system's internal sector buffers
2016-02-22 16:26:04 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Gregory Nutt
658272bbbf
FAT: Fix some duplicate definition warnings when big-endian is enabled
2015-12-26 14:49:40 -06:00
Gregory Nutt
11afff74dc
Kconfig change for improved usability
2015-11-29 12:13:24 -06:00
Gregory Nutt
c70987e551
nuttx/fs: Fix some spacing and alignment issues
2015-10-11 11:39:29 -06:00
Gregory Nutt
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
3d6161a7aa
Update some comments
2015-04-13 07:39:56 -06:00
Gregory Nutt
1a3c6f7ec9
FAT: Fix misthink when CONFIG_ENDIAN_BIG=y. From Lwazi Dube
2015-04-12 14:24:05 -06:00
Gregory Nutt
ddb8073ad5
Update TODO list and some comments
2015-03-16 08:49:39 -06:00
Gregory Nutt
f60f22258a
Trivial update to FAT, comments, README
2015-03-15 15:06:17 -06:00
Gregory Nutt
b637a0cc3e
Costmetic changes name while debugging a filename issue
2015-03-15 12:22:12 -06:00
Gregory Nutt
7adc1b96c9
FAT cosmetic changes
2015-03-15 08:41:42 -06:00
Gregory Nutt
9f7f258728
Add support for umount2(target, MNT_FORCE) in the FAT file system.
2015-03-15 07:45:19 -06:00
Gregory Nutt
43936a6a69
Remove an UNSED that is no longer necessary
2015-03-14 18:41:26 -06:00
Gregory Nutt
2be14d09a2
Fix a bug in the FAT unbind() logic. There were problems with the way certain internal list handling was implemented. The end result is that newly opened or cloned file structures were never being added to the list of open files. So when the unmount() happens, it always looked like there were not open files and a crash could ensue.
2015-03-14 17:33:48 -06:00
Gregory Nutt
8055ba4d03
Pass the umount2() flags to every unbind() implementation. That is where the the decision to umount or not will be made.
2015-03-14 17:22:02 -06:00
Gregory Nutt
d36d7a959d
FAT: fat_unbind() was accessing 'fs->fs_sem' after freeing the 'fs' struct. From Juha Niskanen.
2015-03-11 13:11:50 -06:00
Gregory Nutt
60bdc27d25
Fix a couple of typos in recent commit. Found by David Sidrane
2015-02-17 19:21:07 -06:00
Gregory Nutt
b3dd424e10
mkfatfs: use DMA memory for mkfatfs when needed
...
this makes mkfatfs use fat_dma_alloc() when CONFIG_FAT_DMAMEMORY is
set. This is needed to ensure mkfatfs operates with boards that use
DMA for microSD
From Andrew Tridgell via the PX4/NuttX repository
2015-02-17 16:57:15 -06:00
Gregory Nutt
9ac09db800
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
2014-11-25 13:46:14 -06:00
Gregory Nutt
ae90309b36
Move fs/fs.h to fs/inode/inode.h and some to fs/driver/driver.h
2014-09-29 07:14:38 -06:00
Gregory Nutt
650a0d0615
Completes VFS-based named semaphore implemetation. Still a little buggy
2014-09-28 15:58:56 -06:00
Gregory Nutt
d038133501
Rename fs/fs_internal.h to fs/fs.h
2014-09-28 09:13:56 -06:00
Gregory Nutt
31a908ea3a
Cosmetic changes to comments/spacing
2014-09-08 08:57:25 -06:00
Gregory Nutt
205260d5e2
Reanem kzalloc to kmm_zalloc for consistency
2014-08-31 17:34:44 -06:00
Gregory Nutt
1780810d3d
Rename kmalloc to kmm_malloc for consistency
2014-08-31 17:26:36 -06:00
Gregory Nutt
54fa3b0b59
Rename kfree to kmm_free for consistency with other naming conventions
2014-08-31 17:04:02 -06:00
Gregory Nutt
220216cc38
nuttx/fs: Remove explicity references to errno. That is a problem from within the kernel for certain configurations
2014-08-28 16:58:43 -06:00
Gregory Nutt
f8024cf409
More trailing whilespace removal
2014-04-13 16:22:22 -06:00
Gregory Nutt
4f6d6a6aa2
Fix a FAT file corruption problem. From Andrew Tridgell
2014-03-04 11:34:54 -06:00
Gregory Nutt
91b002a043
Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced
2014-02-10 18:08:49 -06:00
Gregory Nutt
c9cb7972fb
FAT: Fix some root directory logic that was conditionally done only for FAT32. Apparently this needs to be done for all FAT types. From Tridge via Lorenz Meier
2014-01-14 18:24:21 -06:00
Gregory Nutt
85e7e13bb0
Fix a FAT cluster allocation bug. From Tridge
2014-01-14 13:45:26 -06:00
Gregory Nutt
d6b81cc7ef
A10: Timer interrupt handler
2013-12-13 12:42:26 -06:00
Gregory Nutt
40e0253189
mkfatfs: Fix an error in logic that determines if FAT16 is possible
2013-12-05 18:17:22 -06:00
Gregory Nutt
f1671bb6a7
Alloc CONFIG_FS_READABLE/WRITABLE to be defined in Kconfig files while preserving backward compatibility with legacy configurations (for the time being)
2013-11-15 09:49:27 -06:00
Gregory Nutt
af4c5246b0
FAT: Fix error return value. In one failure case, success was being returned
2013-11-01 11:49:13 -06:00
Gregory Nutt
f479f5d698
Enhanced the FAT32 filesystem code to understand DMA preflight failures, and to use the file sector buffer as a bounce buffer when a user-supplied buffer is not suitable for DMA. From Mike Smith
2013-10-18 08:38:44 -06:00
Gregory Nutt
bc46b447dc
Fix all occurrences of "the the" in documentation and comments
2013-08-27 09:40:19 -06:00
Gregory Nutt
d60e9e14f6
Remove some pre-processor warnings that I am more than tired of seeing
2013-08-10 09:18:57 -06:00
Gregory Nutt
619cd66f33
Fix some cache-related issues with the SAMA5 DMA driver
2013-08-09 15:25:13 -06:00
Gregory Nutt
f9b9875952
Various Kconfig files still have references to CONFIG_ variables. Some in harmless comments, some in config definionts which is not harmless. All removed
2013-04-25 15:52:00 -06:00
Gregory Nutt
c23ad7963f
Fixes to strchr, mkfats, and NxWidgets from Petteri Aimonen
2013-04-22 08:01:43 -06:00
Gregory Nutt
2848f657ed
Fix comments, references to the old SVN, and links to the old SVN. Replace with equivalent GIT info
2013-04-19 18:35:06 -06:00
patacongo
bc247a45a0
FAT fixes for extending directory entries with long file names. From RonenV
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5802 42af7a65-404d-4744-a932-0658087f49c3
2013-03-31 13:06:22 +00:00
patacongo
3bf2c1b355
Change prototypes of up_create_stack and up_release_stack to include a task type parameter
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5765 42af7a65-404d-4744-a932-0658087f49c3
2013-03-20 18:22:21 +00:00
patacongo
d5d9fa89ab
Fix a FAT error when trying to create file in a non-existent directory. Reported by Andrew Tridgell.
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5764 42af7a65-404d-4744-a932-0658087f49c3
2013-03-20 15:26:50 +00:00
patacongo
1c52dce216
More changes for a kernel-mode allocator (more to be done)
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5724 42af7a65-404d-4744-a932-0658087f49c3
2013-03-09 21:12:20 +00:00
patacongo
9ee24b19de
LPC1788 updates -- OS test configuration now works
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5704 42af7a65-404d-4744-a932-0658087f49c3
2013-03-04 18:00:07 +00:00
patacongo
30a0cdf33e
Correct a memory leak in NSH
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5600 42af7a65-404d-4744-a932-0658087f49c3
2013-02-02 23:56:54 +00:00
patacongo
329328e5df
New interface task_spawn(); exec_builtin() now uses task_spawn(); All argv types should be char * const * not const char **
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5598 42af7a65-404d-4744-a932-0658087f49c3
2013-02-02 19:31:30 +00:00
patacongo
4587760eee
Additional patches from Petteri Aimonen for FAT, STM32 SPI, and AT25
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5593 42af7a65-404d-4744-a932-0658087f49c3
2013-02-01 15:32:39 +00:00
patacongo
a1045c27e7
apps/builtin/binfs.c moved to nuttx/fs/binfs/fs_binfs.c
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5523 42af7a65-404d-4744-a932-0658087f49c3
2013-01-16 15:41:27 +00:00
patacongo
fd1189a6fe
Implement redirection of output from NSH builtin commands to a file in a mounted volume
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5521 42af7a65-404d-4744-a932-0658087f49c3
2013-01-15 21:01:37 +00:00
patacongo
5a2eda210b
Finish dup logic for open files; fix bug in sigtimedwait(), would return wrong signo value if the signal was already pending
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5517 42af7a65-404d-4744-a932-0658087f49c3
2013-01-14 19:22:32 +00:00
patacongo
555e3fe1f5
Add support for dup2'ing files. Infrastructure and ROMFS done. Still need FAT, BINFS, NXFFS, and NFS
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5516 42af7a65-404d-4744-a932-0658087f49c3
2013-01-14 15:42:03 +00:00
patacongo
7a9457bb07
Email address change in nuttx/
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5145 42af7a65-404d-4744-a932-0658087f49c3
2012-09-13 18:32:24 +00:00
patacongo
a30e2f4a27
Add beginning of a simple granule allocator to support DMA IO buffer allocation
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5129 42af7a65-404d-4744-a932-0658087f49c3
2012-09-11 18:22:27 +00:00
patacongo
870b6511ea
Add support for DMA memory allocator to FAT file system
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5127 42af7a65-404d-4744-a932-0658087f49c3
2012-09-11 13:53:44 +00:00
patacongo
a93d7eb69e
Shenzhou board is first to use ONLY Kconfig for configuration
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5114 42af7a65-404d-4744-a932-0658087f49c3
2012-09-08 13:56:21 +00:00
patacongo
9224a95952
Important FAT fix. Bad test would cause many un-necessary writes to FLASH.
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5102 42af7a65-404d-4744-a932-0658087f49c3
2012-09-06 14:46:08 +00:00
patacongo
8e9e6b1103
Fix max filename size report by FAT statfs with long file names; Add missing logic to support fieldwidth and justification for %s format; Add extended help options. Default help command just shows a short list of commands. Verbose and single command help options
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5008 42af7a65-404d-4744-a932-0658087f49c3
2012-08-04 22:00:18 +00:00
patacongo
a65d283e96
Fix some warnings and fix some simulator builds
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4688 42af7a65-404d-4744-a932-0658087f49c3
2012-05-02 15:36:19 +00:00