summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-946/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* imfs.h: Add cast to remove warning for pointer/integer size mismatchJoel Sherrill2015-03-241-1/+1
|
* IMFS: Implement variable length node namesSebastian Huber2015-02-151-2/+7
| | | | This reduces the average node size and adds more flexibility.
* IMFS: Add CONFIGURE_IMFS_DISABLE_READDIRSebastian Huber2015-02-141-21/+9
|
* IMFS: Add fine grained configurationSebastian Huber2015-02-121-16/+5
| | | | | | | | | | | | | | | | | | Remove miniIMFS. Statically initialize the root IMFS. Add configuration options to disable individual features of the root IMFS, e.g. o CONFIGURE_IMFS_DISABLE_CHOWN, o CONFIGURE_IMFS_DISABLE_FCHMOD, o CONFIGURE_IMFS_DISABLE_LINK, o CONFIGURE_IMFS_DISABLE_MKNOD, o CONFIGURE_IMFS_DISABLE_MOUNT, o CONFIGURE_IMFS_DISABLE_READLINK, o CONFIGURE_IMFS_DISABLE_RENAME, o CONFIGURE_IMFS_DISABLE_RMNOD, o CONFIGURE_IMFS_DISABLE_SYMLINK, o CONFIGURE_IMFS_DISABLE_UNMOUNT, and o CONFIGURE_IMFS_DISABLE_UTIME.
* IMFS: Allow static initialization of FS infoSebastian Huber2015-02-121-18/+16
|
* IMFS: Add root directory to FS infoSebastian Huber2015-02-121-7/+3
| | | | Fix memory leak in IMFS_fsunmount().
* IMFS: Split linfile and memfile modulesSebastian Huber2015-02-121-52/+10
| | | | Make several functions static.
* IMFS: Introduce IMFS_mknod_controlSebastian Huber2015-02-121-10/+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.
* IMFS: Simplify ino generationSebastian Huber2015-02-041-2/+5
| | | | | The type of ino_t is unsigned long, so it can store a pointer. Avoid a potential integer overflow.
* IMFS: Use rtems_filesystem_make_dev_t_from_pointerSebastian Huber2015-02-041-18/+1
|
* IMFS: Reduce IMFS node typesSebastian Huber2015-01-281-28/+1
| | | | Provide only types used by IMFS_mknod().
* IMFS: Replace node union with individual structSebastian Huber2015-01-271-120/+171
| | | | | | This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
* Filesystem: Delete node type operationSebastian Huber2015-01-221-15/+5
| | | | Use the fstat handler instead.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* IMFS: Improved support for generic nodesSebastian Huber2014-01-211-3/+1
| | | | | | | | | | | | | | | | The rtems_filesystem_location_info_t::node_access_2 was unused by the IMFS. Use it to hold the context of generic nodes. This makes it possible to use node handlers for objects with and without a corresponding file system node. For example network sockets created with socket() have only a file descriptor, but no corresponding file system node. The UNIX(4) domain sockets can be bound to file system nodes. In both cases the rtems_filesystem_location_info_t must provide a pointer to the socket structure used by the socket node handlers. With the context pointer (for sockets, this is the socket structure) in rtems_filesystem_location_info_t::node_access_2 the same node handlers can be used in both cases.
* PR2160: imfs: Use ENOSYS for unsupported nodesSebastian Huber2013-12-111-1/+1
| | | | | Return an error status with errno set to ENOSYS during node creation for nodes not available in the current configuration.
* IMFS: Use inline functions instead of macrosSebastian Huber2013-09-131-28/+36
|
* cpukit: Doxygen group fixes and many warnings addressedJoel Sherrill2013-01-101-52/+48
| | | | | | | The output of the modules.html is much improved. Most filesystem and POSIX API related groups are properly nested. Some formatting issues were addressed as were multiple inconsistencies.
* IMFS: DocumentationSebastian Huber2013-01-091-23/+36
|
* libfs: Doxygen Clean Up Task #1Alex Ivanov2013-01-081-46/+51
| | | | | | http://www.google-melange.com/gci/task/view/google/gci2012/8120204 Patch committed with fixes for whitespace issues.
* IMFS: DocumentationSebastian Huber2012-12-211-4/+146
|
* libfs: Doxygen Enhancement Task #1Alex Ivanov2012-12-201-3/+161
|
* libfs: Doxygen Enhancement Task #2Alex Ivanov2012-12-181-1/+78
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/8032207
* Filesystem: Reject removal of root nodesSebastian Huber2012-10-071-4/+2
| | | | | | | 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.
* Filesystem: Use ioctl_command_tSebastian Huber2012-05-151-9/+3
|
* 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: PR1398: Fix lseek() mechanicSebastian Huber2012-05-111-18/+0
| | | | | | | | | | | | 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().
* IMFS: Generic device identifierSebastian Huber2012-03-131-0/+12
|
* IMFS: Add make generic node supportSebastian Huber2012-03-131-0/+46
| | | | | | | | | | | | | | | | | | | | | | 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-131-37/+101
| | | | | | 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-131-0/+10
| | | | Add and use IMFS_type() and IMFS_is_directory().
* IMFS: Removed superfluous imfs_dir_open()Sebastian Huber2012-03-131-7/+0
|
* IMFS: Reference counting for nodesSebastian Huber2012-03-131-27/+18
| | | | | 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-131-0/+15
| | | | | Directory entry add or removal operations are protected by the file system instance lock. There is no need for protected chain operations.
* Filesystem: New defaults fsync_h and fdatasync_hSebastian Huber2012-03-131-4/+0
| | | | | | | 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-131-129/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-061-10/+10
| | | | | | | 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-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-01-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-01-041-1/+1
| | | | | * libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_readlink.c: readlink filesystem entry should return ssize_t.
* 2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-08-251-5/+0
| | | | | | | | | | | | * 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-08 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-08-081-1/+1
| | | | * libfs/src/imfs/imfs.h: Fix typo.
* 2010-07-30 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-301-0/+11
| | | | | | | | * 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-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-151-10/+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-14 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-141-8/+0
| | | | | | | | | * 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-13 Vinu Rajashekhar <vinutheraj@gmail.com>Joel Sherrill2010-07-131-0/+1
| | | | | | | PR 1614/filesystem * libfs/src/imfs/fifoimfs_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_load_tar.c: Fix rtems_tarfs_load to work with pipe filesystem.
* 2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-06-081-2/+8
| | | | | | | | | | | * 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-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-06-081-5/+8
| | | | | | | | | | | * libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_rmnod.c: Added and use IMFS_create_orphan() and IMFS_check_node_remove(). * libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c: Use IMFS_create_orphan() and IMFS_check_node_remove(). * libfs/src/imfs/imfs_handlers_memfile.c, libfs/src/imfs/memfile.c: Use IMFS_rmnod() and IMFS_check_node_remove() instead of memfile_rmnod() and memfile_check_rmnod().
* 2010-05-31 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/Makefile.am: Add mount-mgr.c. * libcsupport/src/mount-mgr.c: New. * include/rtems/fs.h: Added rtems_filesystem_location_mount. * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New mount interface. It is similar to Linux. * libcsupport/include/rtems/libio_.h: Remove the init_fs_mount_table call. * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use the new mount call. Remove setting the root node in the global pathloc. Mount does this now. * libcsupport/src/privateenv.c: Remove the hack to set the root mount table entry in the environment. * libcsupport/src/unmount.cL Free the target string. * libblock/src/bdpart-mount.c: New mount API. * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c, libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h, libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h, libnetworking/rtems/tftp.h: New mount_h API. * libfs/src/devfs/devfs_eval.c: Local include of extern ops. * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount me call and fixed the initialisation to happen when mounting. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount filesystem files. * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to the new mount table values. * libmisc/shell/main_mount_ftp.c, libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c, libmisc/shell/main_mount_tftp.c: Removed. * libmisc/shell/main_mount.c: Use the new mount API. Also access the file system table for the file system types. * libnetworking/lib/tftpDriver.c: Updated to the new mount API. Fixed to allow mounting from any mount point. Also can now have more than file system mounted. * sapi/include/confdefs.h: Add file system configuration support.