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