summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Filesystem: Remove pipe_lseek()Sebastian Huber2012-05-041-11/+1
|
* IMFS: Update IMS_assert check when RTEMS_DEBUG is enabled.Chris Johns2012-04-281-1/+1
| | | | Update the assert macro to the new IMFS_jnode_t.
* IMFS: Node specific stat handlersSebastian Huber2012-03-135-58/+81
|
* IMFS: Generic device identifierSebastian Huber2012-03-131-0/+12
|
* IMFS: Add make generic node supportSebastian Huber2012-03-132-0/+154
| | | | | | | | | | | | | | | | | | | | | | Generic nodes are an alternative to standard drivers in RTEMS. The handlers of a generic node are called with less overhead compared to the standard driver operations. The usage of file system node handlers enable more features like support for fsync() and fdatasync(). The generic nodes use the reference counting of the IMFS. This provides automatic node destruction when the last reference vanishes. Extend type IMFS_types_union by new type IMFS_generic_t. Extend enum IMFS_jnode_types_t by IMFS_GENERIC. Add functions o IMFS_make_generic_node(), o IMFS_is_imfs_instance(), o IMFS_generic_get_context_by_node(), o IMFS_generic_get_context_by_location(), and o IMFS_generic_get_context_by_iop(). New test fstests/fsimfsgeneric01.
* IMFS: Add and use node controlSebastian Huber2012-03-1314-315/+419
| | | | | | Add and use structure IMFS_node_control with support functions. This helps to make high level functions independent of the node type and reduces the number of branches in the code.
* IMFS: New support functionsSebastian Huber2012-03-139-31/+43
| | | | Add and use IMFS_type() and IMFS_is_directory().
* IMFS: Removed superfluous imfs_dir_open()Sebastian Huber2012-03-133-35/+1
|
* IMFS: Reference counting for nodesSebastian Huber2012-03-1316-126/+84
| | | | | The introduction of reference counting of nodes avoids the removal of open nodes and potential usage of freed memory.
* IMFS: Use unprotected chain operationsSebastian Huber2012-03-134-17/+28
| | | | | Directory entry add or removal operations are protected by the file system instance lock. There is no need for protected chain operations.
* IMFS: Lock the file system during directory readsSebastian Huber2012-03-131-21/+15
| | | | | Other threads may add or remove directory entries during a read of the directory. Use the file system instance lock for protection.
* IMFS: Do not check for unsupported typesSebastian Huber2012-03-131-10/+0
| | | | | Allow creation of nodes with an unsupported type. Later the usage of such nodes will return an error status.
* Filesystem: Rename definesSebastian Huber2012-03-132-6/+6
| | | | | | | | | | | | | | | 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-137-43/+10
| | | | | | | 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-1335-1610/+635
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* POSIX conformanceSebastian Huber2012-02-081-1/+2
| | | | | For symbolic links, the length in bytes of the pathname contained in the symbolic link should be returned in st_size.
* Removed fpathconf file system node handler.Sebastian Huber2012-02-025-5/+0
| | | | There existed no calling function for this handler.
* Remove all .cvsignore files.Joel Sherrill2012-02-011-5/+0
|
* 2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-062-3/+3
| | | | | | * libfs/src/imfs/imfs_debug.c: Make IMFS_print_jnode, IMFS_dump_directory static. * libfs/src/imfs/memfile.c: Make memfile_free_blocks_in_table static.
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-021-0/+1
| | | | | * libfs/src/imfs/deviceerrno.c: Include <rtems/devfs.h> for missing prototypes.
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-022-9/+9
| | | | | | | | * libfs/src/imfs/imfs_eval.c: Make IMFS_evaluate_permission, IMFS_evaluate_hard_link, IMFS_evaluate_sym_link static. * libfs/src/imfs/imfs_fifo.c: Make IMFS_fifo_open, IMFS_fifo_close, IMFS_fifo_read, IMFS_fifo_write, IMFS_fifo_ioctl static.
* Remove stray whitespaces.Ralf Corsepius2011-11-068-12/+12
|
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-065-20/+20
| | | | | | | PR1945/cpukit * libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c: Replace rtems_off64_t with off_t.
* 2011-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-10-261-0/+6
| | | | * libfs/src/imfs/imfs.h: Add IMFS_memfile_maximum_size.
* 2011-10-10 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-10-101-1/+1
| | | | | | | * libfs/src/devfs/devfs_mknod.c: Remove const cast. * libfs/src/imfs/ioman.c: Remove const cast. * libfs/src/devfs/devfs.h: Make device_name a const char*. * sapi/include/rtems/io.h: Make device_name a const char*.
* 2011-10-07 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-10-071-4/+0
| | | | | * libfs/src/imfs/memfile.c (memfile_ioctl): Remove unused var "the_jnode".
* 2011-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-08-022-0/+5
| | | | | | | | | PR 1877/cpukit * libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/memfile.c, sapi/inline/rtems/rbtree.inl, score/include/rtems/score/rbtree.h, score/inline/rtems/score/rbtree.inl, score/src/rbtree.c, score/src/rbtreefind.c, score/src/rbtreeinsert.c: Add comparison function for RBTrees.
* 2011-07-21 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2011-07-212-4/+3
| | | | | | | | * libcsupport/include/rtems/libio_.h: Added rtems_filesystem_is_root_location(). * libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c: Use rtems_filesystem_is_root_location().
* 2011-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-06-241-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/rtems/bspIo.h, include/rtems/concat.h, include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h, include/rtems/pci.h, include/rtems/userenv.h, libblock/include/rtems/flashdisk.h, libblock/include/rtems/nvdisk-sram.h, libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h, libcsupport/include/console.h, libcsupport/include/iosupp.h, libcsupport/include/spurious.h, libcsupport/include/motorola/mc68230.h, libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h, libcsupport/include/rtems/framebuffer.h, libcsupport/include/rtems/gxx_wrappers.h, libcsupport/include/rtems/libcsupport.h, libcsupport/include/rtems/libio_.h, libcsupport/include/rtems/malloc.h, libcsupport/include/rtems/termiostypes.h, libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h, libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h, libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h, libmisc/capture/capture-cli.h, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h, libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h, libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h, libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h, libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h, posix/include/mqueue.h, posix/include/semaphore.h, posix/include/rtems/posix/aio_misc.h, posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/posixapi.h, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/sigset.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/priority.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/spinlock.inl, posix/inline/rtems/posix/timer.inl, rtems/mainpage.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/timer.inl, rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h, sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h, score/include/rtems/score/object.h, score/include/rtems/score/priority.h, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl: Add @file Doxygen directives and descriptions to files which originated with RTEMS. This improves the file list page generated by Doxygen.
* 2011-06-10 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-06-101-0/+2
| | | | | | PR 1812/filesystem * libfs/src/imfs/imfs_stat.c: stat() implementation for IMFS did not set st_blksize field. Set it based upon user configuration.
* 2011-05-11 Chris Johns <chrisj@rtems.org>Chris Johns2011-05-111-79/+100
| | | | | | PR 1774/filesystem * libfs/src/imfs/imfs_eval.c: Updated to fix regressions found in the testsuite.
* 2011-04-16 Chris Johns <chrisj@rtems.org>Chris Johns2011-04-161-60/+64
| | | | | | PR 1774/filesystem * libfs/src/imfs/imfs_eval.c: Fix the IMFS eval and eval for make handlers to not inspect a mounted file sytems path.
* 2011-04-05 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-04-051-1/+1
| | | | | PR 1701/filesystems * libfs/src/imfs/memfile.c: Fix sense of assert.
* 2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-03-141-0/+3
| | | | | * libfs/src/imfs/deviceerrno.c: Add RTEMS_INVALID_CLOCK, RTEMS_INVALID_NODE, and RTEMS_NOT_CONFIGURED.
* 2011-01-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-01-042-5/+5
| | | | | * libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_readlink.c: readlink filesystem entry should return ssize_t.
* 2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-11-253-4/+4
| | | | | | | | | | | | | | | | | | * libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c, posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl, score/inline/rtems/score/watchdog.inl, score/src/apiext.c, score/src/chain.c, score/src/coremsgflushsupp.c, score/src/coremsginsert.c, score/src/objectshrinkinformation.c, score/src/schedulerpriorityyield.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueuepriority.c, score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c, score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c, score/src/userextthreadbegin.c, score/src/userextthreadcreate.c, score/src/userextthreaddelete.c, score/src/userextthreadrestart.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c, score/src/watchdogreportchain.c: Avoid chain API violations.
* 2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-08-271-1/+1
| | | | | | PR 1693/filesystem * libfs/src/imfs/memfile.c: IMFS_memfile_get_block_pointer() was checking incorrect pointer and thus had dead code.
* 2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-08-271-3/+2
| | | | | | | PR 1692/filesystem * libcsupport/include/rtems/libio.h, libfs/src/devfs/devfs_eval.c, libfs/src/imfs/imfs_eval.c: Fix implementation and use of rtems_libio_is_valid_perms().
* 2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-08-255-36/+3
| | | | | | | | | | | | * 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-08-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-08-181-2/+1
| | | | | | PR 1677/filesystem * libfs/src/imfs/imfs_creat.c: Fix creating of a file. Lost in the change from a switch statement.
* 2010-08-13 Chris Johns <chrisj@rtems.org>Chris Johns2010-08-131-2/+2
| | | | | * libfs/src/imfs/imfs_eval.c: Add the missing ';' for the debug case.
* 2010-08-09 Bharath Suri <bharath.s.jois@gmail.com>Joel Sherrill2010-08-102-6/+8
| | | | | | | | | | PR 1660/filesystem * libfs/src/pipe/fifo.c, libfs/src/pipe/pipe.h: Changed int pipe_release to void pipe_release. * libfs/src/imfs/imfs_fifo.c: Corresponding change to IMFS_fifo_close since pipe_release does not return any error. * libfs/src/imfs/imfs_initsupp.c: Changes to improve IMFS_determine_bytes_per_block
* 2010-08-08 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-081-1/+1
| | | | * libfs/src/imfs/imfs.h: Fix typo.
* 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-024-72/+36
| | | | | | | * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_readlink.c, libfs/src/pipe/fifo.c: Clean up for coverage improvements and formatting.
* 2010-07-30 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-305-218/+58
| | | | | | | | * libcsupport/src/fstat.c, libcsupport/src/rmdir.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_getchild.c, libfs/src/imfs/memfile.c: Add IMFS_assert. Clean up and remove all checks which are redundant with system call layer. Formatting.
* 2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-271-2/+3
| | | | | * libfs/src/imfs/imfs_load_tar.c, libmisc/untar/untar.c: Now supports both pax and GNU tar created tar files.
* 2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-261-4/+3
| | | | * libfs/src/imfs/imfs_load_tar.c: Formatting.
* 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-152-24/+9
| | | | | | * libfs/src/imfs/imfs.h: Changed IMFS_jnode_types_t to an enum. Removed IMFS_NUMBER_OF_TYPES define. * libfs/src/imfs/imfs_debug.c: Removed IMFS_types.
* 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-153-5/+5
| | | | | | | | | | | | * libcsupport/include/rtems/libio_.h: Removed rtems_filesystem_null_handlers. * libcsupport/src/fs_null_handlers.c: Removed file. * libcsupport/Makefile.am: Reflect change above. * libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c: Use rtems_filesystem_handlers_default instead of rtems_filesystem_null_handlers. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c: Initialize handler and operations table with proper defaults.
* 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-154-19/+19
| | | | | | | | | | | | | | | | | | | | | * 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.