mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code cleanup.
This commit is contained in:
@@ -80,13 +80,13 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if(testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.CHS != null && testedMedia.CurrentCHS != null)
|
||||
@@ -94,14 +94,14 @@ namespace DiscImageChef.Server.App_Start
|
||||
int currentSectors = testedMedia.CurrentCHS.Cylinders * testedMedia.CurrentCHS.Heads *
|
||||
testedMedia.CurrentCHS.Sectors;
|
||||
mediaOneValue
|
||||
.Add($"Cylinders: {testedMedia.CHS.Cylinders} max., {testedMedia.CurrentCHS.Cylinders} current");
|
||||
.Add($"Cylinders: {testedMedia.CHS.Cylinders} max., {testedMedia.CurrentCHS.Cylinders} current");
|
||||
mediaOneValue.Add($"Heads: {testedMedia.CHS.Heads} max., {testedMedia.CurrentCHS.Heads} current");
|
||||
mediaOneValue
|
||||
.Add($"Sectors per track: {testedMedia.CHS.Sectors} max., {testedMedia.CurrentCHS.Sectors} current");
|
||||
.Add($"Sectors per track: {testedMedia.CHS.Sectors} max., {testedMedia.CurrentCHS.Sectors} current");
|
||||
mediaOneValue
|
||||
.Add($"Sectors addressable in CHS mode: {testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors} max., {currentSectors} current");
|
||||
.Add($"Sectors addressable in CHS mode: {testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors} max., {currentSectors} current");
|
||||
mediaOneValue
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
else if(testedMedia.CHS != null)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add($"Sectors per track: {testedMedia.CHS.Sectors}");
|
||||
mediaOneValue.Add($"Sectors addressable in CHS mode: {currentSectors}");
|
||||
mediaOneValue
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.LBASectorsSpecified)
|
||||
@@ -120,13 +120,13 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if((ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if((ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.LBA48SectorsSpecified)
|
||||
@@ -135,27 +135,28 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if(testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.NominalRotationRateSpecified && testedMedia.NominalRotationRate != 0x0000 &&
|
||||
testedMedia.NominalRotationRate != 0xFFFF)
|
||||
testedMedia.NominalRotationRate != 0xFFFF)
|
||||
mediaOneValue.Add(testedMedia.NominalRotationRate == 0x0001
|
||||
? "Medium does not rotate."
|
||||
: $"Medium rotates at {testedMedia.NominalRotationRate} rpm");
|
||||
|
||||
if(testedMedia.BlockSizeSpecified && testedMedia.PhysicalBlockSizeSpecified &&
|
||||
testedMedia.BlockSize != testedMedia.PhysicalBlockSize &&
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
if(testedMedia.BlockSizeSpecified &&
|
||||
testedMedia.PhysicalBlockSizeSpecified &&
|
||||
testedMedia.BlockSize != testedMedia.PhysicalBlockSize &&
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||
mediaOneValue
|
||||
.Add($"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
||||
.Add($"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
||||
|
||||
if(testedMedia.SupportsRead && ata)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in CHS mode with this medium");
|
||||
@@ -174,7 +175,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadRetryLba)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaLba)
|
||||
mediaOneValue.Add("Device can use the READ DMA command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaRetryLba)
|
||||
@@ -217,10 +218,10 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium");
|
||||
if(testedMedia.SupportsReadCdRaw)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
if(testedMedia.SupportsReadCdMsfRaw)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
|
||||
if(testedMedia.SupportsHLDTSTReadRawDVD)
|
||||
mediaOneValue.Add("Device can use the HL-DT-ST vendor READ DVD (RAW) command with this medium");
|
||||
@@ -250,7 +251,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can correct subchannels when reading from this medium");
|
||||
if(testedMedia.CanReadCorrectedSubchannelWithC2)
|
||||
mediaOneValue
|
||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
if(testedMedia.CanReadDCB)
|
||||
mediaOneValue.Add("Device can read the Disc Control Blocks from this medium");
|
||||
if(testedMedia.CanReadDDS)
|
||||
@@ -279,14 +280,14 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can read the P to Q subchannels from this medium");
|
||||
if(testedMedia.CanReadPQSubchannelWithC2)
|
||||
mediaOneValue
|
||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadPRI)
|
||||
mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium");
|
||||
if(testedMedia.CanReadRWSubchannel)
|
||||
mediaOneValue.Add("Device can read the R to W subchannels from this medium");
|
||||
if(testedMedia.CanReadRWSubchannelWithC2)
|
||||
mediaOneValue
|
||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadRecordablePFI)
|
||||
mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium");
|
||||
if(testedMedia.CanReadSpareAreaInformation)
|
||||
|
||||
Reference in New Issue
Block a user