mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use new little endian marshaller on filesystems.
This commit is contained in:
@@ -209,10 +209,7 @@ namespace DiscImageChef.Filesystems
|
||||
byte[] sbSector = imagePlugin.ReadSectors(sbSectorOff + partition.Start, sbSizeInSectors);
|
||||
byte[] sblock = new byte[sbSizeInBytes];
|
||||
Array.Copy(sbSector, sbOff, sblock, 0, sbSizeInBytes);
|
||||
IntPtr sbPtr = Marshal.AllocHGlobal(sbSizeInBytes);
|
||||
Marshal.Copy(sblock, 0, sbPtr, sbSizeInBytes);
|
||||
ext2FSSuperBlock supblk = (ext2FSSuperBlock)Marshal.PtrToStructure(sbPtr, typeof(ext2FSSuperBlock));
|
||||
Marshal.FreeHGlobal(sbPtr);
|
||||
ext2FSSuperBlock supblk = Helpers.Marshal.ByteArrayToStructureLittleEndian<ext2FSSuperBlock>(sblock);
|
||||
|
||||
XmlFsType = new FileSystemType();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user