summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs_initsupp.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-22cpukit/libfs/src/imfs: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber1-1/+2
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber1-2/+2
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-03-09imfs: Simplify code generationSebastian Huber1-11/+17
Update #3894.
2020-03-09imfs: Remove unused handlersSebastian Huber1-6/+1
Update #3894.
2020-03-09imfs: Constify imfs_memfile_bytes_per_blockSebastian Huber1-35/+0
The CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK value is validated by <rtems/confdefs/libio.h>. Changing this value during runtime could lead to memory corruption. Update #3894.
2017-12-13IMFS: Include <rtems/imfs.h>Sebastian Huber1-1/+1
Prepare for header file move to common include directory. Update #3254.
2016-09-19imfs: Untangle dependenciesSebastian Huber1-89/+0
This helps to use IMFS_make_generic_node() without pulling in the complete IMFS implementation.
2016-09-16imfs: Fix IMFS_stat_file()Sebastian Huber1-5/+0
Use the adjusted and not the requested memfile bytes per block. Untangle dependencies.
2015-02-18IMFS: Silence warningSebastian Huber1-1/+1
2015-02-15IMFS: Implement variable length node namesSebastian Huber1-2/+6
This reduces the average node size and adds more flexibility.
2015-02-12IMFS: Allow static initialization of FS infoSebastian Huber1-42/+29
2015-02-12IMFS: Add root directory to FS infoSebastian Huber1-13/+56
Fix memory leak in IMFS_fsunmount().
2015-02-12IMFS: Introduce IMFS_mknod_controlSebastian Huber1-12/+14
Drop IMFS_node_control::node_size field and add node_size parameter to IMFS_allocate_node() and IMFS_create_node(). This reduces the size of generic nodes.
2015-02-04IMFS: Use rtems_filesystem_make_dev_t_from_pointerSebastian Huber1-3/+0
2015-01-27IMFS: Replace node union with individual structSebastian Huber1-8/+6
This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2013-12-11PR2160: imfs: Use ENOSYS for unsupported nodesSebastian Huber1-2/+13
Return an error status with errno set to ENOSYS during node creation for nodes not available in the current configuration.
2013-09-05IMFS: Resource leakGedare Bloom1-0/+1
Free fs_info in case root_node is NULL.
2013-07-23Include missing <string.h>Sebastian Huber1-0/+1
2013-06-21IMFS: Fix reference count for debug enabledSebastian Huber1-3/+3
2012-12-18libfs: Doxygen Enhancement Task #2Alex Ivanov1-2/+7
http://www.google-melange.com/gci/task/view/google/gci2012/8032207
2012-10-07Filesystem: Reject removal of root nodesSebastian Huber1-2/+1
Reject the removal of file system instance root nodes in rmdir() and unlink() and return the EBUSY error status. File system instances can be removed with unmount(). Remove root node special cases in IMFS, DOSFS, and RFS.
2012-05-15Filesystem: Change pathconf_limits_and_optionsSebastian Huber1-1/+1
The pathconf_limits_and_options field of rtems_filesystem_mount_table_entry_t is now a const pointer to reduce the read-write memory demands of file system instances.
2012-05-15Filesystem: Move operations to mount table entrySebastian Huber1-1/+1
The scope of the file system operations is the file system instance. The scope of the file system node handlers is the file location. The benefit of moving the operations to the mount table entry is a size reduction of the file location (rtems_filesystem_location_info_t). The code size is slightly increased due to additional load instructions. Restructure rtems_filesystem_mount_table_entry_t to improve cache efficiency.
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-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.
2012-03-13IMFS: Add and use node controlSebastian Huber1-59/+77
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.
2012-03-13IMFS: Reference counting for nodesSebastian Huber1-0/+38
The introduction of reference counting of nodes avoids the removal of open nodes and potential usage of freed memory.
2012-03-13Filesystem: Reference counting for locationsSebastian Huber1-20/+9
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.
2010-08-102010-08-09 Bharath Suri <bharath.s.jois@gmail.com>Joel Sherrill1-0/+3
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-06-242010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill1-2/+0
* libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_getchild.c, libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/ioman.c, libfs/src/imfs/memfile.c: Evaluate all assert calls in IMFS. Either made them conditional on RTEMS_DEBUG or eliminated them.
2010-06-082010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-4/+3
* libfs/src/imfs/fifoimfs_init.c: New file. * libfs/Makefile.am: Reflect change above. * libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/miniimfs_init.c, libfs/src/pipe/fifo.c, libfs/src/pipe/pipe.c, libfs/src/pipe/pipe.h: Pipe support is now link-time optional. * sapi/include/confdefs.h: Reflect changes above.
2010-05-152010-05-15 Chris Johns <chrisj@rtems.org>Chris Johns1-0/+2
* libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_stat.c: PR1419. Return a device for the IMFS.
2010-01-192010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-16/+5
* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs_link.c, libfs/src/imfs/imfs_load_tar.c, libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_symlink.c: Create special helper method for creating the j-node for the root directory. This lets us assume that every j-node created otherwise has a parent node.
2008-10-142008-10-14 Wei Shen <cquark@gmail.com>Joel Sherrill1-4/+7
* Makefile.am, preinstall.am, libcsupport/src/mknod.c, libcsupport/src/open.c, libcsupport/src/pipe.c, libfs/Makefile.am, libfs/preinstall.am, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_stat.c, libfs/src/imfs/memfile.c: Initial commit of POSIX pipe support. * libfs/src/imfs/imfs_fifo.c, libfs/src/pipe/fifo.c, libfs/src/pipe/pipe.c, libfs/src/pipe/pipe.h: New files.
2008-09-04Use "bool" instead of "rtems_boolean|boolean".Ralf Corsepius1-2/+2
2008-05-27Added const qualifier to various pointers and data tables toThomas Doerfler1-4/+4
reduce size of data area. IMFS: Fixed creation of symbolic links to avoid a compiler warning. DOSFS: Use LibBlock instead of read() to read the boot record.
2006-07-09applied patches for PR1117/1118/1119/1120Thomas Doerfler1-0/+38
2005-02-08Add copy-on-write semantics to rtems_tarfs_load().Eric Norum1-2/+0
2003-09-042003-09-04 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* src/dosfs/dosfs.h, src/dosfs/fat.h, src/dosfs/fat_fat_operations.h, src/dosfs/fat_file.h, src/dosfs/msdos.h, src/dosfs/msdos_create.c, src/dosfs/msdos_dir.c, src/dosfs/msdos_eval.c, src/dosfs/msdos_file.c, src/dosfs/msdos_free.c, src/dosfs/msdos_fsunmount.c, src/dosfs/msdos_handlers_dir.c, src/dosfs/msdos_handlers_file.c, src/dosfs/msdos_init.c, src/dosfs/msdos_initsupp.c, src/dosfs/msdos_misc.c, src/dosfs/msdos_mknod.c, src/dosfs/msdos_node_type.c, src/imfs/deviceio.c, src/imfs/imfs.h, src/imfs/imfs_chown.c, src/imfs/imfs_config.c, src/imfs/imfs_creat.c, src/imfs/imfs_debug.c, src/imfs/imfs_directory.c, src/imfs/imfs_eval.c, src/imfs/imfs_fchmod.c, src/imfs/imfs_fcntl.c, src/imfs/imfs_fdatasync.c, src/imfs/imfs_free.c, src/imfs/imfs_fsunmount.c, src/imfs/imfs_getchild.c, src/imfs/imfs_gtkn.c, src/imfs/imfs_handlers_device.c, src/imfs/imfs_handlers_directory.c, src/imfs/imfs_handlers_link.c, src/imfs/imfs_handlers_memfile.c, src/imfs/imfs_init.c, src/imfs/imfs_initsupp.c, src/imfs/imfs_link.c, src/imfs/imfs_mknod.c, src/imfs/imfs_mount.c, src/imfs/imfs_ntype.c, src/imfs/imfs_readlink.c, src/imfs/imfs_rmnod.c, src/imfs/imfs_stat.c, src/imfs/imfs_symlink.c, src/imfs/imfs_unixstub.c, src/imfs/imfs_unlink.c, src/imfs/imfs_unmount.c, src/imfs/imfs_utime.c, src/imfs/ioman.c, src/imfs/linearfile.c, src/imfs/memfile.c, src/imfs/miniimfs_init.c: URL for license changed.
2003-07-242003-07-24 jennifer averett <jennifer.averett@OARcorp.com>Jennifer Averett1-1/+2
PR 434/filesystem * src/imfs/imfs_init.c: Modified to return error code * src/imfs/miniimfs_init.c: Modified to return error code * src/imfs/imfs_initsup.c: Modified to set error upon memory failure.
2001-05-252001-05-25 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+3
* src/imfs/imfs_initsupp.c: Create the root node with the desired permissions. Nodes should be created with the right permissions because chmod() is not supported by the miniIMFS so changing after creation is not possible.
2001-01-222001-01-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-0/+4
* configure.in: Add src/imfs/config.h * src/imfs/Makefile.am: Add INCLUDES += -I. to pickup config.h * src/imfs/.cvsignore: Add config.h and stamp-h * src/imfs/*.c: Add config.h support.
2000-12-132000-12-12 Jake Janovetz <janovetz@uiuc.edu>Joel Sherrill1-3/+5
* src/imfs/linearfile.c, src/imfs/imfs_load_tar.c: New files. * src/imfs/Makefile.am, src/imfs/imfs.h, src/imfs/imfs_creat.c, src/imfs/imfs_debug.c, src/imfs/imfs_eval.c, src/imfs/imfs_handlers_memfile.c, src/imfs/imfs_init.c, src/imfs/imfs_initsupp.c, src/imfs/imfs_stat.c, src/imfs/miniimfs_init.c: Added "tarfs". This is not really a tar filesystem. It is a way to load a tar image into the IMFS but actually leave bulky file contents in the original tar image. It essentially adds the linear file type and associated support and a loader routine.
2000-11-012000-11-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-1/+1
* src/imfs/Makefile.am, src/imfs/deviceio.c, src/imfs/imfs_chown.c, src/imfs/imfs_config.c, src/imfs/imfs_creat.c, src/imfs/imfs_debug.c, src/imfs/imfs_directory.c, src/imfs/imfs_eval.c, src/imfs/imfs_fchmod.c, src/imfs/imfs_free.c, src/imfs/imfs_fsunmount.c, src/imfs/imfs_gtkn.c, src/imfs/imfs_init.c, src/imfs/imfs_initsupp.c, src/imfs/imfs_link.c, src/imfs/imfs_mknod.c, src/imfs/imfs_mount.c, src/imfs/imfs_readlink.c, src/imfs/imfs_rmnod.c, src/imfs/imfs_stat.c, src/imfs/imfs_symlink.c, src/imfs/imfs_unixstub.c, src/imfs/imfs_unlink.c, src/imfs/imfs_unmount.c, src/imfs/imfs_utime.c, src/imfs/ioman.c, src/imfs/memfile.c, src/imfs/miniimfs_init.c: assoc.h, error.h, libio_.h, libio.h, and libcsupport.h moved from libc to lib/include/rtems and now must be referenced as <rtems/XXX.h>. Now we do not have to reach up and over to libc to pick them up.
2000-06-26Patch from Chris Johns <cjohns@cybertec.com.au> andJoel Sherrill1-1/+1
Jennifer Averett <jennifer.averett@oarcorp.com> to make sure "/" is created with S_IFDIR set.
1999-11-17Updated copyright notice.Joel Sherrill1-2/+1
1999-11-02Fixed typo where memfile_handlers set twice and directory_handlersJoel Sherrill1-3/+3
was not set.
1999-10-26Added initial cut at miniIMFS which leaves out memfile and directoryJoel Sherrill1-87/+10
readdir support. The next step is to add a mount table and configure either the miniIMFS or the full IMFS at the application level.
1999-10-12Split null handlers table to own file and renamed.Joel Sherrill1-1/+1
Renamed IMFS handler tables to include IMFS prefix.