Start working on FAT formatter

This commit is contained in:
Pdawg11239
2025-03-16 13:51:50 -04:00
parent 642fd5e1ed
commit 87cf731f0b
6 changed files with 127 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
using System.Runtime.InteropServices;
namespace BadBuilder.Formatter
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct FAT32FsInfo
{
public uint LeadSignature; // Should be 0x41615252
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)]
public byte[] Reserved1; // Zeros
public uint StructureSignature; // Should be 0x61417272
public uint FreeClusterCount; // Number of free clusters (or 0xFFFFFFFF if unknown)
public uint NextFreeCluster; // Next free cluster (or 0xFFFFFFFF if unknown)
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
public byte[] Reserved2; // Zeros
public uint TrailSignature; // Should be 0xAA550000
}
}