summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dosfs/fat.c: Remove use of register keywordJoel Sherrill2014-02-031-1/+1
|
* IMFS: Improved support for generic nodesSebastian Huber2014-01-212-3/+3
| | | | | | | | | | | | | | | | The rtems_filesystem_location_info_t::node_access_2 was unused by the IMFS. Use it to hold the context of generic nodes. This makes it possible to use node handlers for objects with and without a corresponding file system node. For example network sockets created with socket() have only a file descriptor, but no corresponding file system node. The UNIX(4) domain sockets can be bound to file system nodes. In both cases the rtems_filesystem_location_info_t must provide a pointer to the socket structure used by the socket node handlers. With the context pointer (for sockets, this is the socket structure) in rtems_filesystem_location_info_t::node_access_2 the same node handlers can be used in both cases.
* IMFS: Allow sockets as generic nodesSebastian Huber2014-01-211-1/+2
|
* libcsupport: Accept NULL for zero-length entriesSebastian Huber2013-12-202-20/+28
|
* Filesystem: Use default kqfilter and poll handlerSebastian Huber2013-12-2015-0/+38
|
* Filesystem: Add readv/writev handlersSebastian Huber2013-12-2018-89/+249
| | | | | | | | | The readv() and writev() support was implemented in terms of multiple calls to the read and write handlers. This imposes a problem on device files which use an IO vector as single request entity. For example a low-level network device (e.g. BPF(4)) may use an IO vector to create one frame from multiple protocol layers each with its own IO vector entry.
* For PR 2164 - RFS File System - fix bitmap_create_search loop bugAlan Cudmore2013-12-191-1/+2
| | | | | | | | | | | | | | | | | This is for the RFS file system. There is a bug in the rtems_rfs_bitmap_create_search loop. It is supposed to iterate over the range of bits in a search element ( usually 32 bits ), so it should loop through bits 0 through 31. Instead it loops through 0 - 32, causing some blocks not to be allocated. As in PR 2163, this depends on the block size and number of blocks in a file system. Block sizes and group sizes that are powers of 2 seem to work fine ( 512 byte blocks, 4096 block groups, etc ). When the block sizes are not powers of 2, then this loop error causes some of the blocks at the end of a group to be skipped, preventing 100% of the blocks from being used. A simple test for this and PR2163 is to create a RAM disk with block size 3900 and at least 1 full group ( 31200 blocks ). A file system with these sizes will not be able to allocate 100% of the blocks.
* For PR 2162 - RFS File System - statvfs reports 1 block freeAlan Cudmore2013-12-192-2/+2
| | | | | | | | | This is for the RFS file system. The statvfs call reports 1 block free when the file system is full because it does not account for the superblock in its calculation of free blocks. This is a simple fix that adjusts the number of blocks reported to account for the superblock. We may want to wait for a more complete solution such as locating the superblock in each group.
* For PR 2163 - RFS File System - fix group search algorithm bugAlan Cudmore2013-12-191-1/+15
| | | | | | | | | This is for the RFS file system. There is a bug in the group search algorithm where it will skip groups, causing blocks to remain unallocated. This is dependant on the size of the blocks and number of blocks in a group, so it does not always show up. The fix corrects the skipping of groups during the search, allowing all of the blocks to be found.
* nfsclient: Move defines to cover all header filesSebastian Huber2013-12-161-2/+3
|
* JFFS2: Do not re-define struct iovecSebastian Huber2013-12-161-5/+1
|
* PR2160: imfs: Use ENOSYS for unsupported nodesSebastian Huber2013-12-114-7/+18
| | | | | Return an error status with errno set to ENOSYS during node creation for nodes not available in the current configuration.
* PR2138: rtems_rfs_rtems_initialize() can erroneously set errno.Chris Johns2013-12-101-1/+1
| | | | Patch from Nick for this. Thanks.
* PR2159: Have the FIFO driver read follow POSIX standard.Chris Johns2013-12-101-43/+41
| | | | | The read call was only returning once the requested buffer was full. The change returns any available data.
* libfs/imfs: Set the FIFO control block.Chris Johns2013-12-101-1/+1
| | | | The FIFO was incorrectly set to the default control block.
* statvfs filesystem handlers: Remove restrictJoel Sherrill2013-11-274-12/+12
|
* statvfs and ALL filesystem handlers: Add restrict keyword.Daniel Ramirez2013-11-217-18/+21
|
* Filesystem: Add kernel event filter handlerSebastian Huber2013-11-042-0/+39
| | | | | | This handler is necessary to implement the KQUEUE(2) system calls. Add <sys/event.h> from FreeBSD 8.4.
* Filesystem: Add poll() handlerSebastian Huber2013-11-042-0/+38
| | | | | | | This handler is necessary to implement the SELECT(2) and POLL(2) system calls. Add <sys/poll.h> from FreeBSD 8.4.
* Filesystem: Use ENOTTY for default ioctl() handlerSebastian Huber2013-10-311-1/+1
| | | | This is in line with Linux and FreeBSD.
* IMFS: Use IMFS_mtime_ctime_update()Sebastian Huber2013-10-272-4/+2
|
* dosfs: Ensure initially the sector size is used as bdbuf block sizeRalf Kirchner2013-10-181-0/+9
|
* RFS: Include missing header fileSebastian Huber2013-10-161-0/+1
|
* Return EINVAL in default ftruncate() handlerSebastian Huber2013-10-111-1/+1
| | | | | According to POSIX this case is implementation defined. Linux and FreeBSD return EINVAL.
* nfsclient/src/dirutils.c: Fix missing prototype warningsJoel Sherrill2013-09-221-0/+12
|
* JFFS2: Add RTEMS supportSebastian Huber2013-09-1919-2821/+1858
|
* JFFS2: Update Linux compatibility layerSebastian Huber2013-09-1925-66/+261
| | | | | Modify compatbility layer for RTEMS. Add support for Linux 3.11 based JFFS2.
* JFFS2: Import from eCosSebastian Huber2013-09-1938-0/+4843
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import of Linux compatibility layer and JFFS2 file system support from eCos. The files are imported from eCos CVS on 2013-09-16. cvs -d :pserver:anoncvs@ecos.sourceware.org:/cvs/ecos login cvs -z3 -d :pserver:anoncvs@ecos.sourceware.org:/cvs/ecos co -P ecos The files "ecos/packages/compat/linux/current/asm/atomic.h", "ecos/packages/compat/linux/current/asm/bug.h", "ecos/packages/compat/linux/current/asm/page.h", "ecos/packages/compat/linux/current/cyg/crc/crc.h", "ecos/packages/compat/linux/current/cyg/infra/cyg_type.h", "ecos/packages/compat/linux/current/linux/compiler.h", "ecos/packages/compat/linux/current/linux/completion.h", "ecos/packages/compat/linux/current/linux/config.h", "ecos/packages/compat/linux/current/linux/crc32.h", "ecos/packages/compat/linux/current/linux/errno.h", "ecos/packages/compat/linux/current/linux/fs.h", "ecos/packages/compat/linux/current/linux/kernel.h", "ecos/packages/compat/linux/current/linux/list.h", "ecos/packages/compat/linux/current/linux/mtd/compatmac.h", "ecos/packages/compat/linux/current/linux/mtd/mtd.h", "ecos/packages/compat/linux/current/linux/pagemap.h", "ecos/packages/compat/linux/current/linux/rbtree.h", "ecos/packages/compat/linux/current/linux/rwsem.h", "ecos/packages/compat/linux/current/linux/sched.h", "ecos/packages/compat/linux/current/linux/slab.h", "ecos/packages/compat/linux/current/linux/spinlock.h", "ecos/packages/compat/linux/current/linux/stat.h", "ecos/packages/compat/linux/current/linux/string.h", "ecos/packages/compat/linux/current/linux/timer.h", "ecos/packages/compat/linux/current/linux/types.h", "ecos/packages/compat/linux/current/linux/version.h", "ecos/packages/compat/linux/current/linux/vmalloc.h", "ecos/packages/compat/linux/current/linux/wait.h", "ecos/packages/compat/linux/current/linux/workqueue.h", and "ecos/packages/compat/linux/current/linux/zlib.h" "ecos/packages/compat/linux/current/linux/zutil.h" are copied to "cpukit/libfs/src/jffs2/include". The file "ecos/packages/services/crc/current/src/crc32.c" is copied to "cpukit/libfs/src/jffs2/src/compat-crc32.c". The file "ecos/packages/compat/linux/current/src/rbtree.c" is copied to "cpukit/libfs/src/jffs2/src/compat-rbtree.c". The file "ecos/packages/fs/jffs2/current/src/dir-ecos.c" is copied to "cpukit/libfs/src/jffs2/src/dir-rtems.c". The file "ecos/packages/fs/jffs2/current/src/flashio.c" is copied to "cpukit/libfs/src/jffs2/src/flashio.c". The file "ecos/packages/fs/jffs2/current/src/fs-ecos.c" is copied to "cpukit/libfs/src/jffs2/src/fs-rtems.c". The file "ecos/packages/fs/jffs2/current/src/malloc-ecos.c" is copied to "cpukit/libfs/src/jffs2/src/malloc-rtems.c". The file "ecos/packages/fs/jffs2/current/src/os-ecos.h" is copied to "cpukit/libfs/src/jffs2/src/os-rtems.h". The LICENSE file referenced in some files of this patch set is part of a previous patch set imported from Linux.
* JFFS2: Import from LinuxSebastian Huber2013-09-1924-0/+11350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import of Journalling Flash File System, Version 2 from Linux 3.11. This part of the Linux kernel is under a separate license which is similar to the RTEMS license. The file "cpukit/libfs/src/jffs2/include/linux/jffs2.h" is a copy of "linux-3.11/include/uapi/linux/jffs2.h". The file "LICENSE.JFFS2" is a copy of "linux-3.11/fs/jffs2/LICENCE". The files "linux-3.11/fs/jffs2/LICENCE", "linux-3.11/fs/jffs2/acl.h", "linux-3.11/fs/jffs2/build.c", "linux-3.11/fs/jffs2/compr.c", "linux-3.11/fs/jffs2/compr.h", "linux-3.11/fs/jffs2/compr_rtime.c", "linux-3.11/fs/jffs2/compr_rubin.c", "linux-3.11/fs/jffs2/compr_zlib.c", "linux-3.11/fs/jffs2/debug.c", "linux-3.11/fs/jffs2/debug.h", "linux-3.11/fs/jffs2/erase.c", "linux-3.11/fs/jffs2/gc.c", "linux-3.11/fs/jffs2/jffs2_fs_i.h", "linux-3.11/fs/jffs2/jffs2_fs_sb.h", "linux-3.11/fs/jffs2/nodelist.c", "linux-3.11/fs/jffs2/nodelist.h", "linux-3.11/fs/jffs2/nodemgmt.c", "linux-3.11/fs/jffs2/read.c", "linux-3.11/fs/jffs2/readinode.c", "linux-3.11/fs/jffs2/scan.c", "linux-3.11/fs/jffs2/summary.h", "linux-3.11/fs/jffs2/write.c", and "linux-3.11/fs/jffs2/xattr.h" are copied to "cpukit/libfs/src/jffs2/src".
* IMFS: Fix truncate according to POSIXSebastian Huber2013-09-131-3/+2
| | | | | | | | | | | | | | | | | ftruncate() and open() with O_TRUNC shall upon successful completion mark for update the st_ctime and st_mtime fields of the file. truncate() shall upon successful completion, if the file size is changed, mark for update the st_ctime and st_mtime fields of the file. The POSIX standard "The Open Group Base Specifications Issue 7", IEEE Std 1003.1, 2013 Edition says nothing about the behaviour of truncate() if the file size remains unchanged. Future directions of the standard may mandate the behaviour specified in ftruncate(): http://austingroupbugs.net/view.php?id=489
* IMFS: Use inline functions instead of macrosSebastian Huber2013-09-131-28/+36
|
* Filesystem: Add and use rtems_filesystem_chmod()Sebastian Huber2013-09-122-42/+2
| | | | Implement POSIX requirements in the high-level file system layer.
* dosfs: Correct handling of iconv() return valueRalf Kirchner2013-09-101-5/+16
|
* imfs: use safe string functionsGedare Bloom2013-09-051-3/+5
| | | | Replace strcpy and strcat with counted variants.
* imfs: check return value from mkdirGedare Bloom2013-09-051-1/+1
|
* dosfs: Eliminate empty case statements that fall through to default.Gedare Bloom2013-09-051-2/+0
| | | | | | | Also eliminates possibly dead code in case the name_type can never actually be MSDOS_NAME_INVALID. 1063860 Logically dead code.
* nfs: Fix ln option processing.Gedare Bloom2013-09-051-1/+1
| | | | | | If opts is NULL, then strchr() will dereference it and search for 's'. 1063863 Dereference after null check
* dosfs: Unsigned compared against 0Gedare Bloom2013-09-051-1/+1
| | | | Change the type for storing the return from iconv to be signed.
* dosfs: Unsigned compared against 0Gedare Bloom2013-09-051-1/+1
| | | | | Fix the type of "cmpltd" to be ssize_t so that assigning it to -1 will terminate processing as intended.
* dosfs: Unintentional integer overflowGedare Bloom2013-09-051-1/+1
| | | | Explicitly promote 32-bit integer to 64-bits for multiplication.
* IMFS: Resource leakGedare Bloom2013-09-051-0/+1
| | | | Free fs_info in case root_node is NULL.
* RFS: Use unprotected chain operationsSebastian Huber2013-08-272-12/+15
| | | | This area is protected by the RFS file system instance lock.
* Filesystem: Avoid usage of uninitialized variableSebastian Huber2013-08-231-2/+2
| | | | This is a cosmetic fix. There was no bug.
* dosfs: Use unprotected chain operationsSebastian Huber2013-08-212-4/+4
| | | | This area is protected by the FAT file system instance lock.
* Add "const void* data" parameter to rtems_rfs_rtems_initialize()'s ↵Nick Withers2013-08-091-1/+1
| | | | | | declaration, matching its definition See https://www.rtems.org/bugzilla/show_bug.cgi?id=2137
* PR766: Delete __RTEMS_VIOLATE_KERNEL_VISIBILITY__Sebastian Huber2013-08-081-6/+0
|
* Fix compiler warningsR. Diez2013-08-061-1/+1
|
* Return the amount of data written when an error occurs rather thanChris Johns2013-07-271-3/+9
| | | | | | the error. The change lets the mrfs_fsrdwr test pass.
* score: Create states implementation headerSebastian Huber2013-07-261-0/+1
| | | | | | Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
* Include missing <string.h>Sebastian Huber2013-07-2318-0/+21
|