Rev 2404 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2404 | Rev 2435 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
33 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ |
34 | */ |
35 | 35 | ||
- | 36 | /** @addtogroup FileSystemImpl |
|
- | 37 | * @{ |
|
- | 38 | */ |
|
36 | 39 | ||
- | 40 | /** |
|
- | 41 | * @file type.h |
|
37 | /* Declaration of the basic used types which are part of the V1 and V2 inode |
42 | * @brief Declaration of the basic used types which are part of the V1 and V2 inode |
38 | * as it is on the disk (not in memory). |
43 | * as it is on the disk (not in memory). |
39 | */ |
44 | */ |
40 | 45 | ||
41 | 46 | ||
42 | #ifndef _TYPE_H |
47 | #ifndef _TYPE_H |
43 | #define _TYPE_H |
48 | #define _TYPE_H |
44 | 49 | ||
45 | #include <sys/time.h> |
50 | #include <sys/time.h> |
46 | 51 | ||
47 | /* Types used in disk, inode, etc. data structures. */ |
52 | /* Types used in disk, inode, etc. data structures. */ |
48 | typedef unsigned short mode_t; /* file type and permissions bits */ |
53 | typedef unsigned short mode_t; /**< file type and permissions bits */ |
49 | typedef char nlink_t; /* number of links to a file */ |
54 | typedef char nlink_t; /**< number of links to a file */ |
50 | typedef short dev_t; /* holds (major|minor) device pair */ |
55 | typedef short dev_t; /**< holds (major|minor) device pair */ |
51 | typedef char gid_t; /* group id */ |
56 | typedef char gid_t; /**< group id */ |
52 | typedef unsigned short ino_t; /* i-node number */ |
57 | typedef unsigned short ino_t; /**< i-node number */ |
53 | typedef unsigned long offset_t; /* offset within a file */ |
58 | typedef unsigned long offset_t; /**< offset within a file */ |
54 | typedef int pid_t; /* process id (must be signed) */ |
59 | typedef int pid_t; /**< process id (must be signed) */ |
55 | typedef short uid_t; /* user id */ |
60 | typedef short uid_t; /**< user id */ |
56 | typedef unsigned long zone_t; /* zone number */ |
61 | typedef unsigned long zone_t; /**< zone number */ |
57 | typedef unsigned short zone1_t; /* zone number for V1 file systems */ |
62 | typedef unsigned short zone1_t; /**< zone number for V1 file systems */ |
58 | typedef unsigned long block_num_t; /* block number */ |
63 | typedef unsigned long block_num_t; /**< block number */ |
59 | typedef unsigned long bit_t; /* bit number in a bit map */ |
64 | typedef unsigned long bit_t; /**< bit number in a bit map */ |
60 | typedef unsigned short bitchunk_t; /* collection of bits in a bitmap */ |
65 | typedef unsigned short bitchunk_t; /**< collection of bits in a bitmap */ |
61 | 66 | ||
62 | typedef unsigned char u8_t; /* 8 bit type */ |
67 | typedef unsigned char u8_t; /**< 8 bit type */ |
63 | typedef unsigned short u16_t; /* 16 bit type */ |
68 | typedef unsigned short u16_t; /**< 16 bit type */ |
64 | typedef unsigned long u32_t; /* 32 bit type */ |
69 | typedef unsigned long u32_t; /**< 32 bit type */ |
65 | 70 | ||
66 | typedef char i8_t; /* 8 bit signed type */ |
71 | typedef char i8_t; /**< 8 bit signed type */ |
67 | typedef short i16_t; /* 16 bit signed type */ |
72 | typedef short i16_t; /**< 16 bit signed type */ |
68 | typedef long i32_t; /* 32 bit signed type */ |
73 | typedef long i32_t; /**< 32 bit signed type */ |
69 | 74 | ||
70 | //typedef unsigned long phys_bytes;/* physical addresses and lengths in bytes */ |
75 | //typedef unsigned long phys_bytes;/* physical addresses and lengths in bytes */ |
71 | 76 | ||
72 | 77 | ||
- | 78 | /** |
|
73 | /* Declaration of the V1 inode as it is on the disk (not in core). */ |
79 | * Declaration of the V1 inode as it is on the disk (not in core). |
- | 80 | */ |
|
74 | typedef struct { /* V1.x disk inode */ |
81 | typedef struct { /**< V1.x disk inode */ |
75 | mode_t d1_mode; /* file type, protection, etc. */ |
82 | mode_t d1_mode; /**< file type, protection, etc. */ |
76 | uid_t d1_uid; /* user id of the file's owner */ |
83 | uid_t d1_uid; /**< user id of the file's owner */ |
77 | offset_t d1_size; /* current file size in bytes */ |
84 | offset_t d1_size; /**< current file size in bytes */ |
78 | time_t d1_mtime; /* when was file data last changed */ |
85 | time_t d1_mtime; /**< when was file data last changed */ |
79 | gid_t d1_gid; /* group number */ |
86 | gid_t d1_gid; /**< group number */ |
80 | nlink_t d1_nlinks; /* how many links to this file */ |
87 | nlink_t d1_nlinks; /**< how many links to this file */ |
81 | zone1_t d1_zone[V1_NR_TZONES]; /* block nums for direct, ind, and dbl ind */ |
88 | zone1_t d1_zone[V1_NR_TZONES]; /**< block nums for direct, ind, and dbl ind */ |
82 | } d1_inode_t; |
89 | } d1_inode_t; |
83 | 90 | ||
- | 91 | /** |
|
84 | /* Declaration of the V2 inode as it is on the disk (not in core). */ |
92 | * Declaration of the V2 inode as it is on the disk (not in core). |
- | 93 | */ |
|
85 | typedef struct { /* V2.x disk inode */ |
94 | typedef struct { /**< V2.x disk inode */ |
86 | mode_t d2_mode; /* file type, protection, etc. */ |
95 | mode_t d2_mode; /**< file type, protection, etc. */ |
87 | u16_t d2_nlinks; /* how many links to this file. HACK! */ |
96 | u16_t d2_nlinks; /**< how many links to this file. HACK! */ |
88 | uid_t d2_uid; /* user id of the file's owner. */ |
97 | uid_t d2_uid; /**< user id of the file's owner. */ |
89 | u16_t d2_gid; /* group number HACK! */ |
98 | u16_t d2_gid; /**< group number HACK! */ |
90 | offset_t d2_size; /* current file size in bytes */ |
99 | offset_t d2_size; /**< current file size in bytes */ |
91 | time_t d2_atime; /* when was file data last accessed */ |
100 | time_t d2_atime; /**< when was file data last accessed */ |
92 | time_t d2_mtime; /* when was file data last changed */ |
101 | time_t d2_mtime; /**< when was file data last changed */ |
93 | time_t d2_ctime; /* when was inode data last changed */ |
102 | time_t d2_ctime; /**< when was inode data last changed */ |
94 | zone_t d2_zone[V2_NR_TZONES]; /* block nums for direct, ind, and dbl ind */ |
103 | zone_t d2_zone[V2_NR_TZONES]; /**< block nums for direct, ind, and dbl ind */ |
95 | } d2_inode_t; |
104 | } d2_inode_t; |
96 | 105 | ||
97 | #endif /* _TYPE_H */ |
106 | #endif /* _TYPE_H */ |
98 | 107 | ||
- | 108 | ||
- | 109 | /** |
|
- | 110 | * } |
|
- | 111 | */ |
|
- | 112 |