From 4719c29c2658eb0754442b7ae395fcfc5094de41 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 13 Jul 2017 00:17:39 +0100 Subject: [PATCH] Added missing fields. --- DiscImageChef.Filesystems/AppleHFS.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DiscImageChef.Filesystems/AppleHFS.cs b/DiscImageChef.Filesystems/AppleHFS.cs index 5aa9e95a7..cb010aabf 100644 --- a/DiscImageChef.Filesystems/AppleHFS.cs +++ b/DiscImageChef.Filesystems/AppleHFS.cs @@ -262,9 +262,9 @@ namespace DiscImageChef.Filesystems } else { - if(BB.sec_sv_pages > 0) + if(BB.boot_flags > 0) sb.AppendLine("Allocate secondary sound buffer at boot."); - else if(BB.sec_sv_pages < 0) + else if(BB.boot_flags < 0) sb.AppendLine("Allocate secondary sound and video buffers at boot."); sb.AppendFormat("System filename: {0}", StringHandlers.PascalToString(BB.system_name, CurrentEncoding)).AppendLine(); @@ -426,18 +426,17 @@ namespace DiscImageChef.Filesystems /// /// Should be sectors 0 and 1 in volume, followed by boot code /// + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct HFS_BootBlock // Should be sectors 0 and 1 in volume { /// 0x000, Signature, 0x4C4B if bootable public ushort signature; /// 0x002, Branch public uint branch; - /// 0x006, Boot block flags - public byte boot_flags; /// 0x007, Boot block version - public byte boot_version; - /// 0x008, Allocate secondary buffers - public short sec_sv_pages; + public ushort boot_version; + /// 0x006, Boot block flags + public short boot_flags; /// 0x00A, System file name (16 bytes) [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] system_name; @@ -469,6 +468,12 @@ namespace DiscImageChef.Filesystems public uint heap_256k; /// 0x086, Heap size on a Mac with 512KiB of RAM or more public uint heap_512k; + /// Padding + public ushort padding; + /// Additional system heap space + public uint heap_extra; + /// Fraction of RAM for system heap + public uint heap_fract; } public override Errno Mount()