mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Decoders/ATA/ATA.cs:
* DiscImageChef.Decoders/ATA/Identify.cs: * DiscImageChef.Decoders/DiscImageChef.Decoders.csproj: Rename fields, methods and structs to more adequate names. * DiscImageChef/Commands/Decode.cs: * DiscImageChef/Commands/DeviceInfo.cs: Rename ATA/ATAPI decoders fields, methods and structs to more adequate names.
This commit is contained in:
@@ -40,7 +40,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.Console;
|
||||
|
||||
namespace DiscImageChef.Decoders
|
||||
namespace DiscImageChef.Decoders.ATA
|
||||
{
|
||||
/// <summary>
|
||||
/// Information from following standards:
|
||||
@@ -56,7 +56,7 @@ namespace DiscImageChef.Decoders
|
||||
/// T13-2161D rev. 5 (ACS-3)
|
||||
/// CF+ & CF Specification rev. 1.4 (CFA)
|
||||
/// </summary>
|
||||
public static class ATA
|
||||
public static class Identify
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=2)]
|
||||
public struct IdentifyDevice
|
||||
@@ -1851,7 +1851,7 @@ namespace DiscImageChef.Decoders
|
||||
Clear = 0x0001,
|
||||
}
|
||||
|
||||
public static IdentifyDevice? DecodeIdentifyDevice(byte[] IdentifyDeviceResponse)
|
||||
public static IdentifyDevice? Decode(byte[] IdentifyDeviceResponse)
|
||||
{
|
||||
if (IdentifyDeviceResponse == null)
|
||||
return null;
|
||||
@@ -1880,16 +1880,16 @@ namespace DiscImageChef.Decoders
|
||||
return ATAID;
|
||||
}
|
||||
|
||||
public static string PrettifyIdentifyDevice(byte[] IdentifyDeviceResponse)
|
||||
public static string Prettify(byte[] IdentifyDeviceResponse)
|
||||
{
|
||||
if (IdentifyDeviceResponse.Length != 512)
|
||||
return null;
|
||||
|
||||
IdentifyDevice? decoded = DecodeIdentifyDevice(IdentifyDeviceResponse);
|
||||
return PrettifyIdentifyDevice(decoded);
|
||||
IdentifyDevice? decoded = Decode(IdentifyDeviceResponse);
|
||||
return Prettify(decoded);
|
||||
}
|
||||
|
||||
public static string PrettifyIdentifyDevice(IdentifyDevice? IdentifyDeviceResponse)
|
||||
public static string Prettify(IdentifyDevice? IdentifyDeviceResponse)
|
||||
{
|
||||
if (IdentifyDeviceResponse == null)
|
||||
return null;
|
||||
@@ -1,3 +1,10 @@
|
||||
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* ATA/ATA.cs:
|
||||
* ATA/Identify.cs:
|
||||
* DiscImageChef.Decoders.csproj:
|
||||
Rename fields, methods and structs to more adequate names.
|
||||
|
||||
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* ATA/ATA.cs:
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SCSI\Inquiry.cs" />
|
||||
<Compile Include="ATA\ATA.cs" />
|
||||
<Compile Include="Blu-ray\BD.cs" />
|
||||
<Compile Include="Floppy\Enums.cs" />
|
||||
<Compile Include="Floppy\System3740.cs" />
|
||||
@@ -78,6 +77,7 @@
|
||||
<Compile Include="SCSI\MMC\OPW.cs" />
|
||||
<Compile Include="SCSI\Enums.cs" />
|
||||
<Compile Include="SCSI\VendorString.cs" />
|
||||
<Compile Include="ATA\Identify.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Commands/Decode.cs:
|
||||
* Commands/DeviceInfo.cs:
|
||||
Rename ATA/ATAPI decoders fields, methods and structs to
|
||||
more adequate names.
|
||||
|
||||
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Commands/Decode.cs:
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace DiscImageChef.Commands
|
||||
{
|
||||
DicConsole.WriteLine("ATA IDENTIFY DEVICE command response:");
|
||||
DicConsole.WriteLine("================================================================================");
|
||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(identify));
|
||||
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(identify));
|
||||
DicConsole.WriteLine("================================================================================");
|
||||
}
|
||||
break;
|
||||
@@ -110,7 +110,7 @@ namespace DiscImageChef.Commands
|
||||
{
|
||||
DicConsole.WriteLine("ATA IDENTIFY PACKET DEVICE command response:");
|
||||
DicConsole.WriteLine("================================================================================");
|
||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(identify));
|
||||
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(identify));
|
||||
DicConsole.WriteLine("================================================================================");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace DiscImageChef.Commands
|
||||
else
|
||||
{
|
||||
DicConsole.WriteLine("ATAPI OK");
|
||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(ataBuf));
|
||||
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(ataBuf));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -137,7 +137,7 @@ namespace DiscImageChef.Commands
|
||||
else
|
||||
{
|
||||
DicConsole.WriteLine("ATA OK");
|
||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(ataBuf));
|
||||
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(ataBuf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user