summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/libfs/src/rfs: Change license to BSD-2Joel Sherrill2022-03-221-3/+22
| | | | Updates #3053.
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-281-1/+2
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* 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-141-0/+1
| | | | | | | | | | | 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-181-8/+1
| | | | | | | | 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.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* Filesystem: Use default kqfilter and poll handlerSebastian Huber2013-12-201-0/+2
|
* Filesystem: Add readv/writev handlersSebastian Huber2013-12-201-1/+3
| | | | | | | | | 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.
* 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.
* Include missing <string.h>Sebastian Huber2013-07-231-0/+1
|
* rfs: Doxygen group cannot have a dash in itJoel Sherrill2013-01-101-1/+1
| | | | Change rtems-rfs to rtems_rfs
* libfs: Doxygen Enhancement Task #3Alex Ivanov2012-12-281-10/+10
|
* Filesystem: PR1255: Move offset update to handlersSebastian Huber2012-05-151-1/+6
| | | | | | | It is now the responsibility of the read() and write() handler to update the offset field of the IO descriptor (rtems_libio_t). This change makes it possible to protect the IO descriptor from concurrent access by per file locks.
* Filesystem: Use ioctl_command_tSebastian Huber2012-05-151-17/+1
|
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* Filesystem: PR1871: Fix O_APPENDSebastian Huber2012-05-111-13/+22
|
* Filesystem: PR1398: Fix lseek() mechanicSebastian Huber2012-05-111-14/+15
| | | | | | | | | | | | According to POSIX the lseek() function shall not, by itself, extend the size of a file. Remove the size field of rtems_libio_t. A file has only one size but may have multiple open file descriptors. Thus a file size field in the file descriptor may lead to inconsistencies. New default handlers rtems_filesystem_default_lseek_file() and rtems_filesystem_default_lseek_directory().
* Filesystem: Reference counting for locationsSebastian Huber2012-03-131-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removed fpathconf file system node handler.Sebastian Huber2012-02-021-1/+0
| | | | There existed no calling function for this handler.
* Remove stray whitespaces.Ralf Corsepius2011-11-061-30/+30
|
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-061-6/+14
| | | | | | | | 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-03-15 Chris Johns <chrisj@rtems.org>Chris Johns2011-03-151-64/+8
| | | | | | | | | | | * 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-12/+73
| | | | | | | | | | | | | | | | | | 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.
* 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-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-08-251-1/+1
| | | | | | | | | | | | * 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-151-6/+6
| | | | | | | | | | | | | | | | | | | | | * 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-01 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-07-011-1/+1
| | | | | | | | | | | | | * 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-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-03-27 Chris Johns <chrisj@rtems.org>Chris Johns2010-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | libfs/src/nfsclient/src/cexphelp.c, libfs/src/nfsclient/src/dirutils.c, libfs/src/nfsclient/src/nfs.modini.c, libfs/src/nfsclient/src/nfsTest.c, libfs/src/nfsclient/src/rpcio.c, libfs/src/nfsclient/src/rpcio.modini.c, libfs/src/nfsclient/src/sock_mbuf.c, libfs/src/nfsclient/src/xdr_mbuf.c, libfs/src/rfs/rtems-rfs-bitmaps-ut.c, libfs/src/rfs/rtems-rfs-bitmaps.c, libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-buffer-bdbuf.c, libfs/src/rfs/rtems-rfs-buffer-devio.c, libfs/src/rfs/rtems-rfs-buffer.c, libfs/src/rfs/rtems-rfs-dir-hash.c, libfs/src/rfs/rtems-rfs-dir.c, libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-inode.c, libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-mutex.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, libfs/src/rfs/rtems-rfs-rtems-utils.c, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-shell.c, libfs/src/rfs/rtems-rfs-trace.c: Add HAVE_CONFIG_H support to let files receive configure defines.
* 2010-03-22 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-221-2/+2
| | | | | | | | | | * libfs/src/rfs/rtems-rfs-bitmaps-ut.c, libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-buffer.c, libfs/src/rfs/rtems-rfs-dir.c, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-rtems-file.c, libfs/src/rfs/rtems-rfs-shell.c: Fix printf format warning. Primarily for size_t.
* 010-02-26 Chris Johns <chrisj@rtems.org>Chris Johns2010-02-261-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libfs/src/rfs/rtems-rfs-block.c: Reset a buffer handle after moving down an indirection level. * libfs/src/rfs/rtems-rfs-dir.c: Move directory entry validation into a macro and use the macro. Fix the range check on the ino so all inodes can be used. * libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system.h:: Add a version number to the superblock. Use RTEMS_RFS_INODE_SIZE. * libfs/src/rfs/rtems-rfs-file.c: Fix the size offset on partial block lengths. Set the size in the file handle on a truncate to 0. * libfs/src/rfs/rtems-rfs-format.c: Add a version number to the superblock. Use RTEMS_RFS_INODE_SIZE. A better set of defaults for small disks. * libfs/src/rfs/rtems-rfs-inode.c: Use RTEMS_RFS_INODE_SIZE. Free the allocated inode if it cannot be opened. * libfs/src/rfs/rtems-rfs-inode.h: Add RTEMS_RFS_INODE_SIZE. * libfs/src/rfs/rtems-rfs-rtems-file.c: Move some of the iop acceses inside the fs lock. * libfs/src/rfs/rtems-rfs-shell.c: Use RTEMS_RFS_INODE_SIZE.
* 2010-02-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-02-181-0/+334
* libfs/src/rfs/rtems-rfs-bitmaps.c, libfs/src/rfs/rtems-rfs-bitmaps.h, libfs/src/rfs/rtems-rfs-bitmaps-ut.c, libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-block.h, libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-buffer-bdbuf.c, libfs/src/rfs/rtems-rfs-buffer.c, libfs/src/rfs/rtems-rfs-buffer-devio.c, libfs/src/rfs/rtems-rfs-buffer.h, libfs/src/rfs/rtems-rfs-data.h, libfs/src/rfs/rtems-rfs-dir.c, libfs/src/rfs/rtems-rfs-dir.h, libfs/src/rfs/rtems-rfs-dir-hash.c, libfs/src/rfs/rtems-rfs-dir-hash.h, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-file.h, libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system-fwd.h, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-format.h, libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-group.h, libfs/src/rfs/rtems-rfs.h, libfs/src/rfs/rtems-rfs-inode.c, libfs/src/rfs/rtems-rfs-inode.h, libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h, libfs/src/rfs/rtems-rfs-mutex.c, libfs/src/rfs/rtems-rfs-mutex.h, libfs/src/rfs/rtems-rfs-rtems.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, libfs/src/rfs/rtems-rfs-rtems.h, libfs/src/rfs/rtems-rfs-rtems-utils.c, libfs/src/rfs/rtems-rfs-shell.c, libfs/src/rfs/rtems-rfs-shell.h, libfs/src/rfs/rtems-rfs-trace.c, libfs/src/rfs/rtems-rfs-trace.h: New. * Makefile.am, preinstall.am, libfs/Makefile.am, wrapup/Makefile.am: Updated with the RFS support. * libfs/README: Updated after 10 years. * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk-driver.c: Updated to the new error reporting in libblock. * libmisc/shell/main_ls.c, libmisc/shell/print-ls.c: Fix printing the size in long mode. * libnetworking/nfs/bootp_subr.c, libnetworking/rtems/rtems_bootp.c, libnetworking/rtems/rtems_bsdnet_internal.h: Return the BOOTP/DHCP to the forever behaviour of 4.9 with the ability to call BOOTP and control the process if required.