mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Remove deprecated FreeBSD code.
This commit is contained in:
@@ -46,7 +46,6 @@ using Aaru.Database.Models;
|
||||
using Aaru.Decoders.CD;
|
||||
using Aaru.Devices;
|
||||
using Schemas;
|
||||
using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
|
||||
using TrackType = Aaru.CommonTypes.Enums.TrackType;
|
||||
using Version = Aaru.CommonTypes.Interop.Version;
|
||||
|
||||
@@ -64,63 +63,63 @@ namespace Aaru.Core.Devices.Dumping
|
||||
/// <summary>Dumps a compact disc</summary>
|
||||
void CompactDisc()
|
||||
{
|
||||
ExtentsULong audioExtents; // Extents with audio sectors
|
||||
ulong blocks; // Total number of positive sectors
|
||||
uint blockSize; // Size of the read sector in bytes
|
||||
CdOffset cdOffset; // Read offset from database
|
||||
byte[] cmdBuf; // Data buffer
|
||||
DumpHardwareType currentTry = null; // Current dump hardware try
|
||||
double currentSpeed = 0; // Current read speed
|
||||
int? discOffset = null; // Disc write offset
|
||||
DateTime dumpStart = DateTime.UtcNow; // Time of dump start
|
||||
DateTime end; // Time of operation end
|
||||
ExtentsULong extents = null; // Extents
|
||||
bool hiddenData; // Hidden track is data
|
||||
IbgLog ibgLog; // IMGBurn log
|
||||
double imageWriteDuration = 0; // Duration of image write
|
||||
long lastSector; // Last sector number
|
||||
ExtentsULong audioExtents; // Extents with audio sectors
|
||||
ulong blocks; // Total number of positive sectors
|
||||
uint blockSize; // Size of the read sector in bytes
|
||||
CdOffset cdOffset; // Read offset from database
|
||||
byte[] cmdBuf; // Data buffer
|
||||
DumpHardwareType currentTry = null; // Current dump hardware try
|
||||
double currentSpeed = 0; // Current read speed
|
||||
int? discOffset = null; // Disc write offset
|
||||
DateTime dumpStart = DateTime.UtcNow; // Time of dump start
|
||||
DateTime end; // Time of operation end
|
||||
ExtentsULong extents = null; // Extents
|
||||
bool hiddenData; // Hidden track is data
|
||||
IbgLog ibgLog; // IMGBurn log
|
||||
double imageWriteDuration = 0; // Duration of image write
|
||||
long lastSector; // Last sector number
|
||||
var leadOutExtents = new ExtentsULong(); // Lead-out extents
|
||||
Dictionary<int, long> leadOutStarts = new Dictionary<int, long>(); // Lead-out starts
|
||||
double maxSpeed = double.MinValue; // Maximum speed
|
||||
MhddLog mhddLog; // MHDD log
|
||||
double minSpeed = double.MaxValue; // Minimum speed
|
||||
bool newTrim; // Is trim a new one?
|
||||
int offsetBytes = 0; // Read offset
|
||||
bool read6 = false; // Device supports READ(6)
|
||||
bool read10 = false; // Device supports READ(10)
|
||||
bool read12 = false; // Device supports READ(12)
|
||||
bool read16 = false; // Device supports READ(16)
|
||||
bool readcd; // Device supports READ CD
|
||||
bool ret; // Image writing return status
|
||||
const uint sectorSize = 2352; // Full sector size
|
||||
int sectorsForOffset = 0; // Sectors needed to fix offset
|
||||
bool sense = true; // Sense indicator
|
||||
int sessions; // Number of sessions in disc
|
||||
DateTime start; // Start of operation
|
||||
SubchannelLog subLog = null; // Subchannel log
|
||||
uint subSize; // Subchannel size in bytes
|
||||
TrackSubchannelType subType; // Track subchannel type
|
||||
bool supportsLongSectors = true; // Supports reading EDC and ECC
|
||||
bool supportsPqSubchannel; // Supports reading PQ subchannel
|
||||
bool supportsRwSubchannel; // Supports reading RW subchannel
|
||||
byte[] tmpBuf; // Temporary buffer
|
||||
FullTOC.CDFullTOC? toc; // Full CD TOC
|
||||
double totalDuration = 0; // Total commands duration
|
||||
Dictionary<byte, byte> trackFlags = new Dictionary<byte, byte>(); // Track flags
|
||||
Track[] tracks; // Tracks in disc
|
||||
int firstTrackLastSession; // Number of first track in last session
|
||||
bool hiddenTrack; // Disc has a hidden track before track 1
|
||||
MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
|
||||
MmcSubchannel desiredSubchannel; // User requested subchannel
|
||||
bool bcdSubchannel = false; // Subchannel positioning is in BCD
|
||||
Dictionary<byte, string> isrcs = new Dictionary<byte, string>();
|
||||
Dictionary<int, long> leadOutStarts = new(); // Lead-out starts
|
||||
double maxSpeed = double.MinValue; // Maximum speed
|
||||
MhddLog mhddLog; // MHDD log
|
||||
double minSpeed = double.MaxValue; // Minimum speed
|
||||
bool newTrim; // Is trim a new one?
|
||||
int offsetBytes = 0; // Read offset
|
||||
bool read6 = false; // Device supports READ(6)
|
||||
bool read10 = false; // Device supports READ(10)
|
||||
bool read12 = false; // Device supports READ(12)
|
||||
bool read16 = false; // Device supports READ(16)
|
||||
bool readcd; // Device supports READ CD
|
||||
bool ret; // Image writing return status
|
||||
const uint sectorSize = 2352; // Full sector size
|
||||
int sectorsForOffset = 0; // Sectors needed to fix offset
|
||||
bool sense = true; // Sense indicator
|
||||
int sessions; // Number of sessions in disc
|
||||
DateTime start; // Start of operation
|
||||
SubchannelLog subLog = null; // Subchannel log
|
||||
uint subSize; // Subchannel size in bytes
|
||||
TrackSubchannelType subType; // Track subchannel type
|
||||
bool supportsLongSectors = true; // Supports reading EDC and ECC
|
||||
bool supportsPqSubchannel; // Supports reading PQ subchannel
|
||||
bool supportsRwSubchannel; // Supports reading RW subchannel
|
||||
byte[] tmpBuf; // Temporary buffer
|
||||
FullTOC.CDFullTOC? toc; // Full CD TOC
|
||||
double totalDuration = 0; // Total commands duration
|
||||
Dictionary<byte, byte> trackFlags = new(); // Track flags
|
||||
Track[] tracks; // Tracks in disc
|
||||
int firstTrackLastSession; // Number of first track in last session
|
||||
bool hiddenTrack; // Disc has a hidden track before track 1
|
||||
MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
|
||||
MmcSubchannel desiredSubchannel; // User requested subchannel
|
||||
bool bcdSubchannel = false; // Subchannel positioning is in BCD
|
||||
Dictionary<byte, string> isrcs = new();
|
||||
string mcn = null;
|
||||
HashSet<int> subchannelExtents = new HashSet<int>();
|
||||
HashSet<int> subchannelExtents = new();
|
||||
bool cdiReadyReadAsAudio = false;
|
||||
uint firstLba;
|
||||
|
||||
Dictionary<MediaTagType, byte[]> mediaTags = new Dictionary<MediaTagType, byte[]>(); // Media tags
|
||||
Dictionary<byte, int> smallestPregapLbaPerTrack = new Dictionary<byte, int>();
|
||||
Dictionary<MediaTagType, byte[]> mediaTags = new(); // Media tags
|
||||
Dictionary<byte, int> smallestPregapLbaPerTrack = new();
|
||||
|
||||
MediaType dskType = MediaType.CD;
|
||||
|
||||
@@ -565,7 +564,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
_dumpLog.WriteLine("Disc contains a hidden track...");
|
||||
UpdateStatus?.Invoke("Disc contains a hidden track...");
|
||||
|
||||
List<Track> trkList = new List<Track>
|
||||
List<Track> trkList = new()
|
||||
{
|
||||
new Track
|
||||
{
|
||||
@@ -721,31 +720,6 @@ namespace Aaru.Core.Devices.Dumping
|
||||
// Check if something prevents from dumping the first track pregap
|
||||
if(_dumpFirstTrackPregap && readcd)
|
||||
{
|
||||
if(_dev.PlatformId == PlatformID.FreeBSD &&
|
||||
!_dev.IsRemote)
|
||||
{
|
||||
if(_force)
|
||||
{
|
||||
_dumpLog.
|
||||
WriteLine("FreeBSD panics when reading CD first track pregap, see upstream bug #224253. continuing");
|
||||
|
||||
ErrorMessage?.
|
||||
Invoke("FreeBSD panics when reading CD first track pregap, see upstream bug #224253. continuing");
|
||||
}
|
||||
else
|
||||
{
|
||||
_dumpLog.
|
||||
WriteLine("FreeBSD panics when reading CD first track pregap, see upstream bug #224253. Not continuing");
|
||||
|
||||
StoppingErrorMessage?.
|
||||
Invoke("FreeBSD panics when reading CD first track pregap, see upstream bug #224253. Not continuing");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_dumpFirstTrackPregap = false;
|
||||
}
|
||||
|
||||
if(!_outputPlugin.SupportedMediaTags.Contains(MediaTagType.CD_FirstTrackPregap))
|
||||
{
|
||||
if(_force)
|
||||
|
||||
Reference in New Issue
Block a user