git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debug, Debug, Debug
[tpg/acess2.git]
/
Modules
/
Filesystems
/
NTFS
/
common.h
diff --git
a/Modules/Filesystems/NTFS/common.h
b/Modules/Filesystems/NTFS/common.h
index
fb3fe35
..
598120d
100644
(file)
--- a/
Modules/Filesystems/NTFS/common.h
+++ b/
Modules/Filesystems/NTFS/common.h
@@
-1,8
+1,19
@@
/*
/*
+ * Acess2 - NTFS Driver
+ * By John Hodge (thePowersGang)
+ * This file is published under the terms of the Acess licence. See the
+ * file COPYING for details.
+ *
+ * common.h - Common Types and Definitions
*/
#ifndef _COMMON_H_
#define _COMMON_H_
*/
#ifndef _COMMON_H_
#define _COMMON_H_
+#include <acess.h>
+#include <vfs.h>
+
+typedef Uint16 WCHAR;
+
// === STRUCTURES ===
/**
* In-memory representation of an NTFS Disk
// === STRUCTURES ===
/**
* In-memory representation of an NTFS Disk
@@
-10,7
+21,12
@@
typedef struct sNTFS_Disk
{
int FD;
typedef struct sNTFS_Disk
{
int FD;
- Uint64 MFTOfs;
+ int CacheHandle;
+
+ int ClusterSize;
+ Uint64 MFTBase;
+ Uint32 MFTRecSize;
+
tVFS_Node RootNode;
} tNTFS_Disk;
tVFS_Node RootNode;
} tNTFS_Disk;
@@
-22,31
+38,35
@@
typedef struct sNTFS_BootSector
Uint16 BytesPerSector;
Uint8 SectorsPerCluster;
Uint16 BytesPerSector;
Uint8 SectorsPerCluster;
- //
14
+ //
0xE
Uint8 Unused[7];
Uint8 MediaDescriptor;
Uint16 Unused2;
Uint16 SectorsPerTrack;
Uint8 Unused[7];
Uint8 MediaDescriptor;
Uint16 Unused2;
Uint16 SectorsPerTrack;
+ Uint16 Heads;
+ // 0x1C
Uint64 Unused3;
Uint64 Unused3;
- Uint32 Unk
nown;
+ Uint32 Unk
own; // Usually 0x00800080 (according to Linux docs)
- //
3
8
+ //
0x2
8
Uint64 TotalSectorCount; // Size of volume in sectors
Uint64 MFTStart; // Logical Cluster Number of Cluster 0 of MFT
Uint64 MFTMirrorStart; // Logical Cluster Number of Cluster 0 of MFT Backup
Uint64 TotalSectorCount; // Size of volume in sectors
Uint64 MFTStart; // Logical Cluster Number of Cluster 0 of MFT
Uint64 MFTMirrorStart; // Logical Cluster Number of Cluster 0 of MFT Backup
- //
6
0
+ //
0x4
0
// If either of these are -ve, the size can be obtained via
// SizeInBytes = 2^(-1 * Value)
// If either of these are -ve, the size can be obtained via
// SizeInBytes = 2^(-1 * Value)
- Uint32 ClustersPerMFTRecord;
- Uint32 ClustersPerIndexRecord;
+ Sint8 ClustersPerMFTRecord;
+ Uint8 Unused4[3];
+ Sint8 ClustersPerIndexRecord;
+ Uint8 Unused5[3];
Uint64 SerialNumber;
Uint64 SerialNumber;
- Uint8 Padding[51
5-offsetof(tNTFS_BootSector, Padding)
];
+ Uint8 Padding[51
2-0x50
];
-} tNTFS_BootSector;
+}
PACKED
tNTFS_BootSector;
/**
* FILE header, an entry in the MFT
/**
* FILE header, an entry in the MFT
@@
-88,7
+108,7
@@
typedef struct sNTFS_FILE_Header
} All;
} OSDep;
} All;
} OSDep;
-} tNTFS_FILE_Header;
+}
PACKED
tNTFS_FILE_Header;
/**
* File Attribute, follows the FILE header
/**
* File Attribute, follows the FILE header
@@
-128,6
+148,6
@@
typedef struct sNTFS_FILE_Attrib
// Data Runs
} NonResident;
};
// Data Runs
} NonResident;
};
-} tNTFS_FILE_Attrib;
+}
PACKED
tNTFS_FILE_Attrib;
#endif
#endif
UCC
git Repository :: git.ucc.asn.au