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 System.Text;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
|
|
||||||
namespace DiscImageChef.Decoders
|
namespace DiscImageChef.Decoders.ATA
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Information from following standards:
|
/// Information from following standards:
|
||||||
@@ -56,7 +56,7 @@ namespace DiscImageChef.Decoders
|
|||||||
/// T13-2161D rev. 5 (ACS-3)
|
/// T13-2161D rev. 5 (ACS-3)
|
||||||
/// CF+ & CF Specification rev. 1.4 (CFA)
|
/// CF+ & CF Specification rev. 1.4 (CFA)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class ATA
|
public static class Identify
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=2)]
|
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=2)]
|
||||||
public struct IdentifyDevice
|
public struct IdentifyDevice
|
||||||
@@ -1851,7 +1851,7 @@ namespace DiscImageChef.Decoders
|
|||||||
Clear = 0x0001,
|
Clear = 0x0001,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IdentifyDevice? DecodeIdentifyDevice(byte[] IdentifyDeviceResponse)
|
public static IdentifyDevice? Decode(byte[] IdentifyDeviceResponse)
|
||||||
{
|
{
|
||||||
if (IdentifyDeviceResponse == null)
|
if (IdentifyDeviceResponse == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -1880,16 +1880,16 @@ namespace DiscImageChef.Decoders
|
|||||||
return ATAID;
|
return ATAID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string PrettifyIdentifyDevice(byte[] IdentifyDeviceResponse)
|
public static string Prettify(byte[] IdentifyDeviceResponse)
|
||||||
{
|
{
|
||||||
if (IdentifyDeviceResponse.Length != 512)
|
if (IdentifyDeviceResponse.Length != 512)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
IdentifyDevice? decoded = DecodeIdentifyDevice(IdentifyDeviceResponse);
|
IdentifyDevice? decoded = Decode(IdentifyDeviceResponse);
|
||||||
return PrettifyIdentifyDevice(decoded);
|
return Prettify(decoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string PrettifyIdentifyDevice(IdentifyDevice? IdentifyDeviceResponse)
|
public static string Prettify(IdentifyDevice? IdentifyDeviceResponse)
|
||||||
{
|
{
|
||||||
if (IdentifyDeviceResponse == null)
|
if (IdentifyDeviceResponse == null)
|
||||||
return 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>
|
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* ATA/ATA.cs:
|
* ATA/ATA.cs:
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SCSI\Inquiry.cs" />
|
<Compile Include="SCSI\Inquiry.cs" />
|
||||||
<Compile Include="ATA\ATA.cs" />
|
|
||||||
<Compile Include="Blu-ray\BD.cs" />
|
<Compile Include="Blu-ray\BD.cs" />
|
||||||
<Compile Include="Floppy\Enums.cs" />
|
<Compile Include="Floppy\Enums.cs" />
|
||||||
<Compile Include="Floppy\System3740.cs" />
|
<Compile Include="Floppy\System3740.cs" />
|
||||||
@@ -78,6 +77,7 @@
|
|||||||
<Compile Include="SCSI\MMC\OPW.cs" />
|
<Compile Include="SCSI\MMC\OPW.cs" />
|
||||||
<Compile Include="SCSI\Enums.cs" />
|
<Compile Include="SCSI\Enums.cs" />
|
||||||
<Compile Include="SCSI\VendorString.cs" />
|
<Compile Include="SCSI\VendorString.cs" />
|
||||||
|
<Compile Include="ATA\Identify.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<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>
|
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Commands/Decode.cs:
|
* Commands/Decode.cs:
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine("ATA IDENTIFY DEVICE command response:");
|
DicConsole.WriteLine("ATA IDENTIFY DEVICE command response:");
|
||||||
DicConsole.WriteLine("================================================================================");
|
DicConsole.WriteLine("================================================================================");
|
||||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(identify));
|
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(identify));
|
||||||
DicConsole.WriteLine("================================================================================");
|
DicConsole.WriteLine("================================================================================");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -110,7 +110,7 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine("ATA IDENTIFY PACKET DEVICE command response:");
|
DicConsole.WriteLine("ATA IDENTIFY PACKET DEVICE command response:");
|
||||||
DicConsole.WriteLine("================================================================================");
|
DicConsole.WriteLine("================================================================================");
|
||||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(identify));
|
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(identify));
|
||||||
DicConsole.WriteLine("================================================================================");
|
DicConsole.WriteLine("================================================================================");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace DiscImageChef.Commands
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine("ATAPI OK");
|
DicConsole.WriteLine("ATAPI OK");
|
||||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(ataBuf));
|
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(ataBuf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -137,7 +137,7 @@ namespace DiscImageChef.Commands
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine("ATA OK");
|
DicConsole.WriteLine("ATA OK");
|
||||||
DicConsole.WriteLine(Decoders.ATA.PrettifyIdentifyDevice(ataBuf));
|
DicConsole.WriteLine(Decoders.ATA.Identify.Prettify(ataBuf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user