1 | .. comment SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 1988, 2002 On-Line Applications Research Corporation (OAR) |
---|
4 | |
---|
5 | Preface |
---|
6 | ******* |
---|
7 | |
---|
8 | This document describes the implementation of the RTEMS filesystem |
---|
9 | infrastructure. This infrastructure supports the following capabilities: |
---|
10 | |
---|
11 | - Mountable file systems |
---|
12 | |
---|
13 | - Hierarchical file system directory structure |
---|
14 | |
---|
15 | - POSIX compliant set of routines for the manipulation of files and directories |
---|
16 | |
---|
17 | - Individual file and directory support for the following: |
---|
18 | |
---|
19 | #. Permissions for read, write and execute |
---|
20 | #. User ID |
---|
21 | #. Group ID |
---|
22 | #. Access time |
---|
23 | #. Modification time |
---|
24 | #. Creation time |
---|
25 | |
---|
26 | - Hard links to files and directories |
---|
27 | |
---|
28 | - Symbolic links to files and directories |
---|
29 | |
---|
30 | This has been implemented to provide the framework for a UNIX-like file system |
---|
31 | support. POSIX file and directory functions have been implemented that allow a |
---|
32 | standard method of accessing file, device and directory information within file |
---|
33 | systems. The file system concept that has been implemented allows for expansion |
---|
34 | and adaptation of the file system to a variety of existing and future data |
---|
35 | storage devices. To this end, file system mount and unmount capabilities have |
---|
36 | been included in this RTEMS framework. |
---|
37 | |
---|
38 | This framework slightly alters the manner in which devices are handled under |
---|
39 | RTEMS from that of public release 4.0.0 and earlier. Devices that are defined |
---|
40 | under a given RTEMS configuration will now be registered as files in a mounted |
---|
41 | file system. Access to these device drivers and their associated devices may |
---|
42 | now be performed through the traditional file system open(), read(), write(), |
---|
43 | lseek(), fstat() and ioctl() functions in addition to the interface provided by |
---|
44 | the IO Manager in the RTEMS Classic API. |
---|
45 | |
---|
46 | An In-Memory File System (IMFS) is included which provides full POSIX |
---|
47 | filesystem functionality yet is RAM based. The IMFS maintains a node structure |
---|
48 | for each file, device, and directory in each mounted instantiation of its file |
---|
49 | system. The node structure is used to manage ownership, access rights, access |
---|
50 | time, modification time, and creation time. A union of structures within the |
---|
51 | IMFS nodal structure provide for manipulation of file data, device selection, |
---|
52 | or directory content as required by the nodal type. Manipulation of these |
---|
53 | properties is accomplished through the POSIX set of file and directory |
---|
54 | functions. In addition to being useful in its own right, the IMFS serves as a |
---|
55 | full featured example filesystem. |
---|
56 | |
---|
57 | The intended audience for this document is those persons implementing their own |
---|
58 | filesystem. Users of the filesystem may find information on the implementation |
---|
59 | useful. But the user interface to the filesystem is through the ISO/ANSI C |
---|
60 | Library and POSIX 1003.1b file and directory APIs. |
---|