mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Squash] Use new source generator based big endian marshaller
This commit is contained in:
@@ -78,7 +78,7 @@ public sealed partial class Squash
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case SQUASH_CIGAM:
|
case SQUASH_CIGAM:
|
||||||
sqSb = Marshal.ByteArrayToStructureBigEndian<SuperBlock>(sector);
|
sqSb = Marshal.ByteArrayToStructureBigEndianGenerated<SuperBlock>(sector);
|
||||||
littleEndian = false;
|
littleEndian = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Aaru.CommonTypes.Attributes;
|
||||||
|
|
||||||
namespace Aaru.Filesystems;
|
namespace Aaru.Filesystems;
|
||||||
|
|
||||||
@@ -37,27 +38,28 @@ public sealed partial class Squash
|
|||||||
#region Nested type: SuperBlock
|
#region Nested type: SuperBlock
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
readonly struct SuperBlock
|
[SwapEndian]
|
||||||
|
partial struct SuperBlock
|
||||||
{
|
{
|
||||||
public readonly uint magic;
|
public uint magic;
|
||||||
public readonly uint inodes;
|
public uint inodes;
|
||||||
public readonly uint mkfs_time;
|
public uint mkfs_time;
|
||||||
public readonly uint block_size;
|
public uint block_size;
|
||||||
public readonly uint fragments;
|
public uint fragments;
|
||||||
public readonly ushort compression;
|
public ushort compression;
|
||||||
public readonly ushort block_log;
|
public ushort block_log;
|
||||||
public readonly ushort flags;
|
public ushort flags;
|
||||||
public readonly ushort no_ids;
|
public ushort no_ids;
|
||||||
public readonly ushort s_major;
|
public ushort s_major;
|
||||||
public readonly ushort s_minor;
|
public ushort s_minor;
|
||||||
public readonly ulong root_inode;
|
public ulong root_inode;
|
||||||
public readonly ulong bytes_used;
|
public ulong bytes_used;
|
||||||
public readonly ulong id_table_start;
|
public ulong id_table_start;
|
||||||
public readonly ulong xattr_id_table_start;
|
public ulong xattr_id_table_start;
|
||||||
public readonly ulong inode_table_start;
|
public ulong inode_table_start;
|
||||||
public readonly ulong directory_table_start;
|
public ulong directory_table_start;
|
||||||
public readonly ulong fragment_table_start;
|
public ulong fragment_table_start;
|
||||||
public readonly ulong lookup_table_start;
|
public ulong lookup_table_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user