Use new little endian marshaller on filesystems.

This commit is contained in:
2019-03-01 00:28:55 +00:00
parent f95633046e
commit 0ec558da55
45 changed files with 154 additions and 531 deletions

View File

@@ -73,11 +73,7 @@ namespace DiscImageChef.Filesystems
ulong vmfsSuperOff = VXFS_BASE / imagePlugin.Info.SectorSize;
byte[] sector = imagePlugin.ReadSector(partition.Start + vmfsSuperOff);
VxSuperBlock vxSb = new VxSuperBlock();
IntPtr vxSbPtr = Marshal.AllocHGlobal(Marshal.SizeOf(vxSb));
Marshal.Copy(sector, 0, vxSbPtr, Marshal.SizeOf(vxSb));
vxSb = (VxSuperBlock)Marshal.PtrToStructure(vxSbPtr, typeof(VxSuperBlock));
Marshal.FreeHGlobal(vxSbPtr);
VxSuperBlock vxSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<VxSuperBlock>(sector);
StringBuilder sbInformation = new StringBuilder();