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;
|
||||
case SQUASH_CIGAM:
|
||||
sqSb = Marshal.ByteArrayToStructureBigEndian<SuperBlock>(sector);
|
||||
sqSb = Marshal.ByteArrayToStructureBigEndianGenerated<SuperBlock>(sector);
|
||||
littleEndian = false;
|
||||
|
||||
break;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using Aaru.CommonTypes.Attributes;
|
||||
|
||||
namespace Aaru.Filesystems;
|
||||
|
||||
@@ -37,27 +38,28 @@ public sealed partial class Squash
|
||||
#region Nested type: SuperBlock
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct SuperBlock
|
||||
[SwapEndian]
|
||||
partial struct SuperBlock
|
||||
{
|
||||
public readonly uint magic;
|
||||
public readonly uint inodes;
|
||||
public readonly uint mkfs_time;
|
||||
public readonly uint block_size;
|
||||
public readonly uint fragments;
|
||||
public readonly ushort compression;
|
||||
public readonly ushort block_log;
|
||||
public readonly ushort flags;
|
||||
public readonly ushort no_ids;
|
||||
public readonly ushort s_major;
|
||||
public readonly ushort s_minor;
|
||||
public readonly ulong root_inode;
|
||||
public readonly ulong bytes_used;
|
||||
public readonly ulong id_table_start;
|
||||
public readonly ulong xattr_id_table_start;
|
||||
public readonly ulong inode_table_start;
|
||||
public readonly ulong directory_table_start;
|
||||
public readonly ulong fragment_table_start;
|
||||
public readonly ulong lookup_table_start;
|
||||
public uint magic;
|
||||
public uint inodes;
|
||||
public uint mkfs_time;
|
||||
public uint block_size;
|
||||
public uint fragments;
|
||||
public ushort compression;
|
||||
public ushort block_log;
|
||||
public ushort flags;
|
||||
public ushort no_ids;
|
||||
public ushort s_major;
|
||||
public ushort s_minor;
|
||||
public ulong root_inode;
|
||||
public ulong bytes_used;
|
||||
public ulong id_table_start;
|
||||
public ulong xattr_id_table_start;
|
||||
public ulong inode_table_start;
|
||||
public ulong directory_table_start;
|
||||
public ulong fragment_table_start;
|
||||
public ulong lookup_table_start;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user