mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Partitions;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -39,8 +41,6 @@ using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Marshal = Aaru.Helpers.Marshal;
|
||||
|
||||
namespace Aaru.Partitions;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Implements decoding of Rio Karma partitions</summary>
|
||||
public sealed class RioKarma : IPartition
|
||||
@@ -51,7 +51,7 @@ public sealed class RioKarma : IPartition
|
||||
/// <inheritdoc />
|
||||
public string Name => "Rio Karma partitioning";
|
||||
/// <inheritdoc />
|
||||
public Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||
public Guid Id => new("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||
/// <inheritdoc />
|
||||
public string Author => "Natalia Portillo";
|
||||
|
||||
@@ -59,9 +59,10 @@ public sealed class RioKarma : IPartition
|
||||
public bool GetInformation(IMediaImage imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||
{
|
||||
partitions = null;
|
||||
var errno = imagePlugin.ReadSector(sectorOffset, out byte[] sector);
|
||||
ErrorNumber errno = imagePlugin.ReadSector(sectorOffset, out byte[] sector);
|
||||
|
||||
if(errno != ErrorNumber.NoError ||sector.Length < 512)
|
||||
if(errno != ErrorNumber.NoError ||
|
||||
sector.Length < 512)
|
||||
return false;
|
||||
|
||||
Table table = Marshal.ByteArrayToStructureLittleEndian<Table>(sector);
|
||||
|
||||
Reference in New Issue
Block a user