mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
[FORMATTING]
- TABS -> SPACES svn path=/trunk/; revision=38984
This commit is contained in:
parent
25efba5b5b
commit
2e3d23a37d
1 changed files with 99 additions and 100 deletions
|
@ -65,31 +65,31 @@ typedef union _UCHAR4
|
|||
//
|
||||
typedef struct _PACKED_BIOS_PARAMETER_BLOCK
|
||||
{
|
||||
UCHAR BytesPerSector[2];
|
||||
UCHAR SectorsPerCluster[1];
|
||||
UCHAR ReservedSectors[2];
|
||||
UCHAR Fats[1];
|
||||
UCHAR RootEntries[2];
|
||||
UCHAR Sectors[2];
|
||||
UCHAR Media[1];
|
||||
UCHAR SectorsPerFat[2];
|
||||
UCHAR SectorsPerTrack[2];
|
||||
UCHAR Heads[2];
|
||||
UCHAR HiddenSectors[4];
|
||||
UCHAR LargeSectors[4];
|
||||
UCHAR BytesPerSector[2];
|
||||
UCHAR SectorsPerCluster[1];
|
||||
UCHAR ReservedSectors[2];
|
||||
UCHAR Fats[1];
|
||||
UCHAR RootEntries[2];
|
||||
UCHAR Sectors[2];
|
||||
UCHAR Media[1];
|
||||
UCHAR SectorsPerFat[2];
|
||||
UCHAR SectorsPerTrack[2];
|
||||
UCHAR Heads[2];
|
||||
UCHAR HiddenSectors[4];
|
||||
UCHAR LargeSectors[4];
|
||||
} PACKED_BIOS_PARAMETER_BLOCK, *PPACKED_BIOS_PARAMETER_BLOCK;
|
||||
// sizeof = 0x019
|
||||
|
||||
typedef struct _PACKED_BIOS_PARAMETER_BLOCK_EX
|
||||
{
|
||||
PACKED_BIOS_PARAMETER_BLOCK Block;
|
||||
UCHAR LargeSectorsPerFat[4];
|
||||
UCHAR ExtendedFlags[2];
|
||||
UCHAR FsVersion[2];
|
||||
UCHAR RootDirFirstCluster[4];
|
||||
UCHAR FsInfoSector[2];
|
||||
UCHAR BackupBootSector[2];
|
||||
UCHAR Reserved[12];
|
||||
PACKED_BIOS_PARAMETER_BLOCK Block;
|
||||
UCHAR LargeSectorsPerFat[4];
|
||||
UCHAR ExtendedFlags[2];
|
||||
UCHAR FsVersion[2];
|
||||
UCHAR RootDirFirstCluster[4];
|
||||
UCHAR FsInfoSector[2];
|
||||
UCHAR BackupBootSector[2];
|
||||
UCHAR Reserved[12];
|
||||
} PACKED_BIOS_PARAMETER_BLOCK_EX, *PPACKED_BIOS_PARAMETER_BLOCK_EX;
|
||||
// sizeof = 0x035 53
|
||||
|
||||
|
@ -98,82 +98,82 @@ typedef struct _PACKED_BIOS_PARAMETER_BLOCK_EX
|
|||
//
|
||||
typedef struct BIOS_PARAMETER_BLOCK
|
||||
{
|
||||
USHORT BytesPerSector;
|
||||
UCHAR SectorsPerCluster;
|
||||
USHORT ReservedSectors;
|
||||
UCHAR Fats;
|
||||
USHORT RootEntries;
|
||||
USHORT Sectors;
|
||||
UCHAR Media;
|
||||
USHORT SectorsPerFat;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT Heads;
|
||||
ULONG HiddenSectors;
|
||||
ULONG LargeSectors;
|
||||
ULONG LargeSectorsPerFat;
|
||||
USHORT BytesPerSector;
|
||||
UCHAR SectorsPerCluster;
|
||||
USHORT ReservedSectors;
|
||||
UCHAR Fats;
|
||||
USHORT RootEntries;
|
||||
USHORT Sectors;
|
||||
UCHAR Media;
|
||||
USHORT SectorsPerFat;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT Heads;
|
||||
ULONG HiddenSectors;
|
||||
ULONG LargeSectors;
|
||||
ULONG LargeSectorsPerFat;
|
||||
union
|
||||
{
|
||||
USHORT ExtendedFlags;
|
||||
USHORT ExtendedFlags;
|
||||
struct
|
||||
{
|
||||
ULONG ActiveFat:4;
|
||||
ULONG Reserved0:3;
|
||||
ULONG MirrorDisabled:1;
|
||||
ULONG Reserved1:8;
|
||||
ULONG ActiveFat:4;
|
||||
ULONG Reserved0:3;
|
||||
ULONG MirrorDisabled:1;
|
||||
ULONG Reserved1:8;
|
||||
};
|
||||
};
|
||||
USHORT FsVersion;
|
||||
ULONG RootDirFirstCluster;
|
||||
USHORT FsInfoSector;
|
||||
USHORT BackupBootSector;
|
||||
USHORT FsVersion;
|
||||
ULONG RootDirFirstCluster;
|
||||
USHORT FsInfoSector;
|
||||
USHORT BackupBootSector;
|
||||
} BIOS_PARAMETER_BLOCK, *PBIOS_PARAMETER_BLOCK;
|
||||
|
||||
#define FatValidBytesPerSector(xBytes) \
|
||||
(!((xBytes) & ((xBytes)-1)) && (xBytes)>=0x80 && (xBytes)<=0x1000)
|
||||
(!((xBytes) & ((xBytes)-1)) && (xBytes)>=0x80 && (xBytes)<=0x1000)
|
||||
|
||||
#define FatValidSectorsPerCluster(xSectors) \
|
||||
(!((xSectors) & ((xSectors)-1)) && (xSectors)>=0 && (xSectors)<=0x80)
|
||||
(!((xSectors) & ((xSectors)-1)) && (xSectors)>=0 && (xSectors)<=0x80)
|
||||
|
||||
typedef struct _PACKED_BOOT_SECTOR
|
||||
{
|
||||
UCHAR Jump[3];
|
||||
UCHAR Oem[8];
|
||||
UCHAR Jump[3];
|
||||
UCHAR Oem[8];
|
||||
PACKED_BIOS_PARAMETER_BLOCK PackedBpb;
|
||||
UCHAR PhysicalDriveNumber;
|
||||
UCHAR CurrentHead;
|
||||
UCHAR Signature;
|
||||
UCHAR Id[4];
|
||||
UCHAR VolumeLabel[11];
|
||||
UCHAR SystemId[8];
|
||||
UCHAR PhysicalDriveNumber;
|
||||
UCHAR CurrentHead;
|
||||
UCHAR Signature;
|
||||
UCHAR Id[4];
|
||||
UCHAR VolumeLabel[11];
|
||||
UCHAR SystemId[8];
|
||||
} PACKED_BOOT_SECTOR, *PPACKED_BOOT_SECTOR;
|
||||
// sizeof = 0x03E
|
||||
|
||||
typedef struct _PACKED_BOOT_SECTOR_EX
|
||||
{
|
||||
UCHAR Jump[3];
|
||||
UCHAR Oem[8];
|
||||
PACKED_BIOS_PARAMETER_BLOCK_EX PackedBpb;
|
||||
UCHAR PhysicalDriveNumber;
|
||||
UCHAR CurrentHead;
|
||||
UCHAR Signature;
|
||||
UCHAR Id[4];
|
||||
UCHAR VolumeLabel[11];
|
||||
UCHAR SystemId[8];
|
||||
UCHAR Jump[3];
|
||||
UCHAR Oem[8];
|
||||
PACKED_BIOS_PARAMETER_BLOCK_EX PackedBpb;
|
||||
UCHAR PhysicalDriveNumber;
|
||||
UCHAR CurrentHead;
|
||||
UCHAR Signature;
|
||||
UCHAR Id[4];
|
||||
UCHAR VolumeLabel[11];
|
||||
UCHAR SystemId[8];
|
||||
} PACKED_BOOT_SECTOR_EX, *PPACKED_BOOT_SECTOR_EX;
|
||||
// sizeof = 0x060
|
||||
|
||||
#define FatBootSectorJumpValid(xMagic) \
|
||||
((xMagic)[0] == 0xe9 || (xMagic)[0] == 0xeb || (xMagic)[0] == 0x49)
|
||||
((xMagic)[0] == 0xe9 || (xMagic)[0] == 0xeb || (xMagic)[0] == 0x49)
|
||||
|
||||
typedef struct _FSINFO_SECTOR
|
||||
{
|
||||
ULONG SectorBeginSignature;
|
||||
UCHAR Reserved[480];
|
||||
ULONG FsInfoSignature;
|
||||
ULONG FreeClusterCount;
|
||||
ULONG NextFreeCluster;
|
||||
UCHAR Reserved0[12];
|
||||
ULONG SectorEndSignature;
|
||||
ULONG SectorBeginSignature;
|
||||
UCHAR Reserved[480];
|
||||
ULONG FsInfoSignature;
|
||||
ULONG FreeClusterCount;
|
||||
ULONG NextFreeCluster;
|
||||
UCHAR Reserved0[12];
|
||||
ULONG SectorEndSignature;
|
||||
} FSINFO_SECTOR, *PFSINFO_SECTOR;
|
||||
// sizeof = 0x200
|
||||
#define FSINFO_SECTOR_BEGIN_SIGNATURE 0x41615252
|
||||
|
@ -182,11 +182,10 @@ typedef struct _FSINFO_SECTOR
|
|||
//
|
||||
// Cluster Markers:
|
||||
//
|
||||
//
|
||||
#define FAT_CLUSTER_AVAILABLE 0x00000000
|
||||
#define FAT_CLUSTER_RESERVED 0x0ffffff0
|
||||
#define FAT_CLUSTER_BAD 0x0ffffff7
|
||||
#define FAT_CLUSTER_LAST 0x0fffffff
|
||||
#define FAT_CLUSTER_AVAILABLE 0x00000000
|
||||
#define FAT_CLUSTER_RESERVED 0x0ffffff0
|
||||
#define FAT_CLUSTER_BAD 0x0ffffff7
|
||||
#define FAT_CLUSTER_LAST 0x0fffffff
|
||||
//
|
||||
// Directory Structure:
|
||||
//
|
||||
|
@ -232,31 +231,31 @@ typedef struct _FAT_DATETIME {
|
|||
//
|
||||
typedef struct _DIR_ENTRY
|
||||
{
|
||||
UCHAR FileName[11];
|
||||
UCHAR Attributes;
|
||||
UCHAR Case;
|
||||
UCHAR CreationTimeTenMs;
|
||||
UCHAR FileName[11];
|
||||
UCHAR Attributes;
|
||||
UCHAR Case;
|
||||
UCHAR CreationTimeTenMs;
|
||||
FAT_DATETIME CreationDateTime;
|
||||
FAT_DATE LastAccessDate;
|
||||
union {
|
||||
USHORT ExtendedAttributes;
|
||||
USHORT FirstClusterOfFileHi;
|
||||
};
|
||||
union {
|
||||
USHORT ExtendedAttributes;
|
||||
USHORT FirstClusterOfFileHi;
|
||||
};
|
||||
FAT_DATETIME LastWriteDateTime;
|
||||
USHORT FirstCluster;
|
||||
ULONG FileSize;
|
||||
USHORT FirstCluster;
|
||||
ULONG FileSize;
|
||||
} DIR_ENTRY, *PDIR_ENTRY;
|
||||
// sizeof = 0x020
|
||||
|
||||
typedef struct _LONG_FILE_NAME_ENTRY {
|
||||
UCHAR Index;
|
||||
UCHAR NameA[10];
|
||||
UCHAR Attributes;
|
||||
UCHAR Type;
|
||||
UCHAR Checksum;
|
||||
USHORT NameB[6];
|
||||
USHORT Reserved;
|
||||
USHORT NameC[2];
|
||||
UCHAR Index;
|
||||
UCHAR NameA[10];
|
||||
UCHAR Attributes;
|
||||
UCHAR Type;
|
||||
UCHAR Checksum;
|
||||
USHORT NameB[6];
|
||||
USHORT Reserved;
|
||||
USHORT NameC[2];
|
||||
} LONG_FILE_NAME_ENTRY, *PLONG_FILE_NAME_ENTRY;
|
||||
// sizeof = 0x020
|
||||
|
||||
|
@ -285,14 +284,14 @@ typedef struct _LONG_FILE_NAME_ENTRY {
|
|||
FAT_DIRENT_ATTR_VOLUME_ID)
|
||||
|
||||
typedef struct _PACKED_LFN_DIRENT {
|
||||
UCHAR Ordinal; // offset = 0
|
||||
UCHAR Name1[10]; // offset = 1 (Really 5 chars, but not WCHAR aligned)
|
||||
UCHAR Attributes; // offset = 11
|
||||
UCHAR Type; // offset = 12
|
||||
UCHAR Checksum; // offset = 13
|
||||
WCHAR Name2[6]; // offset = 14
|
||||
USHORT MustBeZero; // offset = 26
|
||||
WCHAR Name3[2]; // offset = 28
|
||||
UCHAR Ordinal; // offset = 0
|
||||
UCHAR Name1[10]; // offset = 1 (Really 5 chars, but not WCHAR aligned)
|
||||
UCHAR Attributes; // offset = 11
|
||||
UCHAR Type; // offset = 12
|
||||
UCHAR Checksum; // offset = 13
|
||||
WCHAR Name2[6]; // offset = 14
|
||||
USHORT MustBeZero; // offset = 26
|
||||
WCHAR Name3[2]; // offset = 28
|
||||
} PACKED_LFN_DIRENT; // sizeof = 32
|
||||
|
||||
#endif//__FAT_H__
|
||||
|
|
Loading…
Reference in a new issue