mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.Images] Reformat and cleanup.
This commit is contained in:
@@ -42,13 +42,15 @@ namespace Aaru.DiscImages;
|
||||
|
||||
public sealed partial class DiscFerret
|
||||
{
|
||||
#region IMediaImage Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber Open(IFilter imageFilter)
|
||||
{
|
||||
byte[] magicB = new byte[4];
|
||||
var magicB = new byte[4];
|
||||
Stream stream = imageFilter.GetDataForkStream();
|
||||
stream.EnsureRead(magicB, 0, 4);
|
||||
uint magic = BitConverter.ToUInt32(magicB, 0);
|
||||
var magic = BitConverter.ToUInt32(magicB, 0);
|
||||
|
||||
if(magic != DFI_MAGIC &&
|
||||
magic != DFI_MAGIC2)
|
||||
@@ -64,7 +66,7 @@ public sealed partial class DiscFerret
|
||||
{
|
||||
long thisOffset = stream.Position;
|
||||
|
||||
byte[] blk = new byte[Marshal.SizeOf<BlockHeader>()];
|
||||
var blk = new byte[Marshal.SizeOf<BlockHeader>()];
|
||||
stream.EnsureRead(blk, 0, Marshal.SizeOf<BlockHeader>());
|
||||
BlockHeader blockHeader = Marshal.ByteArrayToStructureBigEndian<BlockHeader>(blk);
|
||||
|
||||
@@ -171,4 +173,6 @@ public sealed partial class DiscFerret
|
||||
|
||||
return ErrorNumber.NotImplemented;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user