summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* PR2039: Fix NULL pointer accessSebastian Huber2012-03-141-2/+2
| | | | | | | In case rtems_bdbuf_read() returns an error status, the block device buffer pointer will be set to NULL. In RFS the chain node of the block device buffer will be used for RFS purposes. We must not do this after an erroneous read.
* libblock: Change bdbuf APISebastian Huber2012-03-132-22/+25
| | | | | | | | | | | | | | | | | | | | The functions o rtems_bdbuf_get(), o rtems_bdbuf_read(), o rtems_bdbuf_syncdev(), and o rtems_bdbuf_purge_dev(), use now the disk device instead of the device identifier. This makes bdbuf independent of rtems_disk_obtain() and rtems_disk_release(). It is the responsiblity of the file system to obtain the disk device. This also reduces the overhead to get a buffer. The key for the AVL tree uses now the disk device instead of the device identifier. The pointer is interpreted as an unsigned integer. This reduces the memory overhead and makes the comparison operation a bit faster. Removed function rtems_bdbuf_purge_major(). This function was too destructive and could have unpredictable side effects.
* Filesystem: Rename definesSebastian Huber2012-03-132-3/+3
| | | | | | | | | | | | | | | o Removed RTEMS_LIBIO_PERMS_SEARCH. o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ. o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE. o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC. o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK. o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK. o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE. o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE. o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS. o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in RTEMS_FS_REJECT_TERMINAL_DOT.
* Filesystem: New defaults fsync_h and fdatasync_hSebastian Huber2012-03-133-5/+5
| | | | | | | New defaults rtems_filesystem_default_fsync_or_fdatasync() and rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and fdatasync_h. The rtems_filesystem_default_fsync_or_fdatasync() sets now errno to EINVAL according to POSIX.
* Filesystem: Reference counting for locationsSebastian Huber2012-03-1311-825/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o A new data structure rtems_filesystem_global_location_t was introduced to be used for o the mount point location in the mount table entry, o the file system root location in the mount table entry, o the root directory location in the user environment, and o the current directory location in the user environment. During the path evaluation global start locations are obtained to ensure that the current file system instance will be not unmounted in the meantime. o The user environment uses now reference counting and is protected from concurrent access. o The path evaluation process was completely rewritten and simplified. The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation method. Recursive calls in the path evaluation have been replaced with iteration to avoid stack overflows. Only the evaluation of symbolic links is recursive. No dynamic memory allocations and intermediate buffers are used in the high level path evaluation. No global locks are held during the file system instance specific path evaluation process. o Recursive symbolic link evaluation is now limited by RTEMS_FILESYSTEM_SYMLOOP_MAX. Applications can retrieve this value via sysconf(). o The device file system (devFS) uses now no global variables and allocation from the workspace. Node names are allocated from the heap. o The upper layer lseek() performs now some parameter checks. o The upper layer ftruncate() performs now some parameter checks. o unmask() is now restricted to the RWX flags and protected from concurrent access. o The fchmod_h and rmnod_h file system node handlers are now a file system operation. o The unlink_h operation has been removed. All nodes are now destroyed with the rmnod_h operation. o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system operations. o The path evaluation and file system operations are now protected by per file system instance lock and unlock operations. o Fix and test file descriptor duplicate in fcntl(). o New test fstests/fsnofs01.
* PR 2026/filesystem - Fix semaphore attributesSebastian Huber2012-02-231-7/+2
| | | | | Semaphores of type RTEMS_SIMPLE_BINARY_SEMAPHORE are not suitable for a mutex. Use RTEMS_BINARY_SEMAPHORE with RTEMS_INHERIT_PRIORITY instead.
* Removed fpathconf file system node handler.Sebastian Huber2012-02-024-4/+0
| | | | There existed no calling function for this handler.
* 2011-12-09 Chris Johns <chrisj@rtems.org>Chris Johns2011-12-093-31/+72
| | | | | | | | | | PR 1968/filesystem * libfs/src/rfs/rtems-rfs-file.c: Fix to the seek bug where a seek to 0 after reading the end of the file did not point to the correct block. * libfs/src/rfs/rtems-rfs-rtems.h, libfs/src/rfs/rtems-rfs-trace.c: Fix the trace flags. Used to fix the bug.
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-021-5/+1
| | | | | | * libfs/src/rfs/rtems-rfs-rtems-dev.c: Remove duplicate prototype of rtems_deviceio_errno. Include <rtems/devfs.h> for rtems_deviceio_errno().
* Remove stray whitespaces.Ralf Corsepius2011-11-0630-515/+515
|
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-063-13/+21
| | | | | | | | PR1945/cpukit * libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dev.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems-file.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c: Replace rtems_off64_t with off_t.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-061-3/+3
| | | | * libfs/src/rfs/rtems-rfs-dir.c: Rename PRIdoff_t into PRIooff_t.
* 2011-11-04 Chris Johns <chrisj@rtems.org>Chris Johns2011-11-031-2/+24
| | | | | * libfs/src/rfs/rtems-rfs-dir.h: Commit the missing change. Part of removing the hardcoded dir string.
* 2011-11-03 Chris Johns <chrisj@rtems.org>Chris Johns2011-11-034-11/+54
| | | | | | | | | | | PR 1948/filesystem * libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-rtems.c: Add support for mount passing an ASCIIZ string containing configuration options. Remove the hardcoded dir string and size. Fix comments. * libblock/src/bdbuf.c: Fix state labels in trace output.
* 2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-10-171-0/+4
| | | | | * libfs/src/rfs/rtems-rfs-file-system.c (rtems_rfs_fs_open): Comment out unused vars "group", "group_base".
* 2011-07-04 Chris Johns <chrisj@rtems.org>Chris Johns2011-07-041-1/+1
| | | | | | PR 1827/filesystem * libfs/src/rfs/rtems-rfs-rtems.c: Skip the parent (..) path value when eval make moving up out of the RFS file system.
* 2011-03-15 Chris Johns <chrisj@rtems.org>Chris Johns2011-03-153-176/+77
| | | | | | | | | | | * libfs/src/rfs/rtems-rfs-rtems-file.c, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems.h: The fix to the removal of file_info from iop was broken. The node_access field must be the inode number in the RFS because the file system ops provides no way to tell is a stat call is the result of stat, fstat, or lstat. The solution is to move the file handle to node_access_2 which is also shared with doff but these do not overlap.
* 2011-03-15 Chris Johns <chrisj@rtems.org>Chris Johns2011-03-151-1/+1
| | | | | | PR 1757/filesystem * libfs/src/rfs/rtems-rfs-block-pos.h: Fix the bug in equal compare.
* 2011-03-15 Chris Johns <chrisj@rtems.org>Chris Johns2011-03-158-106/+245
| | | | | | | | | | | | | | | | | | PR 1763/shell * libmisc/shell/hexdump-conv.c: Remove debug hacks. PR 1757/filesystem * libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-block.h, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-rtems-file.c: Set the file size in iop-size when a file is open. Fix lseek to end of file then write for sizes less than half the file system block size. * libfs/src/rfs/rtems-rfs-rtems-dev.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems.h: Fix the fstat and fchmod calls due to the change in the iop struct where pathinfo went away. The node_access field in pathinfo was overloaded.
* 2011-03-03 Chris Johns <chrisj@rtems.org>Chris Johns2011-03-031-0/+15
| | | | | | * libcsupport/src/mknod.c, libfs/src/rfs/rtems-rfs-inode.c: PR 1749. Fix the incorrect handling of the file type in the mode value to reject invalid types as per the standard.
* 011-02-08 Brett Swimley <bswimley@advanced.pro>Chris Johns2011-02-071-0/+6
| | | | | * libfs/src/rfs/rtems-rfs-rtems.c: Fix bug where the eval path did not close an inode.
* 2010-10-19 Chris Johns <chrisj@rtems.org>Chris Johns2010-10-181-1/+4
| | | | | * libfs/src/rfs/rtems-rfs-rtems-file.c: Add missing unlock in write. Return the error code in close.
* 2010-10-11 Chris Johns <chrisj@rtems.org>Chris Johns2010-10-1110-97/+106
| | | | | | | | | | | | | | | | | | | * libfs/src/rfs/rtems-rfs-trace.c, libfs/src/rfs/rtems-rfs-trace.h: Add inode-delete. * libfs/src/rfs/rtems-rfs-shell.c: Fix formatting. * libfs/src/rfs/rtems-rfs-rtems-dir.c: Use ssize_t. Fix spelling. * libfs/src/rfs/rtems-rfs-block.c: Fix rtems_rfs_block_get_bpos to return the position correctly. A bpos does not have any special processing. Do no reset the buffer handle when shrinking indirectly. * libfs/src/rfs/rtems-rfs-inode.c: Add trace. * libfs/src/rfs/rtems-rfs-format.c: Fix comments. * libfs/src/rfs/rtems-rfs-group.c: Limit the inodes to the blocks in a group so the accounting works. * libfs/src/rfs/rtems-rfs-dir.c: PR 1705. Fix handling the offsets when deleting an entry. * libfs/src/rfs/rtems-rfs-buffer.h: Remove rtems_rfs_buffer_handle_reset. It is not needed and dangerous.
* 2010-08-26 Chris Johns <chrisj@rtems.org>Chris Johns2010-08-262-11/+18
| | | | | | | | | * libfs/src/defaults/default_evaluate_link.c: Remove assignment. * libfs/src/rfs/rtems-rfs-file.c: Check then load the inode is not present on the close. * libfs/src/rfs/rtems-rfs-format.c: Initialise the buffer chain.
* 2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-08-254-26/+2
| | | | | | | | | | | | * libfs/src/imfs/imfs_fcntl.c: Removed file. * libfs/Makefile.am: Reflect change from above. * libfs/src/defaults/default_fcntl.c: Return 0 instead of -1 and errno. * libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/imfs_handlers_directory.c, libfs/src/imfs/imfs_handlers_memfile.c, libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems-file.c, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems.h: Use default file system handlers.
* 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-152-7/+7
| | | | | | | | | | | | | | | | | | | | | * libcsupport/include/rtems/libio.h: Removed file_info and handlers fields in rtems_libio_t. * libcsupport/src/close.c, libcsupport/src/fcntl.c, libcsupport/src/fdatasync.c, libcsupport/src/fstat.c, libcsupport/src/fsync.c, libcsupport/src/ftruncate.c, libcsupport/src/getdents.c, libcsupport/src/ioctl.c, libcsupport/src/libio_sockets.c, libcsupport/src/lseek.c, libcsupport/src/open.c, libcsupport/src/read.c, libcsupport/src/readv.c, libcsupport/src/write.c, libcsupport/src/writev.c, libfs/src/devfs/devclose.c, libfs/src/devfs/devioctl.c, libfs/src/devfs/devopen.c, libfs/src/devfs/devread.c, libfs/src/devfs/devwrite.c libfs/src/dosfs/msdos_dir.c libfs/src/dosfs/msdos_file.c libfs/src/imfs/deviceio.c libfs/src/imfs/imfs_directory.c libfs/src/imfs/imfs_fifo.c libfs/src/imfs/memfile.c libfs/src/nfsclient/src/nfs.c libfs/src/rfs/rtems-rfs-rtems-file.c libfs/src/rfs/rtems-rfs-rtems.h libnetworking/lib/ftpfs.c: Reflect changes above.
* 2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-141-15/+1
| | | | | | | | | * libfs/Makefile.am: Remove reference to imfs_free.c, wrapup/Makefile.am: Split devfs into its own library. * libfs/src/imfs/fifoimfs_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_init.c, libfs/src/rfs/rtems-rfs-rtems.c: Use default freenode implementation. * libfs/src/imfs/imfs_free.c: Removed.
* 2010-07-03 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-031-1/+1
| | | | | | | * libcsupport/include/rtems/libio.h, libfs/src/defaults/default_read.c, libfs/src/defaults/default_readlink.c, libfs/src/rfs/rtems-rfs-rtems.c: Correct types and prototypes to eliminate warnings.
* 2010-07-01 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-07-013-10/+10
| | | | | | | | | | | | | * libfs/src/dosfs/msdos_handlers_dir.c, libfs/src/dosfs/msdos_handlers_file.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/imfs_handlers_device.c, libfs/src/imfs/imfs_handlers_directory.c, libfs/src/imfs/imfs_handlers_link.c, libfs/src/imfs/imfs_handlers_memfile.c, libfs/src/imfs/miniimfs_init.c, libfs/src/rfs/rtems-rfs-rtems-dev.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems-file.c: Turn NULLs into default handlers.
* 2010-06-29 Jennifer.Averett <Jennifer.Averett@OARcorp.com>Jennifer Averett2010-06-291-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/include/rtems/libio.h, libfs/Makefile.am, libfs/src/defaults/default_chown.c, libfs/src/defaults/default_evalpath.c, libfs/src/defaults/default_freenode.c, libfs/src/defaults/default_fsmount.c, libfs/src/defaults/default_link.c, libfs/src/defaults/default_mount.c, libfs/src/defaults/default_rename.c, libfs/src/defaults/default_statvfs.c, libfs/src/defaults/default_symlink.c, libfs/src/defaults/default_unlink.c, libfs/src/defaults/default_utime.c, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs_init.c, libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems.c, wrapup/Makefile.am: Fixed typo in default names. Added default methods into filesystem tables. * libfs/src/defaults/default_close.c, libfs/src/defaults/default_evaluate_link.c, libfs/src/defaults/default_fpathconf.c, libfs/src/defaults/default_fsunmount.c, libfs/src/defaults/default_open.c, libfs/src/defaults/default_unmount.c: New files.
* 2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-06-241-0/+5
| | | | | | PR 1587/filesystem Coverity Id 35 * libfs/src/rfs/rtems-rfs-shell.c: Address possible NULL dereference.
* 2010-06-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-06-171-1/+3
| | | | * libfs/src/rfs/rtems-rfs-file-block.c: Clean up uint64_t maths.
* 2010-06-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-06-172-16/+32
| | | | | | * libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to C functions.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-2/+2
| | | | | * libfs/src/rfs/rtems-rfs-file-system.h: Revert previous change. Force RTEMS_RFS_VERSION_MASK to be 32bit.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-1/+3
| | | | * libfs/src/rfs/rtems-rfs-rtems-dir.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-9/+10
| | | | * libfs/src/rfs/rtems-rfs-format.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-2/+4
| | | | * libfs/src/rfs/rtems-rfs-file-system.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-1/+3
| | | | * libfs/src/rfs/rtems-rfs-rtems-file.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-13/+13
| | | | * libfs/src/rfs/rtems-rfs-buffer.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-29/+30
| | | | * libfs/src/rfs/rtems-rfs-shell.c: Various 64bit fixes.
* 2010-06-17 Chris Johns <chrisj@rtems.org>Chris Johns2010-06-173-6/+6
| | | | | | libfs/src/rfs/rtems-rfs-bitmaps.h, libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-block.h: PR 1556. Struct clean up.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-21/+22
| | | | * libfs/src/rfs/rtems-rfs-bitmaps-ut.c: Various 64bit fixes.
* 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-171-5/+7
| | | | * libfs/src/rfs/rtems-rfs-group.c: Various 64bit fixes.
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-161-11/+13
| | | | * libfs/src/rfs/rtems-rfs-file.c: Various 64bit fixes.
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-161-5/+7
| | | | * libfs/src/rfs/rtems-rfs-inode.c: Various 64bit fixes.
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-161-17/+26
| | | | | * libfs/src/rfs/rtems-rfs-rtems.c: Various 64bit fixes. Add PRIomode_t.
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-161-2/+3
| | | | | * libfs/src/rfs/rtems-rfs-buffer-bdbuf.c: Various 64bit fixes.
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-169-16/+14
| | | | | | | | | | | | | | PR 1556/cpukit * libfs/src/rfs/rtems-rfs-bitmaps.h, libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-buffer.h, libfs/src/rfs/rtems-rfs-file-system-fwd.h, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-file.h, libfs/src/rfs/rtems-rfs-format.h, libfs/src/rfs/rtems-rfs-group.h, libfs/src/rfs/rtems-rfs-inode.h: Rename "struct rtems_rfs_*_t" into "struct _rtems_rfs_*".
* 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-161-1/+1
| | | | | PR 1556/cpukit * libfs/src/rfs/rtems-rfs-shell.c: Remove rtems_rfs_shell_cmd_t.
* 2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-06-152-49/+61
| | | | | | | * libfs/src/rfs/rtems-rfs-dir.c: Various 64bit compatibility fixes. Add PRIdoff_t. Remove stray "\"s. * libfs/src/rfs/rtems-rfs-link.c: Various 64bit compatibility fixes.