mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Moved comments to XML documentation.
This commit is contained in:
@@ -49,12 +49,19 @@ namespace DiscImageChef.Plugins
|
||||
{
|
||||
class AppleHFS : Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// "BD", HFS magic
|
||||
/// </summary>
|
||||
const UInt16 HFS_MAGIC = 0x4244;
|
||||
// "BD"
|
||||
/// <summary>
|
||||
/// "H+", HFS+ magic
|
||||
/// </summary>
|
||||
const UInt16 HFSP_MAGIC = 0x482B;
|
||||
// "H+"
|
||||
/// <summary>
|
||||
/// "LK", HFS bootblock magic
|
||||
/// </summary>
|
||||
const UInt16 HFSBB_MAGIC = 0x4C4B;
|
||||
// "LK"
|
||||
|
||||
public AppleHFS()
|
||||
{
|
||||
Name = "Apple Hierarchical File System";
|
||||
@@ -405,128 +412,133 @@ namespace DiscImageChef.Plugins
|
||||
return sector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Master Directory Block, should be sector 2 in volume
|
||||
/// </summary>
|
||||
struct HFS_MasterDirectoryBlock // Should be sector 2 in volume
|
||||
{
|
||||
/// <summary>0x000, Signature, 0x4244</summary>
|
||||
public UInt16 drSigWord;
|
||||
// 0x000, Signature, 0x4244
|
||||
/// <summary>0x002, Volume creation date</summary>
|
||||
public UInt32 drCrDate;
|
||||
// 0x002, Volume creation date
|
||||
/// <summary>0x006, Volume last modification date</summary>
|
||||
public UInt32 drLsMod;
|
||||
// 0x006, Volume last modification date
|
||||
/// <summary>0x00A, Volume attributes</summary>
|
||||
public UInt16 drAtrb;
|
||||
// 0x00A, Volume attributes
|
||||
/// <summary>0x00C, Files in root directory</summary>
|
||||
public UInt16 drNmFls;
|
||||
// 0x00C, Files in root directory
|
||||
/// <summary>0x00E, Start 512-byte sector of volume bitmap</summary>
|
||||
public UInt16 drVBMSt;
|
||||
// 0x00E, Start 512-byte sector of volume bitmap
|
||||
/// <summary>0x010, Allocation block to begin next allocation</summary>
|
||||
public UInt16 drAllocPtr;
|
||||
// 0x010, Allocation block to begin next allocation
|
||||
/// <summary>0x012, Allocation blocks</summary>
|
||||
public UInt16 drNmAlBlks;
|
||||
// 0x012, Allocation blocks
|
||||
/// <summary>0x014, Bytes per allocation block</summary>
|
||||
public UInt32 drAlBlkSiz;
|
||||
// 0x014, Bytes per allocation block
|
||||
/// <summary>0x018, Bytes to allocate when extending a file</summary>
|
||||
public UInt32 drClpSiz;
|
||||
// 0x018, Bytes to allocate when extending a file
|
||||
/// <summary>0x01C, Start 512-byte sector of first allocation block</summary>
|
||||
public UInt16 drAlBlSt;
|
||||
// 0x01C, Start 512-byte sector of first allocation block
|
||||
/// <summary>0x01E, CNID for next file</summary>
|
||||
public UInt32 drNxtCNID;
|
||||
// 0x01E, CNID for next file
|
||||
/// <summary>0x022, Free allocation blocks</summary>
|
||||
public UInt16 drFreeBks;
|
||||
// 0x022, Free allocation blocks
|
||||
/// <summary>0x024, Volume name (28 bytes)</summary>
|
||||
public string drVN;
|
||||
// 0x024, Volume name (28 bytes)
|
||||
/// <summary>0x040, Volume last backup time</summary>
|
||||
public UInt32 drVolBkUp;
|
||||
// 0x040, Volume last backup time
|
||||
/// <summary>0x044, Volume backup sequence number</summary>
|
||||
public UInt16 drVSeqNum;
|
||||
// 0x044, Volume backup sequence number
|
||||
/// <summary>0x046, Filesystem write count</summary>
|
||||
public UInt32 drWrCnt;
|
||||
// 0x046, Filesystem write count
|
||||
/// <summary>0x04A, Bytes to allocate when extending the extents B-Tree</summary>
|
||||
public UInt32 drXTClpSiz;
|
||||
// 0x04A, Bytes to allocate when extending the extents B-Tree
|
||||
/// <summary>0x04E, Bytes to allocate when extending the catalog B-Tree</summary>
|
||||
public UInt32 drCTClpSiz;
|
||||
// 0x04E, Bytes to allocate when extending the catalog B-Tree
|
||||
/// <summary>0x052, Number of directories in root directory</summary>
|
||||
public UInt16 drNmRtDirs;
|
||||
// 0x052, Number of directories in root directory
|
||||
/// <summary>0x054, Number of files in the volume</summary>
|
||||
public UInt32 drFilCnt;
|
||||
// 0x054, Number of files in the volume
|
||||
/// <summary>0x058, Number of directories in the volume</summary>
|
||||
public UInt32 drDirCnt;
|
||||
// 0x058, Number of directories in the volume
|
||||
/// <summary>0x05C, finderInfo[0], CNID for bootable system's directory</summary>
|
||||
public UInt32 drFndrInfo0;
|
||||
// 0x05C, finderInfo[0], CNID for bootable system's directory
|
||||
/// <summary>0x060, finderInfo[1], CNID of the directory containing the boot application</summary>
|
||||
public UInt32 drFndrInfo1;
|
||||
// 0x060, finderInfo[1], CNID of the directory containing the boot application
|
||||
/// <summary>0x064, finderInfo[2], CNID of the directory that should be opened on boot</summary>
|
||||
public UInt32 drFndrInfo2;
|
||||
// 0x064, finderInfo[2], CNID of the directory that should be opened on boot
|
||||
/// <summary>0x068, finderInfo[3], CNID for Mac OS 8 or 9 directory</summary>
|
||||
public UInt32 drFndrInfo3;
|
||||
// 0x068, finderInfo[3], CNID for Mac OS 8 or 9 directory
|
||||
/// <summary>0x06C, finderInfo[4], Reserved</summary>
|
||||
public UInt32 drFndrInfo4;
|
||||
// 0x06C, finderInfo[4], Reserved
|
||||
/// <summary>0x070, finderInfo[5], CNID for Mac OS X directory</summary>
|
||||
public UInt32 drFndrInfo5;
|
||||
// 0x070, finderInfo[5], CNID for Mac OS X directory
|
||||
/// <summary>0x074, finderInfo[6], first part of Mac OS X volume ID</summary>
|
||||
public UInt32 drFndrInfo6;
|
||||
// 0x074, finderInfo[6], first part of Mac OS X volume ID
|
||||
/// <summary>0x078, finderInfo[7], second part of Mac OS X volume ID</summary>
|
||||
public UInt32 drFndrInfo7;
|
||||
// 0x078, finderInfo[7], second part of Mac OS X volume ID
|
||||
// If wrapping HFS+
|
||||
/// <summary>0x07C, Embedded volume signature, "H+" if HFS+ is embedded ignore following two fields if not</summary>
|
||||
public UInt16 drEmbedSigWord;
|
||||
// 0x07C, Embedded volume signature, "H+" if HFS+ is embedded ignore following two fields if not
|
||||
/// <summary>0x07E, Starting block number of embedded HFS+ volume</summary>
|
||||
public UInt16 xdrStABNt;
|
||||
// 0x07E, Starting block number of embedded HFS+ volume
|
||||
/// <summary>0x080, Allocation blocks used by embedded volume</summary>
|
||||
public UInt16 xdrNumABlks;
|
||||
// 0x080, Allocation blocks used by embedded volume
|
||||
// If not
|
||||
/// <summary>0x07C, Size in blocks of volume cache</summary>
|
||||
public UInt16 drVCSize;
|
||||
// 0x07C, Size in blocks of volume cache
|
||||
/// <summary>0x07E, Size in blocks of volume bitmap cache</summary>
|
||||
public UInt16 drVBMCSize;
|
||||
// 0x07E, Size in blocks of volume bitmap cache
|
||||
/// <summary>0x080, Size in blocks of volume common cache</summary>
|
||||
public UInt16 drCtlCSize;
|
||||
// 0x080, Size in blocks of volume common cache
|
||||
// End of variable variables :D
|
||||
/// <summary>0x082, Bytes in the extents B-Tree
|
||||
/// 3 HFS extents following, 32 bits each</summary>
|
||||
public UInt32 drXTFlSize;
|
||||
// 0x082, Bytes in the extents B-Tree
|
||||
// 3 HFS extents following, 32 bits each
|
||||
/// <summary>0x092, Bytes in the catalog B-Tree
|
||||
/// 3 HFS extents following, 32 bits each</summary>
|
||||
public UInt32 drCTFlSize;
|
||||
// 0x092, Bytes in the catalog B-Tree
|
||||
// 3 HFS extents following, 32 bits each
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should be sectors 0 and 1 in volume, followed by boot code
|
||||
/// </summary>
|
||||
struct HFS_BootBlock // Should be sectors 0 and 1 in volume
|
||||
{
|
||||
/// <summary>0x000, Signature, 0x4C4B if bootable</summary>
|
||||
public UInt16 signature;
|
||||
// 0x000, Signature, 0x4C4B if bootable
|
||||
/// <summary>0x002, Branch</summary>
|
||||
public UInt32 branch;
|
||||
// 0x002, Branch
|
||||
/// <summary>0x006, Boot block flags</summary>
|
||||
public byte boot_flags;
|
||||
// 0x006, Boot block flags
|
||||
/// <summary>0x007, Boot block version</summary>
|
||||
public byte boot_version;
|
||||
// 0x007, Boot block version
|
||||
/// <summary>0x008, Allocate secondary buffers</summary>
|
||||
public Int16 sec_sv_pages;
|
||||
// 0x008, Allocate secondary buffers
|
||||
/// <summary>0x00A, System file name (16 bytes)</summary>
|
||||
public string system_name;
|
||||
// 0x00A, System file name (16 bytes)
|
||||
/// <summary>0x01A, Finder file name (16 bytes)</summary>
|
||||
public string finder_name;
|
||||
// 0x01A, Finder file name (16 bytes)
|
||||
/// <summary>0x02A, Debugger file name (16 bytes)</summary>
|
||||
public string debug_name;
|
||||
// 0x02A, Debugger file name (16 bytes)
|
||||
/// <summary>0x03A, Disassembler file name (16 bytes)</summary>
|
||||
public string disasm_name;
|
||||
// 0x03A, Disassembler file name (16 bytes)
|
||||
/// <summary>0x04A, Startup screen file name (16 bytes)</summary>
|
||||
public string stupscr_name;
|
||||
// 0x04A, Startup screen file name (16 bytes)
|
||||
/// <summary>0x05A, First program to execute on boot (16 bytes)</summary>
|
||||
public string bootup_name;
|
||||
// 0x05A, First program to execute on boot (16 bytes)
|
||||
/// <summary>0x06A, Clipboard file name (16 bytes)</summary>
|
||||
public string clipbrd_name;
|
||||
// 0x06A, Clipboard file name (16 bytes)
|
||||
/// <summary>0x07A, 1/4 of maximum opened at a time files</summary>
|
||||
public UInt16 max_files;
|
||||
// 0x07A, 1/4 of maximum opened at a time files
|
||||
/// <summary>0x07C, Event queue size</summary>
|
||||
public UInt16 queue_size;
|
||||
// 0x07C, Event queue size
|
||||
/// <summary>0x07E, Heap size on a Mac with 128KiB of RAM</summary>
|
||||
public UInt32 heap_128k;
|
||||
// 0x07E, Heap size on a Mac with 128KiB of RAM
|
||||
/// <summary>0x082, Heap size on a Mac with 256KiB of RAM</summary>
|
||||
public UInt32 heap_256k;
|
||||
// 0x082, Heap size on a Mac with 256KiB of RAM
|
||||
/// <summary>0x086, Heap size on a Mac with 512KiB of RAM or more</summary>
|
||||
public UInt32 heap_512k;
|
||||
// 0x086, Heap size on a Mac with 512KiB of RAM or more
|
||||
}
|
||||
// Follows boot code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,12 +45,19 @@ namespace DiscImageChef.Plugins
|
||||
{
|
||||
class AppleHFSPlus : Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// "BD", HFS magic
|
||||
/// </summary>
|
||||
const UInt16 HFS_MAGIC = 0x4244;
|
||||
// "BD"
|
||||
/// <summary>
|
||||
/// "H+", HFS+ magic
|
||||
/// </summary>
|
||||
const UInt16 HFSP_MAGIC = 0x482B;
|
||||
// "H+"
|
||||
/// <summary>
|
||||
/// "HX", HFSX magic
|
||||
/// </summary>
|
||||
const UInt16 HFSX_MAGIC = 0x4858;
|
||||
// "HX"
|
||||
|
||||
public AppleHFSPlus()
|
||||
{
|
||||
Name = "Apple HFS+ filesystem";
|
||||
@@ -300,265 +307,268 @@ namespace DiscImageChef.Plugins
|
||||
else
|
||||
return;
|
||||
}
|
||||
// Size = 532 bytes
|
||||
struct HFSPlusVolumeHeader // Should be offset 0x0400 bytes in volume
|
||||
|
||||
/// <summary>
|
||||
/// HFS+ Volume Header, should be at offset 0x0400 bytes in volume with a size of 532 bytes
|
||||
/// </summary>
|
||||
struct HFSPlusVolumeHeader
|
||||
{
|
||||
/// <summary>0x000, "H+" for HFS+, "HX" for HFSX</summary>
|
||||
public UInt16 signature;
|
||||
// 0x000, "H+" for HFS+, "HX" for HFSX
|
||||
/// <summary>0x002, 4 for HFS+, 5 for HFSX</summary>
|
||||
public UInt16 version;
|
||||
// 0x002, 4 for HFS+, 5 for HFSX
|
||||
/// <summary>0x004, Volume attributes</summary>
|
||||
public UInt32 attributes;
|
||||
// 0x004, Volume attributes
|
||||
/// <summary>0x008, Implementation that last mounted the volume.
|
||||
/// Reserved by Apple:
|
||||
/// "8.10" Mac OS 8.1 to 9.2.2
|
||||
/// "10.0" Mac OS X
|
||||
/// "HFSJ" Journaled implementation
|
||||
/// "fsck" /sbin/fsck</summary>
|
||||
public string lastMountedVersion;
|
||||
// 0x008, Implementation that last mounted the volume.
|
||||
// Reserved by Apple:
|
||||
// "8.10" Mac OS 8.1 to 9.2.2
|
||||
// "10.0" Mac OS X
|
||||
// "HFSJ" Journaled implementation
|
||||
// "fsck" /sbin/fsck
|
||||
/// <summary>0x00C, Allocation block number containing the journal</summary>
|
||||
public UInt32 journalInfoBlock;
|
||||
// 0x00C, Allocation block number containing the journal
|
||||
/// <summary>0x010, Date of volume creation</summary>
|
||||
public ulong createDate;
|
||||
// 0x010, Date of volume creation
|
||||
/// <summary>0x018, Date of last volume modification</summary>
|
||||
public ulong modifyDate;
|
||||
// 0x018, Date of last volume modification
|
||||
/// <summary>0x020, Date of last backup</summary>
|
||||
public ulong backupDate;
|
||||
// 0x020, Date of last backup
|
||||
/// <summary>0x028, Date of last consistency check</summary>
|
||||
public ulong checkedDate;
|
||||
// 0x028, Date of last consistency check
|
||||
/// <summary>0x030, File on the volume</summary>
|
||||
public UInt32 fileCount;
|
||||
// 0x030, File on the volume
|
||||
/// <summary>0x034, Folders on the volume</summary>
|
||||
public UInt32 folderCount;
|
||||
// 0x034, Folders on the volume
|
||||
/// <summary>0x038, Bytes per allocation block</summary>
|
||||
public UInt32 blockSize;
|
||||
// 0x038, Bytes per allocation block
|
||||
/// <summary>0x03C, Allocation blocks on the volume</summary>
|
||||
public UInt32 totalBlocks;
|
||||
// 0x03C, Allocation blocks on the volume
|
||||
/// <summary>0x040, Free allocation blocks</summary>
|
||||
public UInt32 freeBlocks;
|
||||
// 0x040, Free allocation blocks
|
||||
/// <summary>0x044, Hint for next allocation block</summary>
|
||||
public UInt32 nextAllocation;
|
||||
// 0x044, Hint for next allocation block
|
||||
/// <summary>0x048, Resource fork clump size</summary>
|
||||
public UInt32 rsrcClumpSize;
|
||||
// 0x048, Resource fork clump size
|
||||
/// <summary>0x04C, Data fork clump size</summary>
|
||||
public UInt32 dataClumpSize;
|
||||
// 0x04C, Data fork clump size
|
||||
/// <summary>0x050, Next unused CNID</summary>
|
||||
public UInt32 nextCatalogID;
|
||||
// 0x050, Next unused CNID
|
||||
/// <summary>0x054, Times that the volume has been mounted writable</summary>
|
||||
public UInt32 writeCount;
|
||||
// 0x054, Times that the volume has been mounted writable
|
||||
/// <summary>0x058, Used text encoding hints</summary>
|
||||
public UInt64 encodingsBitmap;
|
||||
// 0x058, Used text encoding hints
|
||||
/// <summary>0x060, finderInfo[0], CNID for bootable system's directory</summary>
|
||||
public UInt32 drFndrInfo0;
|
||||
// 0x060, finderInfo[0], CNID for bootable system's directory
|
||||
/// <summary>0x064, finderInfo[1], CNID of the directory containing the boot application</summary>
|
||||
public UInt32 drFndrInfo1;
|
||||
// 0x064, finderInfo[1], CNID of the directory containing the boot application
|
||||
/// <summary>0x068, finderInfo[2], CNID of the directory that should be opened on boot</summary>
|
||||
public UInt32 drFndrInfo2;
|
||||
// 0x068, finderInfo[2], CNID of the directory that should be opened on boot
|
||||
/// <summary>0x06C, finderInfo[3], CNID for Mac OS 8 or 9 directory</summary>
|
||||
public UInt32 drFndrInfo3;
|
||||
// 0x06C, finderInfo[3], CNID for Mac OS 8 or 9 directory
|
||||
/// <summary>0x070, finderInfo[4], Reserved</summary>
|
||||
public UInt32 drFndrInfo4;
|
||||
// 0x070, finderInfo[4], Reserved
|
||||
/// <summary>0x074, finderInfo[5], CNID for Mac OS X directory</summary>
|
||||
public UInt32 drFndrInfo5;
|
||||
// 0x074, finderInfo[5], CNID for Mac OS X directory
|
||||
/// <summary>0x078, finderInfo[6], first part of Mac OS X volume ID</summary>
|
||||
public UInt32 drFndrInfo6;
|
||||
// 0x078, finderInfo[6], first part of Mac OS X volume ID
|
||||
/// <summary>0x07C, finderInfo[7], second part of Mac OS X volume ID</summary>
|
||||
public UInt32 drFndrInfo7;
|
||||
// 0x07C, finderInfo[7], second part of Mac OS X volume ID
|
||||
// HFSPlusForkData allocationFile;
|
||||
/// <summary>0x080</summary>
|
||||
public UInt64 allocationFile_logicalSize;
|
||||
// 0x080
|
||||
/// <summary>0x088</summary>
|
||||
public UInt32 allocationFile_clumpSize;
|
||||
// 0x088
|
||||
/// <summary>0x08C</summary>
|
||||
public UInt32 allocationFile_totalBlocks;
|
||||
// 0x08C
|
||||
/// <summary>0x090</summary>
|
||||
public UInt32 allocationFile_extents_startBlock0;
|
||||
// 0x090
|
||||
/// <summary>0x094</summary>
|
||||
public UInt32 allocationFile_extents_blockCount0;
|
||||
// 0x094
|
||||
/// <summary>0x098</summary>
|
||||
public UInt32 allocationFile_extents_startBlock1;
|
||||
// 0x098
|
||||
/// <summary>0x09C</summary>
|
||||
public UInt32 allocationFile_extents_blockCount1;
|
||||
// 0x09C
|
||||
/// <summary>0x0A0</summary>
|
||||
public UInt32 allocationFile_extents_startBlock2;
|
||||
// 0x0A0
|
||||
/// <summary>0x0A4</summary>
|
||||
public UInt32 allocationFile_extents_blockCount2;
|
||||
// 0x0A4
|
||||
/// <summary>0x0A8</summary>
|
||||
public UInt32 allocationFile_extents_startBlock3;
|
||||
// 0x0A8
|
||||
/// <summary>0x0AC</summary>
|
||||
public UInt32 allocationFile_extents_blockCount3;
|
||||
// 0x0AC
|
||||
/// <summary>0x0B0</summary>
|
||||
public UInt32 allocationFile_extents_startBlock4;
|
||||
// 0x0B0
|
||||
/// <summary>0x0B4</summary>
|
||||
public UInt32 allocationFile_extents_blockCount4;
|
||||
// 0x0B4
|
||||
/// <summary>0x0B8</summary>
|
||||
public UInt32 allocationFile_extents_startBlock5;
|
||||
// 0x0B8
|
||||
/// <summary>0x0BC</summary>
|
||||
public UInt32 allocationFile_extents_blockCount5;
|
||||
// 0x0BC
|
||||
/// <summary>0x0C0</summary>
|
||||
public UInt32 allocationFile_extents_startBlock6;
|
||||
// 0x0C0
|
||||
/// <summary>0x0C4</summary>
|
||||
public UInt32 allocationFile_extents_blockCount6;
|
||||
// 0x0C4
|
||||
/// <summary>0x0C8</summary>
|
||||
public UInt32 allocationFile_extents_startBlock7;
|
||||
// 0x0C8
|
||||
/// <summary>0x0CC</summary>
|
||||
public UInt32 allocationFile_extents_blockCount7;
|
||||
// 0x0CC
|
||||
// HFSPlusForkData extentsFile;
|
||||
/// <summary>0x0D0</summary>
|
||||
public UInt64 extentsFile_logicalSize;
|
||||
// 0x0D0
|
||||
/// <summary>0x0D8</summary>
|
||||
public UInt32 extentsFile_clumpSize;
|
||||
// 0x0D8
|
||||
/// <summary>0x0DC</summary>
|
||||
public UInt32 extentsFile_totalBlocks;
|
||||
// 0x0DC
|
||||
/// <summary>0x0E0</summary>
|
||||
public UInt32 extentsFile_extents_startBlock0;
|
||||
// 0x0E0
|
||||
/// <summary>0x0E4</summary>
|
||||
public UInt32 extentsFile_extents_blockCount0;
|
||||
// 0x0E4
|
||||
/// <summary>0x0E8</summary>
|
||||
public UInt32 extentsFile_extents_startBlock1;
|
||||
// 0x0E8
|
||||
/// <summary>0x0EC</summary>
|
||||
public UInt32 extentsFile_extents_blockCount1;
|
||||
// 0x0EC
|
||||
/// <summary>0x0F0</summary>
|
||||
public UInt32 extentsFile_extents_startBlock2;
|
||||
// 0x0F0
|
||||
/// <summary>0x0F4</summary>
|
||||
public UInt32 extentsFile_extents_blockCount2;
|
||||
// 0x0F4
|
||||
/// <summary>0x0F8</summary>
|
||||
public UInt32 extentsFile_extents_startBlock3;
|
||||
// 0x0F8
|
||||
/// <summary>0x0FC</summary>
|
||||
public UInt32 extentsFile_extents_blockCount3;
|
||||
// 0x0FC
|
||||
/// <summary>0x100</summary>
|
||||
public UInt32 extentsFile_extents_startBlock4;
|
||||
// 0x100
|
||||
/// <summary>0x104</summary>
|
||||
public UInt32 extentsFile_extents_blockCount4;
|
||||
// 0x104
|
||||
/// <summary>0x108</summary>
|
||||
public UInt32 extentsFile_extents_startBlock5;
|
||||
// 0x108
|
||||
/// <summary>0x10C</summary>
|
||||
public UInt32 extentsFile_extents_blockCount5;
|
||||
// 0x10C
|
||||
/// <summary>0x110</summary>
|
||||
public UInt32 extentsFile_extents_startBlock6;
|
||||
// 0x110
|
||||
/// <summary>0x114</summary>
|
||||
public UInt32 extentsFile_extents_blockCount6;
|
||||
// 0x114
|
||||
/// <summary>0x118</summary>
|
||||
public UInt32 extentsFile_extents_startBlock7;
|
||||
// 0x118
|
||||
/// <summary>0x11C</summary>
|
||||
public UInt32 extentsFile_extents_blockCount7;
|
||||
// 0x11C
|
||||
// HFSPlusForkData catalogFile;
|
||||
/// <summary>0x120</summary>
|
||||
public UInt64 catalogFile_logicalSize;
|
||||
// 0x120
|
||||
/// <summary>0x128</summary>
|
||||
public UInt32 catalogFile_clumpSize;
|
||||
// 0x128
|
||||
/// <summary>0x12C</summary>
|
||||
public UInt32 catalogFile_totalBlocks;
|
||||
// 0x12C
|
||||
/// <summary>0x130</summary>
|
||||
public UInt32 catalogFile_extents_startBlock0;
|
||||
// 0x130
|
||||
/// <summary>0x134</summary>
|
||||
public UInt32 catalogFile_extents_blockCount0;
|
||||
// 0x134
|
||||
/// <summary>0x138</summary>
|
||||
public UInt32 catalogFile_extents_startBlock1;
|
||||
// 0x138
|
||||
/// <summary>0x13C</summary>
|
||||
public UInt32 catalogFile_extents_blockCount1;
|
||||
// 0x13C
|
||||
/// <summary>0x140</summary>
|
||||
public UInt32 catalogFile_extents_startBlock2;
|
||||
// 0x140
|
||||
/// <summary>0x144</summary>
|
||||
public UInt32 catalogFile_extents_blockCount2;
|
||||
// 0x144
|
||||
/// <summary>0x148</summary>
|
||||
public UInt32 catalogFile_extents_startBlock3;
|
||||
// 0x148
|
||||
/// <summary>0x14C</summary>
|
||||
public UInt32 catalogFile_extents_blockCount3;
|
||||
// 0x14C
|
||||
/// <summary>0x150</summary>
|
||||
public UInt32 catalogFile_extents_startBlock4;
|
||||
// 0x150
|
||||
/// <summary>0x154</summary>
|
||||
public UInt32 catalogFile_extents_blockCount4;
|
||||
// 0x154
|
||||
/// <summary>0x158</summary>
|
||||
public UInt32 catalogFile_extents_startBlock5;
|
||||
// 0x158
|
||||
/// <summary>0x15C</summary>
|
||||
public UInt32 catalogFile_extents_blockCount5;
|
||||
// 0x15C
|
||||
/// <summary>0x160</summary>
|
||||
public UInt32 catalogFile_extents_startBlock6;
|
||||
// 0x160
|
||||
/// <summary>0x164</summary>
|
||||
public UInt32 catalogFile_extents_blockCount6;
|
||||
// 0x164
|
||||
/// <summary>0x168</summary>
|
||||
public UInt32 catalogFile_extents_startBlock7;
|
||||
// 0x168
|
||||
/// <summary>0x16C</summary>
|
||||
public UInt32 catalogFile_extents_blockCount7;
|
||||
// 0x16C
|
||||
// HFSPlusForkData attributesFile;
|
||||
/// <summary>0x170</summary>
|
||||
public UInt64 attributesFile_logicalSize;
|
||||
// 0x170
|
||||
/// <summary>0x178</summary>
|
||||
public UInt32 attributesFile_clumpSize;
|
||||
// 0x178
|
||||
/// <summary>0x17C</summary>
|
||||
public UInt32 attributesFile_totalBlocks;
|
||||
// 0x17C
|
||||
/// <summary>0x180</summary>
|
||||
public UInt32 attributesFile_extents_startBlock0;
|
||||
// 0x180
|
||||
/// <summary>0x184</summary>
|
||||
public UInt32 attributesFile_extents_blockCount0;
|
||||
// 0x184
|
||||
/// <summary>0x188</summary>
|
||||
public UInt32 attributesFile_extents_startBlock1;
|
||||
// 0x188
|
||||
/// <summary>0x18C</summary>
|
||||
public UInt32 attributesFile_extents_blockCount1;
|
||||
// 0x18C
|
||||
/// <summary>0x190</summary>
|
||||
public UInt32 attributesFile_extents_startBlock2;
|
||||
// 0x190
|
||||
/// <summary>0x194</summary>
|
||||
public UInt32 attributesFile_extents_blockCount2;
|
||||
// 0x194
|
||||
/// <summary>0x198</summary>
|
||||
public UInt32 attributesFile_extents_startBlock3;
|
||||
// 0x198
|
||||
/// <summary>0x19C</summary>
|
||||
public UInt32 attributesFile_extents_blockCount3;
|
||||
// 0x19C
|
||||
/// <summary>0x1A0</summary>
|
||||
public UInt32 attributesFile_extents_startBlock4;
|
||||
// 0x1A0
|
||||
/// <summary>0x1A4</summary>
|
||||
public UInt32 attributesFile_extents_blockCount4;
|
||||
// 0x1A4
|
||||
/// <summary>0x1A8</summary>
|
||||
public UInt32 attributesFile_extents_startBlock5;
|
||||
// 0x1A8
|
||||
/// <summary>0x1AC</summary>
|
||||
public UInt32 attributesFile_extents_blockCount5;
|
||||
// 0x1AC
|
||||
/// <summary>0x1B0</summary>
|
||||
public UInt32 attributesFile_extents_startBlock6;
|
||||
// 0x1B0
|
||||
/// <summary>0x1B4</summary>
|
||||
public UInt32 attributesFile_extents_blockCount6;
|
||||
// 0x1B4
|
||||
/// <summary>0x1B8</summary>
|
||||
public UInt32 attributesFile_extents_startBlock7;
|
||||
// 0x1B8
|
||||
/// <summary>0x1BC</summary>
|
||||
public UInt32 attributesFile_extents_blockCount7;
|
||||
// 0x1BC
|
||||
// HFSPlusForkData startupFile;
|
||||
/// <summary>0x1C0</summary>
|
||||
public UInt64 startupFile_logicalSize;
|
||||
// 0x1C0
|
||||
/// <summary>0x1C8</summary>
|
||||
public UInt32 startupFile_clumpSize;
|
||||
// 0x1C8
|
||||
/// <summary>0x1CC</summary>
|
||||
public UInt32 startupFile_totalBlocks;
|
||||
// 0x1CC
|
||||
/// <summary>0x1D0</summary>
|
||||
public UInt32 startupFile_extents_startBlock0;
|
||||
// 0x1D0
|
||||
/// <summary>0x1D4</summary>
|
||||
public UInt32 startupFile_extents_blockCount0;
|
||||
// 0x1D4
|
||||
/// <summary>0x1D8</summary>
|
||||
public UInt32 startupFile_extents_startBlock1;
|
||||
// 0x1D8
|
||||
/// <summary>0x1E0</summary>
|
||||
public UInt32 startupFile_extents_blockCount1;
|
||||
// 0x1E0
|
||||
/// <summary>0x1E4</summary>
|
||||
public UInt32 startupFile_extents_startBlock2;
|
||||
// 0x1E4
|
||||
/// <summary>0x1E8</summary>
|
||||
public UInt32 startupFile_extents_blockCount2;
|
||||
// 0x1E8
|
||||
/// <summary>0x1EC</summary>
|
||||
public UInt32 startupFile_extents_startBlock3;
|
||||
// 0x1EC
|
||||
/// <summary>0x1F0</summary>
|
||||
public UInt32 startupFile_extents_blockCount3;
|
||||
// 0x1F0
|
||||
/// <summary>0x1F4</summary>
|
||||
public UInt32 startupFile_extents_startBlock4;
|
||||
// 0x1F4
|
||||
/// <summary>0x1F8</summary>
|
||||
public UInt32 startupFile_extents_blockCount4;
|
||||
// 0x1F8
|
||||
/// <summary>0x1FC</summary>
|
||||
public UInt32 startupFile_extents_startBlock5;
|
||||
// 0x1FC
|
||||
/// <summary>0x200</summary>
|
||||
public UInt32 startupFile_extents_blockCount5;
|
||||
// 0x200
|
||||
/// <summary>0x204</summary>
|
||||
public UInt32 startupFile_extents_startBlock6;
|
||||
// 0x204
|
||||
/// <summary>0x208</summary>
|
||||
public UInt32 startupFile_extents_blockCount6;
|
||||
// 0x208
|
||||
/// <summary>0x20C</summary>
|
||||
public UInt32 startupFile_extents_startBlock7;
|
||||
// 0x20C
|
||||
/// <summary>0x210</summary>
|
||||
public UInt32 startupFile_extents_blockCount7;
|
||||
// 0x210
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,77 +220,82 @@ namespace DiscImageChef.Plugins
|
||||
return;
|
||||
}
|
||||
|
||||
struct MFS_MasterDirectoryBlock // Should be offset 0x0400 bytes in volume
|
||||
/// <summary>
|
||||
/// Master Directory Block, should be at offset 0x0400 bytes in volume
|
||||
/// </summary>
|
||||
struct MFS_MasterDirectoryBlock
|
||||
{
|
||||
// 0x000, Signature, 0xD2D7
|
||||
/// <summary>0x000, Signature, 0xD2D7</summary>
|
||||
public UInt16 drSigWord;
|
||||
// 0x002, Volume creation date
|
||||
/// <summary>0x002, Volume creation date</summary>
|
||||
public UInt32 drCrDate;
|
||||
// 0x006, Volume last backup date
|
||||
/// <summary>0x006, Volume last backup date</summary>
|
||||
public UInt32 drLsBkUp;
|
||||
// 0x00A, Volume attributes
|
||||
/// <summary>0x00A, Volume attributes</summary>
|
||||
public UInt16 drAtrb;
|
||||
// 0x00C, Volume number of files
|
||||
/// <summary>0x00C, Volume number of files</summary>
|
||||
public UInt16 drNmFls;
|
||||
// 0x00E, First directory block
|
||||
/// <summary>0x00E, First directory block</summary>
|
||||
public UInt16 drDirSt;
|
||||
// 0x010, Length of directory in blocks
|
||||
/// <summary>0x010, Length of directory in blocks</summary>
|
||||
public UInt16 drBlLen;
|
||||
// 0x012, Volume allocation blocks
|
||||
/// <summary>0x012, Volume allocation blocks</summary>
|
||||
public UInt16 drNmAlBlks;
|
||||
// 0x014, Size of allocation blocks
|
||||
/// <summary>0x014, Size of allocation blocks</summary>
|
||||
public UInt32 drAlBlkSiz;
|
||||
// 0x018, Number of bytes to allocate
|
||||
/// <summary>0x018, Number of bytes to allocate</summary>
|
||||
public UInt32 drClpSiz;
|
||||
// 0x01C, First allocation block in block map
|
||||
/// <summary>0x01C, First allocation block in block map</summary>
|
||||
public UInt16 drAlBlSt;
|
||||
// 0x01E. Next unused file number
|
||||
/// <summary>0x01E. Next unused file number</summary>
|
||||
public UInt32 drNxtFNum;
|
||||
// 0x022, Number of unused allocation blocks
|
||||
/// <summary>0x022, Number of unused allocation blocks</summary>
|
||||
public UInt16 drFreeBks;
|
||||
// 0x024, Length of volume name
|
||||
/// <summary>0x024, Length of volume name</summary>
|
||||
public byte drVNSiz;
|
||||
// 0x025, Characters of volume name
|
||||
/// <summary>0x025, Characters of volume name</summary>
|
||||
public string drVN;
|
||||
}
|
||||
|
||||
struct MFS_BootBlock // Should be offset 0x0000 bytes in volume
|
||||
/// <summary>
|
||||
/// Should be at offset 0x0000 in volume, followed by boot code
|
||||
/// </summary>
|
||||
struct MFS_BootBlock
|
||||
{
|
||||
/// <summary>0x000, Signature, 0x4C4B if bootable</summary>
|
||||
public UInt16 signature;
|
||||
// 0x000, Signature, 0x4C4B if bootable
|
||||
/// <summary>0x002, Branch</summary>
|
||||
public UInt32 branch;
|
||||
// 0x002, Branch
|
||||
/// <summary>0x006, Boot block flags</summary>
|
||||
public byte boot_flags;
|
||||
// 0x006, Boot block flags
|
||||
/// <summary>0x007, Boot block version</summary>
|
||||
public byte boot_version;
|
||||
// 0x007, Boot block version
|
||||
/// <summary>0x008, Allocate secondary buffers</summary>
|
||||
public short sec_sv_pages;
|
||||
// 0x008, Allocate secondary buffers
|
||||
/// <summary>0x00A, System file name (16 bytes)</summary>
|
||||
public string system_name;
|
||||
// 0x00A, System file name (16 bytes)
|
||||
/// <summary>0x01A, Finder file name (16 bytes)</summary>
|
||||
public string finder_name;
|
||||
// 0x01A, Finder file name (16 bytes)
|
||||
/// <summary>0x02A, Debugger file name (16 bytes)</summary>
|
||||
public string debug_name;
|
||||
// 0x02A, Debugger file name (16 bytes)
|
||||
/// <summary>0x03A, Disassembler file name (16 bytes)</summary>
|
||||
public string disasm_name;
|
||||
// 0x03A, Disassembler file name (16 bytes)
|
||||
/// <summary>0x04A, Startup screen file name (16 bytes)</summary>
|
||||
public string stupscr_name;
|
||||
// 0x04A, Startup screen file name (16 bytes)
|
||||
/// <summary>0x05A, First program to execute on boot (16 bytes)</summary>
|
||||
public string bootup_name;
|
||||
// 0x05A, First program to execute on boot (16 bytes)
|
||||
/// <summary>0x06A, Clipboard file name (16 bytes)</summary>
|
||||
public string clipbrd_name;
|
||||
// 0x06A, Clipboard file name (16 bytes)
|
||||
/// <summary>0x07A, 1/4 of maximum opened at a time files</summary>
|
||||
public UInt16 max_files;
|
||||
// 0x07A, 1/4 of maximum opened at a time files
|
||||
/// <summary>0x07C, Event queue size</summary>
|
||||
public UInt16 queue_size;
|
||||
// 0x07C, Event queue size
|
||||
/// <summary>0x07E, Heap size on a Mac with 128KiB of RAM</summary>
|
||||
public UInt32 heap_128k;
|
||||
// 0x07E, Heap size on a Mac with 128KiB of RAM
|
||||
/// <summary>0x082, Heap size on a Mac with 256KiB of RAM</summary>
|
||||
public UInt32 heap_256k;
|
||||
// 0x082, Heap size on a Mac with 256KiB of RAM
|
||||
/// <summary>0x086, Heap size on a Mac with 512KiB of RAM or more</summary>
|
||||
public UInt32 heap_512k;
|
||||
// 0x086, Heap size on a Mac with 512KiB of RAM or more
|
||||
}
|
||||
// Follows boot code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,58 +230,61 @@ namespace DiscImageChef.Plugins
|
||||
xmlFSType.VolumeName = besb.name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Be superblock
|
||||
/// </summary>
|
||||
struct BeSuperBlock
|
||||
{
|
||||
/// <summary>0x000, Volume name, 32 bytes</summary>
|
||||
public string name;
|
||||
// 0x000, Volume name, 32 bytes
|
||||
/// <summary>0x020, "BFS1", 0x42465331</summary>
|
||||
public UInt32 magic1;
|
||||
// 0x020, "BFS1", 0x42465331
|
||||
/// <summary>0x024, "BIGE", 0x42494745</summary>
|
||||
public UInt32 fs_byte_order;
|
||||
// 0x024, "BIGE", 0x42494745
|
||||
/// <summary>0x028, Bytes per block</summary>
|
||||
public UInt32 block_size;
|
||||
// 0x028, Bytes per block
|
||||
/// <summary>0x02C, 1 << block_shift == block_size</summary>
|
||||
public UInt32 block_shift;
|
||||
// 0x02C, 1 << block_shift == block_size
|
||||
/// <summary>0x030, Blocks in volume</summary>
|
||||
public Int64 num_blocks;
|
||||
// 0x030, Blocks in volume
|
||||
/// <summary>0x038, Used blocks in volume</summary>
|
||||
public Int64 used_blocks;
|
||||
// 0x038, Used blocks in volume
|
||||
/// <summary>0x040, Bytes per inode</summary>
|
||||
public Int32 inode_size;
|
||||
// 0x040, Bytes per inode
|
||||
/// <summary>0x044, 0xDD121031</summary>
|
||||
public UInt32 magic2;
|
||||
// 0x044, 0xDD121031
|
||||
/// <summary>0x048, Blocks per allocation group</summary>
|
||||
public Int32 blocks_per_ag;
|
||||
// 0x048, Blocks per allocation group
|
||||
/// <summary>0x04C, 1 << ag_shift == blocks_per_ag</summary>
|
||||
public Int32 ag_shift;
|
||||
// 0x04C, 1 << ag_shift == blocks_per_ag
|
||||
/// <summary>0x050, Allocation groups in volume</summary>
|
||||
public Int32 num_ags;
|
||||
// 0x050, Allocation groups in volume
|
||||
/// <summary>0x054, 0x434c454e if clean, 0x44495254 if dirty</summary>
|
||||
public UInt32 flags;
|
||||
// 0x054, 0x434c454e if clean, 0x44495254 if dirty
|
||||
/// <summary>0x058, Allocation group of journal</summary>
|
||||
public Int32 log_blocks_ag;
|
||||
// 0x058, Allocation group of journal
|
||||
/// <summary>0x05C, Start block of journal, inside ag</summary>
|
||||
public UInt16 log_blocks_start;
|
||||
// 0x05C, Start block of journal, inside ag
|
||||
/// <summary>0x05E, Length in blocks of journal, inside ag</summary>
|
||||
public UInt16 log_blocks_len;
|
||||
// 0x05E, Length in blocks of journal, inside ag
|
||||
/// <summary>0x060, Start of journal</summary>
|
||||
public Int64 log_start;
|
||||
// 0x060, Start of journal
|
||||
/// <summary>0x068, End of journal</summary>
|
||||
public Int64 log_end;
|
||||
// 0x068, End of journal
|
||||
/// <summary>0x070, 0x15B6830E</summary>
|
||||
public UInt32 magic3;
|
||||
// 0x070, 0x15B6830E
|
||||
/// <summary>0x074, Allocation group where root folder's i-node resides</summary>
|
||||
public Int32 root_dir_ag;
|
||||
// 0x074, Allocation group where root folder's i-node resides
|
||||
/// <summary>0x078, Start in ag of root folder's i-node</summary>
|
||||
public UInt16 root_dir_start;
|
||||
// 0x078, Start in ag of root folder's i-node
|
||||
/// <summary>0x07A, As this is part of inode_addr, this is 1</summary>
|
||||
public UInt16 root_dir_len;
|
||||
// 0x07A, As this is part of inode_addr, this is 1
|
||||
/// <summary>0x07C, Allocation group where indices' i-node resides</summary>
|
||||
public Int32 indices_ag;
|
||||
// 0x07C, Allocation group where indices' i-node resides
|
||||
/// <summary>0x080, Start in ag of indices' i-node</summary>
|
||||
public UInt16 indices_start;
|
||||
// 0x080, Start in ag of indices' i-node
|
||||
/// <summary>0x082, As this is part of inode_addr, this is 1</summary>
|
||||
public UInt16 indices_len;
|
||||
// 0x082, As this is part of inode_addr, this is 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,23 @@
|
||||
2015-12-06 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* ODS.cs:
|
||||
* FFS.cs:
|
||||
* BFS.cs:
|
||||
* HPFS.cs:
|
||||
* NTFS.cs:
|
||||
* SysV.cs:
|
||||
* Opera.cs:
|
||||
* extFS.cs:
|
||||
* ext2FS.cs:
|
||||
* LisaFS.cs:
|
||||
* SolarFS.cs:
|
||||
* MinixFS.cs:
|
||||
* UNIXBFS.cs:
|
||||
* AppleMFS.cs:
|
||||
* AppleHFS.cs:
|
||||
* AppleHFSPlus.cs:
|
||||
Moved comments to XML documentation.
|
||||
|
||||
2015-12-06 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Plugin.cs:
|
||||
|
||||
@@ -214,180 +214,180 @@ namespace DiscImageChef.Plugins
|
||||
byte[] strings_b;
|
||||
ufs_sb_sectors = imagePlugin.ReadSectors(sb_offset, sb_size_in_sectors);
|
||||
|
||||
ufs_sb.fs_link_42bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0000); // 0x0000
|
||||
ufs_sb.fs_link_42bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0000); /// <summary>0x0000
|
||||
ufs_sb.fs_state_sun = ufs_sb.fs_link_42bsd;
|
||||
ufs_sb.fs_rlink = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0004); // 0x0004 UNUSED
|
||||
ufs_sb.fs_sblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0008); // 0x0008 addr of super-block in filesys
|
||||
ufs_sb.fs_cblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x000C); // 0x000C offset of cyl-block in filesys
|
||||
ufs_sb.fs_iblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0010); // 0x0010 offset of inode-blocks in filesys
|
||||
ufs_sb.fs_dblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0014); // 0x0014 offset of first data after cg
|
||||
ufs_sb.fs_cgoffset = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0018); // 0x0018 cylinder group offset in cylinder
|
||||
ufs_sb.fs_cgmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x001C); // 0x001C used to calc mod fs_ntrak
|
||||
ufs_sb.fs_time_t = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0020); // 0x0020 last time written -- time_t
|
||||
ufs_sb.fs_size = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0024); // 0x0024 number of blocks in fs
|
||||
ufs_sb.fs_dsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0028); // 0x0028 number of data blocks in fs
|
||||
ufs_sb.fs_ncg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x002C); // 0x002C number of cylinder groups
|
||||
ufs_sb.fs_bsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0030); // 0x0030 size of basic blocks in fs
|
||||
ufs_sb.fs_fsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0034); // 0x0034 size of frag blocks in fs
|
||||
ufs_sb.fs_frag = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0038); // 0x0038 number of frags in a block in fs
|
||||
ufs_sb.fs_rlink = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0004); /// <summary>0x0004 UNUSED
|
||||
ufs_sb.fs_sblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0008); /// <summary>0x0008 addr of super-block in filesys
|
||||
ufs_sb.fs_cblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x000C); /// <summary>0x000C offset of cyl-block in filesys
|
||||
ufs_sb.fs_iblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0010); /// <summary>0x0010 offset of inode-blocks in filesys
|
||||
ufs_sb.fs_dblkno = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0014); /// <summary>0x0014 offset of first data after cg
|
||||
ufs_sb.fs_cgoffset = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0018); /// <summary>0x0018 cylinder group offset in cylinder
|
||||
ufs_sb.fs_cgmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x001C); /// <summary>0x001C used to calc mod fs_ntrak
|
||||
ufs_sb.fs_time_t = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0020); /// <summary>0x0020 last time written -- time_t
|
||||
ufs_sb.fs_size = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0024); /// <summary>0x0024 number of blocks in fs
|
||||
ufs_sb.fs_dsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0028); /// <summary>0x0028 number of data blocks in fs
|
||||
ufs_sb.fs_ncg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x002C); /// <summary>0x002C number of cylinder groups
|
||||
ufs_sb.fs_bsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0030); /// <summary>0x0030 size of basic blocks in fs
|
||||
ufs_sb.fs_fsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0034); /// <summary>0x0034 size of frag blocks in fs
|
||||
ufs_sb.fs_frag = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0038); /// <summary>0x0038 number of frags in a block in fs
|
||||
// these are configuration parameters
|
||||
ufs_sb.fs_minfree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x003C); // 0x003C minimum percentage of free blocks
|
||||
ufs_sb.fs_rotdelay = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0040); // 0x0040 num of ms for optimal next block
|
||||
ufs_sb.fs_rps = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0044); // 0x0044 disk revolutions per second
|
||||
ufs_sb.fs_minfree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x003C); /// <summary>0x003C minimum percentage of free blocks
|
||||
ufs_sb.fs_rotdelay = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0040); /// <summary>0x0040 num of ms for optimal next block
|
||||
ufs_sb.fs_rps = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0044); /// <summary>0x0044 disk revolutions per second
|
||||
// these fields can be computed from the others
|
||||
ufs_sb.fs_bmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0048); // 0x0048 ``blkoff'' calc of blk offsets
|
||||
ufs_sb.fs_fmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x004C); // 0x004C ``fragoff'' calc of frag offsets
|
||||
ufs_sb.fs_bshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0050); // 0x0050 ``lblkno'' calc of logical blkno
|
||||
ufs_sb.fs_fshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0054); // 0x0054 ``numfrags'' calc number of frags
|
||||
ufs_sb.fs_bmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0048); /// <summary>0x0048 ``blkoff'' calc of blk offsets
|
||||
ufs_sb.fs_fmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x004C); /// <summary>0x004C ``fragoff'' calc of frag offsets
|
||||
ufs_sb.fs_bshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0050); /// <summary>0x0050 ``lblkno'' calc of logical blkno
|
||||
ufs_sb.fs_fshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0054); /// <summary>0x0054 ``numfrags'' calc number of frags
|
||||
// these are configuration parameters
|
||||
ufs_sb.fs_maxcontig = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0058); // 0x0058 max number of contiguous blks
|
||||
ufs_sb.fs_maxbpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x005C); // 0x005C max number of blks per cyl group
|
||||
ufs_sb.fs_maxcontig = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0058); /// <summary>0x0058 max number of contiguous blks
|
||||
ufs_sb.fs_maxbpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x005C); /// <summary>0x005C max number of blks per cyl group
|
||||
// these fields can be computed from the others
|
||||
ufs_sb.fs_fragshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0060); // 0x0060 block to frag shift
|
||||
ufs_sb.fs_fsbtodb = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0064); // 0x0064 fsbtodb and dbtofsb shift constant
|
||||
ufs_sb.fs_sbsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0068); // 0x0068 actual size of super block
|
||||
ufs_sb.fs_csmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x006C); // 0x006C csum block offset
|
||||
ufs_sb.fs_csshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0070); // 0x0070 csum block number
|
||||
ufs_sb.fs_nindir = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0074); // 0x0074 value of NINDIR
|
||||
ufs_sb.fs_inopb = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0078); // 0x0078 value of INOPB
|
||||
ufs_sb.fs_nspf = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x007C); // 0x007C value of NSPF
|
||||
ufs_sb.fs_fragshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0060); /// <summary>0x0060 block to frag shift
|
||||
ufs_sb.fs_fsbtodb = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0064); /// <summary>0x0064 fsbtodb and dbtofsb shift constant
|
||||
ufs_sb.fs_sbsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0068); /// <summary>0x0068 actual size of super block
|
||||
ufs_sb.fs_csmask = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x006C); /// <summary>0x006C csum block offset
|
||||
ufs_sb.fs_csshift = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0070); /// <summary>0x0070 csum block number
|
||||
ufs_sb.fs_nindir = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0074); /// <summary>0x0074 value of NINDIR
|
||||
ufs_sb.fs_inopb = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0078); /// <summary>0x0078 value of INOPB
|
||||
ufs_sb.fs_nspf = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x007C); /// <summary>0x007C value of NSPF
|
||||
// yet another configuration parameter
|
||||
ufs_sb.fs_optim = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0080); // 0x0080 optimization preference, see below
|
||||
ufs_sb.fs_optim = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0080); /// <summary>0x0080 optimization preference, see below
|
||||
// these fields are derived from the hardware
|
||||
#region Sun
|
||||
ufs_sb.fs_npsect_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0084); // 0x0084 # sectors/track including spares
|
||||
ufs_sb.fs_npsect_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0084); /// <summary>0x0084 # sectors/track including spares
|
||||
#endregion Sun
|
||||
#region Sunx86
|
||||
ufs_sb.fs_state_t_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0084); // 0x0084 file system state time stamp
|
||||
ufs_sb.fs_state_t_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0084); /// <summary>0x0084 file system state time stamp
|
||||
#endregion Sunx86
|
||||
#region COMMON
|
||||
ufs_sb.fs_interleave = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0088); // 0x0088 hardware sector interleave
|
||||
ufs_sb.fs_trackskew = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x008C); // 0x008C sector 0 skew, per track
|
||||
ufs_sb.fs_interleave = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0088); /// <summary>0x0088 hardware sector interleave
|
||||
ufs_sb.fs_trackskew = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x008C); /// <summary>0x008C sector 0 skew, per track
|
||||
#endregion COMMON
|
||||
// a unique id for this filesystem (currently unused and unmaintained)
|
||||
// In 4.3 Tahoe this space is used by fs_headswitch and fs_trkseek
|
||||
// Neither of those fields is used in the Tahoe code right now but
|
||||
// there could be problems if they are.
|
||||
#region COMMON
|
||||
ufs_sb.fs_id_1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0090); // 0x0090
|
||||
ufs_sb.fs_id_2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0094); // 0x0094
|
||||
ufs_sb.fs_id_1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0090); /// <summary>0x0090
|
||||
ufs_sb.fs_id_2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0094); /// <summary>0x0094
|
||||
#endregion COMMON
|
||||
#region 43BSD
|
||||
ufs_sb.fs_headswitch_43bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0090); // 0x0090
|
||||
ufs_sb.fs_trkseek_43bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0094); // 0x0094
|
||||
ufs_sb.fs_headswitch_43bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0090); /// <summary>0x0090
|
||||
ufs_sb.fs_trkseek_43bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0094); /// <summary>0x0094
|
||||
#endregion 43BSD
|
||||
#region COMMON
|
||||
// sizes determined by number of cylinder groups and their sizes
|
||||
ufs_sb.fs_csaddr = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0098); // 0x0098 blk addr of cyl grp summary area
|
||||
ufs_sb.fs_cssize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x009C); // 0x009C size of cyl grp summary area
|
||||
ufs_sb.fs_cgsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A0); // 0x00A0 cylinder group size
|
||||
ufs_sb.fs_csaddr = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0098); /// <summary>0x0098 blk addr of cyl grp summary area
|
||||
ufs_sb.fs_cssize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x009C); /// <summary>0x009C size of cyl grp summary area
|
||||
ufs_sb.fs_cgsize = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A0); /// <summary>0x00A0 cylinder group size
|
||||
// these fields are derived from the hardware
|
||||
ufs_sb.fs_ntrak = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A4); // 0x00A4 tracks per cylinder
|
||||
ufs_sb.fs_nsect = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A8); // 0x00A8 sectors per track
|
||||
ufs_sb.fs_spc = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00AC); // 0x00AC sectors per cylinder
|
||||
ufs_sb.fs_ntrak = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A4); /// <summary>0x00A4 tracks per cylinder
|
||||
ufs_sb.fs_nsect = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00A8); /// <summary>0x00A8 sectors per track
|
||||
ufs_sb.fs_spc = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00AC); /// <summary>0x00AC sectors per cylinder
|
||||
// this comes from the disk driver partitioning
|
||||
ufs_sb.fs_ncyl = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B0); // 0x00B0 cylinders in file system
|
||||
ufs_sb.fs_ncyl = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B0); /// <summary>0x00B0 cylinders in file system
|
||||
// these fields can be computed from the others
|
||||
ufs_sb.fs_cpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B4); // 0x00B4 cylinders per group
|
||||
ufs_sb.fs_ipg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B8); // 0x00B8 inodes per cylinder group
|
||||
ufs_sb.fs_fpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00BC); // 0x00BC blocks per group * fs_frag
|
||||
ufs_sb.fs_cpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B4); /// <summary>0x00B4 cylinders per group
|
||||
ufs_sb.fs_ipg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00B8); /// <summary>0x00B8 inodes per cylinder group
|
||||
ufs_sb.fs_fpg = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00BC); /// <summary>0x00BC blocks per group * fs_frag
|
||||
// this data must be re-computed after crashes
|
||||
// struct ufs_csum fs_cstotal = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0000); // cylinder summary information
|
||||
ufs_sb.fs_cstotal_ndir = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C0); // 0x00C0 number of directories
|
||||
ufs_sb.fs_cstotal_nbfree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C4); // 0x00C4 number of free blocks
|
||||
ufs_sb.fs_cstotal_nifree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C8); // 0x00C8 number of free inodes
|
||||
ufs_sb.fs_cstotal_nffree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00CC); // 0x00CC number of free frags
|
||||
ufs_sb.fs_cstotal_ndir = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C0); /// <summary>0x00C0 number of directories
|
||||
ufs_sb.fs_cstotal_nbfree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C4); /// <summary>0x00C4 number of free blocks
|
||||
ufs_sb.fs_cstotal_nifree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00C8); /// <summary>0x00C8 number of free inodes
|
||||
ufs_sb.fs_cstotal_nffree = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x00CC); /// <summary>0x00CC number of free frags
|
||||
// these fields are cleared at mount time
|
||||
ufs_sb.fs_fmod = ufs_sb_sectors[0x00D0]; // 0x00D0 super block modified flag
|
||||
ufs_sb.fs_clean = ufs_sb_sectors[0x00D1]; // 0x00D1 file system is clean flag
|
||||
ufs_sb.fs_ronly = ufs_sb_sectors[0x00D2]; // 0x00D2 mounted read-only flag
|
||||
ufs_sb.fs_flags = ufs_sb_sectors[0x00D3]; // 0x00D3
|
||||
ufs_sb.fs_fmod = ufs_sb_sectors[0x00D0]; /// <summary>0x00D0 super block modified flag
|
||||
ufs_sb.fs_clean = ufs_sb_sectors[0x00D1]; /// <summary>0x00D1 file system is clean flag
|
||||
ufs_sb.fs_ronly = ufs_sb_sectors[0x00D2]; /// <summary>0x00D2 mounted read-only flag
|
||||
ufs_sb.fs_flags = ufs_sb_sectors[0x00D3]; /// <summary>0x00D3
|
||||
#endregion COMMON
|
||||
#region UFS1
|
||||
strings_b = new byte[512];
|
||||
Array.Copy(ufs_sb_sectors, 0x00D4, strings_b, 0, 512);
|
||||
ufs_sb.fs_fsmnt_ufs1 = StringHandlers.CToString(strings_b); // 0x00D4, 512 bytes, name mounted on
|
||||
ufs_sb.fs_cgrotor_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0000); // 0x02D4 last cg searched
|
||||
Array.Copy(ufs_sb_sectors, 0x02D8, ufs_sb.fs_cs_ufs1, 0, 124); // 0x02D8, 124 bytes, UInt32s, list of fs_cs info buffers
|
||||
ufs_sb.fs_maxcluster_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0354); // 0x0354
|
||||
ufs_sb.fs_cpc_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0358); // 0x0358 cyl per cycle in postbl
|
||||
Array.Copy(ufs_sb_sectors, 0x035C, ufs_sb.fs_opostbl_ufs1, 0, 256); // 0x035C, 256 bytes, [16][8] matrix of UInt16s, old rotation block list head
|
||||
ufs_sb.fs_fsmnt_ufs1 = StringHandlers.CToString(strings_b); /// <summary>0x00D4, 512 bytes, name mounted on
|
||||
ufs_sb.fs_cgrotor_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0000); /// <summary>0x02D4 last cg searched
|
||||
Array.Copy(ufs_sb_sectors, 0x02D8, ufs_sb.fs_cs_ufs1, 0, 124); /// <summary>0x02D8, 124 bytes, UInt32s, list of fs_cs info buffers
|
||||
ufs_sb.fs_maxcluster_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0354); /// <summary>0x0354
|
||||
ufs_sb.fs_cpc_ufs1 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0358); /// <summary>0x0358 cyl per cycle in postbl
|
||||
Array.Copy(ufs_sb_sectors, 0x035C, ufs_sb.fs_opostbl_ufs1, 0, 256); /// <summary>0x035C, 256 bytes, [16][8] matrix of UInt16s, old rotation block list head
|
||||
#endregion UFS1
|
||||
#region UFS2
|
||||
strings_b = new byte[468];
|
||||
Array.Copy(ufs_sb_sectors, 0x00D4, strings_b, 0, 468);
|
||||
ufs_sb.fs_fsmnt_ufs2 = StringHandlers.CToString(strings_b); // 0x00D4, 468 bytes, name mounted on
|
||||
ufs_sb.fs_fsmnt_ufs2 = StringHandlers.CToString(strings_b); /// <summary>0x00D4, 468 bytes, name mounted on
|
||||
strings_b = new byte[32];
|
||||
Array.Copy(ufs_sb_sectors, 0x02A8, strings_b, 0, 32);
|
||||
ufs_sb.fs_volname_ufs2 = StringHandlers.CToString(strings_b); // 0x02A8, 32 bytes, volume name
|
||||
ufs_sb.fs_swuid_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02C8); // 0x02C8 system-wide uid
|
||||
ufs_sb.fs_pad_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02D0); // 0x02D0 due to alignment of fs_swuid
|
||||
ufs_sb.fs_cgrotor_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02D4); // 0x02D4 last cg searched
|
||||
Array.Copy(ufs_sb_sectors, 0x02D8, ufs_sb.fs_ocsp_ufs2, 0, 112); // 0x02D8, 112 bytes, UInt32s, list of fs_cs info buffers
|
||||
ufs_sb.fs_contigdirs_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0348); // 0x0348 # of contiguously allocated dirs
|
||||
ufs_sb.fs_csp_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x034C); // 0x034C cg summary info buffer for fs_cs
|
||||
ufs_sb.fs_maxcluster_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0350); // 0x0350
|
||||
ufs_sb.fs_active_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0354); // 0x0354 used by snapshots to track fs
|
||||
ufs_sb.fs_old_cpc_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0358); // 0x0358 cyl per cycle in postbl
|
||||
ufs_sb.fs_maxbsize_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x035C); // 0x035C maximum blocking factor permitted
|
||||
Array.Copy(ufs_sb_sectors, 0x0360, ufs_sb.fs_sparecon64_ufs2, 0, 136); // 0x0360, 136 bytes, UInt64s, old rotation block list head
|
||||
ufs_sb.fs_sblockloc_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03E8); // 0x03E8 byte offset of standard superblock
|
||||
ufs_sb.fs_volname_ufs2 = StringHandlers.CToString(strings_b); /// <summary>0x02A8, 32 bytes, volume name
|
||||
ufs_sb.fs_swuid_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02C8); /// <summary>0x02C8 system-wide uid
|
||||
ufs_sb.fs_pad_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02D0); /// <summary>0x02D0 due to alignment of fs_swuid
|
||||
ufs_sb.fs_cgrotor_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x02D4); /// <summary>0x02D4 last cg searched
|
||||
Array.Copy(ufs_sb_sectors, 0x02D8, ufs_sb.fs_ocsp_ufs2, 0, 112); /// <summary>0x02D8, 112 bytes, UInt32s, list of fs_cs info buffers
|
||||
ufs_sb.fs_contigdirs_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0348); /// <summary>0x0348 # of contiguously allocated dirs
|
||||
ufs_sb.fs_csp_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x034C); /// <summary>0x034C cg summary info buffer for fs_cs
|
||||
ufs_sb.fs_maxcluster_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0350); /// <summary>0x0350
|
||||
ufs_sb.fs_active_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0354); /// <summary>0x0354 used by snapshots to track fs
|
||||
ufs_sb.fs_old_cpc_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0358); /// <summary>0x0358 cyl per cycle in postbl
|
||||
ufs_sb.fs_maxbsize_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x035C); /// <summary>0x035C maximum blocking factor permitted
|
||||
Array.Copy(ufs_sb_sectors, 0x0360, ufs_sb.fs_sparecon64_ufs2, 0, 136); /// <summary>0x0360, 136 bytes, UInt64s, old rotation block list head
|
||||
ufs_sb.fs_sblockloc_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03E8); /// <summary>0x03E8 byte offset of standard superblock
|
||||
//cylinder summary information*/
|
||||
ufs_sb.fs_cstotal_ndir_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03F0); // 0x03F0 number of directories
|
||||
ufs_sb.fs_cstotal_nbfree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03F8); // 0x03F8 number of free blocks
|
||||
ufs_sb.fs_cstotal_nifree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0400); // 0x0400 number of free inodes
|
||||
ufs_sb.fs_cstotal_nffree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0408); // 0x0408 number of free frags
|
||||
ufs_sb.fs_cstotal_numclusters_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0410); // 0x0410 number of free clusters
|
||||
ufs_sb.fs_cstotal_spare0_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0418); // 0x0418 future expansion
|
||||
ufs_sb.fs_cstotal_spare1_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0420); // 0x0420 future expansion
|
||||
ufs_sb.fs_cstotal_spare2_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0428); // 0x0428 future expansion
|
||||
ufs_sb.fs_time_sec_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0430); // 0x0430 last time written
|
||||
ufs_sb.fs_time_usec_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0434); // 0x0434 last time written
|
||||
ufs_sb.fs_size_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0438); // 0x0438 number of blocks in fs
|
||||
ufs_sb.fs_dsize_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0440); // 0x0440 number of data blocks in fs
|
||||
ufs_sb.fs_csaddr_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0448); // 0x0448 blk addr of cyl grp summary area
|
||||
ufs_sb.fs_pendingblocks_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0450); // 0x0450 blocks in process of being freed
|
||||
ufs_sb.fs_pendinginodes_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0458); // 0x0458 inodes in process of being freed
|
||||
ufs_sb.fs_cstotal_ndir_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03F0); /// <summary>0x03F0 number of directories
|
||||
ufs_sb.fs_cstotal_nbfree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x03F8); /// <summary>0x03F8 number of free blocks
|
||||
ufs_sb.fs_cstotal_nifree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0400); /// <summary>0x0400 number of free inodes
|
||||
ufs_sb.fs_cstotal_nffree_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0408); /// <summary>0x0408 number of free frags
|
||||
ufs_sb.fs_cstotal_numclusters_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0410); /// <summary>0x0410 number of free clusters
|
||||
ufs_sb.fs_cstotal_spare0_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0418); /// <summary>0x0418 future expansion
|
||||
ufs_sb.fs_cstotal_spare1_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0420); /// <summary>0x0420 future expansion
|
||||
ufs_sb.fs_cstotal_spare2_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0428); /// <summary>0x0428 future expansion
|
||||
ufs_sb.fs_time_sec_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0430); /// <summary>0x0430 last time written
|
||||
ufs_sb.fs_time_usec_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0434); /// <summary>0x0434 last time written
|
||||
ufs_sb.fs_size_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0438); /// <summary>0x0438 number of blocks in fs
|
||||
ufs_sb.fs_dsize_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0440); /// <summary>0x0440 number of data blocks in fs
|
||||
ufs_sb.fs_csaddr_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0448); /// <summary>0x0448 blk addr of cyl grp summary area
|
||||
ufs_sb.fs_pendingblocks_ufs2 = BigEndianBitConverter.ToUInt64(ufs_sb_sectors, 0x0450); /// <summary>0x0450 blocks in process of being freed
|
||||
ufs_sb.fs_pendinginodes_ufs2 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0458); /// <summary>0x0458 inodes in process of being freed
|
||||
#endregion UFS2
|
||||
#region Sun
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_sun, 0, 212); // 0x045C, 212 bytes, reserved for future constants
|
||||
ufs_sb.fs_reclaim_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); // 0x0530
|
||||
ufs_sb.fs_sparecon2_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); // 0x0534
|
||||
ufs_sb.fs_state_t_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); // 0x0538 file system state time stamp
|
||||
ufs_sb.fs_qbmask0_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); // 0x053C ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); // 0x0540 ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); // 0x0544 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); // 0x0548 ~usb_fmask
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_sun, 0, 212); /// <summary>0x045C, 212 bytes, reserved for future constants
|
||||
ufs_sb.fs_reclaim_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); /// <summary>0x0530
|
||||
ufs_sb.fs_sparecon2_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); /// <summary>0x0534
|
||||
ufs_sb.fs_state_t_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); /// <summary>0x0538 file system state time stamp
|
||||
ufs_sb.fs_qbmask0_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); /// <summary>0x053C ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); /// <summary>0x0540 ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); /// <summary>0x0544 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_sun = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); /// <summary>0x0548 ~usb_fmask
|
||||
#endregion Sun
|
||||
#region Sunx86
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_sun86, 0, 212); // 0x045C, 212 bytes, reserved for future constants
|
||||
ufs_sb.fs_reclaim_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); // 0x0530
|
||||
ufs_sb.fs_sparecon2_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); // 0x0534
|
||||
ufs_sb.fs_npsect_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); // 0x0538 # sectors/track including spares
|
||||
ufs_sb.fs_qbmask0_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); // 0x053C ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); // 0x0540 ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); // 0x0544 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); // 0x0548 ~usb_fmask
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_sun86, 0, 212); /// <summary>0x045C, 212 bytes, reserved for future constants
|
||||
ufs_sb.fs_reclaim_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); /// <summary>0x0530
|
||||
ufs_sb.fs_sparecon2_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); /// <summary>0x0534
|
||||
ufs_sb.fs_npsect_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); /// <summary>0x0538 # sectors/track including spares
|
||||
ufs_sb.fs_qbmask0_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); /// <summary>0x053C ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); /// <summary>0x0540 ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); /// <summary>0x0544 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_sun86 = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); /// <summary>0x0548 ~usb_fmask
|
||||
#endregion Sunx86
|
||||
#region 44BSD
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_44bsd, 0, 200); // 0x045C, 200 bytes
|
||||
ufs_sb.fs_contigsumsize_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0524); // 0x0524 size of cluster summary array
|
||||
ufs_sb.fs_maxsymlinklen_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0528); // 0x0528 max length of an internal symlink
|
||||
ufs_sb.fs_inodefmt_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x052C); // 0x052C format of on-disk inodes
|
||||
ufs_sb.fs_maxfilesize0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); // 0x0530 max representable file size
|
||||
ufs_sb.fs_maxfilesize1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); // 0x0534 max representable file size
|
||||
ufs_sb.fs_qbmask0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); // 0x0538 ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); // 0x053C ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); // 0x0540 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); // 0x0544 ~usb_fmask
|
||||
ufs_sb.fs_state_t_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); // 0x0548 file system state time stamp
|
||||
Array.Copy(ufs_sb_sectors, 0x045C, ufs_sb.fs_sparecon_44bsd, 0, 200); /// <summary>0x045C, 200 bytes
|
||||
ufs_sb.fs_contigsumsize_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0524); /// <summary>0x0524 size of cluster summary array
|
||||
ufs_sb.fs_maxsymlinklen_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0528); /// <summary>0x0528 max length of an internal symlink
|
||||
ufs_sb.fs_inodefmt_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x052C); /// <summary>0x052C format of on-disk inodes
|
||||
ufs_sb.fs_maxfilesize0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0530); /// <summary>0x0530 max representable file size
|
||||
ufs_sb.fs_maxfilesize1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0534); /// <summary>0x0534 max representable file size
|
||||
ufs_sb.fs_qbmask0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0538); /// <summary>0x0538 ~usb_bmask
|
||||
ufs_sb.fs_qbmask1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x053C); /// <summary>0x053C ~usb_bmask
|
||||
ufs_sb.fs_qfmask0_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0540); /// <summary>0x0540 ~usb_fmask
|
||||
ufs_sb.fs_qfmask1_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0544); /// <summary>0x0544 ~usb_fmask
|
||||
ufs_sb.fs_state_t_44bsd = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0548); /// <summary>0x0548 file system state time stamp
|
||||
#endregion 44BSD
|
||||
ufs_sb.fs_postblformat = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x054C); // 0x054C format of positional layout tables
|
||||
ufs_sb.fs_nrpos = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0550); // 0x0550 number of rotational positions
|
||||
ufs_sb.fs_postbloff = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0554); // 0x0554 (__s16) rotation block list head
|
||||
ufs_sb.fs_rotbloff = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0558); // 0x0558 (__u8) blocks for each rotation
|
||||
ufs_sb.fs_magic = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x055C); // 0x055C magic number
|
||||
ufs_sb.fs_space = ufs_sb_sectors[0x0560]; // 0x0560 list of blocks for each rotation
|
||||
ufs_sb.fs_postblformat = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x054C); /// <summary>0x054C format of positional layout tables
|
||||
ufs_sb.fs_nrpos = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0550); /// <summary>0x0550 number of rotational positions
|
||||
ufs_sb.fs_postbloff = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0554); /// <summary>0x0554 (__s16) rotation block list head
|
||||
ufs_sb.fs_rotbloff = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x0558); /// <summary>0x0558 (__u8) blocks for each rotation
|
||||
ufs_sb.fs_magic = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x055C); /// <summary>0x055C magic number
|
||||
ufs_sb.fs_space = ufs_sb_sectors[0x0560]; /// <summary>0x0560 list of blocks for each rotation
|
||||
|
||||
DicConsole.DebugWriteLine("FFS plugin", "ufs_sb offset: 0x{0:X8}", sb_offset);
|
||||
DicConsole.DebugWriteLine("FFS plugin", "fs_link_42bsd: 0x{0:X8}", ufs_sb.fs_link_42bsd);
|
||||
@@ -719,379 +719,395 @@ namespace DiscImageChef.Plugins
|
||||
}
|
||||
|
||||
const uint block_size = 8192;
|
||||
|
||||
// As specified in FreeBSD source code, FFS/UFS can start in any of four places
|
||||
const ulong sb_start_floppy = 0;
|
||||
// For floppies, start at offset 0
|
||||
const ulong sb_start_ufs1 = 1;
|
||||
const ulong sb_start_floppy = 0;
|
||||
// For normal devices, start at offset 8192
|
||||
const ulong sb_start_ufs2 = 8;
|
||||
const ulong sb_start_ufs1 = 1;
|
||||
// For UFS2, start at offset 65536
|
||||
const ulong sb_start_piggy = 32;
|
||||
const ulong sb_start_ufs2 = 8;
|
||||
// For piggy devices (?), start at offset 262144
|
||||
const ulong sb_start_piggy = 32;
|
||||
|
||||
// MAGICs
|
||||
const UInt32 UFS_MAGIC = 0x00011954;
|
||||
// UFS magic
|
||||
const UInt32 UFS_MAGIC_BW = 0x0f242697;
|
||||
const UInt32 UFS_MAGIC = 0x00011954;
|
||||
// BorderWare UFS
|
||||
const UInt32 UFS2_MAGIC = 0x19540119;
|
||||
const UInt32 UFS_MAGIC_BW = 0x0f242697;
|
||||
// UFS2 magic
|
||||
const UInt32 UFS_CIGAM = 0x54190100;
|
||||
const UInt32 UFS2_MAGIC = 0x19540119;
|
||||
// byteswapped
|
||||
const UInt32 UFS_BAD_MAGIC = 0x19960408;
|
||||
const UInt32 UFS_CIGAM = 0x54190100;
|
||||
// Incomplete newfs
|
||||
// On-disk superblock is quite a mixture of all the UFS/FFS variants
|
||||
// There is no clear way to detect which one is correct
|
||||
// And as C# does not support unions this struct will clearly appear quite dirty :p
|
||||
// To clean up things a little, comment starts with relative superblock offset of field
|
||||
// Biggest sized supleblock would be 1377 bytes
|
||||
const UInt32 UFS_BAD_MAGIC = 0x19960408;
|
||||
|
||||
/// <summary>
|
||||
/// On-disk superblock is quite a mixture of all the UFS/FFS variants
|
||||
/// There is no clear way to detect which one is correct
|
||||
/// And as C# does not support unions this struct will clearly appear quite dirty :p
|
||||
/// To clean up things a little, comment starts with relative superblock offset of field
|
||||
/// Biggest sized supleblock would be 1377 bytes
|
||||
/// </summary>
|
||||
public struct UFSSuperBlock
|
||||
{
|
||||
#region 42BSD
|
||||
|
||||
/// <summary>0x0000 linked list of file systems</summary>
|
||||
public UInt32 fs_link_42bsd;
|
||||
// 0x0000 linked list of file systems
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sun
|
||||
|
||||
/// <summary>0x0000 file system state flag</summary>
|
||||
public UInt32 fs_state_sun;
|
||||
// 0x0000 file system state flag
|
||||
|
||||
#endregion
|
||||
|
||||
#region COMMON
|
||||
|
||||
/// <summary>0x0004 used for incore super blocks</summary>
|
||||
public UInt32 fs_rlink;
|
||||
// 0x0004 used for incore super blocks
|
||||
/// <summary>0x0008 addr of super-block in filesys</summary>
|
||||
public UInt32 fs_sblkno;
|
||||
// 0x0008 addr of super-block in filesys
|
||||
/// <summary>0x000C offset of cyl-block in filesys</summary>
|
||||
public UInt32 fs_cblkno;
|
||||
// 0x000C offset of cyl-block in filesys
|
||||
/// <summary>0x0010 offset of inode-blocks in filesys</summary>
|
||||
public UInt32 fs_iblkno;
|
||||
// 0x0010 offset of inode-blocks in filesys
|
||||
/// <summary>0x0014 offset of first data after cg</summary>
|
||||
public UInt32 fs_dblkno;
|
||||
// 0x0014 offset of first data after cg
|
||||
/// <summary>0x0018 cylinder group offset in cylinder</summary>
|
||||
public UInt32 fs_cgoffset;
|
||||
// 0x0018 cylinder group offset in cylinder
|
||||
/// <summary>0x001C used to calc mod fs_ntrak</summary>
|
||||
public UInt32 fs_cgmask;
|
||||
// 0x001C used to calc mod fs_ntrak
|
||||
/// <summary>0x0020 last time written -- time_t</summary>
|
||||
public UInt32 fs_time_t;
|
||||
// 0x0020 last time written -- time_t
|
||||
/// <summary>0x0024 number of blocks in fs</summary>
|
||||
public UInt32 fs_size;
|
||||
// 0x0024 number of blocks in fs
|
||||
/// <summary>0x0028 number of data blocks in fs</summary>
|
||||
public UInt32 fs_dsize;
|
||||
// 0x0028 number of data blocks in fs
|
||||
/// <summary>0x002C number of cylinder groups</summary>
|
||||
public UInt32 fs_ncg;
|
||||
// 0x002C number of cylinder groups
|
||||
/// <summary>0x0030 size of basic blocks in fs</summary>
|
||||
public UInt32 fs_bsize;
|
||||
// 0x0030 size of basic blocks in fs
|
||||
/// <summary>0x0034 size of frag blocks in fs</summary>
|
||||
public UInt32 fs_fsize;
|
||||
// 0x0034 size of frag blocks in fs
|
||||
/// <summary>0x0038 number of frags in a block in fs</summary>
|
||||
public UInt32 fs_frag;
|
||||
// 0x0038 number of frags in a block in fs
|
||||
|
||||
// these are configuration parameters
|
||||
/// <summary>0x003C minimum percentage of free blocks</summary>
|
||||
public UInt32 fs_minfree;
|
||||
// 0x003C minimum percentage of free blocks
|
||||
/// <summary>0x0040 num of ms for optimal next block</summary>
|
||||
public UInt32 fs_rotdelay;
|
||||
// 0x0040 num of ms for optimal next block
|
||||
/// <summary>0x0044 disk revolutions per second</summary>
|
||||
public UInt32 fs_rps;
|
||||
// 0x0044 disk revolutions per second
|
||||
|
||||
// these fields can be computed from the others
|
||||
/// <summary>0x0048 ``blkoff'' calc of blk offsets</summary>
|
||||
public UInt32 fs_bmask;
|
||||
// 0x0048 ``blkoff'' calc of blk offsets
|
||||
/// <summary>0x004C ``fragoff'' calc of frag offsets</summary>
|
||||
public UInt32 fs_fmask;
|
||||
// 0x004C ``fragoff'' calc of frag offsets
|
||||
/// <summary>0x0050 ``lblkno'' calc of logical blkno</summary>
|
||||
public UInt32 fs_bshift;
|
||||
// 0x0050 ``lblkno'' calc of logical blkno
|
||||
/// <summary>0x0054 ``numfrags'' calc number of frags</summary>
|
||||
public UInt32 fs_fshift;
|
||||
// 0x0054 ``numfrags'' calc number of frags
|
||||
|
||||
// these are configuration parameters
|
||||
/// <summary>0x0058 max number of contiguous blks</summary>
|
||||
public UInt32 fs_maxcontig;
|
||||
// 0x0058 max number of contiguous blks
|
||||
/// <summary>0x005C max number of blks per cyl group</summary>
|
||||
public UInt32 fs_maxbpg;
|
||||
// 0x005C max number of blks per cyl group
|
||||
|
||||
// these fields can be computed from the others
|
||||
/// <summary>0x0060 block to frag shift</summary>
|
||||
public UInt32 fs_fragshift;
|
||||
// 0x0060 block to frag shift
|
||||
/// <summary>0x0064 fsbtodb and dbtofsb shift constant</summary>
|
||||
public UInt32 fs_fsbtodb;
|
||||
// 0x0064 fsbtodb and dbtofsb shift constant
|
||||
/// <summary>0x0068 actual size of super block</summary>
|
||||
public UInt32 fs_sbsize;
|
||||
// 0x0068 actual size of super block
|
||||
/// <summary>0x006C csum block offset</summary>
|
||||
public UInt32 fs_csmask;
|
||||
// 0x006C csum block offset
|
||||
/// <summary>0x0070 csum block number</summary>
|
||||
public UInt32 fs_csshift;
|
||||
// 0x0070 csum block number
|
||||
/// <summary>0x0074 value of NINDIR</summary>
|
||||
public UInt32 fs_nindir;
|
||||
// 0x0074 value of NINDIR
|
||||
/// <summary>0x0078 value of INOPB</summary>
|
||||
public UInt32 fs_inopb;
|
||||
// 0x0078 value of INOPB
|
||||
/// <summary>0x007C value of NSPF</summary>
|
||||
public UInt32 fs_nspf;
|
||||
// 0x007C value of NSPF
|
||||
|
||||
// yet another configuration parameter
|
||||
/// <summary>0x0080 optimization preference, see below</summary>
|
||||
public UInt32 fs_optim;
|
||||
// 0x0080 optimization preference, see below
|
||||
|
||||
#endregion COMMON
|
||||
|
||||
// these fields are derived from the hardware
|
||||
|
||||
#region Sun
|
||||
|
||||
// these fields are derived from the hardware
|
||||
/// <summary>0x0084 # sectors/track including spares</summary>
|
||||
public UInt32 fs_npsect_sun;
|
||||
// 0x0084 # sectors/track including spares
|
||||
|
||||
#endregion Sun
|
||||
|
||||
#region Sunx86
|
||||
|
||||
/// <summary>0x0084 file system state time stamp</summary>
|
||||
public UInt32 fs_state_t_sun86;
|
||||
// 0x0084 file system state time stamp
|
||||
|
||||
#endregion Sunx86
|
||||
|
||||
#region COMMON
|
||||
|
||||
/// <summary>0x0088 hardware sector interleave</summary>
|
||||
public UInt32 fs_interleave;
|
||||
// 0x0088 hardware sector interleave
|
||||
/// <summary>0x008C sector 0 skew, per track</summary>
|
||||
public UInt32 fs_trackskew;
|
||||
// 0x008C sector 0 skew, per track
|
||||
|
||||
#endregion COMMON
|
||||
|
||||
|
||||
#region COMMON
|
||||
|
||||
// a unique id for this filesystem (currently unused and unmaintained)
|
||||
// In 4.3 Tahoe this space is used by fs_headswitch and fs_trkseek
|
||||
// Neither of those fields is used in the Tahoe code right now but
|
||||
// there could be problems if they are.
|
||||
|
||||
#region COMMON
|
||||
|
||||
/// <summary>0x0090</summary>
|
||||
public UInt32 fs_id_1;
|
||||
// 0x0090
|
||||
/// <summary>0x0094</summary>
|
||||
public UInt32 fs_id_2;
|
||||
// 0x0094
|
||||
|
||||
#endregion COMMON
|
||||
|
||||
#region 43BSD
|
||||
|
||||
/// <summary>0x0090 head switch time, usec</summary>
|
||||
public UInt32 fs_headswitch_43bsd;
|
||||
// 0x0090 head switch time, usec
|
||||
/// <summary>0x0094 track-to-track seek, usec</summary>
|
||||
public UInt32 fs_trkseek_43bsd;
|
||||
// 0x0094 track-to-track seek, usec
|
||||
|
||||
#endregion 43BSD
|
||||
|
||||
#region COMMON
|
||||
|
||||
// sizes determined by number of cylinder groups and their sizes
|
||||
/// <summary>0x0098 blk addr of cyl grp summary area</summary>
|
||||
public UInt32 fs_csaddr;
|
||||
// 0x0098 blk addr of cyl grp summary area
|
||||
/// <summary>0x009C size of cyl grp summary area</summary>
|
||||
public UInt32 fs_cssize;
|
||||
// 0x009C size of cyl grp summary area
|
||||
/// <summary>0x00A0 cylinder group size</summary>
|
||||
public UInt32 fs_cgsize;
|
||||
// 0x00A0 cylinder group size
|
||||
|
||||
// these fields are derived from the hardware
|
||||
/// <summary>0x00A4 tracks per cylinder</summary>
|
||||
public UInt32 fs_ntrak;
|
||||
// 0x00A4 tracks per cylinder
|
||||
/// <summary>0x00A8 sectors per track</summary>
|
||||
public UInt32 fs_nsect;
|
||||
// 0x00A8 sectors per track
|
||||
/// <summary>0x00AC sectors per cylinder</summary>
|
||||
public UInt32 fs_spc;
|
||||
// 0x00AC sectors per cylinder
|
||||
|
||||
// this comes from the disk driver partitioning
|
||||
/// <summary>0x00B0 cylinders in file system</summary>
|
||||
public UInt32 fs_ncyl;
|
||||
// 0x00B0 cylinders in file system
|
||||
|
||||
// these fields can be computed from the others
|
||||
/// <summary>0x00B4 cylinders per group</summary>
|
||||
public UInt32 fs_cpg;
|
||||
// 0x00B4 cylinders per group
|
||||
/// <summary>0x00B8 inodes per cylinder group</summary>
|
||||
public UInt32 fs_ipg;
|
||||
// 0x00B8 inodes per cylinder group
|
||||
/// <summary>0x00BC blocks per group * fs_frag</summary>
|
||||
public UInt32 fs_fpg;
|
||||
// 0x00BC blocks per group * fs_frag
|
||||
|
||||
// this data must be re-computed after crashes
|
||||
// struct ufs_csum fs_cstotal; // cylinder summary information
|
||||
/// <summary>0x00C0 number of directories</summary>
|
||||
public UInt32 fs_cstotal_ndir;
|
||||
// 0x00C0 number of directories
|
||||
/// <summary>0x00C4 number of free blocks</summary>
|
||||
public UInt32 fs_cstotal_nbfree;
|
||||
// 0x00C4 number of free blocks
|
||||
/// <summary>0x00C8 number of free inodes</summary>
|
||||
public UInt32 fs_cstotal_nifree;
|
||||
// 0x00C8 number of free inodes
|
||||
/// <summary>0x00CC number of free frags</summary>
|
||||
public UInt32 fs_cstotal_nffree;
|
||||
// 0x00CC number of free frags
|
||||
|
||||
// these fields are cleared at mount time
|
||||
/// <summary>0x00D0 super block modified flag</summary>
|
||||
public byte fs_fmod;
|
||||
// 0x00D0 super block modified flag
|
||||
/// <summary>0x00D1 file system is clean flag</summary>
|
||||
public byte fs_clean;
|
||||
// 0x00D1 file system is clean flag
|
||||
/// <summary>0x00D2 mounted read-only flag</summary>
|
||||
public byte fs_ronly;
|
||||
// 0x00D2 mounted read-only flag
|
||||
/// <summary>0x00D3</summary>
|
||||
public byte fs_flags;
|
||||
// 0x00D3
|
||||
|
||||
#endregion common
|
||||
|
||||
#region UFS1
|
||||
|
||||
/// <summary>0x00D4, 512 bytes, name mounted on</summary>
|
||||
public string fs_fsmnt_ufs1;
|
||||
// 0x00D4, 512 bytes, name mounted on
|
||||
/// <summary>0x02D4 last cg searched</summary>
|
||||
public UInt32 fs_cgrotor_ufs1;
|
||||
// 0x02D4 last cg searched
|
||||
/// <summary>0x02D8, 124 bytes, UInt32s, list of fs_cs info buffers</summary>
|
||||
public byte[] fs_cs_ufs1;
|
||||
// 0x02D8, 124 bytes, UInt32s, list of fs_cs info buffers
|
||||
/// <summary>0x0354</summary>
|
||||
public UInt32 fs_maxcluster_ufs1;
|
||||
// 0x0354
|
||||
/// <summary>0x0358 cyl per cycle in postbl</summary>
|
||||
public UInt32 fs_cpc_ufs1;
|
||||
// 0x0358 cyl per cycle in postbl
|
||||
/// <summary>0x035C, 256 bytes, [16][8] matrix of UInt16s, old rotation block list head</summary>
|
||||
public byte[] fs_opostbl_ufs1;
|
||||
// 0x035C, 256 bytes, [16][8] matrix of UInt16s, old rotation block list head
|
||||
|
||||
#endregion UFS1
|
||||
|
||||
#region UFS2
|
||||
|
||||
/// <summary>0x00D4, 468 bytes, name mounted on</summary>
|
||||
public string fs_fsmnt_ufs2;
|
||||
// 0x00D4, 468 bytes, name mounted on
|
||||
/// <summary>0x02A8, 32 bytes, volume name</summary>
|
||||
public string fs_volname_ufs2;
|
||||
// 0x02A8, 32 bytes, volume name
|
||||
/// <summary>0x02C8 system-wide uid</summary>
|
||||
public UInt64 fs_swuid_ufs2;
|
||||
// 0x02C8 system-wide uid
|
||||
/// <summary>0x02D0 due to alignment of fs_swuid</summary>
|
||||
public UInt32 fs_pad_ufs2;
|
||||
// 0x02D0 due to alignment of fs_swuid
|
||||
/// <summary>0x02D4 last cg searched</summary>
|
||||
public UInt32 fs_cgrotor_ufs2;
|
||||
// 0x02D4 last cg searched
|
||||
/// <summary>0x02D8, 112 bytes, UInt32s, list of fs_cs info buffers</summary>
|
||||
public byte[] fs_ocsp_ufs2;
|
||||
// 0x02D8, 112 bytes, UInt32s, list of fs_cs info buffers
|
||||
/// <summary>0x0348 # of contiguously allocated dirs</summary>
|
||||
public UInt32 fs_contigdirs_ufs2;
|
||||
// 0x0348 # of contiguously allocated dirs
|
||||
/// <summary>0x034C cg summary info buffer for fs_cs</summary>
|
||||
public UInt32 fs_csp_ufs2;
|
||||
// 0x034C cg summary info buffer for fs_cs
|
||||
/// <summary>0x0350</summary>
|
||||
public UInt32 fs_maxcluster_ufs2;
|
||||
// 0x0350
|
||||
/// <summary>0x0354 used by snapshots to track fs</summary>
|
||||
public UInt32 fs_active_ufs2;
|
||||
// 0x0354 used by snapshots to track fs
|
||||
/// <summary>0x0358 cyl per cycle in postbl</summary>
|
||||
public UInt32 fs_old_cpc_ufs2;
|
||||
// 0x0358 cyl per cycle in postbl
|
||||
/// <summary>0x035C maximum blocking factor permitted</summary>
|
||||
public UInt32 fs_maxbsize_ufs2;
|
||||
// 0x035C maximum blocking factor permitted
|
||||
/// <summary>0x0360, 136 bytes, UInt64s, old rotation block list head</summary>
|
||||
public byte[] fs_sparecon64_ufs2;
|
||||
// 0x0360, 136 bytes, UInt64s, old rotation block list head
|
||||
/// <summary>0x03E8 byte offset of standard superblock</summary>
|
||||
public UInt64 fs_sblockloc_ufs2;
|
||||
// 0x03E8 byte offset of standard superblock
|
||||
//cylinder summary information*/
|
||||
|
||||
/// <summary>0x03F0 number of directories</summary>
|
||||
public UInt64 fs_cstotal_ndir_ufs2;
|
||||
// 0x03F0 number of directories
|
||||
/// <summary>0x03F8 number of free blocks</summary>
|
||||
public UInt64 fs_cstotal_nbfree_ufs2;
|
||||
// 0x03F8 number of free blocks
|
||||
/// <summary>0x0400 number of free inodes</summary>
|
||||
public UInt64 fs_cstotal_nifree_ufs2;
|
||||
// 0x0400 number of free inodes
|
||||
/// <summary>0x0408 number of free frags</summary>
|
||||
public UInt64 fs_cstotal_nffree_ufs2;
|
||||
// 0x0408 number of free frags
|
||||
/// <summary>0x0410 number of free clusters</summary>
|
||||
public UInt64 fs_cstotal_numclusters_ufs2;
|
||||
// 0x0410 number of free clusters
|
||||
/// <summary>0x0418 future expansion</summary>
|
||||
public UInt64 fs_cstotal_spare0_ufs2;
|
||||
// 0x0418 future expansion
|
||||
/// <summary>0x0420 future expansion</summary>
|
||||
public UInt64 fs_cstotal_spare1_ufs2;
|
||||
// 0x0420 future expansion
|
||||
/// <summary>0x0428 future expansion</summary>
|
||||
public UInt64 fs_cstotal_spare2_ufs2;
|
||||
// 0x0428 future expansion
|
||||
/// <summary>0x0430 last time written</summary>
|
||||
public UInt32 fs_time_sec_ufs2;
|
||||
// 0x0430 last time written
|
||||
/// <summary>0x0434 last time written</summary>
|
||||
public UInt32 fs_time_usec_ufs2;
|
||||
// 0x0434 last time written
|
||||
/// <summary>0x0438 number of blocks in fs</summary>
|
||||
public UInt64 fs_size_ufs2;
|
||||
// 0x0438 number of blocks in fs
|
||||
/// <summary>0x0440 number of data blocks in fs</summary>
|
||||
public UInt64 fs_dsize_ufs2;
|
||||
// 0x0440 number of data blocks in fs
|
||||
/// <summary>0x0448 blk addr of cyl grp summary area</summary>
|
||||
public UInt64 fs_csaddr_ufs2;
|
||||
// 0x0448 blk addr of cyl grp summary area
|
||||
/// <summary>0x0450 blocks in process of being freed</summary>
|
||||
public UInt64 fs_pendingblocks_ufs2;
|
||||
// 0x0450 blocks in process of being freed
|
||||
/// <summary>0x0458 inodes in process of being freed</summary>
|
||||
public UInt32 fs_pendinginodes_ufs2;
|
||||
// 0x0458 inodes in process of being freed
|
||||
|
||||
#endregion UFS2
|
||||
|
||||
#region Sun
|
||||
|
||||
/// <summary>0x045C, 212 bytes, reserved for future constants</summary>
|
||||
public byte[] fs_sparecon_sun;
|
||||
// 0x045C, 212 bytes, reserved for future constants
|
||||
/// <summary>0x0530</summary>
|
||||
public UInt32 fs_reclaim_sun;
|
||||
// 0x0530
|
||||
/// <summary>0x0534</summary>
|
||||
public UInt32 fs_sparecon2_sun;
|
||||
// 0x0534
|
||||
/// <summary>0x0538 file system state time stamp</summary>
|
||||
public UInt32 fs_state_t_sun;
|
||||
// 0x0538 file system state time stamp
|
||||
/// <summary>0x053C ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask0_sun;
|
||||
// 0x053C ~usb_bmask
|
||||
/// <summary>0x0540 ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask1_sun;
|
||||
// 0x0540 ~usb_bmask
|
||||
/// <summary>0x0544 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask0_sun;
|
||||
// 0x0544 ~usb_fmask
|
||||
/// <summary>0x0548 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask1_sun;
|
||||
// 0x0548 ~usb_fmask
|
||||
|
||||
#endregion Sun
|
||||
|
||||
#region Sunx86
|
||||
|
||||
/// <summary>0x045C, 212 bytes, reserved for future constants</summary>
|
||||
public byte[] fs_sparecon_sun86;
|
||||
// 0x045C, 212 bytes, reserved for future constants
|
||||
/// <summary>0x0530</summary>
|
||||
public UInt32 fs_reclaim_sun86;
|
||||
// 0x0530
|
||||
/// <summary>0x0534</summary>
|
||||
public UInt32 fs_sparecon2_sun86;
|
||||
// 0x0534
|
||||
/// <summary>0x0538 # sectors/track including spares</summary>
|
||||
public UInt32 fs_npsect_sun86;
|
||||
// 0x0538 # sectors/track including spares
|
||||
/// <summary>0x053C ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask0_sun86;
|
||||
// 0x053C ~usb_bmask
|
||||
/// <summary>0x0540 ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask1_sun86;
|
||||
// 0x0540 ~usb_bmask
|
||||
/// <summary>0x0544 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask0_sun86;
|
||||
// 0x0544 ~usb_fmask
|
||||
/// <summary>0x0548 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask1_sun86;
|
||||
// 0x0548 ~usb_fmask
|
||||
|
||||
#endregion Sunx86
|
||||
|
||||
#region 44BSD
|
||||
|
||||
/// <summary>0x045C, 200 bytes</summary>
|
||||
public byte[] fs_sparecon_44bsd;
|
||||
// 0x045C, 200 bytes
|
||||
/// <summary>0x0524 size of cluster summary array</summary>
|
||||
public UInt32 fs_contigsumsize_44bsd;
|
||||
// 0x0524 size of cluster summary array
|
||||
/// <summary>0x0528 max length of an internal symlink</summary>
|
||||
public UInt32 fs_maxsymlinklen_44bsd;
|
||||
// 0x0528 max length of an internal symlink
|
||||
/// <summary>0x052C format of on-disk inodes</summary>
|
||||
public UInt32 fs_inodefmt_44bsd;
|
||||
// 0x052C format of on-disk inodes
|
||||
/// <summary>0x0530 max representable file size</summary>
|
||||
public UInt32 fs_maxfilesize0_44bsd;
|
||||
// 0x0530 max representable file size
|
||||
/// <summary>0x0534 max representable file size</summary>
|
||||
public UInt32 fs_maxfilesize1_44bsd;
|
||||
// 0x0534 max representable file size
|
||||
/// <summary>0x0538 ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask0_44bsd;
|
||||
// 0x0538 ~usb_bmask
|
||||
/// <summary>0x053C ~usb_bmask</summary>
|
||||
public UInt32 fs_qbmask1_44bsd;
|
||||
// 0x053C ~usb_bmask
|
||||
/// <summary>0x0540 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask0_44bsd;
|
||||
// 0x0540 ~usb_fmask
|
||||
/// <summary>0x0544 ~usb_fmask</summary>
|
||||
public UInt32 fs_qfmask1_44bsd;
|
||||
// 0x0544 ~usb_fmask
|
||||
/// <summary>0x0548 file system state time stamp</summary>
|
||||
public UInt32 fs_state_t_44bsd;
|
||||
// 0x0548 file system state time stamp
|
||||
|
||||
#endregion 44BSD
|
||||
|
||||
/// <summary>0x054C format of positional layout tables</summary>
|
||||
public UInt32 fs_postblformat;
|
||||
// 0x054C format of positional layout tables
|
||||
/// <summary>0x0550 number of rotational positions</summary>
|
||||
public UInt32 fs_nrpos;
|
||||
// 0x0550 number of rotational positions
|
||||
/// <summary>0x0554 (__s16) rotation block list head</summary>
|
||||
public UInt32 fs_postbloff;
|
||||
// 0x0554 (__s16) rotation block list head
|
||||
/// <summary>0x0558 (__u8) blocks for each rotation</summary>
|
||||
public UInt32 fs_rotbloff;
|
||||
// 0x0558 (__u8) blocks for each rotation
|
||||
/// <summary>0x055C magic number</summary>
|
||||
public UInt32 fs_magic;
|
||||
// 0x055C magic number
|
||||
/// <summary>0x0560 list of blocks for each rotation</summary>
|
||||
public byte fs_space;
|
||||
// 0x0560 list of blocks for each rotation
|
||||
// 0x0561
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,132 +259,141 @@ namespace DiscImageChef.Plugins
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
struct HPFS_BIOSParameterBlock // Sector 0
|
||||
/// <summary>
|
||||
/// BIOS Parameter Block, at sector 0
|
||||
/// </summary>
|
||||
struct HPFS_BIOSParameterBlock
|
||||
{
|
||||
/// <summary>0x000, Jump to boot code</summary>
|
||||
public byte jmp1;
|
||||
// 0x000, Jump to boot code
|
||||
/// <summary>0x001, ...;</summary>
|
||||
public UInt16 jmp2;
|
||||
// 0x001, ...;
|
||||
/// <summary>0x003, OEM Name, 8 bytes, space-padded</summary>
|
||||
public string OEMName;
|
||||
// 0x003, OEM Name, 8 bytes, space-padded
|
||||
/// <summary>0x00B, Bytes per sector</summary>
|
||||
public UInt16 bps;
|
||||
// 0x00B, Bytes per sector
|
||||
/// <summary>0x00D, Sectors per cluster</summary>
|
||||
public byte spc;
|
||||
// 0x00D, Sectors per cluster
|
||||
/// <summary>0x00E, Reserved sectors between BPB and... does it have sense in HPFS?</summary>
|
||||
public UInt16 rsectors;
|
||||
// 0x00E, Reserved sectors between BPB and... does it have sense in HPFS?
|
||||
/// <summary>0x010, Number of FATs... seriously?</summary>
|
||||
public byte fats_no;
|
||||
// 0x010, Number of FATs... seriously?
|
||||
/// <summary>0x011, Number of entries on root directory... ok</summary>
|
||||
public UInt16 root_ent;
|
||||
// 0x011, Number of entries on root directory... ok
|
||||
/// <summary>0x013, Sectors in volume... doubt it</summary>
|
||||
public UInt16 sectors;
|
||||
// 0x013, Sectors in volume... doubt it
|
||||
/// <summary>0x015, Media descriptor</summary>
|
||||
public byte media;
|
||||
// 0x015, Media descriptor
|
||||
/// <summary>0x016, Sectors per FAT... again</summary>
|
||||
public UInt16 spfat;
|
||||
// 0x016, Sectors per FAT... again
|
||||
/// <summary>0x018, Sectors per track... you're kidding</summary>
|
||||
public UInt16 sptrk;
|
||||
// 0x018, Sectors per track... you're kidding
|
||||
/// <summary>0x01A, Heads... stop!</summary>
|
||||
public UInt16 heads;
|
||||
// 0x01A, Heads... stop!
|
||||
/// <summary>0x01C, Hidden sectors before BPB</summary>
|
||||
public UInt32 hsectors;
|
||||
// 0x01C, Hidden sectors before BPB
|
||||
/// <summary>0x024, Sectors in volume if > 65535...</summary>
|
||||
public UInt32 big_sectors;
|
||||
// 0x024, Sectors in volume if > 65535...
|
||||
/// <summary>0x028, Drive number</summary>
|
||||
public byte drive_no;
|
||||
// 0x028, Drive number
|
||||
/// <summary>0x029, Volume flags?</summary>
|
||||
public byte nt_flags;
|
||||
// 0x029, Volume flags?
|
||||
/// <summary>0x02A, EPB signature, 0x29</summary>
|
||||
public byte signature;
|
||||
// 0x02A, EPB signature, 0x29
|
||||
/// <summary>0x02B, Volume serial number</summary>
|
||||
public UInt32 serial_no;
|
||||
// 0x02B, Volume serial number
|
||||
/// <summary>0x02F, Volume label, 11 bytes, space-padded</summary>
|
||||
public string volume_label;
|
||||
// 0x02F, Volume label, 11 bytes, space-padded
|
||||
/// <summary>0x03A, Filesystem type, 8 bytes, space-padded ("HPFS ")</summary>
|
||||
public string fs_type;
|
||||
// 0x03A, Filesystem type, 8 bytes, space-padded ("HPFS ")
|
||||
}
|
||||
|
||||
struct HPFS_SuperBlock // Sector 16
|
||||
/// <summary>
|
||||
/// HPFS superblock at sector 16
|
||||
/// </summary>
|
||||
struct HPFS_SuperBlock
|
||||
{
|
||||
/// <summary>0x000, 0xF995E849</summary>
|
||||
public UInt32 magic1;
|
||||
// 0x000, 0xF995E849
|
||||
/// <summary>0x004, 0xFA53E9C5</summary>
|
||||
public UInt32 magic2;
|
||||
// 0x004, 0xFA53E9C5
|
||||
/// <summary>0x008, HPFS version</summary>
|
||||
public byte version;
|
||||
// 0x008, HPFS version
|
||||
/// <summary>0x009, 2 if <= 4 GiB, 3 if > 4 GiB</summary>
|
||||
public byte func_version;
|
||||
// 0x009, 2 if <= 4 GiB, 3 if > 4 GiB
|
||||
/// <summary>0x00A, Alignment</summary>
|
||||
public UInt16 dummy;
|
||||
// 0x00A, Alignment
|
||||
/// <summary>0x00C, LSN pointer to root fnode</summary>
|
||||
public UInt32 root_fnode;
|
||||
// 0x00C, LSN pointer to root fnode
|
||||
/// <summary>0x010, Sectors on volume</summary>
|
||||
public UInt32 sectors;
|
||||
// 0x010, Sectors on volume
|
||||
/// <summary>0x014, Bad blocks on volume</summary>
|
||||
public UInt32 badblocks;
|
||||
// 0x014, Bad blocks on volume
|
||||
/// <summary>0x018, LSN pointer to volume bitmap</summary>
|
||||
public UInt32 bitmap_lsn;
|
||||
// 0x018, LSN pointer to volume bitmap
|
||||
/// <summary>0x01C, 0</summary>
|
||||
public UInt32 zero1;
|
||||
// 0x01C, 0
|
||||
/// <summary>0x020, LSN pointer to badblock directory</summary>
|
||||
public UInt32 badblock_lsn;
|
||||
// 0x020, LSN pointer to badblock directory
|
||||
/// <summary>0x024, 0</summary>
|
||||
public UInt32 zero2;
|
||||
// 0x024, 0
|
||||
/// <summary>0x028, Time of last CHKDSK</summary>
|
||||
public Int32 last_chkdsk;
|
||||
// 0x028, Time of last CHKDSK
|
||||
/// <summary>0x02C, Time of last optimization</summary>
|
||||
public Int32 last_optim;
|
||||
// 0x02C, Time of last optimization
|
||||
/// <summary>0x030, Sectors of dir band</summary>
|
||||
public UInt32 dband_sectors;
|
||||
// 0x030, Sectors of dir band
|
||||
/// <summary>0x034, Start sector of dir band</summary>
|
||||
public UInt32 dband_start;
|
||||
// 0x034, Start sector of dir band
|
||||
/// <summary>0x038, Last sector of dir band</summary>
|
||||
public UInt32 dband_last;
|
||||
// 0x038, Last sector of dir band
|
||||
/// <summary>0x03C, LSN of free space bitmap</summary>
|
||||
public UInt32 dband_bitmap;
|
||||
// 0x03C, LSN of free space bitmap
|
||||
/// <summary>0x040, Can be used for volume name (32 bytes)</summary>
|
||||
public UInt64 zero3;
|
||||
// 0x040, Can be used for volume name (32 bytes)
|
||||
/// <summary>0x048, ...</summary>
|
||||
public UInt64 zero4;
|
||||
// 0x048, ...
|
||||
/// <summary>0x04C, ...</summary>
|
||||
public UInt64 zero5;
|
||||
// 0x04C, ...
|
||||
/// <summary>0x050, ...;</summary>
|
||||
public UInt64 zero6;
|
||||
// 0x050, ...;
|
||||
/// <summary>0x058, LSN pointer to ACLs (only HPFS386)</summary>
|
||||
public UInt32 acl_start;
|
||||
// 0x058, LSN pointer to ACLs (only HPFS386)
|
||||
}
|
||||
|
||||
struct HPFS_SpareBlock // Sector 17
|
||||
/// <summary>
|
||||
/// HPFS spareblock at sector 17
|
||||
/// </summary>
|
||||
struct HPFS_SpareBlock
|
||||
{
|
||||
/// <summary>0x000, 0xF9911849</summary>
|
||||
public UInt32 magic1;
|
||||
// 0x000, 0xF9911849
|
||||
/// <summary>0x004, 0xFA5229C5</summary>
|
||||
public UInt32 magic2;
|
||||
// 0x004, 0xFA5229C5
|
||||
/// <summary>0x008, HPFS flags</summary>
|
||||
public byte flags1;
|
||||
// 0x008, HPFS flags
|
||||
/// <summary>0x009, HPFS386 flags</summary>
|
||||
public byte flags2;
|
||||
// 0x009, HPFS386 flags
|
||||
/// <summary>0x00A, Alignment</summary>
|
||||
public UInt16 dummy;
|
||||
// 0x00A, Alignment
|
||||
/// <summary>0x00C, LSN of hotfix directory</summary>
|
||||
public UInt32 hotfix_start;
|
||||
// 0x00C, LSN of hotfix directory
|
||||
/// <summary>0x010, Used hotfixes</summary>
|
||||
public UInt32 hotfix_used;
|
||||
// 0x010, Used hotfixes
|
||||
/// <summary>0x014, Total hotfixes available</summary>
|
||||
public UInt32 hotfix_entries;
|
||||
// 0x014, Total hotfixes available
|
||||
/// <summary>0x018, Unused spare dnodes</summary>
|
||||
public UInt32 spare_dnodes_free;
|
||||
// 0x018, Unused spare dnodes
|
||||
/// <summary>0x01C, Length of spare dnodes list</summary>
|
||||
public UInt32 spare_dnodes;
|
||||
// 0x01C, Length of spare dnodes list
|
||||
/// <summary>0x020, LSN of codepage directory</summary>
|
||||
public UInt32 codepage_lsn;
|
||||
// 0x020, LSN of codepage directory
|
||||
/// <summary>0x024, Number of codepages used</summary>
|
||||
public UInt32 codepages;
|
||||
// 0x024, Number of codepages used
|
||||
/// <summary>0x028, SuperBlock CRC32 (only HPFS386)</summary>
|
||||
public UInt32 sb_crc32;
|
||||
// 0x028, SuperBlock CRC32 (only HPFS386)
|
||||
/// <summary>0x02C, SpareBlock CRC32 (only HPFS386)</summary>
|
||||
public UInt32 sp_crc32;
|
||||
// 0x02C, SpareBlock CRC32 (only HPFS386)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,176 +423,176 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
struct Lisa_MDDF
|
||||
{
|
||||
// 0x00, Filesystem version
|
||||
/// <summary>0x00, Filesystem version</summary>
|
||||
public UInt16 fsversion;
|
||||
// 0x02, Volume ID
|
||||
/// <summary>0x02, Volume ID</summary>
|
||||
public UInt64 volid;
|
||||
// 0x0A, Volume sequence number
|
||||
/// <summary>0x0A, Volume sequence number</summary>
|
||||
public UInt16 volnum;
|
||||
// 0x0C, Pascal string, 32+1 bytes, volume name
|
||||
/// <summary>0x0C, Pascal string, 32+1 bytes, volume name</summary>
|
||||
public string volname;
|
||||
// 0x2D, unknown, possible padding
|
||||
/// <summary>0x2D, unknown, possible padding</summary>
|
||||
public byte unknown1;
|
||||
// 0x2E, Pascal string, 32+1 bytes, password
|
||||
/// <summary>0x2E, Pascal string, 32+1 bytes, password</summary>
|
||||
public string password;
|
||||
// 0x4F, unknown, possible padding
|
||||
/// <summary>0x4F, unknown, possible padding</summary>
|
||||
public byte unknown2;
|
||||
// 0x50, Lisa serial number that init'ed this disk
|
||||
/// <summary>0x50, Lisa serial number that init'ed this disk</summary>
|
||||
public UInt32 machine_id;
|
||||
// 0x54, ID of the master copy ? no idea really
|
||||
/// <summary>0x54, ID of the master copy ? no idea really</summary>
|
||||
public UInt32 master_copy_id;
|
||||
// 0x58, Date of volume creation
|
||||
/// <summary>0x58, Date of volume creation</summary>
|
||||
public DateTime dtvc;
|
||||
// 0x5C, Date...
|
||||
/// <summary>0x5C, Date...</summary>
|
||||
public DateTime dtcc;
|
||||
// 0x60, Date of volume backup
|
||||
/// <summary>0x60, Date of volume backup</summary>
|
||||
public DateTime dtvb;
|
||||
// 0x64, Date of volume scavenging
|
||||
/// <summary>0x64, Date of volume scavenging</summary>
|
||||
public DateTime dtvs;
|
||||
// 0x68, unknown
|
||||
/// <summary>0x68, unknown</summary>
|
||||
public UInt32 unknown3;
|
||||
// 0x6C, block the MDDF is residing on
|
||||
/// <summary>0x6C, block the MDDF is residing on</summary>
|
||||
public UInt32 mddf_block;
|
||||
// 0x70, volsize-1
|
||||
/// <summary>0x70, volsize-1</summary>
|
||||
public UInt32 volsize_minus_one;
|
||||
// 0x74, volsize-1-mddf_block
|
||||
/// <summary>0x74, volsize-1-mddf_block</summary>
|
||||
public UInt32 volsize_minus_mddf_minus_one;
|
||||
// 0x78, Volume size in blocks
|
||||
/// <summary>0x78, Volume size in blocks</summary>
|
||||
public UInt32 vol_size;
|
||||
// 0x7C, Blocks size of underlying drive (data+tags)
|
||||
/// <summary>0x7C, Blocks size of underlying drive (data+tags)</summary>
|
||||
public UInt16 blocksize;
|
||||
// 0x7E, Data only block size
|
||||
/// <summary>0x7E, Data only block size</summary>
|
||||
public UInt16 datasize;
|
||||
// 0x80, unknown
|
||||
/// <summary>0x80, unknown</summary>
|
||||
public UInt16 unknown4;
|
||||
// 0x82, unknown
|
||||
/// <summary>0x82, unknown</summary>
|
||||
public UInt32 unknown5;
|
||||
// 0x86, unknown
|
||||
/// <summary>0x86, unknown</summary>
|
||||
public UInt32 unknown6;
|
||||
// 0x8A, Size in sectors of filesystem clusters
|
||||
/// <summary>0x8A, Size in sectors of filesystem clusters</summary>
|
||||
public UInt16 clustersize;
|
||||
// 0x8C, Filesystem size in blocks
|
||||
/// <summary>0x8C, Filesystem size in blocks</summary>
|
||||
public UInt32 fs_size;
|
||||
// 0x90, unknown
|
||||
/// <summary>0x90, unknown</summary>
|
||||
public UInt32 unknown7;
|
||||
// 0x94, unknown
|
||||
/// <summary>0x94, unknown</summary>
|
||||
public UInt32 unknown8;
|
||||
// 0x98, unknown
|
||||
/// <summary>0x98, unknown</summary>
|
||||
public UInt32 unknown9;
|
||||
// 0x9C, unknown
|
||||
/// <summary>0x9C, unknown</summary>
|
||||
public UInt32 unknown10;
|
||||
// 0xA0, unknown
|
||||
/// <summary>0xA0, unknown</summary>
|
||||
public UInt32 unknown11;
|
||||
// 0xA4, unknown
|
||||
/// <summary>0xA4, unknown</summary>
|
||||
public UInt32 unknown12;
|
||||
// 0xA8, unknown
|
||||
/// <summary>0xA8, unknown</summary>
|
||||
public UInt32 unknown13;
|
||||
// 0xAC, unknown
|
||||
/// <summary>0xAC, unknown</summary>
|
||||
public UInt32 unknown14;
|
||||
// 0xB0, Files in volume
|
||||
/// <summary>0xB0, Files in volume</summary>
|
||||
public UInt16 filecount;
|
||||
// 0xB2, unknown
|
||||
/// <summary>0xB2, unknown</summary>
|
||||
public UInt32 unknown15;
|
||||
// 0xB6, unknown
|
||||
/// <summary>0xB6, unknown</summary>
|
||||
public UInt32 unknown16;
|
||||
// 0xBA, Free blocks
|
||||
/// <summary>0xBA, Free blocks</summary>
|
||||
public UInt32 freecount;
|
||||
// 0xBE, unknown
|
||||
/// <summary>0xBE, unknown</summary>
|
||||
public UInt16 unknown17;
|
||||
// 0xC0, unknown
|
||||
/// <summary>0xC0, unknown</summary>
|
||||
public UInt32 unknown18;
|
||||
// 0xC4, no idea
|
||||
/// <summary>0xC4, no idea</summary>
|
||||
public UInt64 overmount_stamp;
|
||||
// 0xCC, serialization, lisa serial number authorized to use blocked software on this volume
|
||||
/// <summary>0xCC, serialization, lisa serial number authorized to use blocked software on this volume</summary>
|
||||
public UInt32 serialization;
|
||||
// 0xD0, unknown
|
||||
/// <summary>0xD0, unknown</summary>
|
||||
public UInt32 unknown19;
|
||||
// 0xD4, unknown, possible timestamp
|
||||
/// <summary>0xD4, unknown, possible timestamp</summary>
|
||||
public UInt32 unknown_timestamp;
|
||||
// 0xD8, unknown
|
||||
/// <summary>0xD8, unknown</summary>
|
||||
public UInt32 unknown20;
|
||||
// 0xDC, unknown
|
||||
/// <summary>0xDC, unknown</summary>
|
||||
public UInt32 unknown21;
|
||||
// 0xE0, unknown
|
||||
/// <summary>0xE0, unknown</summary>
|
||||
public UInt32 unknown22;
|
||||
// 0xE4, unknown
|
||||
/// <summary>0xE4, unknown</summary>
|
||||
public UInt32 unknown23;
|
||||
// 0xE8, unknown
|
||||
/// <summary>0xE8, unknown</summary>
|
||||
public UInt32 unknown24;
|
||||
// 0xEC, unknown
|
||||
/// <summary>0xEC, unknown</summary>
|
||||
public UInt32 unknown25;
|
||||
// 0xF0, unknown
|
||||
/// <summary>0xF0, unknown</summary>
|
||||
public UInt32 unknown26;
|
||||
// 0xF4, unknown
|
||||
/// <summary>0xF4, unknown</summary>
|
||||
public UInt32 unknown27;
|
||||
// 0xF8, unknown
|
||||
/// <summary>0xF8, unknown</summary>
|
||||
public UInt32 unknown28;
|
||||
// 0xFC, unknown
|
||||
/// <summary>0xFC, unknown</summary>
|
||||
public UInt32 unknown29;
|
||||
// 0x100, unknown
|
||||
/// <summary>0x100, unknown</summary>
|
||||
public UInt32 unknown30;
|
||||
// 0x104, unknown
|
||||
/// <summary>0x104, unknown</summary>
|
||||
public UInt32 unknown31;
|
||||
// 0x108, unknown
|
||||
/// <summary>0x108, unknown</summary>
|
||||
public UInt32 unknown32;
|
||||
// 0x10C, unknown
|
||||
/// <summary>0x10C, unknown</summary>
|
||||
public UInt32 unknown33;
|
||||
// 0x110, unknown
|
||||
/// <summary>0x110, unknown</summary>
|
||||
public UInt32 unknown34;
|
||||
// 0x114, unknown
|
||||
/// <summary>0x114, unknown</summary>
|
||||
public UInt32 unknown35;
|
||||
// 0x118, ID of volume where this volume was backed up
|
||||
/// <summary>0x118, ID of volume where this volume was backed up</summary>
|
||||
public UInt64 backup_volid;
|
||||
// 0x120, Size of LisaInfo label
|
||||
/// <summary>0x120, Size of LisaInfo label</summary>
|
||||
public UInt16 label_size;
|
||||
// 0x122, not clear
|
||||
/// <summary>0x122, not clear</summary>
|
||||
public UInt16 fs_overhead;
|
||||
// 0x124, Return code of Scavenger
|
||||
/// <summary>0x124, Return code of Scavenger</summary>
|
||||
public UInt16 result_scavenge;
|
||||
// 0x126, No idea
|
||||
/// <summary>0x126, No idea</summary>
|
||||
public UInt16 boot_code;
|
||||
// 0x128, No idea
|
||||
/// <summary>0x128, No idea</summary>
|
||||
public UInt16 boot_environ;
|
||||
// 0x12A, unknown
|
||||
/// <summary>0x12A, unknown</summary>
|
||||
public UInt32 unknown36;
|
||||
// 0x12E, unknown
|
||||
/// <summary>0x12E, unknown</summary>
|
||||
public UInt32 unknown37;
|
||||
// 0x132, unknown
|
||||
/// <summary>0x132, unknown</summary>
|
||||
public UInt32 unknown38;
|
||||
// 0x136, Total volumes in sequence
|
||||
/// <summary>0x136, Total volumes in sequence</summary>
|
||||
public UInt16 vol_sequence;
|
||||
// 0x138, Volume is dirty?
|
||||
/// <summary>0x138, Volume is dirty?</summary>
|
||||
public byte vol_left_mounted;
|
||||
// Is password present? (On-disk position unknown)
|
||||
/// <summary>Is password present? (On-disk position unknown)</summary>
|
||||
public byte passwd_present;
|
||||
// Opened files (memory-only?) (On-disk position unknown)
|
||||
/// <summary>Opened files (memory-only?) (On-disk position unknown)</summary>
|
||||
public UInt32 opencount;
|
||||
// No idea (On-disk position unknown)
|
||||
/// <summary>No idea (On-disk position unknown)</summary>
|
||||
public UInt32 copy_thread;
|
||||
// Flags are boolean, but Pascal seems to use them as full unsigned 8 bit values
|
||||
// No idea (On-disk position unknown)
|
||||
/// <summary>No idea (On-disk position unknown)</summary>
|
||||
public byte privileged;
|
||||
// Read-only volume (On-disk position unknown)
|
||||
/// <summary>Read-only volume (On-disk position unknown)</summary>
|
||||
public byte write_protected;
|
||||
// Master disk (On-disk position unknown)
|
||||
/// <summary>Master disk (On-disk position unknown)</summary>
|
||||
public byte master;
|
||||
// Copy disk (On-disk position unknown)
|
||||
/// <summary>Copy disk (On-disk position unknown)</summary>
|
||||
public byte copy;
|
||||
// No idea (On-disk position unknown)
|
||||
/// <summary>No idea (On-disk position unknown)</summary>
|
||||
public byte copy_flag;
|
||||
// No idea (On-disk position unknown)
|
||||
/// <summary>No idea (On-disk position unknown)</summary>
|
||||
public byte scavenge_flag;
|
||||
}
|
||||
|
||||
struct Lisa_Tag
|
||||
{
|
||||
// 0x00 Unknown
|
||||
/// <summary>0x00 Unknown</summary>
|
||||
public UInt32 unknown1;
|
||||
// 0x04 File ID
|
||||
/// <summary>0x04 File ID</summary>
|
||||
public UInt16 fileID;
|
||||
// 0x06 Unknown
|
||||
/// <summary>0x06 Unknown</summary>
|
||||
public UInt16 unknown2;
|
||||
// 0x08 Unknown
|
||||
/// <summary>0x08 Unknown</summary>
|
||||
public UInt32 unknown3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,58 +245,64 @@ namespace DiscImageChef.Plugins
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Superblock for Minix V1 and V2 filesystems
|
||||
/// </summary>
|
||||
public struct MinixSuperBlock
|
||||
{
|
||||
/// <summary>0x00, inodes on volume</summary>
|
||||
public UInt16 s_ninodes;
|
||||
// 0x00, inodes on volume
|
||||
/// <summary>0x02, zones on volume</summary>
|
||||
public UInt16 s_nzones;
|
||||
// 0x02, zones on volume
|
||||
/// <summary>0x04, blocks on inode map</summary>
|
||||
public UInt16 s_imap_blocks;
|
||||
// 0x04, blocks on inode map
|
||||
/// <summary>0x06, blocks on zone map</summary>
|
||||
public UInt16 s_zmap_blocks;
|
||||
// 0x06, blocks on zone map
|
||||
/// <summary>0x08, first data zone</summary>
|
||||
public UInt16 s_firstdatazone;
|
||||
// 0x08, first data zone
|
||||
/// <summary>0x0A, log2 of blocks/zone</summary>
|
||||
public UInt16 s_log_zone_size;
|
||||
// 0x0A, log2 of blocks/zone
|
||||
/// <summary>0x0C, max file size</summary>
|
||||
public UInt32 s_max_size;
|
||||
// 0x0C, max file size
|
||||
/// <summary>0x10, magic</summary>
|
||||
public UInt16 s_magic;
|
||||
// 0x10, magic
|
||||
/// <summary>0x12, filesystem state</summary>
|
||||
public UInt16 s_state;
|
||||
// 0x12, filesystem state
|
||||
/// <summary>0x14, number of zones</summary>
|
||||
public UInt32 s_zones;
|
||||
// 0x14, number of zones
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Superblock for Minix V3 filesystems
|
||||
/// </summary>
|
||||
public struct Minix3SuperBlock
|
||||
{
|
||||
/// <summary>0x00, inodes on volume</summary>
|
||||
public UInt32 s_ninodes;
|
||||
// 0x00, inodes on volume
|
||||
/// <summary>0x04, padding</summary>
|
||||
public UInt16 s_pad0;
|
||||
// 0x04, padding
|
||||
/// <summary>0x06, blocks on inode map</summary>
|
||||
public UInt16 s_imap_blocks;
|
||||
// 0x06, blocks on inode map
|
||||
/// <summary>0x08, blocks on zone map</summary>
|
||||
public UInt16 s_zmap_blocks;
|
||||
// 0x08, blocks on zone map
|
||||
/// <summary>0x0A, first data zone</summary>
|
||||
public UInt16 s_firstdatazone;
|
||||
// 0x0A, first data zone
|
||||
/// <summary>0x0C, log2 of blocks/zone</summary>
|
||||
public UInt16 s_log_zone_size;
|
||||
// 0x0C, log2 of blocks/zone
|
||||
/// <summary>0x0E, padding</summary>
|
||||
public UInt16 s_pad1;
|
||||
// 0x0E, padding
|
||||
/// <summary>0x10, max file size</summary>
|
||||
public UInt32 s_max_size;
|
||||
// 0x10, max file size
|
||||
/// <summary>0x14, number of zones</summary>
|
||||
public UInt32 s_zones;
|
||||
// 0x14, number of zones
|
||||
/// <summary>0x18, magic</summary>
|
||||
public UInt16 s_magic;
|
||||
// 0x18, magic
|
||||
/// <summary>0x1A, padding</summary>
|
||||
public UInt16 s_pad2;
|
||||
// 0x1A, padding
|
||||
/// <summary>0x1C, bytes in a block</summary>
|
||||
public UInt16 s_blocksize;
|
||||
// 0x1C, bytes in a block
|
||||
/// <summary>0x1E, on-disk structures version</summary>
|
||||
public byte s_disk_version;
|
||||
// 0x1E, on-disk structures version
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,72 +176,77 @@ namespace DiscImageChef.Plugins
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
struct NTFS_BootBlock // Sector 0
|
||||
/// <summary>
|
||||
/// NTFS $BOOT
|
||||
/// </summary>
|
||||
struct NTFS_BootBlock
|
||||
{
|
||||
// BIOS Parameter Block
|
||||
// Start of BIOS Parameter Block
|
||||
/// <summary>0x000, Jump to boot code</summary>
|
||||
public byte jmp1;
|
||||
// 0x000, Jump to boot code
|
||||
/// <summary>0x001, ...;</summary>
|
||||
public UInt16 jmp2;
|
||||
// 0x001, ...;
|
||||
/// <summary>0x003, OEM Name, 8 bytes, space-padded, must be "NTFS "</summary>
|
||||
public string OEMName;
|
||||
// 0x003, OEM Name, 8 bytes, space-padded, must be "NTFS "
|
||||
/// <summary>0x00B, Bytes per sector</summary>
|
||||
public UInt16 bps;
|
||||
// 0x00B, Bytes per sector
|
||||
/// <summary>0x00D, Sectors per cluster</summary>
|
||||
public byte spc;
|
||||
// 0x00D, Sectors per cluster
|
||||
/// <summary>0x00E, Reserved sectors, seems 0</summary>
|
||||
public UInt16 rsectors;
|
||||
// 0x00E, Reserved sectors, seems 0
|
||||
/// <summary>0x010, Number of FATs... obviously, 0</summary>
|
||||
public byte fats_no;
|
||||
// 0x010, Number of FATs... obviously, 0
|
||||
/// <summary>0x011, Number of entries on root directory... 0</summary>
|
||||
public UInt16 root_ent;
|
||||
// 0x011, Number of entries on root directory... 0
|
||||
/// <summary>0x013, Sectors in volume... 0</summary>
|
||||
public UInt16 sml_sectors;
|
||||
// 0x013, Sectors in volume... 0
|
||||
/// <summary>0x015, Media descriptor</summary>
|
||||
public byte media;
|
||||
// 0x015, Media descriptor
|
||||
/// <summary>0x016, Sectors per FAT... 0</summary>
|
||||
public UInt16 spfat;
|
||||
// 0x016, Sectors per FAT... 0
|
||||
/// <summary>0x018, Sectors per track, required to boot</summary>
|
||||
public UInt16 sptrk;
|
||||
// 0x018, Sectors per track, required to boot
|
||||
/// <summary>0x01A, Heads... required to boot</summary>
|
||||
public UInt16 heads;
|
||||
// 0x01A, Heads... required to boot
|
||||
/// <summary>0x01C, Hidden sectors before BPB</summary>
|
||||
public UInt32 hsectors;
|
||||
// 0x01C, Hidden sectors before BPB
|
||||
/// <summary>0x020, Sectors in volume if > 65535... 0</summary>
|
||||
public UInt32 big_sectors;
|
||||
// 0x020, Sectors in volume if > 65535... 0
|
||||
/// <summary>0x024, Drive number</summary>
|
||||
public byte drive_no;
|
||||
// 0x024, Drive number
|
||||
/// <summary>0x025, 0</summary>
|
||||
public byte nt_flags;
|
||||
// 0x025, 0
|
||||
/// <summary>0x026, EPB signature, 0x80</summary>
|
||||
public byte signature1;
|
||||
// 0x026, EPB signature, 0x80
|
||||
/// <summary>0x027, Alignment</summary>
|
||||
public byte dummy;
|
||||
// 0x027, Alignment
|
||||
// End of BIOS Parameter Block
|
||||
// NTFS real superblock
|
||||
|
||||
// Start of NTFS real superblock
|
||||
/// <summary>0x028, Sectors on volume</summary>
|
||||
public Int64 sectors;
|
||||
// 0x028, Sectors on volume
|
||||
/// <summary>0x030, LSN of $MFT</summary>
|
||||
public Int64 mft_lsn;
|
||||
// 0x030, LSN of $MFT
|
||||
/// <summary>0x038, LSN of $MFTMirror</summary>
|
||||
public Int64 mftmirror_lsn;
|
||||
// 0x038, LSN of $MFTMirror
|
||||
/// <summary>0x040, Clusters per MFT record</summary>
|
||||
public sbyte mft_rc_clusters;
|
||||
// 0x040, Clusters per MFT record
|
||||
/// <summary>0x041, Alignment</summary>
|
||||
public byte dummy2;
|
||||
// 0x041, Alignment
|
||||
/// <summary>0x042, Alignment</summary>
|
||||
public UInt16 dummy3;
|
||||
// 0x042, Alignment
|
||||
/// <summary>0x044, Clusters per index block</summary>
|
||||
public sbyte index_blk_cts;
|
||||
// 0x044, Clusters per index block
|
||||
/// <summary>0x045, Alignment</summary>
|
||||
public byte dummy4;
|
||||
// 0x045, Alignment
|
||||
/// <summary>0x046, Alignment</summary>
|
||||
public UInt16 dummy5;
|
||||
// 0x046, Alignment
|
||||
/// <summary>0x048, Volume serial number</summary>
|
||||
public UInt64 serial_no;
|
||||
// 0x048, Volume serial number
|
||||
// End of NTFS superblock, followed by 430 bytes of boot code
|
||||
|
||||
/// <summary>0x1FE, 0xAA55</summary>
|
||||
public UInt16 signature2;
|
||||
// 0x1FE, 0xAA55
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,98 +279,98 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
struct ODSHomeBlock
|
||||
{
|
||||
/// <summary>0x000, LBN of THIS home block</summary>
|
||||
public UInt32 homelbn;
|
||||
// 0x000, LBN of THIS home block
|
||||
/// <summary>0x004, LBN of the secondary home block</summary>
|
||||
public UInt32 alhomelbn;
|
||||
// 0x004, LBN of the secondary home block
|
||||
/// <summary>0x008, LBN of backup INDEXF.SYS;1</summary>
|
||||
public UInt32 altidxlbn;
|
||||
// 0x008, LBN of backup INDEXF.SYS;1
|
||||
/// <summary>0x00C, High byte contains filesystem version (1, 2 or 5), low byte contains revision (1)</summary>
|
||||
public UInt16 struclev;
|
||||
// 0x00C, High byte contains filesystem version (1, 2 or 5), low byte contains revision (1)
|
||||
/// <summary>0x00E, Number of blocks each bit of the volume bitmap represents</summary>
|
||||
public UInt16 cluster;
|
||||
// 0x00E, Number of blocks each bit of the volume bitmap represents
|
||||
/// <summary>0x010, VBN of THIS home block</summary>
|
||||
public UInt16 homevbn;
|
||||
// 0x010, VBN of THIS home block
|
||||
/// <summary>0x012, VBN of the secondary home block</summary>
|
||||
public UInt16 alhomevbn;
|
||||
// 0x012, VBN of the secondary home block
|
||||
/// <summary>0x014, VBN of backup INDEXF.SYS;1</summary>
|
||||
public UInt16 altidxvbn;
|
||||
// 0x014, VBN of backup INDEXF.SYS;1
|
||||
/// <summary>0x016, VBN of the bitmap</summary>
|
||||
public UInt16 ibmapvbn;
|
||||
// 0x016, VBN of the bitmap
|
||||
/// <summary>0x018, LBN of the bitmap</summary>
|
||||
public UInt32 ibmaplbn;
|
||||
// 0x018, LBN of the bitmap
|
||||
/// <summary>0x01C, Max files on volume</summary>
|
||||
public UInt32 maxfiles;
|
||||
// 0x01C, Max files on volume
|
||||
/// <summary>0x020, Bitmap size in sectors</summary>
|
||||
public UInt16 ibmapsize;
|
||||
// 0x020, Bitmap size in sectors
|
||||
/// <summary>0x022, Reserved files, 5 at minimum</summary>
|
||||
public UInt16 resfiles;
|
||||
// 0x022, Reserved files, 5 at minimum
|
||||
/// <summary>0x024, Device type, ODS-2 defines it as always 0</summary>
|
||||
public UInt16 devtype;
|
||||
// 0x024, Device type, ODS-2 defines it as always 0
|
||||
/// <summary>0x026, Relative volume number (number of the volume in a set)</summary>
|
||||
public UInt16 rvn;
|
||||
// 0x026, Relative volume number (number of the volume in a set)
|
||||
/// <summary>0x028, Total number of volumes in the set this volume is</summary>
|
||||
public UInt16 setcount;
|
||||
// 0x028, Total number of volumes in the set this volume is
|
||||
/// <summary>0x02A, Flags</summary>
|
||||
public UInt16 volchar;
|
||||
// 0x02A, Flags
|
||||
/// <summary>0x02C, User ID of the volume owner</summary>
|
||||
public UInt32 volowner;
|
||||
// 0x02C, User ID of the volume owner
|
||||
/// <summary>0x030, Security mask (??)</summary>
|
||||
public UInt32 sec_mask;
|
||||
// 0x030, Security mask (??)
|
||||
/// <summary>0x034, Volume permissions (system, owner, group and other)</summary>
|
||||
public UInt16 protect;
|
||||
// 0x034, Volume permissions (system, owner, group and other)
|
||||
/// <summary>0x036, Default file protection, unsupported in ODS-2</summary>
|
||||
public UInt16 fileprot;
|
||||
// 0x036, Default file protection, unsupported in ODS-2
|
||||
/// <summary>0x038, Default file record protection</summary>
|
||||
public UInt16 recprot;
|
||||
// 0x038, Default file record protection
|
||||
/// <summary>0x03A, Checksum of all preceding entries</summary>
|
||||
public UInt16 checksum1;
|
||||
// 0x03A, Checksum of all preceding entries
|
||||
/// <summary>0x03C, Creation date</summary>
|
||||
public UInt64 credate;
|
||||
// 0x03C, Creation date
|
||||
/// <summary>0x044, Window size (pointers for the window)</summary>
|
||||
public byte window;
|
||||
// 0x044, Window size (pointers for the window)
|
||||
/// <summary>0x045, Directories to be stored in cache</summary>
|
||||
public byte lru_lim;
|
||||
// 0x045, Directories to be stored in cache
|
||||
/// <summary>0x046, Default allocation size in blocks</summary>
|
||||
public UInt16 extend;
|
||||
// 0x046, Default allocation size in blocks
|
||||
/// <summary>0x048, Minimum file retention period</summary>
|
||||
public UInt64 retainmin;
|
||||
// 0x048, Minimum file retention period
|
||||
/// <summary>0x050, Maximum file retention period</summary>
|
||||
public UInt64 retainmax;
|
||||
// 0x050, Maximum file retention period
|
||||
/// <summary>0x058, Last modification date</summary>
|
||||
public UInt64 revdate;
|
||||
// 0x058, Last modification date
|
||||
/// <summary>0x060, Minimum security class, 20 bytes</summary>
|
||||
public byte[] min_class;
|
||||
// 0x060, Minimum security class, 20 bytes
|
||||
/// <summary>0x074, Maximum security class, 20 bytes</summary>
|
||||
public byte[] max_class;
|
||||
// 0x074, Maximum security class, 20 bytes
|
||||
/// <summary>0x088, File lookup table FID</summary>
|
||||
public UInt16 filetab_fid1;
|
||||
// 0x088, File lookup table FID
|
||||
/// <summary>0x08A, File lookup table FID</summary>
|
||||
public UInt16 filetab_fid2;
|
||||
// 0x08A, File lookup table FID
|
||||
/// <summary>0x08C, File lookup table FID</summary>
|
||||
public UInt16 filetab_fid3;
|
||||
// 0x08C, File lookup table FID
|
||||
/// <summary>0x08E, Lowest structure level on the volume</summary>
|
||||
public UInt16 lowstruclev;
|
||||
// 0x08E, Lowest structure level on the volume
|
||||
/// <summary>0x090, Highest structure level on the volume</summary>
|
||||
public UInt16 highstruclev;
|
||||
// 0x090, Highest structure level on the volume
|
||||
/// <summary>0x092, Volume copy date (??)</summary>
|
||||
public UInt64 copydate;
|
||||
// 0x092, Volume copy date (??)
|
||||
/// <summary>0x09A, 302 bytes</summary>
|
||||
public byte[] reserved1;
|
||||
// 0x09A, 302 bytes
|
||||
/// <summary>0x1C8, Physical drive serial number</summary>
|
||||
public UInt32 serialnum;
|
||||
// 0x1C8, Physical drive serial number
|
||||
/// <summary>0x1CC, Name of the volume set, 12 bytes</summary>
|
||||
public string strucname;
|
||||
// 0x1CC, Name of the volume set, 12 bytes
|
||||
/// <summary>0x1D8, Volume label, 12 bytes</summary>
|
||||
public string volname;
|
||||
// 0x1D8, Volume label, 12 bytes
|
||||
/// <summary>0x1E4, Name of the volume owner, 12 bytes</summary>
|
||||
public string ownername;
|
||||
// 0x1E4, Name of the volume owner, 12 bytes
|
||||
/// <summary>0x1F0, ODS-2 defines it as "DECFILE11B", 12 bytes</summary>
|
||||
public string format;
|
||||
// 0x1F0, ODS-2 defines it as "DECFILE11B", 12 bytes
|
||||
/// <summary>0x1FC, Reserved</summary>
|
||||
public UInt16 reserved2;
|
||||
// 0x1FC, Reserved
|
||||
/// <summary>0x1FE, Checksum of preceding 255 words (16 bit units)</summary>
|
||||
public UInt16 checksum2;
|
||||
// 0x1FE, Checksum of preceding 255 words (16 bit units)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,32 +141,32 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
struct OperaSuperBlock
|
||||
{
|
||||
/// <summary>0x000, Record type, must be 1</summary>
|
||||
public byte record_type;
|
||||
// 0x000, Record type, must be 1
|
||||
/// <summary>0x001, 5 bytes, "ZZZZZ"</summary>
|
||||
public byte[] sync_bytes;
|
||||
// 0x001, 5 bytes, "ZZZZZ" = new byte[5];
|
||||
/// <summary>0x006, Record version, must be 1</summary>
|
||||
public byte record_version;
|
||||
// 0x006, Record version, must be 1
|
||||
/// <summary>0x007, Volume flags</summary>
|
||||
public byte volume_flags;
|
||||
// 0x007, Volume flags
|
||||
/// <summary>0x008, 32 bytes, volume comment</summary>
|
||||
public string volume_comment;
|
||||
// 0x008, 32 bytes, volume comment
|
||||
/// <summary>0x028, 32 bytes, volume label</summary>
|
||||
public string volume_label;
|
||||
// 0x028, 32 bytes, volume label
|
||||
/// <summary>0x048, Volume ID</summary>
|
||||
public Int32 volume_id;
|
||||
// 0x048, Volume ID
|
||||
/// <summary>0x04C, Block size in bytes</summary>
|
||||
public Int32 block_size;
|
||||
// 0x04C, Block size in bytes
|
||||
/// <summary>0x050, Blocks in volume</summary>
|
||||
public Int32 block_count;
|
||||
// 0x050, Blocks in volume
|
||||
/// <summary>0x054, Root directory ID</summary>
|
||||
public Int32 root_dirid;
|
||||
// 0x054, Root directory ID
|
||||
/// <summary>0x058, Root directory blocks</summary>
|
||||
public Int32 rootdir_blocks;
|
||||
// 0x058, Root directory blocks
|
||||
/// <summary>0x05C, Root directory block size</summary>
|
||||
public Int32 rootdir_bsize;
|
||||
// 0x05C, Root directory block size
|
||||
/// <summary>0x060, Last root directory copy</summary>
|
||||
public Int32 last_root_copy;
|
||||
// 0x060, Last root directory copy
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ namespace DiscImageChef.Plugins
|
||||
if ((2 + partitionStart) >= imagePlugin.GetSectors())
|
||||
return false;
|
||||
|
||||
byte signature; // 0x29
|
||||
byte signature; /// <summary>0x29
|
||||
string fs_type; // "SOL_FS "
|
||||
|
||||
byte[] bpb = imagePlugin.ReadSector(0 + partitionStart);
|
||||
@@ -160,38 +160,38 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
public struct SolarOSParameterBlock
|
||||
{
|
||||
/// <summary>0x00, x86 jump (3 bytes), jumps to 0x60</summary>
|
||||
public byte[] x86_jump;
|
||||
// 0x00, x86 jump (3 bytes), jumps to 0x60
|
||||
/// <summary>0x03, 8 bytes, "SOLAR_OS"</summary>
|
||||
public string OEMName;
|
||||
// 0x03, 8 bytes, "SOLAR_OS"
|
||||
/// <summary>0x0B, Bytes per sector</summary>
|
||||
public UInt16 bps;
|
||||
// 0x0B, Bytes per sector
|
||||
/// <summary>0x0D, unknown, 0x01</summary>
|
||||
public byte unk1;
|
||||
// 0x0D, unknown, 0x01
|
||||
/// <summary>0x0E, unknown, 0x0201</summary>
|
||||
public UInt16 unk2;
|
||||
// 0x0E, unknown, 0x0201
|
||||
/// <summary>0x10, Number of entries on root directory ? (no root directory found)</summary>
|
||||
public UInt16 root_ent;
|
||||
// 0x10, Number of entries on root directory ? (no root directory found)
|
||||
/// <summary>0x12, Sectors in volume</summary>
|
||||
public UInt16 sectors;
|
||||
// 0x12, Sectors in volume
|
||||
/// <summary>0x14, Media descriptor</summary>
|
||||
public byte media;
|
||||
// 0x14, Media descriptor
|
||||
/// <summary>0x15, Sectors per FAT ? (no FAT found)</summary>
|
||||
public UInt16 spfat;
|
||||
// 0x15, Sectors per FAT ? (no FAT found)
|
||||
/// <summary>0x17, Sectors per track</summary>
|
||||
public UInt16 sptrk;
|
||||
// 0x17, Sectors per track
|
||||
/// <summary>0x19, Heads</summary>
|
||||
public UInt16 heads;
|
||||
// 0x19, Heads
|
||||
/// <summary>0x1B, unknown, 10 bytes, zero-filled</summary>
|
||||
public byte[] unk3;
|
||||
// 0x1B, unknown, 10 bytes, zero-filled
|
||||
/// <summary>0x25, 0x29</summary>
|
||||
public byte signature;
|
||||
// 0x25, 0x29
|
||||
/// <summary>0x26, unknown, zero-filled</summary>
|
||||
public UInt32 unk4;
|
||||
// 0x26, unknown, zero-filled
|
||||
/// <summary>0x2A, 11 bytes, volume name, space-padded</summary>
|
||||
public string vol_name;
|
||||
// 0x2A, 11 bytes, volume name, space-padded
|
||||
/// <summary>0x35, 8 bytes, "SOL_FS "</summary>
|
||||
public string fs_type;
|
||||
// 0x35, 8 bytes, "SOL_FS "
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -615,248 +615,248 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
struct XenixSuperBlock
|
||||
{
|
||||
/// <summary>0x000, index of first data zone</summary>
|
||||
public UInt16 s_isize;
|
||||
// 0x000, index of first data zone
|
||||
/// <summary>0x002, total number of zones of this volume</summary>
|
||||
public UInt32 s_fsize;
|
||||
// 0x002, total number of zones of this volume
|
||||
// the start of the free block list:
|
||||
/// <summary>0x006, blocks in s_free, <=100</summary>
|
||||
public UInt16 s_nfree;
|
||||
// 0x006, blocks in s_free, <=100
|
||||
/// <summary>0x008, 100 entries, first free block list chunk</summary>
|
||||
public UInt32[] s_free;
|
||||
// 0x008, 100 entries, first free block list chunk
|
||||
// the cache of free inodes:
|
||||
/// <summary>0x198, number of inodes in s_inode, <= 100</summary>
|
||||
public UInt16 s_ninode;
|
||||
// 0x198, number of inodes in s_inode, <= 100
|
||||
/// <summary>0x19A, 100 entries, some free inodes</summary>
|
||||
public UInt16[] s_inode;
|
||||
// 0x19A, 100 entries, some free inodes
|
||||
/// <summary>0x262, free block list manipulation lock</summary>
|
||||
public byte s_flock;
|
||||
// 0x262, free block list manipulation lock
|
||||
/// <summary>0x263, inode cache manipulation lock</summary>
|
||||
public byte s_ilock;
|
||||
// 0x263, inode cache manipulation lock
|
||||
/// <summary>0x264, superblock modification flag</summary>
|
||||
public byte s_fmod;
|
||||
// 0x264, superblock modification flag
|
||||
/// <summary>0x265, read-only mounted flag</summary>
|
||||
public byte s_ronly;
|
||||
// 0x265, read-only mounted flag
|
||||
/// <summary>0x266, time of last superblock update</summary>
|
||||
public UInt32 s_time;
|
||||
// 0x266, time of last superblock update
|
||||
/// <summary>0x26A, total number of free zones</summary>
|
||||
public UInt32 s_tfree;
|
||||
// 0x26A, total number of free zones
|
||||
/// <summary>0x26E, total number of free inodes</summary>
|
||||
public UInt16 s_tinode;
|
||||
// 0x26E, total number of free inodes
|
||||
/// <summary>0x270, blocks per cylinder</summary>
|
||||
public UInt16 s_cylblks;
|
||||
// 0x270, blocks per cylinder
|
||||
/// <summary>0x272, blocks per gap</summary>
|
||||
public UInt16 s_gapblks;
|
||||
// 0x272, blocks per gap
|
||||
/// <summary>0x274, device information ??</summary>
|
||||
public UInt16 s_dinfo0;
|
||||
// 0x274, device information ??
|
||||
/// <summary>0x276, device information ??</summary>
|
||||
public UInt16 s_dinfo1;
|
||||
// 0x276, device information ??
|
||||
/// <summary>0x278, 6 bytes, volume name</summary>
|
||||
public string s_fname;
|
||||
// 0x278, 6 bytes, volume name
|
||||
/// <summary>0x27E, 6 bytes, pack name</summary>
|
||||
public string s_fpack;
|
||||
// 0x27E, 6 bytes, pack name
|
||||
/// <summary>0x284, 0x46 if volume is clean</summary>
|
||||
public byte s_clean;
|
||||
// 0x284, 0x46 if volume is clean
|
||||
/// <summary>0x285, 371 bytes</summary>
|
||||
public byte[] s_fill;
|
||||
// 0x285, 371 bytes
|
||||
/// <summary>0x3F8, magic</summary>
|
||||
public UInt32 s_magic;
|
||||
// 0x3F8, magic
|
||||
/// <summary>0x3FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk, 3 = 2048 bytes/blk)</summary>
|
||||
public UInt32 s_type;
|
||||
// 0x3FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk, 3 = 2048 bytes/blk)
|
||||
}
|
||||
|
||||
struct SystemVRelease4SuperBlock
|
||||
{
|
||||
/// <summary>0x000, index of first data zone</summary>
|
||||
public UInt16 s_isize;
|
||||
// 0x000, index of first data zone
|
||||
/// <summary>0x002, padding</summary>
|
||||
public UInt16 s_pad0;
|
||||
// 0x002, padding
|
||||
/// <summary>0x004, total number of zones of this volume</summary>
|
||||
public UInt32 s_fsize;
|
||||
// 0x004, total number of zones of this volume
|
||||
// the start of the free block list:
|
||||
/// <summary>0x008, blocks in s_free, <=100</summary>
|
||||
public UInt16 s_nfree;
|
||||
// 0x008, blocks in s_free, <=100
|
||||
/// <summary>0x00A, padding</summary>
|
||||
public UInt16 s_pad1;
|
||||
// 0x00A, padding
|
||||
/// <summary>0x00C, 50 entries, first free block list chunk</summary>
|
||||
public UInt32[] s_free;
|
||||
// 0x00C, 50 entries, first free block list chunk
|
||||
// the cache of free inodes:
|
||||
/// <summary>0x0D4, number of inodes in s_inode, <= 100</summary>
|
||||
public UInt16 s_ninode;
|
||||
// 0x0D4, number of inodes in s_inode, <= 100
|
||||
/// <summary>0x0D6, padding</summary>
|
||||
public UInt16 s_pad2;
|
||||
// 0x0D6, padding
|
||||
/// <summary>0x0D8, 100 entries, some free inodes</summary>
|
||||
public UInt16[] s_inode;
|
||||
// 0x0D8, 100 entries, some free inodes
|
||||
/// <summary>0x1A0, free block list manipulation lock</summary>
|
||||
public byte s_flock;
|
||||
// 0x1A0, free block list manipulation lock
|
||||
/// <summary>0x1A1, inode cache manipulation lock</summary>
|
||||
public byte s_ilock;
|
||||
// 0x1A1, inode cache manipulation lock
|
||||
/// <summary>0x1A2, superblock modification flag</summary>
|
||||
public byte s_fmod;
|
||||
// 0x1A2, superblock modification flag
|
||||
/// <summary>0x1A3, read-only mounted flag</summary>
|
||||
public byte s_ronly;
|
||||
// 0x1A3, read-only mounted flag
|
||||
/// <summary>0x1A4, time of last superblock update</summary>
|
||||
public UInt32 s_time;
|
||||
// 0x1A4, time of last superblock update
|
||||
/// <summary>0x1A8, blocks per cylinder</summary>
|
||||
public UInt16 s_cylblks;
|
||||
// 0x1A8, blocks per cylinder
|
||||
/// <summary>0x1AA, blocks per gap</summary>
|
||||
public UInt16 s_gapblks;
|
||||
// 0x1AA, blocks per gap
|
||||
/// <summary>0x1AC, device information ??</summary>
|
||||
public UInt16 s_dinfo0;
|
||||
// 0x1AC, device information ??
|
||||
/// <summary>0x1AE, device information ??</summary>
|
||||
public UInt16 s_dinfo1;
|
||||
// 0x1AE, device information ??
|
||||
/// <summary>0x1B0, total number of free zones</summary>
|
||||
public UInt32 s_tfree;
|
||||
// 0x1B0, total number of free zones
|
||||
/// <summary>0x1B4, total number of free inodes</summary>
|
||||
public UInt16 s_tinode;
|
||||
// 0x1B4, total number of free inodes
|
||||
/// <summary>0x1B6, padding</summary>
|
||||
public UInt16 s_pad3;
|
||||
// 0x1B6, padding
|
||||
/// <summary>0x1B8, 6 bytes, volume name</summary>
|
||||
public string s_fname;
|
||||
// 0x1B8, 6 bytes, volume name
|
||||
/// <summary>0x1BE, 6 bytes, pack name</summary>
|
||||
public string s_fpack;
|
||||
// 0x1BE, 6 bytes, pack name
|
||||
/// <summary>0x1C4, 48 bytes</summary>
|
||||
public byte[] s_fill;
|
||||
// 0x1C4, 48 bytes
|
||||
/// <summary>0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean</summary>
|
||||
public UInt32 s_state;
|
||||
// 0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean
|
||||
/// <summary>0x1F8, magic</summary>
|
||||
public UInt32 s_magic;
|
||||
// 0x1F8, magic
|
||||
/// <summary>0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk)</summary>
|
||||
public UInt32 s_type;
|
||||
// 0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk)
|
||||
}
|
||||
|
||||
struct SystemVRelease2SuperBlock
|
||||
{
|
||||
/// <summary>0x000, index of first data zone</summary>
|
||||
public UInt16 s_isize;
|
||||
// 0x000, index of first data zone
|
||||
/// <summary>0x002, total number of zones of this volume</summary>
|
||||
public UInt32 s_fsize;
|
||||
// 0x002, total number of zones of this volume
|
||||
// the start of the free block list:
|
||||
/// <summary>0x006, blocks in s_free, <=100</summary>
|
||||
public UInt16 s_nfree;
|
||||
// 0x006, blocks in s_free, <=100
|
||||
/// <summary>0x008, 50 entries, first free block list chunk</summary>
|
||||
public UInt32[] s_free;
|
||||
// 0x008, 50 entries, first free block list chunk
|
||||
// the cache of free inodes:
|
||||
/// <summary>0x0D0, number of inodes in s_inode, <= 100</summary>
|
||||
public UInt16 s_ninode;
|
||||
// 0x0D0, number of inodes in s_inode, <= 100
|
||||
/// <summary>0x0D2, 100 entries, some free inodes</summary>
|
||||
public UInt16[] s_inode;
|
||||
// 0x0D2, 100 entries, some free inodes
|
||||
/// <summary>0x19A, free block list manipulation lock</summary>
|
||||
public byte s_flock;
|
||||
// 0x19A, free block list manipulation lock
|
||||
/// <summary>0x19B, inode cache manipulation lock</summary>
|
||||
public byte s_ilock;
|
||||
// 0x19B, inode cache manipulation lock
|
||||
/// <summary>0x19C, superblock modification flag</summary>
|
||||
public byte s_fmod;
|
||||
// 0x19C, superblock modification flag
|
||||
/// <summary>0x19D, read-only mounted flag</summary>
|
||||
public byte s_ronly;
|
||||
// 0x19D, read-only mounted flag
|
||||
/// <summary>0x19E, time of last superblock update</summary>
|
||||
public UInt32 s_time;
|
||||
// 0x19E, time of last superblock update
|
||||
/// <summary>0x1A2, blocks per cylinder</summary>
|
||||
public UInt16 s_cylblks;
|
||||
// 0x1A2, blocks per cylinder
|
||||
/// <summary>0x1A4, blocks per gap</summary>
|
||||
public UInt16 s_gapblks;
|
||||
// 0x1A4, blocks per gap
|
||||
/// <summary>0x1A6, device information ??</summary>
|
||||
public UInt16 s_dinfo0;
|
||||
// 0x1A6, device information ??
|
||||
/// <summary>0x1A8, device information ??</summary>
|
||||
public UInt16 s_dinfo1;
|
||||
// 0x1A8, device information ??
|
||||
/// <summary>0x1AA, total number of free zones</summary>
|
||||
public UInt32 s_tfree;
|
||||
// 0x1AA, total number of free zones
|
||||
/// <summary>0x1AE, total number of free inodes</summary>
|
||||
public UInt16 s_tinode;
|
||||
// 0x1AE, total number of free inodes
|
||||
/// <summary>0x1B0, 6 bytes, volume name</summary>
|
||||
public string s_fname;
|
||||
// 0x1B0, 6 bytes, volume name
|
||||
/// <summary>0x1B6, 6 bytes, pack name</summary>
|
||||
public string s_fpack;
|
||||
// 0x1B6, 6 bytes, pack name
|
||||
/// <summary>0x1BC, 56 bytes</summary>
|
||||
public byte[] s_fill;
|
||||
// 0x1BC, 56 bytes
|
||||
/// <summary>0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean</summary>
|
||||
public UInt32 s_state;
|
||||
// 0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean
|
||||
/// <summary>0x1F8, magic</summary>
|
||||
public UInt32 s_magic;
|
||||
// 0x1F8, magic
|
||||
/// <summary>0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk)</summary>
|
||||
public UInt32 s_type;
|
||||
// 0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk)
|
||||
}
|
||||
|
||||
struct UNIX7thEditionSuperBlock
|
||||
{
|
||||
/// <summary>0x000, index of first data zone</summary>
|
||||
public UInt16 s_isize;
|
||||
// 0x000, index of first data zone
|
||||
/// <summary>0x002, total number of zones of this volume</summary>
|
||||
public UInt32 s_fsize;
|
||||
// 0x002, total number of zones of this volume
|
||||
// the start of the free block list:
|
||||
/// <summary>0x006, blocks in s_free, <=100</summary>
|
||||
public UInt16 s_nfree;
|
||||
// 0x006, blocks in s_free, <=100
|
||||
/// <summary>0x008, 50 entries, first free block list chunk</summary>
|
||||
public UInt32[] s_free;
|
||||
// 0x008, 50 entries, first free block list chunk
|
||||
// the cache of free inodes:
|
||||
/// <summary>0x0D0, number of inodes in s_inode, <= 100</summary>
|
||||
public UInt16 s_ninode;
|
||||
// 0x0D0, number of inodes in s_inode, <= 100
|
||||
/// <summary>0x0D2, 100 entries, some free inodes</summary>
|
||||
public UInt16[] s_inode;
|
||||
// 0x0D2, 100 entries, some free inodes
|
||||
/// <summary>0x19A, free block list manipulation lock</summary>
|
||||
public byte s_flock;
|
||||
// 0x19A, free block list manipulation lock
|
||||
/// <summary>0x19B, inode cache manipulation lock</summary>
|
||||
public byte s_ilock;
|
||||
// 0x19B, inode cache manipulation lock
|
||||
/// <summary>0x19C, superblock modification flag</summary>
|
||||
public byte s_fmod;
|
||||
// 0x19C, superblock modification flag
|
||||
/// <summary>0x19D, read-only mounted flag</summary>
|
||||
public byte s_ronly;
|
||||
// 0x19D, read-only mounted flag
|
||||
/// <summary>0x19E, time of last superblock update</summary>
|
||||
public UInt32 s_time;
|
||||
// 0x19E, time of last superblock update
|
||||
/// <summary>0x1A2, total number of free zones</summary>
|
||||
public UInt32 s_tfree;
|
||||
// 0x1A2, total number of free zones
|
||||
/// <summary>0x1A6, total number of free inodes</summary>
|
||||
public UInt16 s_tinode;
|
||||
// 0x1A6, total number of free inodes
|
||||
/// <summary>0x1A8, interleave factor</summary>
|
||||
public UInt16 s_int_m;
|
||||
// 0x1A8, interleave factor
|
||||
/// <summary>0x1AA, interleave factor</summary>
|
||||
public UInt16 s_int_n;
|
||||
// 0x1AA, interleave factor
|
||||
/// <summary>0x1AC, 6 bytes, volume name</summary>
|
||||
public string s_fname;
|
||||
// 0x1AC, 6 bytes, volume name
|
||||
/// <summary>0x1B2, 6 bytes, pack name</summary>
|
||||
public string s_fpack;
|
||||
// 0x1B2, 6 bytes, pack name
|
||||
}
|
||||
|
||||
struct CoherentSuperBlock
|
||||
{
|
||||
/// <summary>0x000, index of first data zone</summary>
|
||||
public UInt16 s_isize;
|
||||
// 0x000, index of first data zone
|
||||
/// <summary>0x002, total number of zones of this volume</summary>
|
||||
public UInt32 s_fsize;
|
||||
// 0x002, total number of zones of this volume
|
||||
// the start of the free block list:
|
||||
/// <summary>0x006, blocks in s_free, <=100</summary>
|
||||
public UInt16 s_nfree;
|
||||
// 0x006, blocks in s_free, <=100
|
||||
/// <summary>0x008, 64 entries, first free block list chunk</summary>
|
||||
public UInt32[] s_free;
|
||||
// 0x008, 64 entries, first free block list chunk
|
||||
// the cache of free inodes:
|
||||
/// <summary>0x108, number of inodes in s_inode, <= 100</summary>
|
||||
public UInt16 s_ninode;
|
||||
// 0x108, number of inodes in s_inode, <= 100
|
||||
/// <summary>0x10A, 100 entries, some free inodes</summary>
|
||||
public UInt16[] s_inode;
|
||||
// 0x10A, 100 entries, some free inodes
|
||||
/// <summary>0x1D2, free block list manipulation lock</summary>
|
||||
public byte s_flock;
|
||||
// 0x1D2, free block list manipulation lock
|
||||
/// <summary>0x1D3, inode cache manipulation lock</summary>
|
||||
public byte s_ilock;
|
||||
// 0x1D3, inode cache manipulation lock
|
||||
/// <summary>0x1D4, superblock modification flag</summary>
|
||||
public byte s_fmod;
|
||||
// 0x1D4, superblock modification flag
|
||||
/// <summary>0x1D5, read-only mounted flag</summary>
|
||||
public byte s_ronly;
|
||||
// 0x1D5, read-only mounted flag
|
||||
/// <summary>0x1D6, time of last superblock update</summary>
|
||||
public UInt32 s_time;
|
||||
// 0x1D6, time of last superblock update
|
||||
/// <summary>0x1DE, total number of free zones</summary>
|
||||
public UInt32 s_tfree;
|
||||
// 0x1DE, total number of free zones
|
||||
/// <summary>0x1E2, total number of free inodes</summary>
|
||||
public UInt16 s_tinode;
|
||||
// 0x1E2, total number of free inodes
|
||||
/// <summary>0x1E4, interleave factor</summary>
|
||||
public UInt16 s_int_m;
|
||||
// 0x1E4, interleave factor
|
||||
/// <summary>0x1E6, interleave factor</summary>
|
||||
public UInt16 s_int_n;
|
||||
// 0x1E6, interleave factor
|
||||
/// <summary>0x1E8, 6 bytes, volume name</summary>
|
||||
public string s_fname;
|
||||
// 0x1E8, 6 bytes, volume name
|
||||
/// <summary>0x1EE, 6 bytes, pack name</summary>
|
||||
public string s_fpack;
|
||||
// 0x1EE, 6 bytes, pack name
|
||||
/// <summary>0x1F4, zero-filled</summary>
|
||||
public UInt32 s_unique;
|
||||
// 0x1F4, zero-filled
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,24 +116,24 @@ namespace DiscImageChef.Plugins
|
||||
|
||||
struct BFSSuperBlock
|
||||
{
|
||||
/// <summary>0x00, 0x1BADFACE</summary>
|
||||
public UInt32 s_magic;
|
||||
// 0x00, 0x1BADFACE
|
||||
/// <summary>0x04, start in bytes of volume</summary>
|
||||
public UInt32 s_start;
|
||||
// 0x04, start in bytes of volume
|
||||
/// <summary>0x08, end in bytes of volume</summary>
|
||||
public UInt32 s_end;
|
||||
// 0x08, end in bytes of volume
|
||||
/// <summary>0x0C, unknown :p</summary>
|
||||
public UInt32 s_from;
|
||||
// 0x0C, unknown :p
|
||||
/// <summary>0x10, unknown :p</summary>
|
||||
public UInt32 s_to;
|
||||
// 0x10, unknown :p
|
||||
/// <summary>0x14, unknown :p</summary>
|
||||
public Int32 s_bfrom;
|
||||
// 0x14, unknown :p
|
||||
/// <summary>0x18, unknown :p</summary>
|
||||
public Int32 s_bto;
|
||||
// 0x18, unknown :p
|
||||
/// <summary>0x1C, 6 bytes, filesystem name</summary>
|
||||
public string s_fsname;
|
||||
// 0x1C, 6 bytes, filesystem name
|
||||
/// <summary>0x22, 6 bytes, volume name</summary>
|
||||
public string s_volume;
|
||||
// 0x22, 6 bytes, volume name
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -620,288 +620,312 @@ namespace DiscImageChef.Plugins
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Same magic for ext2, ext3 and ext4
|
||||
/// </summary>
|
||||
public const UInt16 ext2FSMagic = 0xEF53;
|
||||
// Same for ext3 and ext4
|
||||
|
||||
public const UInt16 ext2OldFSMagic = 0xEF51;
|
||||
// Size = 536 bytes
|
||||
|
||||
/// <summary>
|
||||
/// ext2/3/4 superblock
|
||||
/// </summary>
|
||||
public struct ext2FSSuperBlock
|
||||
{
|
||||
/// <summary>0x000, inodes on volume</summary>
|
||||
public UInt32 inodes;
|
||||
// 0x000, inodes on volume
|
||||
/// <summary>0x004, blocks on volume</summary>
|
||||
public UInt32 blocks;
|
||||
// 0x004, blocks on volume
|
||||
/// <summary>0x008, reserved blocks</summary>
|
||||
public UInt32 reserved_blocks;
|
||||
// 0x008, reserved blocks
|
||||
/// <summary>0x00C, free blocks count</summary>
|
||||
public UInt32 free_blocks;
|
||||
// 0x00C, free blocks count
|
||||
/// <summary>0x010, free inodes count</summary>
|
||||
public UInt32 free_inodes;
|
||||
// 0x010, free inodes count
|
||||
/// <summary>0x014, first data block</summary>
|
||||
public UInt32 first_block;
|
||||
// 0x014, first data block
|
||||
/// <summary>0x018, block size</summary>
|
||||
public UInt32 block_size;
|
||||
// 0x018, block size
|
||||
/// <summary>0x01C, fragment size</summary>
|
||||
public Int32 frag_size;
|
||||
// 0x01C, fragment size
|
||||
/// <summary>0x020, blocks per group</summary>
|
||||
public UInt32 blocks_per_grp;
|
||||
// 0x020, blocks per group
|
||||
/// <summary>0x024, fragments per group</summary>
|
||||
public UInt32 flags_per_grp;
|
||||
// 0x024, fragments per group
|
||||
/// <summary>0x028, inodes per group</summary>
|
||||
public UInt32 inodes_per_grp;
|
||||
// 0x028, inodes per group
|
||||
/// <summary>0x02C, last mount time</summary>
|
||||
public UInt32 mount_t;
|
||||
// 0x02C, last mount time
|
||||
/// <summary>0x030, last write time</summary>
|
||||
public UInt32 write_t;
|
||||
// 0x030, last write time
|
||||
/// <summary>0x034, mounts count</summary>
|
||||
public UInt16 mount_c;
|
||||
// 0x034, mounts count
|
||||
/// <summary>0x036, max mounts</summary>
|
||||
public Int16 max_mount_c;
|
||||
// 0x036, max mounts
|
||||
/// <summary>0x038, (little endian)</summary>
|
||||
public UInt16 magic;
|
||||
// 0x038, (little endian)
|
||||
/// <summary>0x03A, filesystem state</summary>
|
||||
public UInt16 state;
|
||||
// 0x03A, filesystem state
|
||||
/// <summary>0x03C, behaviour on errors</summary>
|
||||
public UInt16 err_behaviour;
|
||||
// 0x03C, behaviour on errors
|
||||
/// <summary>0x03E, From 0.5b onward</summary>
|
||||
public UInt16 minor_revision;
|
||||
// 0x03E, From 0.5b onward
|
||||
/// <summary>0x040, last check time</summary>
|
||||
public UInt32 check_t;
|
||||
// 0x040, last check time
|
||||
/// <summary>0x044, max time between checks</summary>
|
||||
public UInt32 check_inv;
|
||||
// 0x044, max time between checks
|
||||
|
||||
// From 0.5a onward
|
||||
/// <summary>0x048, Creation OS</summary>
|
||||
public UInt32 creator_os;
|
||||
// 0x048, Creation OS
|
||||
/// <summary>0x04C, Revison level</summary>
|
||||
public UInt32 revision;
|
||||
// 0x04C, Revison level
|
||||
/// <summary>0x050, Default UID for reserved blocks</summary>
|
||||
public UInt16 default_uid;
|
||||
// 0x050, Default UID for reserved blocks
|
||||
/// <summary>0x052, Default GID for reserved blocks</summary>
|
||||
public UInt16 default_gid;
|
||||
// 0x052, Default GID for reserved blocks
|
||||
|
||||
// From 0.5b onward
|
||||
/// <summary>0x054, First unreserved inode</summary>
|
||||
public UInt32 first_inode;
|
||||
// 0x054, First unreserved inode
|
||||
/// <summary>0x058, inode size</summary>
|
||||
public UInt16 inode_size;
|
||||
// 0x058, inode size
|
||||
/// <summary>0x05A, Block group number of THIS superblock</summary>
|
||||
public UInt16 block_group_no;
|
||||
// 0x05A, Block group number of THIS superblock
|
||||
/// <summary>0x05C, Compatible features set</summary>
|
||||
public UInt32 ftr_compat;
|
||||
// 0x05C, Compatible features set
|
||||
/// <summary>0x060, Incompatible features set</summary>
|
||||
public UInt32 ftr_incompat;
|
||||
// 0x060, Incompatible features set
|
||||
|
||||
// Found on Linux 2.0.40
|
||||
/// <summary>0x064, Read-only compatible features set</summary>
|
||||
public UInt32 ftr_ro_compat;
|
||||
// 0x064, Read-only compatible features set
|
||||
|
||||
// Found on Linux 2.1.132
|
||||
/// <summary>0x068, 16 bytes, UUID</summary>
|
||||
public Guid uuid;
|
||||
// 0x068, 16 bytes, UUID
|
||||
/// <summary>0x078, 16 bytes, volume name</summary>
|
||||
public string volume_name;
|
||||
// 0x078, 16 bytes, volume name
|
||||
/// <summary>0x088, 64 bytes, where last mounted</summary>
|
||||
public string last_mount_dir;
|
||||
// 0x088, 64 bytes, where last mounted
|
||||
/// <summary>0x0C8, Usage bitmap algorithm, for compression</summary>
|
||||
public UInt32 algo_usage_bmp;
|
||||
// 0x0C8, Usage bitmap algorithm, for compression
|
||||
/// <summary>0x0CC, Block to try to preallocate</summary>
|
||||
public byte prealloc_blks;
|
||||
// 0x0CC, Block to try to preallocate
|
||||
/// <summary>0x0CD, Blocks to try to preallocate for directories</summary>
|
||||
public byte prealloc_dir_blks;
|
||||
// 0x0CD, Blocks to try to preallocate for directories
|
||||
/// <summary>0x0CE, Per-group desc for online growth</summary>
|
||||
public UInt16 rsrvd_gdt_blocks;
|
||||
// 0x0CE, Per-group desc for online growth
|
||||
|
||||
// Found on Linux 2.4
|
||||
// ext3
|
||||
/// <summary>0x0D0, 16 bytes, UUID of journal superblock</summary>
|
||||
public Guid journal_uuid;
|
||||
// 0x0D0, 16 bytes, UUID of journal superblock
|
||||
/// <summary>0x0E0, inode no. of journal file</summary>
|
||||
public UInt32 journal_inode;
|
||||
// 0x0E0, inode no. of journal file
|
||||
/// <summary>0x0E4, device no. of journal file</summary>
|
||||
public UInt32 journal_dev;
|
||||
// 0x0E4, device no. of journal file
|
||||
/// <summary>0x0E8, Start of list of inodes to delete</summary>
|
||||
public UInt32 last_orphan;
|
||||
// 0x0E8, Start of list of inodes to delete
|
||||
/// <summary>0x0EC, First byte of 128bit HTREE hash seed</summary>
|
||||
public UInt32 hash_seed_1;
|
||||
// 0x0EC, First byte of 128bit HTREE hash seed
|
||||
/// <summary>0x0F0, Second byte of 128bit HTREE hash seed</summary>
|
||||
public UInt32 hash_seed_2;
|
||||
// 0x0F0, Second byte of 128bit HTREE hash seed
|
||||
/// <summary>0x0F4, Third byte of 128bit HTREE hash seed</summary>
|
||||
public UInt32 hash_seed_3;
|
||||
// 0x0F4, Third byte of 128bit HTREE hash seed
|
||||
/// <summary>0x0F8, Fourth byte of 128bit HTREE hash seed</summary>
|
||||
public UInt32 hash_seed_4;
|
||||
// 0x0F8, Fourth byte of 128bit HTREE hash seed
|
||||
/// <summary>0x0FC, Hash version</summary>
|
||||
public byte hash_version;
|
||||
// 0x0FC, Hash version
|
||||
/// <summary>0x0FD, Journal backup type</summary>
|
||||
public byte jnl_backup_type;
|
||||
// 0x0FD, Journal backup type
|
||||
/// <summary>0x0FE, Size of group descriptor</summary>
|
||||
public UInt16 desc_grp_size;
|
||||
// 0x0FE, Size of group descriptor
|
||||
/// <summary>0x100, Default mount options</summary>
|
||||
public UInt32 default_mnt_opts;
|
||||
// 0x100, Default mount options
|
||||
/// <summary>0x104, First metablock block group</summary>
|
||||
public UInt32 first_meta_bg;
|
||||
// 0x104, First metablock block group
|
||||
|
||||
// Introduced with ext4, some can be ext3
|
||||
/// <summary>0x108, Filesystem creation time</summary>
|
||||
public UInt32 mkfs_t;
|
||||
// 0x108, Filesystem creation time
|
||||
// Follows 17 uint32 (68 bytes) of journal inode backup
|
||||
// Following 3 fields are valid if EXT4_FEATURE_COMPAT_64BIT is set
|
||||
/// <summary>0x14C, High 32bits of blocks no.</summary>
|
||||
public UInt32 blocks_hi;
|
||||
// 0x14C, High 32bits of blocks no.
|
||||
/// <summary>0x150, High 32bits of reserved blocks no.</summary>
|
||||
public UInt32 reserved_blocks_hi;
|
||||
// 0x150, High 32bits of reserved blocks no.
|
||||
/// <summary>0x154, High 32bits of free blocks no.</summary>
|
||||
public UInt32 free_blocks_hi;
|
||||
// 0x154, High 32bits of free blocks no.
|
||||
/// <summary>0x158, inodes minimal size in bytes</summary>
|
||||
public UInt16 min_inode_size;
|
||||
// 0x158, inodes minimal size in bytes
|
||||
/// <summary>0x15A, Bytes reserved by new inodes</summary>
|
||||
public UInt16 rsv_inode_size;
|
||||
// 0x15A, Bytes reserved by new inodes
|
||||
/// <summary>0x15C, Flags</summary>
|
||||
public UInt32 flags;
|
||||
// 0x15C, Flags
|
||||
/// <summary>0x160, RAID stride</summary>
|
||||
public UInt16 raid_stride;
|
||||
// 0x160, RAID stride
|
||||
/// <summary>0x162, Waiting seconds in MMP check</summary>
|
||||
public UInt16 mmp_interval;
|
||||
// 0x162, Waiting seconds in MMP check
|
||||
/// <summary>0x164, Block for multi-mount protection</summary>
|
||||
public UInt64 mmp_block;
|
||||
// 0x164, Block for multi-mount protection
|
||||
/// <summary>0x16C, Blocks on all data disks (N*stride)</summary>
|
||||
public UInt32 raid_stripe_width;
|
||||
// 0x16C, Blocks on all data disks (N*stride)
|
||||
/// <summary>0x170, FLEX_BG group size</summary>
|
||||
public byte flex_bg_grp_size;
|
||||
// 0x170, FLEX_BG group size
|
||||
/// <summary>0x171 Padding</summary>
|
||||
public byte padding;
|
||||
// 0x171
|
||||
/// <summary>0x172 Padding</summary>
|
||||
public UInt16 padding2;
|
||||
// 0x172
|
||||
|
||||
// Following are introduced with ext4
|
||||
/// <summary>0x174, Kibibytes written in volume lifetime</summary>
|
||||
public UInt64 kbytes_written;
|
||||
// 0x174, Kibibytes written in volume lifetime
|
||||
/// <summary>0x17C, Active snapshot inode number</summary>
|
||||
public UInt32 snapshot_inum;
|
||||
// 0x17C, Active snapshot inode number
|
||||
/// <summary>0x180, Active snapshot sequential ID</summary>
|
||||
public UInt32 snapshot_id;
|
||||
// 0x180, Active snapshot sequential ID
|
||||
/// <summary>0x184, Reserved blocks for active snapshot's future use</summary>
|
||||
public UInt64 snapshot_blocks;
|
||||
// 0x184, Reserved blocks for active snapshot's future use
|
||||
/// <summary>0x18C, inode number of the on-disk start of the snapshot list</summary>
|
||||
public UInt32 snapshot_list;
|
||||
// 0x18C, inode number of the on-disk start of the snapshot list
|
||||
|
||||
// Optional ext4 error-handling features
|
||||
/// <summary>0x190, total registered filesystem errors</summary>
|
||||
public UInt32 error_count;
|
||||
// 0x190, total registered filesystem errors
|
||||
/// <summary>0x194, time on first error</summary>
|
||||
public UInt32 first_error_t;
|
||||
// 0x194, time on first error
|
||||
/// <summary>0x198, inode involved in first error</summary>
|
||||
public UInt32 first_error_inode;
|
||||
// 0x198, inode involved in first error
|
||||
/// <summary>0x19C, block involved of first error</summary>
|
||||
public UInt64 first_error_block;
|
||||
// 0x19C, block involved of first error
|
||||
/// <summary>0x1A0, 32 bytes, function where the error happened</summary>
|
||||
public string first_error_func;
|
||||
// 0x1A0, 32 bytes, function where the error happened
|
||||
/// <summary>0x1B0, line number where error happened</summary>
|
||||
public UInt32 first_error_line;
|
||||
// 0x1B0, line number where error happened
|
||||
/// <summary>0x1B4, time of most recent error</summary>
|
||||
public UInt32 last_error_t;
|
||||
// 0x1B4, time of most recent error
|
||||
/// <summary>0x1B8, inode involved in last error</summary>
|
||||
public UInt32 last_error_inode;
|
||||
// 0x1B8, inode involved in last error
|
||||
/// <summary>0x1BC, line number where error happened</summary>
|
||||
public UInt32 last_error_line;
|
||||
// 0x1BC, line number where error happened
|
||||
/// <summary>0x1C0, block involved of last error</summary>
|
||||
public UInt64 last_error_block;
|
||||
// 0x1C0, block involved of last error
|
||||
/// <summary>0x1C8, 32 bytes, function where the error happened</summary>
|
||||
public string last_error_func;
|
||||
// 0x1C8, 32 bytes, function where the error happened
|
||||
// End of optional error-handling features
|
||||
|
||||
// 0x1D8, 64 bytes, last used mount options</summary>
|
||||
public string mount_options;
|
||||
// 0x1D8, 64 bytes, last used mount options
|
||||
}
|
||||
|
||||
// ext? filesystem states
|
||||
/// <summary>Cleanly-unmounted volume</summary>
|
||||
public const UInt16 EXT2_VALID_FS = 0x0001;
|
||||
// Cleanly-unmounted volume
|
||||
/// <summary>Dirty volume</summary>
|
||||
public const UInt16 EXT2_ERROR_FS = 0x0002;
|
||||
// Dirty volume
|
||||
/// <summary>Recovering orphan files</summary>
|
||||
public const UInt16 EXT3_ORPHAN_FS = 0x0004;
|
||||
// Recovering orphan files
|
||||
|
||||
// ext? default mount flags
|
||||
/// <summary>Enable debugging messages</summary>
|
||||
public const UInt32 EXT2_DEFM_DEBUG = 0x000001;
|
||||
// Enable debugging messages
|
||||
/// <summary>Emulates BSD behaviour on new file creation</summary>
|
||||
public const UInt32 EXT2_DEFM_BSDGROUPS = 0x000002;
|
||||
// Emulates BSD behaviour on new file creation
|
||||
/// <summary>Enable user xattrs</summary>
|
||||
public const UInt32 EXT2_DEFM_XATTR_USER = 0x000004;
|
||||
// Enable user xattrs
|
||||
/// <summary>Enable POSIX ACLs</summary>
|
||||
public const UInt32 EXT2_DEFM_ACL = 0x000008;
|
||||
// Enable POSIX ACLs
|
||||
/// <summary>Use 16bit UIDs</summary>
|
||||
public const UInt32 EXT2_DEFM_UID16 = 0x000010;
|
||||
// Use 16bit UIDs
|
||||
/// <summary>Journal data mode</summary>
|
||||
public const UInt32 EXT3_DEFM_JMODE_DATA = 0x000040;
|
||||
// Journal data mode
|
||||
/// <summary>Journal ordered mode</summary>
|
||||
public const UInt32 EXT3_DEFM_JMODE_ORDERED = 0x000080;
|
||||
// Journal ordered mode
|
||||
/// <summary>Journal writeback mode</summary>
|
||||
public const UInt32 EXT3_DEFM_JMODE_WBACK = 0x000100;
|
||||
// Journal writeback mode
|
||||
|
||||
// Behaviour on errors
|
||||
/// <summary>Continue execution</summary>
|
||||
public const UInt16 EXT2_ERRORS_CONTINUE = 1;
|
||||
// Continue execution
|
||||
/// <summary>Remount fs read-only</summary>
|
||||
public const UInt16 EXT2_ERRORS_RO = 2;
|
||||
// Remount fs read-only
|
||||
/// <summary>Panic</summary>
|
||||
public const UInt16 EXT2_ERRORS_PANIC = 3;
|
||||
// Panic
|
||||
|
||||
// OS codes
|
||||
public const UInt32 EXT2_OS_LINUX = 0;
|
||||
public const UInt32 EXT2_OS_HURD = 1;
|
||||
public const UInt32 EXT2_OS_MASIX = 2;
|
||||
public const UInt32 EXT2_OS_FREEBSD = 3;
|
||||
public const UInt32 EXT2_OS_LITES = 4;
|
||||
|
||||
// Revision levels
|
||||
/// <summary>The good old (original) format</summary>
|
||||
public const UInt32 EXT2_GOOD_OLD_REV = 0;
|
||||
/* The good old (original) format */
|
||||
/// <summary>V2 format w/ dynamic inode sizes</summary>
|
||||
public const UInt32 EXT2_DYNAMIC_REV = 1;
|
||||
/* V2 format w/ dynamic inode sizes */
|
||||
|
||||
// Compatible features
|
||||
/// <summary>Pre-allocate directories</summary>
|
||||
public const UInt32 EXT2_FEATURE_COMPAT_DIR_PREALLOC = 0x00000001;
|
||||
// Pre-allocate directories
|
||||
/// <summary>imagic inodes ?</summary>
|
||||
public const UInt32 EXT2_FEATURE_COMPAT_IMAGIC_INODES = 0x00000002;
|
||||
// imagic inodes ?
|
||||
/// <summary>Has journal (it's ext3)</summary>
|
||||
public const UInt32 EXT3_FEATURE_COMPAT_HAS_JOURNAL = 0x00000004;
|
||||
// Has journal (it's ext3)
|
||||
/// <summary>EA blocks</summary>
|
||||
public const UInt32 EXT2_FEATURE_COMPAT_EXT_ATTR = 0x00000008;
|
||||
// EA blocks
|
||||
/// <summary>Online filesystem resize reservations</summary>
|
||||
public const UInt32 EXT2_FEATURE_COMPAT_RESIZE_INO = 0x00000010;
|
||||
// Online filesystem resize reservations
|
||||
/// <summary>Can use hashed indexes on directories</summary>
|
||||
public const UInt32 EXT2_FEATURE_COMPAT_DIR_INDEX = 0x00000020;
|
||||
// Can use hashed indexes on directories
|
||||
|
||||
// Read-only compatible features
|
||||
/// <summary>Reduced number of superblocks</summary>
|
||||
public const UInt32 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x00000001;
|
||||
// Reduced number of superblocks
|
||||
/// <summary>Can have files bigger than 2GiB</summary>
|
||||
public const UInt32 EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x00000002;
|
||||
// Can have files bigger than 2GiB
|
||||
/// <summary>Use B-Tree for directories</summary>
|
||||
public const UInt32 EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x00000004;
|
||||
// Use B-Tree for directories
|
||||
/// <summary>Can have files bigger than 2TiB *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x00000008;
|
||||
// Can have files bigger than 2TiB *ext4*
|
||||
/// <summary>Group descriptor checksums and sparse inode table *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x00000010;
|
||||
// Group descriptor checksums and sparse inode table *ext4*
|
||||
/// <summary>More than 32000 directory entries *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x00000020;
|
||||
// More than 32000 directory entries *ext4*
|
||||
/// <summary>Nanosecond timestamps and creation time *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x00000040;
|
||||
// Nanosecond timestamps and creation time *ext4*
|
||||
|
||||
// Incompatible features
|
||||
/// <summary>Uses compression</summary>
|
||||
public const UInt32 EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x00000001;
|
||||
// Uses compression
|
||||
/// <summary>Filetype in directory entries</summary>
|
||||
public const UInt32 EXT2_FEATURE_INCOMPAT_FILETYPE = 0x00000002;
|
||||
// Filetype in directory entries
|
||||
/// <summary>Journal needs recovery *ext3*</summary>
|
||||
public const UInt32 EXT3_FEATURE_INCOMPAT_RECOVER = 0x00000004;
|
||||
// Journal needs recovery *ext3*
|
||||
/// <summary>Has journal on another device *ext3*</summary>
|
||||
public const UInt32 EXT3_FEATURE_INCOMPAT_JOURNAL_DEV = 0x00000008;
|
||||
// Has journal on another device *ext3*
|
||||
/// <summary>Reduced block group backups</summary>
|
||||
public const UInt32 EXT2_FEATURE_INCOMPAT_META_BG = 0x00000010;
|
||||
// Reduced block group backups
|
||||
/// <summary>Volume use extents *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_EXTENTS = 0x00000040;
|
||||
// Volume use extents *ext4*
|
||||
/// <summary>Supports volumes bigger than 2^32 blocks *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_64BIT = 0x00000080;
|
||||
// Supports volumes bigger than 2^32 blocks *ext4*
|
||||
/// <summary>Multi-mount protection *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_MMP = 0x00000100;
|
||||
// Multi-mount protection *ext4*
|
||||
/// <summary>Flexible block group metadata location *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_FLEX_BG = 0x00000200;
|
||||
// Flexible block group metadata location *ext4*
|
||||
/// <summary>EA in inode *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_EA_INODE = 0x00000400;
|
||||
// EA in inode *ext4*
|
||||
/// <summary>Data can reside in directory entry *ext4*</summary>
|
||||
public const UInt32 EXT4_FEATURE_INCOMPAT_DIRDATA = 0x00001000;
|
||||
// Data can reside in directory entry *ext4*
|
||||
|
||||
// Miscellaneous filesystem flags
|
||||
/// <summary>Signed dirhash in use</summary>
|
||||
public const UInt32 EXT2_FLAGS_SIGNED_HASH = 0x00000001;
|
||||
// Signed dirhash in use
|
||||
/// <summary>Unsigned dirhash in use</summary>
|
||||
public const UInt32 EXT2_FLAGS_UNSIGNED_HASH = 0x00000002;
|
||||
// Unsigned dirhash in use
|
||||
/// <summary>Testing development code</summary>
|
||||
public const UInt32 EXT2_FLAGS_TEST_FILESYS = 0x00000004;
|
||||
// Testing development code
|
||||
}
|
||||
}
|
||||
@@ -102,40 +102,46 @@ namespace DiscImageChef.Plugins
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ext superblock magic
|
||||
/// </summary>
|
||||
public const UInt16 extFSMagic = 0x137D;
|
||||
|
||||
/// <summary>
|
||||
/// ext superblock
|
||||
/// </summary>
|
||||
public struct extFSSuperBlock
|
||||
{
|
||||
/// <summary>0x000, inodes on volume</summary>
|
||||
public UInt32 inodes;
|
||||
// 0x000, inodes on volume
|
||||
/// <summary>0x004, zones on volume</summary>
|
||||
public UInt32 zones;
|
||||
// 0x004, zones on volume
|
||||
/// <summary>0x008, first free block</summary>
|
||||
public UInt32 firstfreeblk;
|
||||
// 0x008, first free block
|
||||
/// <summary>0x00C, free blocks count</summary>
|
||||
public UInt32 freecountblk;
|
||||
// 0x00C, free blocks count
|
||||
/// <summary>0x010, first free inode</summary>
|
||||
public UInt32 firstfreeind;
|
||||
// 0x010, first free inode
|
||||
/// <summary>0x014, free inodes count</summary>
|
||||
public UInt32 freecountind;
|
||||
// 0x014, free inodes count
|
||||
/// <summary>0x018, first data zone</summary>
|
||||
public UInt32 firstdatazone;
|
||||
// 0x018, first data zone
|
||||
/// <summary>0x01C, log zone size</summary>
|
||||
public UInt32 logzonesize;
|
||||
// 0x01C, log zone size
|
||||
/// <summary>0x020, max zone size</summary>
|
||||
public UInt32 maxsize;
|
||||
// 0x020, max zone size
|
||||
/// <summary>0x024, reserved</summary>
|
||||
public UInt32 reserved1;
|
||||
// 0x024, reserved
|
||||
/// <summary>0x028, reserved</summary>
|
||||
public UInt32 reserved2;
|
||||
// 0x028, reserved
|
||||
/// <summary>0x02C, reserved</summary>
|
||||
public UInt32 reserved3;
|
||||
// 0x02C, reserved
|
||||
/// <summary>0x030, reserved</summary>
|
||||
public UInt32 reserved4;
|
||||
// 0x030, reserved
|
||||
/// <summary>0x034, reserved</summary>
|
||||
public UInt32 reserved5;
|
||||
// 0x034, reserved
|
||||
/// <summary>0x038, 0x137D (little endian)</summary>
|
||||
public UInt16 magic;
|
||||
// 0x038, 0x137D (little endian)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user