summaryrefslogtreecommitdiff
path: root/cpukit/libfs/src/imfs/imfs_creat.c (follow)
AgeCommit message (Collapse)Author
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-03-04imfs: Simplify IMFS_create_node()Sebastian Huber
Update #3894.
2017-12-13IMFS: Include <rtems/imfs.h>Sebastian Huber
Prepare for header file move to common include directory. Update #3254.
2015-03-05IMFS: Fix warningSebastian Huber
2015-02-15IMFS: Implement variable length node namesSebastian Huber
This reduces the average node size and adds more flexibility.
2015-02-12IMFS: Add root directory to FS infoSebastian Huber
Fix memory leak in IMFS_fsunmount().
2015-02-12IMFS: Introduce IMFS_mknod_controlSebastian Huber
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: Simplify ino generationSebastian Huber
The type of ino_t is unsigned long, so it can store a pointer. Avoid a potential integer overflow.
2015-01-28IMFS: Reduce IMFS node typesSebastian Huber
Provide only types used by IMFS_mknod().
2015-01-27IMFS: Replace node union with individual structSebastian Huber
This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns
2013-03-22libfs: Always use geteuid() and getegid()Sebastian Huber
The two functions are independent of the POSIX API.
2012-12-21IMFS: Fix resource leak in IMFS_allocate_node()Sebastian Huber
2012-12-18libfs: Doxygen Enhancement Task #2Alex Ivanov
http://www.google-melange.com/gci/task/view/google/gci2012/8032207
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill
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 Huber
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 Huber
The introduction of reference counting of nodes avoids the removal of open nodes and potential usage of freed memory.
2012-03-13IMFS: Use unprotected chain operationsSebastian Huber
Directory entry add or removal operations are protected by the file system instance lock. There is no need for protected chain operations.
2012-03-13IMFS: Do not check for unsupported typesSebastian Huber
Allow creation of nodes with an unsupported type. Later the usage of such nodes will return an error status.
2012-03-13Filesystem: Reference counting for locationsSebastian Huber
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-182010-08-18 Chris Johns <chrisj@rtems.org>Chris Johns
PR 1677/filesystem * libfs/src/imfs/imfs_creat.c: Fix creating of a file. Lost in the change from a switch statement.
2010-08-022010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill
* 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-302010-07-30 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill
* 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-152010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber
* 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-06-242010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill
* libfs/src/imfs/imfs_creat.c: Fix warning.
2010-06-242010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill
* 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 Huber
* libfs/src/imfs/imfs_creat.c: Reject creation of FIFOs if support is disabled.
2010-01-192010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill
* 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 Sherrill
* 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-07-032008-07-03 Chris Johns <chrisj@rtems.org>Chris Johns
* cpukit/libcsupport/include/chain.h: Removed. Use the SAPI interface that is supported. * cpukit/libcsupport/Makefile.am, cpukit/libcsupport/preinstall.am: Remove chain.h header references. * cpukit/sapi/include/rtems/chain.h, cpukit/sapi/inline/rtems/chain.inl: New. A supported chains interface. * cpukit/sapi/Makefile.am, cpukit/sapi/preinstall.am: Updated to include the new chains interface. * cpukit/libfs/src/imfs/imfs.h, cpukit/libfs/src/imfs/imfs_creat.c, cpukit/libfs/src/imfs/imfs_debug.c, cpukit/libfs/src/imfs/imfs_directory.c, cpukit/libfs/src/imfs/imfs_fsunmount.c, cpukit/libfs/src/imfs/imfs_getchild.c, cpukit/libfs/src/imfs/imfs_load_tar.c, cpukit/libfs/src/imfs/imfs_rmnod.c, cpukit/libfs/src/imfs/memfile.c, cpukit/libfs/src/nfsclient/src/nfs.c, cpukit/libcsupport/include/rtems/libio.h, cpukit/libcsupport/src/malloc_deferred.c, cpukit/libcsupport/src/mount.c, cpukit/libcsupport/src/privateenv.c, cpukit/libcsupport/src/unmount.c: Change to the new chains interface. * cpukit/libcsupport/src/malloc_boundary.c: Remove warning.
2008-05-27Added const qualifier to various pointers and data tables toThomas Doerfler
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.
2004-04-17Remove stray white spaces.Ralf Corsepius
2003-09-042003-09-04 Joel Sherrill <joel@OARcorp.com>Joel Sherrill
* 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.
2001-01-222001-01-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill
* 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 Sherrill
* 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 Sherrill
* 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-12Merged from 4.5.0-beta3aJoel Sherrill
1999-11-17Updated copyright notice.Joel Sherrill
1999-02-24Changed IMFS to use IMFS_NAME_MAX as the maximum length of a basenameJoel Sherrill
rather then NAME_MAX. NAME_MAX is 255 and that lets IMFS chew up memory too fast. Perhaps in the future, the places in IMFS that put a maximum length name string on the stack and the jnode structure does not include a maximu length name string can be fixed so this is not a problem.
1998-11-23Added base version of file system infrastructure. This includes a majorJoel Sherrill
overhaul of the RTEMS system call interface. This base file system is the "In-Memory File System" aka IMFS. The design and implementation was done by the following people: + Joel Sherrill (joel@OARcorp.com) + Jennifer Averett (jennifer@OARcorp.com) + Steve "Mr Mount" Salitasc (salitasc@OARcorp.com) + Kerwin Wade (wade@OARcorp.com) PROBLEMS ======== + It is VERY likely that merging this will break the UNIX port. This can/will be fixed. + There is likely some reentrancy/mutual exclusion needed. + Eventually, there should be a "mini-IMFS" description table to eliminate links, symlinks, etc to save memory. All you need to have "classic RTEMS" functionality is technically directories and device IO. All the rest could be left out to save memory.