summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update company nameSebastian Huber2023-05-201-1/+1
| | | | | The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
* rtems-rfs-dir-hash.c: Add file headers and licensesRyan Long2022-05-041-0/+27
| | | | | This file had no header, copyright, or license. Based on git history, added appropriate copyright and license.
* cpukit/libfs/src/rfs: Change license to BSD-2Joel Sherrill2022-03-2221-63/+462
| | | | Updates #3053.
* Change filesystem utime_h handler to utimens_hRyan Long2021-05-281-9/+7
| | | | | | | Also updated licenses. Closes #4400 Updates #3899
* libfs/rfs: Check search bit map end on last bitChris Johns2020-10-171-2/+15
| | | | | | | - Do not write past the last location of the search bit map whe nit is being created. Closes #4148
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-2821-21/+42
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-1621-22/+22
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* Fix format warnings due to ino_t changesSebastian Huber2019-01-101-1/+2
|
* 5 spelling errors for a Google Code-In task.Jacob Shin2018-12-021-1/+1
| | | | Username: deuteriumoxide Email: jacobshin313@gmail.com
* rfs: Remove erroneous call of rtems_disk_release()Sebastian Huber2018-08-071-1/+0
| | | | | | | The function rtems_rfs_buffer_sync() erroneously calls rtems_disk_release(). This screws up the reference counting of the disk. Close #3484.
* Fill in the correct d_off in rtems_rfs_dir_read.Fan Deng2018-04-111-1/+1
| | | | | | | | | | | | | | | | | | rtems_rfs_dir_read searches the directory inode's entries list starting at the specified offset until an empty entry (last entry) is encountered. It fills in a struct dirent with the name of the entry, length of the name, ino of the entry, and the absolute offset of the entry in the parent directory's entries list. Unfortunately, the stock implementation of rtems_rfs_dir_read returns a somewhat arbitrary offset (as dirent::d_off), while rtems_rfs_dir_lookup_ino always returns the correct offset. This change fixes that logic so the returned offset is accurate. Tested by comparing the offset returned in dirent with the result of rtems_rfs_dir_lookup_ino.
* Fixes bitmap allocation accounting logic in rtems-rfs-bitmaps.cFan Deng2018-04-111-18/+47
| | | | | | | | | | | | | | | | | | | | The bitmap allocation accounting logic in rtems-rfs-bitmaps.c is flawed around control->free. Specifically: In rtems_rfs_bitmap_map_set(): control->free is only decremented when its corresponding search bit is toggled. This is wrong and will miss on average 31/32 set updates. In rtems_rfs_bitmap_map_clear(): control->free is incremented unconditionally. The correct behavior is: When updating the map, check if the bit is already set/clear. Only update control->free when the bit is toggled. This change enforced the correct behavior. Tested by inspecting the internal data structure.
* Reset free count properly in rtems_rfs_bitmap_map_clear_all().Fan Deng2018-04-111-1/+1
| | | | | | | | In rtems_rfs_bitmap_map_clear_all(), control->free is set to 'elements', which is the number of elements in the bitmap. This is incorrect, as control->free should contain the number of free bits, not elements. This change fixes the logic and resets control->free to a correct value.
* Make bit addressing consistent in rtems_rfs_group.cFan Deng2018-04-111-1/+12
| | | | | | | | | | | | | This change fixes https://devel.rtems.org/ticket/3089. Briefly, rtems_rfs_group.c contains conflicting conversions between block numbers and group number and bit offset pairs. This caused the actual bit stored on the bitmask to be one bit displaced from its intended location. For more details, please see the associated ticket. Tested by inspecting the written bitmasks with and without this change.
* RFS: Use self-contained recursive mutexSebastian Huber2018-02-021-29/+2
| | | | Update #2843.
* Remove make preinstallChris Johns2018-01-2518-3844/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* rfs: Fix format warningSebastian Huber2018-01-231-1/+1
| | | | Update #3082.
* rfs: Fix for 64-bit targetsSebastian Huber2018-01-222-2/+2
| | | | | | | The RTEMS_BLKIO_SETBLKSIZE IO control expects an uint32_t parameter and not a size_t which is 64-bits on 64-bit targets. Update #3082.
* RFS: Include <rtems/rtems-rfs-shell.h>Sebastian Huber2017-12-131-1/+1
| | | | | | Prepare for header file move to common include directory. Update #3254.
* libio: Add rtems_libio_iop_is_append()Sebastian Huber2017-09-151-1/+1
| | | | Update #3132.
* posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel2017-07-144-0/+4
| | | | | | | | | | | Added a mmap file handler to struct _rtems_filesystem_file_handlers_r. Updated each file handler object to support the default mmap handler. Updated mmap() to call the mmap handler for MAP_SHARED. Added a mmap file handler for shm Added support for MAP_ANON in mmap(). Updates #2859
* rtems/inttypes.h: New file. Uses contents from cpukitJoel Sherrill2017-04-183-23/+3
| | | | | | | | Provide extentions to <inttpes.h> PRIxxx constants for more POSIX types. Start with existing definitions found in RTEMS Project owned code in cpukit/. updates #2983.
* libblock: Drop superfluous <stdlib.h> includeSebastian Huber2016-04-073-0/+3
| | | | | | Drop superfluous <stdlib.h> include from <rtems/diskdevs.h> since this leads to conflicts with the latest Newlib in case this header file is used in the FreeBSD kernel space, e.g. for USB mass storage support.
* Filesystem: Remove superfluous permission checksSebastian Huber2016-01-051-17/+0
| | | | The permission is check by the upper layer.
* RFS: Fix resource leakSebastian Huber2015-10-261-0/+2
| | | | Close #2433.
* cpukit/libdl/rtl-obj-comp.c: Use correct printf() specificationJoel Sherrill2015-03-171-2/+2
|
* rfs: cast minor to uintptr_t to truncate explicitlyGedare Bloom2015-03-161-2/+2
|
* Filesystem: Delete unused fsmountme_h handlerSebastian Huber2015-02-091-1/+0
|
* Filesystem: Delete node type operationSebastian Huber2015-01-221-61/+2
| | | | Use the fstat handler instead.
* Correct error return mismatchesNick Withers2014-12-234-22/+48
| | | | Closes #2139
* rtems-rfs-rtems.c: Add cast to address warningJoel Sherrill2014-11-251-1/+1
|
* rfs: explicitly cast to dev_tGedare Bloom2014-10-161-1/+1
|
* Revert: rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate ↵Joel Sherrill2014-09-161-2/+3
| | | | | | warnings This may actually be a problem in inttypes.h.
* rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate warningsJoel Sherrill2014-09-041-3/+2
|
* libfs: Fix the warning in the RFS.Chris Johns2014-09-031-1/+6
| | | | Return the first error if one or more happen when deleting an inode.
* libfs/rfs: Fix the fstime failures for the RFS file system.Chris Johns2014-04-252-12/+22
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-2139-39/+39
|
* Filesystem: Use default kqfilter and poll handlerSebastian Huber2013-12-204-0/+8
|
* Filesystem: Add readv/writev handlersSebastian Huber2013-12-204-4/+12
| | | | | | | | | 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.
* PR2138: rtems_rfs_rtems_initialize() can erroneously set errno.Chris Johns2013-12-101-1/+1
| | | | Patch from Nick for this. Thanks.
* statvfs and ALL filesystem handlers: Add restrict keyword.Daniel Ramirez2013-11-211-2/+3
|
* RFS: Include missing header fileSebastian Huber2013-10-161-0/+1
|
* Filesystem: Add and use rtems_filesystem_chmod()Sebastian Huber2013-09-121-23/+1
| | | | Implement POSIX requirements in the high-level file system layer.
* RFS: Use unprotected chain operationsSebastian Huber2013-08-272-12/+15
| | | | This area is protected by the RFS 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
* 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.