mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Create dump class.
This commit is contained in:
@@ -55,7 +55,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <summary>
|
||||
/// Implements dumping ATA devices
|
||||
/// </summary>
|
||||
public static class Ata
|
||||
public partial class Dump
|
||||
{
|
||||
/// <summary>
|
||||
/// Dumps an ATA device
|
||||
@@ -75,14 +75,13 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <param name="outputPath">Path to output file</param>
|
||||
/// <param name="formatOptions">Formats to pass to output file plugin</param>
|
||||
/// <exception cref="InvalidOperationException">If the resume file is invalid</exception>
|
||||
public static void Dump(Device dev, string devicePath,
|
||||
IWritableImage outputPlugin, ushort retryPasses,
|
||||
bool force, bool dumpRaw,
|
||||
bool persistent, bool stopOnError, ref Resume resume,
|
||||
ref DumpLog dumpLog, Encoding encoding,
|
||||
string outputPrefix, string outputPath,
|
||||
Dictionary<string, string> formatOptions, CICMMetadataType preSidecar,
|
||||
uint skip,
|
||||
public void Ata(Device dev, string devicePath,
|
||||
IWritableImage outputPlugin, ushort retryPasses, bool force,
|
||||
bool dumpRaw, bool persistent,
|
||||
bool stopOnError, ref Resume resume, ref DumpLog dumpLog,
|
||||
Encoding encoding, string outputPrefix,
|
||||
string outputPath,
|
||||
Dictionary<string, string> formatOptions, CICMMetadataType preSidecar, uint skip,
|
||||
bool nometadata, bool notrim)
|
||||
{
|
||||
bool aborted;
|
||||
|
||||
@@ -50,7 +50,6 @@ using DiscImageChef.Devices;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using Schemas;
|
||||
using Ata = DiscImageChef.Core.Devices.Dumping.Ata;
|
||||
using DeviceInfo = DiscImageChef.Core.Devices.Info.DeviceInfo;
|
||||
using MediaType = DiscImageChef.CommonTypes.MediaType;
|
||||
using Scsi = DiscImageChef.Core.Devices.Dumping.Scsi;
|
||||
@@ -447,10 +446,12 @@ namespace DiscImageChef.Gui.Forms
|
||||
parsedOptions.Add(key, value);
|
||||
}
|
||||
|
||||
Dump dumper = new Dump();
|
||||
|
||||
switch(dev.Type)
|
||||
{
|
||||
case DeviceType.ATA:
|
||||
Ata.Dump(dev, devicePath, outputFormat, (ushort)stpRetries.Value, chkForce.Checked == true,
|
||||
dumper.Ata(dev, devicePath, outputFormat, (ushort)stpRetries.Value, chkForce.Checked == true,
|
||||
false, /*options.Raw,*/
|
||||
chkPersistent.Checked == true, chkStopOnError.Checked == true, ref resume, ref dumpLog,
|
||||
encoding, outputPrefix, txtDestination.Text, parsedOptions, sidecar,
|
||||
|
||||
@@ -48,7 +48,6 @@ using DiscImageChef.Core.Logging;
|
||||
using DiscImageChef.Devices;
|
||||
using Mono.Options;
|
||||
using Schemas;
|
||||
using Ata = DiscImageChef.Core.Devices.Dumping.Ata;
|
||||
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
|
||||
using Scsi = DiscImageChef.Core.Devices.Dumping.Scsi;
|
||||
|
||||
@@ -296,6 +295,8 @@ namespace DiscImageChef.Commands
|
||||
DicConsole.WriteLine("Output image format: {0}.", outputFormat.Name);
|
||||
}
|
||||
|
||||
Dump dumper = new Dump();
|
||||
|
||||
if(dev.IsUsb && dev.UsbVendorId == 0x054C &&
|
||||
(dev.UsbProductId == 0x01C8 || dev.UsbProductId == 0x01C9 || dev.UsbProductId == 0x02D2))
|
||||
PlayStationPortable.Dump(dev, devicePath, outputFormat, retryPasses, force, persistent, stopOnError,
|
||||
@@ -305,7 +306,7 @@ namespace DiscImageChef.Commands
|
||||
switch(dev.Type)
|
||||
{
|
||||
case DeviceType.ATA:
|
||||
Ata.Dump(dev, devicePath, outputFormat, retryPasses, force, false, /*raw,*/
|
||||
dumper.Ata(dev, devicePath, outputFormat, retryPasses, force, false, /*raw,*/
|
||||
persistent, stopOnError, ref resume, ref dumpLog, encoding, outputPrefix, outputFile,
|
||||
parsedOptions, sidecar, (uint)skip, noMetadata, noTrim);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user