xref: /reactos/drivers/filesystems/fs_rec/ext.h (revision 1f2d67a8)
1 /*
2  * COPYRIGHT:        See COPYING in the top level directory
3  * PROJECT:          ReactOS File System Recognizer
4  * FILE:             drivers/filesystems/fs_rec/ext.h
5  * PURPOSE:          EXT Header File
6  * PROGRAMMER:       Pierre Schweitzer (pierre@reactos.org)
7  */
8 
9 #include <pshpack1.h>
10 typedef struct _EXT_SUPER_BLOCK {
11     ULONG InodesCount;
12     ULONG BlocksCount;
13     ULONG ReservedBlocksCount;
14     ULONG FreeBlocksCount;
15     ULONG FreeInodesCount;
16     ULONG FirstDataBlock;
17     ULONG LogBlockSize;
18     LONG LogFragSize;
19     ULONG BlocksPerGroup;
20     ULONG FragsPerGroup;
21     ULONG InodesPerGroup;
22     ULONG MountTime;
23     ULONG WriteTime;
24     USHORT MountCount;
25     SHORT MaxMountCount;
26     USHORT Magic;
27     USHORT State;
28     USHORT Errors;
29     USHORT MinorRevLevel;
30     ULONG LastCheck;
31     ULONG CheckInterval;
32     ULONG CreatorOS;
33     ULONG RevLevel;
34     USHORT DefResUid;
35     USHORT DefResGid;
36         // Partial
37 } EXT_SUPER_BLOCK, *PEXT_SUPER_BLOCK;
38 #include <poppack.h>
39 
40 C_ASSERT(FIELD_OFFSET(EXT_SUPER_BLOCK, FreeInodesCount) == 0x10);
41 C_ASSERT(FIELD_OFFSET(EXT_SUPER_BLOCK, BlocksPerGroup) == 0x20);
42 C_ASSERT(FIELD_OFFSET(EXT_SUPER_BLOCK, WriteTime) == 0x30);
43 C_ASSERT(FIELD_OFFSET(EXT_SUPER_BLOCK, LastCheck) == 0x40);
44 C_ASSERT(FIELD_OFFSET(EXT_SUPER_BLOCK, DefResUid) == 0x50);
45 
46 #define EXT_SUPER_MAGIC 0xEF53
47 #define EXT_SB_OFFSET 0x400
48 #define EXT_SB_SIZE 0x400
49