2017-05-19 20:28:49 +01:00
// /***************************************************************************
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : DeviceReport.cs
2016-07-28 18:13:49 +01:00
// Author(s) : Natalia Portillo <claunia@claunia.com>
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
//
2016-07-28 18:13:49 +01:00
// Component : Verbs.
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
//
// --[ Description ] ----------------------------------------------------------
//
2016-07-28 18:13:49 +01:00
// Implements the 'device-report' verb.
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2018-12-29 17:34:38 +00:00
// Copyright © 2011-2019 Natalia Portillo
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
// ****************************************************************************/
2016-07-28 18:13:49 +01:00
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
using System ;
2018-11-25 19:13:21 +00:00
using System.Collections.Generic ;
2017-05-28 21:01:17 +01:00
using System.IO ;
2018-11-25 20:08:28 +00:00
using System.Threading ;
2018-11-27 00:09:53 +00:00
using DiscImageChef.CommonTypes.Enums ;
2018-11-27 21:29:16 +00:00
using DiscImageChef.CommonTypes.Interop ;
2018-11-25 17:47:14 +00:00
using DiscImageChef.CommonTypes.Metadata ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
using DiscImageChef.Console ;
2018-11-25 20:08:28 +00:00
using DiscImageChef.Core ;
2018-11-27 01:42:25 +00:00
using DiscImageChef.Database ;
using DiscImageChef.Database.Models ;
2018-11-25 19:13:21 +00:00
using DiscImageChef.Decoders.ATA ;
2018-11-25 20:08:28 +00:00
using DiscImageChef.Decoders.SCSI ;
2019-01-05 16:59:23 +00:00
using Mono.Options ;
2018-11-25 17:47:14 +00:00
using Newtonsoft.Json ;
2019-01-05 16:59:23 +00:00
using Command = Mono . Options . Command ;
2018-11-27 01:42:25 +00:00
using Device = DiscImageChef . Devices . Device ;
2019-01-05 16:59:23 +00:00
using DeviceReport = DiscImageChef . Core . Devices . Report . DeviceReport ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
namespace DiscImageChef.Commands
{
2019-09-19 16:39:32 +01:00
internal class DeviceReportCommand : Command
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
{
2019-09-19 16:39:32 +01:00
private string devicePath ;
2019-01-05 16:59:23 +00:00
2019-09-19 16:39:32 +01:00
private bool showHelp ;
2019-01-05 16:59:23 +00:00
public DeviceReportCommand ( ) : base ( "device-report" ,
2019-09-19 16:39:32 +01:00
"Tests the device capabilities and creates an JSON report of them." )
2019-01-05 16:59:23 +00:00
{
Options = new OptionSet
{
$"{MainClass.AssemblyTitle} {MainClass.AssemblyVersion?.InformationalVersion}" ,
$"{MainClass.AssemblyCopyright}" ,
"" ,
$"usage: DiscImageChef {Name} devicepath" ,
"" ,
Help ,
{ "help|h|?" , "Show this message and exit." , v = > showHelp = v ! = null }
} ;
}
public override int Invoke ( IEnumerable < string > arguments )
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
{
2019-01-05 16:59:23 +00:00
List < string > extra = Options . Parse ( arguments ) ;
2019-09-19 16:39:32 +01:00
if ( showHelp )
2019-01-05 16:59:23 +00:00
{
Options . WriteOptionDescriptions ( CommandSet . Out ) ;
2019-09-19 16:39:32 +01:00
return ( int ) ErrorNumber . HelpRequested ;
2019-01-05 16:59:23 +00:00
}
MainClass . PrintCopyright ( ) ;
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug ) DicConsole . DebugWriteLineEvent + = System . Console . Error . WriteLine ;
if ( MainClass . Verbose ) DicConsole . VerboseWriteLineEvent + = System . Console . WriteLine ;
2019-01-05 20:21:57 +00:00
Statistics . AddCommand ( "device-report" ) ;
2019-01-05 16:59:23 +00:00
2019-09-19 16:39:32 +01:00
if ( extra . Count > 1 )
2019-01-05 16:59:23 +00:00
{
DicConsole . ErrorWriteLine ( "Too many arguments." ) ;
2019-09-19 16:39:32 +01:00
return ( int ) ErrorNumber . UnexpectedArgumentCount ;
2019-01-05 16:59:23 +00:00
}
2019-09-19 16:39:32 +01:00
if ( extra . Count = = 0 )
2019-01-05 16:59:23 +00:00
{
DicConsole . ErrorWriteLine ( "Missing device path." ) ;
2019-09-19 16:39:32 +01:00
return ( int ) ErrorNumber . MissingArgument ;
2019-01-05 16:59:23 +00:00
}
devicePath = extra [ 0 ] ;
2019-09-19 16:39:32 +01:00
DicConsole . DebugWriteLine ( "Device-Report command" , "--debug={0}" , MainClass . Debug ) ;
DicConsole . DebugWriteLine ( "Device-Report command" , "--device={0}" , devicePath ) ;
2019-01-05 16:59:23 +00:00
DicConsole . DebugWriteLine ( "Device-Report command" , "--verbose={0}" , MainClass . Verbose ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
2019-09-19 16:39:32 +01:00
if ( ! DetectOS . IsAdmin )
2018-11-27 21:29:16 +00:00
{
2018-12-20 00:12:48 +00:00
DicConsole
2019-09-19 16:39:32 +01:00
. ErrorWriteLine (
"Because of the commands sent to a device, device report must be run with administrative privileges." ) ;
2018-11-27 21:29:16 +00:00
DicConsole . ErrorWriteLine ( "Not continuing." ) ;
2019-09-19 16:39:32 +01:00
return ( int ) ErrorNumber . NotEnoughPermissions ;
2018-11-27 21:29:16 +00:00
}
2019-09-19 16:39:32 +01:00
if ( devicePath . Length = = 2 & & devicePath [ 1 ] = = ':' & & devicePath [ 0 ] ! = '/' & & char . IsLetter ( devicePath [ 0 ] ) )
2019-01-05 16:59:23 +00:00
devicePath = "\\\\.\\" + char . ToUpper ( devicePath [ 0 ] ) + ':' ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
2019-09-19 16:39:32 +01:00
var dev = new Device ( devicePath ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
2019-09-19 16:39:32 +01:00
if ( dev . Error )
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
{
DicConsole . ErrorWriteLine ( "Error {0} opening device." , dev . LastError ) ;
2019-09-19 16:39:32 +01:00
return ( int ) ErrorNumber . CannotOpenDevice ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
}
2019-01-05 16:59:23 +00:00
Statistics . AddDevice ( dev ) ;
* commandline:
* DiscImageChef.Settings/Settings.cs:
* DiscImageChef.Settings/docs/README.txt:
* DiscImageChef.Settings/packages.config:
* DiscImageChef.Settings/docs/LICENSE.txt:
* DiscImageChef.Settings/docs/ChangeLog.txt:
* DiscImageChef.Settings/docs/mono/index.xml:
* DiscImageChef.Settings/docs/html/index.html:
* DiscImageChef.Settings/Properties/AssemblyInfo.cs:
* DiscImageChef.Settings/DiscImageChef.Settings.csproj:
* DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html:
Added supports for settings
* DiscImageChef/Commands/Configure.cs:
Added support for settings.
* DiscImageChef/Core/Statistics.cs:
* DiscImageChef/Commands/Verify.cs:
* DiscImageChef/Commands/Entropy.cs:
* DiscImageChef/Commands/Formats.cs:
* DiscImageChef/Commands/PrintHex.cs:
* DiscImageChef/Commands/MediaInfo.cs:
* DiscImageChef/Commands/Statistics.cs:
Added statistics.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
Corrected bug on inquiry decoding.
* DiscImageChef.Decoders/SCSI/Modes.cs:
Corrected bug on decoding mode page 2Ah without write
performance descriptors.
Corrected bug when there is a vendor page 0 in mode sense
decoding.
* DiscImageChef.Devices/Device/Constructor.cs:
Corrected detecting USB or FireWire attached CD/DVD/BD and
tape drives.
Try ATA identify on USB or FireWire that don't have SCSI
INQUIRY.
* DiscImageChef.DiscImages/CDRWin.cs:
Corrected CD-ROM XA vs CD-ROM detection.
* DiscImageChef.Partitions/AppleMap.cs:
Corrected big endian working.
Added debug output.
* DiscImageChef.sln:
Added supports for settings.
* DiscImageChef/Commands/Decode.cs:
* DiscImageChef/Commands/Analyze.cs:
* DiscImageChef/Commands/Compare.cs:
* DiscImageChef/Commands/Checksum.cs:
* DiscImageChef/Commands/Benchmark.cs:
* DiscImageChef/Commands/DeviceInfo.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Added statistics.
* DiscImageChef/Commands/DeviceReport.cs:
Added statistics.
Correct handling empty inquiry string fields.
Suppose it is not removable, til proved wrong.
Corrected MODE SENSE (6/10) detection and calling order.
If device is MMC type but reports neither mode page 2Ah
neither GET CONFIGURATION, try all CDs (old drives work like
that).
Try reading Lead-In and Lead-Out in Audio CD using Audio READ
CD commands.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Added support for DVD raw block (37856 bytes).
Check READ LONG up to 36 times the cooked block size. That
should be enough to detect huge blocked media (like DVD and
BD) without taking ages.
If READ LONG size had to be bruteforced, and debug is
activated, save the result.
* DiscImageChef/Commands/DumpMedia.cs:
Added statistics.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/Commands/MediaScan.cs:
Added statistics.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/DiscImageChef.csproj:
Added support for settings.
Added statistics.
* DiscImageChef/Main.cs:
* DiscImageChef/Options.cs:
Added support for settings.
Added statistics.
2016-02-03 18:58:11 +00:00
2019-09-19 16:39:32 +01:00
var report = new DeviceReportV2
2018-11-27 00:23:05 +00:00
{
Manufacturer = dev . Manufacturer , Model = dev . Model , Revision = dev . Revision , Type = dev . Type
} ;
2019-09-19 16:39:32 +01:00
bool removable = false ;
2018-11-27 00:23:05 +00:00
string jsonFile ;
2018-11-25 17:47:14 +00:00
2019-09-19 16:39:32 +01:00
if ( ! string . IsNullOrWhiteSpace ( dev . Manufacturer ) & & ! string . IsNullOrWhiteSpace ( dev . Revision ) )
2018-11-25 17:47:14 +00:00
jsonFile = dev . Manufacturer + "_" + dev . Model + "_" + dev . Revision + ".json" ;
2019-09-19 16:39:32 +01:00
else if ( ! string . IsNullOrWhiteSpace ( dev . Manufacturer ) )
jsonFile = dev . Manufacturer + "_" + dev . Model + ".json" ;
else if ( ! string . IsNullOrWhiteSpace ( dev . Revision ) ) jsonFile = dev . Model + "_" + dev . Revision + ".json" ;
else jsonFile = dev . Model + ".json" ;
2017-05-28 21:01:17 +01:00
2018-11-25 17:47:14 +00:00
jsonFile = jsonFile . Replace ( '\\' , '_' ) . Replace ( '/' , '_' ) . Replace ( '?' , '_' ) ;
2017-06-03 01:22:59 +01:00
2019-09-19 16:39:32 +01:00
var reporter = new DeviceReport ( dev , MainClass . Debug ) ;
2018-11-25 18:28:57 +00:00
2018-11-25 19:13:21 +00:00
ConsoleKeyInfo pressedKey ;
2019-09-19 16:39:32 +01:00
if ( dev . IsUsb )
2018-11-25 18:28:57 +00:00
{
2018-11-25 19:13:21 +00:00
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 18:28:57 +00:00
{
DicConsole . Write ( "Is the device natively USB (in case of doubt, press Y)? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key = = ConsoleKey . Y )
2018-11-25 18:28:57 +00:00
{
report . USB = reporter . UsbReport ( ) ;
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 18:28:57 +00:00
{
DicConsole . Write ( "Is the media removable from the reading/writing elements? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
report . USB . RemovableMedia = pressedKey . Key = = ConsoleKey . Y ;
2019-09-19 16:39:32 +01:00
removable = report . USB . RemovableMedia ;
2018-11-25 18:28:57 +00:00
}
}
2019-09-19 16:39:32 +01:00
if ( dev . IsFireWire )
2018-11-25 18:35:39 +00:00
{
2018-11-25 19:13:21 +00:00
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 18:35:39 +00:00
{
DicConsole . Write ( "Is the device natively FireWire (in case of doubt, press Y)? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key ! = ConsoleKey . Y )
2018-11-25 18:35:39 +00:00
{
report . FireWire = reporter . FireWireReport ( ) ;
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 18:35:39 +00:00
{
DicConsole . Write ( "Is the media removable from the reading/writing elements? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
report . FireWire . RemovableMedia = pressedKey . Key = = ConsoleKey . Y ;
2019-09-19 16:39:32 +01:00
removable = report . FireWire . RemovableMedia ;
2018-11-25 18:35:39 +00:00
}
}
2019-09-19 16:39:32 +01:00
if ( dev . IsPcmcia ) report . PCMCIA = reporter . PcmciaReport ( ) ;
2018-11-25 18:40:16 +00:00
2018-11-25 19:17:21 +00:00
byte [ ] buffer ;
2018-11-25 20:27:38 +00:00
string mediumTypeName ;
string mediumModel ;
2018-11-25 19:17:21 +00:00
2019-09-19 16:39:32 +01:00
switch ( dev . Type )
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
{
case DeviceType . ATA :
2018-11-25 19:13:21 +00:00
{
DicConsole . WriteLine ( "Querying ATA IDENTIFY..." ) ;
2018-11-25 19:17:21 +00:00
dev . AtaIdentify ( out buffer , out _ , dev . Timeout , out _ ) ;
2018-11-25 19:13:21 +00:00
2019-09-19 16:39:32 +01:00
if ( ! Identify . Decode ( buffer ) . HasValue ) break ;
2018-11-25 19:13:21 +00:00
2019-01-08 20:40:09 +00:00
report . ATA = new Ata { Identify = DeviceReport . ClearIdentify ( buffer ) } ;
2018-11-25 19:13:21 +00:00
2019-09-19 16:39:32 +01:00
if ( report . ATA . IdentifyDevice = = null ) break ;
2018-11-25 19:13:21 +00:00
2019-09-19 16:39:32 +01:00
if ( ( ushort ) report . ATA . IdentifyDevice ? . GeneralConfiguration = = 0x848A )
2018-11-25 19:13:21 +00:00
{
report . CompactFlash = true ;
2019-09-19 16:39:32 +01:00
removable = false ;
2018-11-25 19:13:21 +00:00
}
2019-09-19 16:39:32 +01:00
else if ( ! removable & &
report . ATA . IdentifyDevice ? . GeneralConfiguration . HasFlag ( Identify . GeneralConfigurationBit
. Removable ) = = true )
2018-11-25 19:13:21 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 19:13:21 +00:00
{
DicConsole . Write ( "Is the media removable from the reading/writing elements? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
removable = pressedKey . Key = = ConsoleKey . Y ;
}
2019-09-19 16:39:32 +01:00
if ( removable )
2018-11-25 19:13:21 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. WriteLine ( "Please remove any media from the device and press any key when it is out." ) ;
2018-11-25 19:13:21 +00:00
System . Console . ReadKey ( true ) ;
DicConsole . WriteLine ( "Querying ATA IDENTIFY..." ) ;
dev . AtaIdentify ( out buffer , out _ , dev . Timeout , out _ ) ;
2019-01-08 20:40:09 +00:00
report . ATA . Identify = DeviceReport . ClearIdentify ( buffer ) ;
2018-12-25 14:08:02 +00:00
List < TestedMedia > mediaTests = new List < TestedMedia > ( ) ;
2018-11-25 19:13:21 +00:00
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . N )
2018-11-25 19:13:21 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 19:13:21 +00:00
{
DicConsole . Write ( "Do you have media that you can insert in the drive? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key ! = ConsoleKey . Y ) continue ;
2018-11-25 19:13:21 +00:00
DicConsole . WriteLine ( "Please insert it in the drive and press any key when it is ready." ) ;
System . Console . ReadKey ( true ) ;
DicConsole . Write ( "Please write a description of the media type and press enter: " ) ;
2018-11-25 20:27:38 +00:00
mediumTypeName = System . Console . ReadLine ( ) ;
2018-11-25 19:13:21 +00:00
DicConsole . Write ( "Please write the media model and press enter: " ) ;
2018-11-25 20:27:38 +00:00
mediumModel = System . Console . ReadLine ( ) ;
2018-11-25 19:13:21 +00:00
2019-09-19 16:39:32 +01:00
var mediaTest = reporter . ReportAtaMedia ( ) ;
2018-11-25 19:13:21 +00:00
mediaTest . MediumTypeName = mediumTypeName ;
2019-09-19 16:39:32 +01:00
mediaTest . Model = mediumModel ;
2018-11-25 19:13:21 +00:00
mediaTests . Add ( mediaTest ) ;
}
2018-11-27 01:42:25 +00:00
report . ATA . RemovableMedias = mediaTests ;
2018-11-25 19:13:21 +00:00
}
2019-09-19 16:39:32 +01:00
else
{
report . ATA . ReadCapabilities = reporter . ReportAta ( report . ATA . IdentifyDevice . Value ) ;
}
2018-11-25 19:13:21 +00:00
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
break ;
2018-11-25 19:13:21 +00:00
}
2019-04-30 19:55:52 +01:00
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
case DeviceType . MMC :
2018-11-25 18:51:16 +00:00
report . MultiMediaCard = reporter . MmcSdReport ( ) ;
break ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
case DeviceType . SecureDigital :
2018-11-25 18:51:16 +00:00
report . SecureDigital = reporter . MmcSdReport ( ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
break ;
2018-11-25 20:08:28 +00:00
case DeviceType . NVMe : throw new NotImplementedException ( "NVMe devices not yet supported." ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
case DeviceType . ATAPI :
2018-11-25 19:17:21 +00:00
DicConsole . WriteLine ( "Querying ATAPI IDENTIFY..." ) ;
dev . AtapiIdentify ( out buffer , out _ , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( Identify . Decode ( buffer ) . HasValue )
2019-01-08 20:40:09 +00:00
report . ATAPI = new Ata { Identify = DeviceReport . ClearIdentify ( buffer ) } ;
2018-11-25 19:17:21 +00:00
goto case DeviceType . SCSI ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
case DeviceType . SCSI :
2019-09-19 16:39:32 +01:00
if ( ! dev . IsUsb & & ! dev . IsFireWire & & dev . IsRemovable )
2018-11-25 20:08:28 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:08:28 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Is the media removable from the reading/writing elements (flash memories ARE NOT removable)? (Y/N): " ) ;
2018-11-25 20:08:28 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
removable = pressedKey . Key = = ConsoleKey . Y ;
}
2019-09-19 16:39:32 +01:00
if ( removable )
2018-11-25 20:08:28 +00:00
{
2019-09-19 16:39:32 +01:00
switch ( dev . ScsiType )
2018-11-25 20:08:28 +00:00
{
case PeripheralDeviceTypes . MultiMediaDevice :
dev . AllowMediumRemoval ( out buffer , dev . Timeout , out _ ) ;
dev . EjectTray ( out buffer , dev . Timeout , out _ ) ;
break ;
case PeripheralDeviceTypes . SequentialAccess :
dev . SpcAllowMediumRemoval ( out buffer , dev . Timeout , out _ ) ;
DicConsole . WriteLine ( "Asking drive to unload tape (can take a few minutes)..." ) ;
dev . Unload ( out buffer , dev . Timeout , out _ ) ;
break ;
}
DicConsole
2019-09-19 16:39:32 +01:00
. WriteLine ( "Please remove any media from the device and press any key when it is out." ) ;
2018-11-25 20:08:28 +00:00
System . Console . ReadKey ( true ) ;
}
report . SCSI = reporter . ReportScsiInquiry ( ) ;
2019-09-19 16:39:32 +01:00
if ( report . SCSI = = null ) break ;
2018-11-25 20:08:28 +00:00
2018-12-25 14:48:00 +00:00
report . SCSI . EVPDPages =
reporter . ReportEvpdPages ( StringHandlers
2019-09-19 16:39:32 +01:00
. CToString ( report . SCSI . Inquiry ? . VendorIdentification ) ? . Trim ( )
. ToLowerInvariant ( ) ) ;
2018-11-25 20:08:28 +00:00
2018-12-23 21:38:01 +00:00
reporter . ReportScsiModes ( ref report , out byte [ ] cdromMode ) ;
2018-11-25 20:08:28 +00:00
2018-11-25 22:15:38 +00:00
string mediumManufacturer ;
byte [ ] senseBuffer ;
2019-09-19 16:39:32 +01:00
bool sense ;
2018-11-25 20:08:28 +00:00
2019-09-19 16:39:32 +01:00
switch ( dev . ScsiType )
2018-11-25 20:08:28 +00:00
{
case PeripheralDeviceTypes . MultiMediaDevice :
2018-11-25 22:15:38 +00:00
{
2019-07-13 13:55:24 +01:00
bool iomegaRev = dev . Manufacturer . ToLowerInvariant ( ) = = "iomega" & &
2019-09-19 16:39:32 +01:00
dev . Model . ToLowerInvariant ( ) . StartsWith ( "rrd" ) ;
2019-07-13 13:55:24 +01:00
2018-11-25 22:15:38 +00:00
List < string > mediaTypes = new List < string > ( ) ;
report . SCSI . MultiMediaDevice = new Mmc
{
2018-12-23 21:38:01 +00:00
ModeSense2AData = cdromMode , Features = reporter . ReportMmcFeatures ( )
2018-11-25 22:15:38 +00:00
} ;
2019-09-19 16:39:32 +01:00
if ( cdromMode ! = null & & ! iomegaRev )
2018-11-25 22:15:38 +00:00
{
mediaTypes . Add ( "CD-ROM" ) ;
mediaTypes . Add ( "Audio CD" ) ;
2019-01-02 22:27:02 +00:00
mediaTypes . Add ( "Enhanced CD (aka E-CD, CD-Plus or CD+)" ) ;
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . ModeSense2A . ReadCDR ) mediaTypes . Add ( "CD-R" ) ;
if ( report . SCSI . MultiMediaDevice . ModeSense2A . ReadCDRW )
2018-12-25 14:08:02 +00:00
{
mediaTypes . Add ( "CD-RW Ultra Speed (marked 16x or higher)" ) ;
mediaTypes . Add ( "CD-RW High Speed (marked between 8x and 12x)" ) ;
mediaTypes . Add ( "CD-RW (marked 4x or lower)" ) ;
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . ModeSense2A . ReadDVDROM ) mediaTypes . Add ( "DVD-ROM" ) ;
if ( report . SCSI . MultiMediaDevice . ModeSense2A . ReadDVDRAM )
2019-01-02 05:26:45 +00:00
{
mediaTypes . Add ( "DVD-RAM (1st gen, marked 2.6Gb or 5.2Gb)" ) ;
mediaTypes . Add ( "DVD-RAM (2nd gen, marked 4.7Gb or 9.4Gb)" ) ;
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . ModeSense2A . ReadDVDR ) mediaTypes . Add ( "DVD-R" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features ! = null & & ! iomegaRev )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadBD | |
report . SCSI . MultiMediaDevice . Features . CanReadBDR | |
report . SCSI . MultiMediaDevice . Features . CanReadBDRE1 | |
report . SCSI . MultiMediaDevice . Features . CanReadBDRE2 | |
report . SCSI . MultiMediaDevice . Features . CanReadBDROM | |
report . SCSI . MultiMediaDevice . Features . CanReadOldBDR | |
report . SCSI . MultiMediaDevice . Features . CanReadOldBDRE | |
report . SCSI . MultiMediaDevice . Features . CanReadOldBDROM )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "BD-ROM" ) ) mediaTypes . Add ( "BD-ROM" ) ;
if ( ! mediaTypes . Contains ( "BD-R HTL (not LTH)" ) )
mediaTypes . Add ( "BD-R HTL (not LTH)" ) ;
if ( ! mediaTypes . Contains ( "BD-RE" ) ) mediaTypes . Add ( "BD-RE" ) ;
if ( ! mediaTypes . Contains ( "BD-R LTH" ) ) mediaTypes . Add ( "BD-R LTH" ) ;
if ( ! mediaTypes . Contains ( "BD-R Triple Layer (100Gb)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "BD-R Triple Layer (100Gb)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "BD-R Quad Layer (128Gb)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "BD-R Quad Layer (128Gb)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "Ultra HD Blu-ray movie" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "Ultra HD Blu-ray movie" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "PlayStation 3 game" ) )
mediaTypes . Add ( "PlayStation 3 game" ) ;
if ( ! mediaTypes . Contains ( "PlayStation 4 game" ) )
mediaTypes . Add ( "PlayStation 4 game" ) ;
if ( ! mediaTypes . Contains ( "Xbox One game" ) ) mediaTypes . Add ( "Xbox One game" ) ;
if ( ! mediaTypes . Contains ( "Nintendo Wii U game" ) )
2019-01-07 13:26:46 +00:00
mediaTypes . Add ( "Nintendo Wii U game" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadCD | |
report . SCSI . MultiMediaDevice . Features . MultiRead )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-ROM" ) ) mediaTypes . Add ( "CD-ROM" ) ;
if ( ! mediaTypes . Contains ( "Audio CD" ) ) mediaTypes . Add ( "Audio CD" ) ;
if ( ! mediaTypes . Contains ( "Enhanced CD (aka E-CD, CD-Plus or CD+)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "Enhanced CD (aka E-CD, CD-Plus or CD+)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-R" ) ) mediaTypes . Add ( "CD-R" ) ;
if ( ! mediaTypes . Contains ( "CD-RW Ultra Speed (marked 16x or higher)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW Ultra Speed (marked 16x or higher)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-RW High Speed (marked between 8x and 12x)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW High Speed (marked between 8x and 12x)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-RW (marked 4x or lower)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW (marked 4x or lower)" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadCDMRW )
if ( ! mediaTypes . Contains ( "CD-MRW" ) )
2018-11-25 22:15:38 +00:00
mediaTypes . Add ( "CD-MRW" ) ;
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadDDCD )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "DDCD-ROM" ) ) mediaTypes . Add ( "DDCD-ROM" ) ;
if ( ! mediaTypes . Contains ( "DDCD-R" ) ) mediaTypes . Add ( "DDCD-R" ) ;
if ( ! mediaTypes . Contains ( "DDCD-RW" ) ) mediaTypes . Add ( "DDCD-RW" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadDVD | |
report . SCSI . MultiMediaDevice . Features . DVDMultiRead | |
report . SCSI . MultiMediaDevice . Features . CanReadDVDPlusR | |
report . SCSI . MultiMediaDevice . Features . CanReadDVDPlusRDL | |
report . SCSI . MultiMediaDevice . Features . CanReadDVDPlusRW | |
report . SCSI . MultiMediaDevice . Features . CanReadDVDPlusRWDL )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "DVD-ROM" ) ) mediaTypes . Add ( "DVD-ROM" ) ;
if ( ! mediaTypes . Contains ( "DVD-R" ) ) mediaTypes . Add ( "DVD-R" ) ;
if ( ! mediaTypes . Contains ( "DVD-RW" ) ) mediaTypes . Add ( "DVD-RW" ) ;
if ( ! mediaTypes . Contains ( "DVD+R" ) ) mediaTypes . Add ( "DVD+R" ) ;
if ( ! mediaTypes . Contains ( "DVD+RW" ) ) mediaTypes . Add ( "DVD+RW" ) ;
if ( ! mediaTypes . Contains ( "DVD-R DL" ) ) mediaTypes . Add ( "DVD-R DL" ) ;
if ( ! mediaTypes . Contains ( "DVD+R DL" ) ) mediaTypes . Add ( "DVD+R DL" ) ;
if ( ! mediaTypes . Contains ( "Nintendo GameCube game" ) )
2019-01-07 13:26:46 +00:00
mediaTypes . Add ( "Nintendo GameCube game" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "Nintendo Wii game" ) ) mediaTypes . Add ( "Nintendo Wii game" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadDVDPlusMRW )
if ( ! mediaTypes . Contains ( "DVD+MRW" ) )
2018-11-25 22:15:38 +00:00
mediaTypes . Add ( "DVD+MRW" ) ;
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadHDDVD | |
report . SCSI . MultiMediaDevice . Features . CanReadHDDVDR )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "HD DVD-ROM" ) ) mediaTypes . Add ( "HD DVD-ROM" ) ;
if ( ! mediaTypes . Contains ( "HD DVD-R" ) ) mediaTypes . Add ( "HD DVD-R" ) ;
if ( ! mediaTypes . Contains ( "HD DVD-RW" ) ) mediaTypes . Add ( "HD DVD-RW" ) ;
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
if ( report . SCSI . MultiMediaDevice . Features . CanReadHDDVDRAM )
if ( ! mediaTypes . Contains ( "HD DVD-RAM" ) )
2018-11-25 22:15:38 +00:00
mediaTypes . Add ( "HD DVD-RAM" ) ;
}
2019-09-19 16:39:32 +01:00
if ( iomegaRev )
2019-07-13 13:55:24 +01:00
{
mediaTypes . Add ( "REV 35Gb" ) ;
mediaTypes . Add ( "REV 70Gb" ) ;
mediaTypes . Add ( "REV 120Gb" ) ;
}
2018-11-25 22:15:38 +00:00
// Very old CD drives do not contain mode page 2Ah neither GET CONFIGURATION, so just try all CDs on them
// Also don't get confident, some drives didn't know CD-RW but are able to read them
2019-09-19 16:39:32 +01:00
if ( mediaTypes . Count = = 0 | | mediaTypes . Contains ( "CD-ROM" ) )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-ROM" ) ) mediaTypes . Add ( "CD-ROM" ) ;
if ( ! mediaTypes . Contains ( "Audio CD" ) ) mediaTypes . Add ( "Audio CD" ) ;
if ( ! mediaTypes . Contains ( "CD-R" ) ) mediaTypes . Add ( "CD-R" ) ;
if ( ! mediaTypes . Contains ( "CD-RW Ultra Speed (marked 16x or higher)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW Ultra Speed (marked 16x or higher)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-RW High Speed (marked between 8x and 12x)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW High Speed (marked between 8x and 12x)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "CD-RW (marked 4x or lower)" ) )
2018-12-25 14:08:02 +00:00
mediaTypes . Add ( "CD-RW (marked 4x or lower)" ) ;
2019-09-19 16:39:32 +01:00
if ( ! mediaTypes . Contains ( "Enhanced CD (aka E-CD, CD-Plus or CD+)" ) )
2019-01-02 22:27:02 +00:00
mediaTypes . Add ( "Enhanced CD (aka E-CD, CD-Plus or CD+)" ) ;
2018-11-25 22:15:38 +00:00
}
mediaTypes . Sort ( ) ;
bool tryPlextor = false , tryHldtst = false , tryPioneer = false , tryNec = false ;
tryPlextor | = dev . Manufacturer . ToLowerInvariant ( ) = = "plextor" ;
2019-09-19 16:39:32 +01:00
tryHldtst | = dev . Manufacturer . ToLowerInvariant ( ) = = "hl-dt-st" ;
2018-11-25 22:15:38 +00:00
tryPioneer | = dev . Manufacturer . ToLowerInvariant ( ) = = "pioneer" ;
2019-09-19 16:39:32 +01:00
tryNec | = dev . Manufacturer . ToLowerInvariant ( ) = = "nec" ;
2018-11-25 22:15:38 +00:00
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug & & ! iomegaRev )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( ! tryPlextor )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Do you have want to try Plextor vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): " ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
tryPlextor | = pressedKey . Key = = ConsoleKey . Y ;
}
2019-09-19 16:39:32 +01:00
if ( ! tryNec )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Do you have want to try NEC vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): " ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
tryNec | = pressedKey . Key = = ConsoleKey . Y ;
}
2019-09-19 16:39:32 +01:00
if ( ! tryPioneer )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Do you have want to try Pioneer vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): " ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
tryPioneer | = pressedKey . Key = = ConsoleKey . Y ;
}
2019-09-19 16:39:32 +01:00
if ( ! tryHldtst )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Do you have want to try HL-DT-ST (aka LG) vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): " ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
tryHldtst | = pressedKey . Key = = ConsoleKey . Y ;
}
}
2019-09-19 16:39:32 +01:00
if ( dev . Model . StartsWith ( "PD-" , StringComparison . Ordinal ) ) mediaTypes . Add ( "PD-650" ) ;
2019-05-16 23:29:54 +01:00
2018-11-25 22:15:38 +00:00
List < TestedMedia > mediaTests = new List < TestedMedia > ( ) ;
2019-09-19 16:39:32 +01:00
foreach ( string mediaType in mediaTypes )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole . Write ( "Do you have a {0} disc that you can insert in the drive? (Y/N): " ,
2019-09-19 16:39:32 +01:00
mediaType ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key ! = ConsoleKey . Y ) continue ;
2018-11-25 22:15:38 +00:00
dev . AllowMediumRemoval ( out senseBuffer , dev . Timeout , out _ ) ;
dev . EjectTray ( out senseBuffer , dev . Timeout , out _ ) ;
DicConsole
2019-09-19 16:39:32 +01:00
. WriteLine ( "Please insert it in the drive and press any key when it is ready." ) ;
2018-11-25 22:15:38 +00:00
System . Console . ReadKey ( true ) ;
bool mediaIsRecognized = true ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( sense )
2018-11-25 22:15:38 +00:00
{
FixedSense ? decSense = Sense . DecodeFixed ( senseBuffer ) ;
2019-09-19 16:39:32 +01:00
if ( decSense . HasValue )
{
if ( decSense . Value . ASC = = 0x3A )
2018-11-25 22:15:38 +00:00
{
2019-04-30 19:06:04 +01:00
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 22:15:38 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 22:15:38 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
2019-09-19 16:39:32 +01:00
else if ( decSense . Value . ASC = = 0x04 & & decSense . Value . ASCQ = = 0x01 )
2018-11-25 22:15:38 +00:00
{
2019-04-30 19:06:04 +01:00
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 22:15:38 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 22:15:38 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
// These should be trapped by the OS but seems in some cases they're not
2019-09-19 16:39:32 +01:00
else if ( decSense . Value . ASC = = 0x28 )
2018-11-25 22:15:38 +00:00
{
2019-04-30 19:06:04 +01:00
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 22:15:38 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 22:15:38 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
2019-04-30 19:55:52 +01:00
else
{
DicConsole . DebugWriteLine ( "Device-Report command" ,
2019-09-19 16:39:32 +01:00
"Device not ready. Sense {0}h ASC {1:X2}h ASCQ {2:X2}h" ,
decSense . Value . SenseKey , decSense . Value . ASC ,
decSense . Value . ASCQ ) ;
2019-04-30 19:55:52 +01:00
mediaIsRecognized = false ;
}
2019-09-19 16:39:32 +01:00
}
2019-04-30 19:55:52 +01:00
else
{
DicConsole . DebugWriteLine ( "Device-Report command" ,
2019-09-19 16:39:32 +01:00
"Got sense status but no sense buffer" ) ;
2019-04-30 19:55:52 +01:00
mediaIsRecognized = false ;
}
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
var mediaTest = new TestedMedia ( ) ;
if ( mediaIsRecognized )
2018-11-25 22:15:38 +00:00
{
mediaTest = reporter . ReportMmcMedia ( mediaType , tryPlextor , tryPioneer , tryNec ,
2019-09-19 16:39:32 +01:00
tryHldtst ) ;
2018-11-25 22:15:38 +00:00
2019-09-19 16:39:32 +01:00
if ( mediaTest is null ) continue ;
2019-01-02 22:27:02 +00:00
2019-09-19 16:39:32 +01:00
if ( mediaTest . SupportsReadLong = = true & &
mediaTest . LongBlockSize = = mediaTest . BlockSize )
2018-11-25 22:15:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 22:15:38 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): " ) ;
2018-11-25 22:15:38 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key = = ConsoleKey . Y )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
for ( ushort i = ( ushort ) mediaTest . BlockSize ; ; i + + )
2018-11-25 22:15:38 +00:00
{
DicConsole . Write ( "\rTrying to READ LONG with a size of {0} bytes..." ,
2019-09-19 16:39:32 +01:00
i ) ;
2018-11-25 22:15:38 +00:00
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 , i ,
2019-09-19 16:39:32 +01:00
dev . Timeout , out _ ) ;
if ( ! sense )
2018-11-25 22:15:38 +00:00
{
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug ) mediaTest . ReadLong10Data = buffer ;
2018-11-25 22:15:38 +00:00
mediaTest . LongBlockSize = i ;
break ;
}
2019-09-19 16:39:32 +01:00
if ( i = = ushort . MaxValue ) break ;
2018-11-25 22:15:38 +00:00
}
DicConsole . WriteLine ( ) ;
}
}
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug & & mediaTest . SupportsReadLong = = true & &
mediaTest . LongBlockSize ! = mediaTest . BlockSize )
2018-11-25 22:15:38 +00:00
{
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 ,
2019-09-19 16:39:32 +01:00
( ushort ) mediaTest . LongBlockSize , dev . Timeout , out _ ) ;
if ( ! sense ) mediaTest . ReadLong10Data = buffer ;
2018-11-25 22:15:38 +00:00
}
2018-12-26 01:15:30 +00:00
// TODO: READ LONG (16)
2018-11-25 22:15:38 +00:00
}
2019-09-19 16:39:32 +01:00
mediaTest . MediumTypeName = mediaType ;
2018-11-25 22:15:38 +00:00
mediaTest . MediaIsRecognized = mediaIsRecognized ;
mediaTests . Add ( mediaTest ) ;
2019-04-30 19:07:53 +01:00
dev . AllowMediumRemoval ( out buffer , dev . Timeout , out _ ) ;
dev . EjectTray ( out buffer , dev . Timeout , out _ ) ;
2018-11-25 22:15:38 +00:00
}
2018-11-27 01:42:25 +00:00
report . SCSI . MultiMediaDevice . TestedMedia = mediaTests ;
2018-11-25 22:15:38 +00:00
}
2018-11-25 20:08:28 +00:00
break ;
case PeripheralDeviceTypes . SequentialAccess :
2018-11-25 22:15:38 +00:00
{
2018-11-25 20:27:38 +00:00
report . SCSI . SequentialDevice = reporter . ReportScsiSsc ( ) ;
List < TestedSequentialMedia > seqTests = new List < TestedSequentialMedia > ( ) ;
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:27:38 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:27:38 +00:00
{
DicConsole . Write ( "Do you have media that you can insert in the drive? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key ! = ConsoleKey . Y ) continue ;
2018-11-25 20:27:38 +00:00
DicConsole
2019-09-19 16:39:32 +01:00
. WriteLine ( "Please insert it in the drive and press any key when it is ready." ) ;
2018-11-25 20:27:38 +00:00
System . Console . ReadKey ( true ) ;
DicConsole . Write ( "Please write a description of the media type and press enter: " ) ;
mediumTypeName = System . Console . ReadLine ( ) ;
DicConsole . Write ( "Please write the media manufacturer and press enter: " ) ;
mediumManufacturer = System . Console . ReadLine ( ) ;
DicConsole . Write ( "Please write the media model and press enter: " ) ;
mediumModel = System . Console . ReadLine ( ) ;
bool mediaIsRecognized = true ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-04-30 19:55:52 +01:00
DicConsole . DebugWriteLine ( "Device reporting" , "sense = {0}" , sense ) ;
2019-09-19 16:39:32 +01:00
if ( sense )
2018-11-25 20:27:38 +00:00
{
FixedSense ? decSense = Sense . DecodeFixed ( senseBuffer ) ;
2019-09-19 16:39:32 +01:00
if ( decSense . HasValue )
{
if ( decSense . Value . ASC = = 0x3A )
2018-11-25 20:27:38 +00:00
{
2019-04-30 19:06:04 +01:00
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 20:27:38 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 20:27:38 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
2019-09-19 16:39:32 +01:00
else if ( decSense . Value . ASC = = 0x04 & & decSense . Value . ASCQ = = 0x01 )
2018-11-25 20:27:38 +00:00
{
2019-04-30 19:06:04 +01:00
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 20:27:38 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 20:27:38 +00:00
leftRetries - - ;
}
2019-04-30 20:07:10 +01:00
mediaIsRecognized & = ! sense ;
}
// These should be trapped by the OS but seems in some cases they're not
2019-09-19 16:39:32 +01:00
else if ( decSense . Value . ASC = = 0x28 )
2019-04-30 20:07:10 +01:00
{
int leftRetries = 50 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2019-04-30 20:07:10 +01:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2019-04-30 20:07:10 +01:00
leftRetries - - ;
}
2018-11-25 20:27:38 +00:00
mediaIsRecognized & = ! sense ;
}
2019-04-30 19:55:52 +01:00
else
{
DicConsole . DebugWriteLine ( "Device-Report command" ,
2019-09-19 16:39:32 +01:00
"Device not ready. Sense {0} ASC {1:X2}h ASCQ {2:X2}h" ,
decSense . Value . SenseKey , decSense . Value . ASC ,
decSense . Value . ASCQ ) ;
2019-04-30 19:55:52 +01:00
mediaIsRecognized = false ;
}
2019-09-19 16:39:32 +01:00
}
2019-04-30 19:55:52 +01:00
else
{
DicConsole . DebugWriteLine ( "Device-Report command" ,
2019-09-19 16:39:32 +01:00
"Got sense status but no sense buffer" ) ;
2019-04-30 19:55:52 +01:00
mediaIsRecognized = false ;
}
2018-11-25 20:27:38 +00:00
}
2019-09-19 16:39:32 +01:00
var seqTest = new TestedSequentialMedia ( ) ;
2018-11-25 20:27:38 +00:00
2019-09-19 16:39:32 +01:00
if ( mediaIsRecognized ) seqTest = reporter . ReportSscMedia ( ) ;
2018-11-25 20:27:38 +00:00
2019-09-19 16:39:32 +01:00
seqTest . MediumTypeName = mediumTypeName ;
seqTest . Manufacturer = mediumManufacturer ;
seqTest . Model = mediumModel ;
2018-11-25 22:15:38 +00:00
seqTest . MediaIsRecognized = mediaIsRecognized ;
2018-11-25 20:27:38 +00:00
seqTests . Add ( seqTest ) ;
2019-04-30 19:07:53 +01:00
dev . SpcAllowMediumRemoval ( out buffer , dev . Timeout , out _ ) ;
DicConsole . WriteLine ( "Asking drive to unload tape (can take a few minutes)..." ) ;
dev . Unload ( out buffer , dev . Timeout , out _ ) ;
2018-11-25 20:27:38 +00:00
}
2018-11-27 01:42:25 +00:00
report . SCSI . SequentialDevice . TestedMedia = seqTests ;
2018-11-25 22:15:38 +00:00
}
2018-11-25 20:08:28 +00:00
break ;
default :
{
2019-09-19 16:39:32 +01:00
if ( removable )
2018-11-25 20:08:28 +00:00
{
List < TestedMedia > mediaTests = new List < TestedMedia > ( ) ;
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:08:28 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:08:28 +00:00
{
DicConsole . Write ( "Do you have media that you can insert in the drive? (Y/N): " ) ;
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key ! = ConsoleKey . Y ) continue ;
2018-11-25 20:08:28 +00:00
DicConsole
2019-09-19 16:39:32 +01:00
. WriteLine ( "Please insert it in the drive and press any key when it is ready." ) ;
2018-11-25 20:08:28 +00:00
System . Console . ReadKey ( true ) ;
DicConsole . Write ( "Please write a description of the media type and press enter: " ) ;
2018-11-25 20:27:38 +00:00
mediumTypeName = System . Console . ReadLine ( ) ;
2018-11-25 20:08:28 +00:00
DicConsole . Write ( "Please write the media manufacturer and press enter: " ) ;
2018-11-25 20:27:38 +00:00
mediumManufacturer = System . Console . ReadLine ( ) ;
2018-11-25 20:08:28 +00:00
DicConsole . Write ( "Please write the media model and press enter: " ) ;
2018-11-25 20:27:38 +00:00
mediumModel = System . Console . ReadLine ( ) ;
2018-11-25 20:08:28 +00:00
bool mediaIsRecognized = true ;
2018-11-25 20:27:38 +00:00
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( sense )
2018-11-25 20:08:28 +00:00
{
FixedSense ? decSense = Sense . DecodeFixed ( senseBuffer ) ;
2019-09-19 16:39:32 +01:00
if ( decSense . HasValue )
if ( decSense . Value . ASC = = 0x3A )
2018-11-25 20:08:28 +00:00
{
int leftRetries = 20 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 20:08:28 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 20:08:28 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
2019-09-19 16:39:32 +01:00
else if ( decSense . Value . ASC = = 0x04 & & decSense . Value . ASCQ = = 0x01 )
2018-11-25 20:08:28 +00:00
{
int leftRetries = 20 ;
2019-09-19 16:39:32 +01:00
while ( leftRetries > 0 )
2018-11-25 20:08:28 +00:00
{
DicConsole . Write ( "\rWaiting for drive to become ready" ) ;
Thread . Sleep ( 2000 ) ;
sense = dev . ScsiTestUnitReady ( out senseBuffer , dev . Timeout , out _ ) ;
2019-09-19 16:39:32 +01:00
if ( ! sense ) break ;
2018-11-25 20:08:28 +00:00
leftRetries - - ;
}
mediaIsRecognized & = ! sense ;
}
2019-09-19 16:39:32 +01:00
else
{
mediaIsRecognized = false ;
}
2018-11-25 20:08:28 +00:00
else mediaIsRecognized = false ;
}
2019-09-19 16:39:32 +01:00
var mediaTest = new TestedMedia ( ) ;
2018-11-25 20:08:28 +00:00
2019-09-19 16:39:32 +01:00
if ( mediaIsRecognized )
2018-11-25 20:08:28 +00:00
{
mediaTest = reporter . ReportScsiMedia ( ) ;
2019-09-19 16:39:32 +01:00
if ( mediaTest . SupportsReadLong = = true & &
mediaTest . LongBlockSize = = mediaTest . BlockSize )
2018-11-25 20:08:28 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:08:28 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): " ) ;
2018-11-25 20:08:28 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key = = ConsoleKey . Y )
2018-11-25 20:08:28 +00:00
{
2019-09-19 16:39:32 +01:00
for ( ushort i = ( ushort ) mediaTest . BlockSize ; ; i + + )
2018-11-25 20:08:28 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write ( "\rTrying to READ LONG with a size of {0} bytes..." , i ) ;
2018-11-25 20:08:28 +00:00
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 ,
2019-09-19 16:39:32 +01:00
i , dev . Timeout , out _ ) ;
if ( ! sense )
2018-11-25 20:08:28 +00:00
{
mediaTest . LongBlockSize = i ;
break ;
}
2019-09-19 16:39:32 +01:00
if ( i = = ushort . MaxValue ) break ;
2018-11-25 20:08:28 +00:00
}
DicConsole . WriteLine ( ) ;
}
}
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug & & mediaTest . SupportsReadLong = = true & &
mediaTest . LongBlockSize ! = mediaTest . BlockSize )
2018-11-25 20:08:28 +00:00
{
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 ,
2019-09-19 16:39:32 +01:00
( ushort ) mediaTest . LongBlockSize , dev . Timeout , out _ ) ;
if ( ! sense ) mediaTest . ReadLong10Data = buffer ;
2018-11-25 20:08:28 +00:00
}
}
2019-09-19 16:39:32 +01:00
mediaTest . MediumTypeName = mediumTypeName ;
mediaTest . Manufacturer = mediumManufacturer ;
mediaTest . Model = mediumModel ;
2018-11-25 22:15:38 +00:00
mediaTest . MediaIsRecognized = mediaIsRecognized ;
2018-11-25 20:08:28 +00:00
mediaTests . Add ( mediaTest ) ;
}
2018-11-27 01:42:25 +00:00
report . SCSI . RemovableMedias = mediaTests ;
2018-11-25 20:08:28 +00:00
}
else
{
report . SCSI . ReadCapabilities = reporter . ReportScsi ( ) ;
2019-09-19 16:39:32 +01:00
if ( report . SCSI . ReadCapabilities . SupportsReadLong = = true & &
report . SCSI . ReadCapabilities . LongBlockSize = =
report . SCSI . ReadCapabilities . BlockSize )
2018-11-25 20:08:28 +00:00
{
pressedKey = new ConsoleKeyInfo ( ) ;
2019-09-19 16:39:32 +01:00
while ( pressedKey . Key ! = ConsoleKey . Y & & pressedKey . Key ! = ConsoleKey . N )
2018-11-25 20:08:28 +00:00
{
DicConsole
2019-09-19 16:39:32 +01:00
. Write (
"Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): " ) ;
2018-11-25 20:08:28 +00:00
pressedKey = System . Console . ReadKey ( ) ;
DicConsole . WriteLine ( ) ;
}
2019-09-19 16:39:32 +01:00
if ( pressedKey . Key = = ConsoleKey . Y )
2018-11-25 20:08:28 +00:00
{
2019-09-19 16:39:32 +01:00
for ( ushort i = ( ushort ) report . SCSI . ReadCapabilities . BlockSize ; ; i + + )
2018-11-25 20:08:28 +00:00
{
DicConsole . Write ( "\rTrying to READ LONG with a size of {0} bytes..." , i ) ;
2018-11-25 20:27:38 +00:00
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 , i ,
2019-09-19 16:39:32 +01:00
dev . Timeout , out _ ) ;
if ( ! sense )
2018-11-25 20:08:28 +00:00
{
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug )
2019-01-05 16:59:23 +00:00
report . SCSI . ReadCapabilities . ReadLong10Data = buffer ;
2018-11-25 20:08:28 +00:00
report . SCSI . ReadCapabilities . LongBlockSize = i ;
break ;
}
2019-09-19 16:39:32 +01:00
if ( i = = ushort . MaxValue ) break ;
2018-11-25 20:08:28 +00:00
}
DicConsole . WriteLine ( ) ;
}
}
2019-09-19 16:39:32 +01:00
if ( MainClass . Debug & & report . SCSI . ReadCapabilities . SupportsReadLong = = true & &
report . SCSI . ReadCapabilities . LongBlockSize ! =
report . SCSI . ReadCapabilities . BlockSize )
2018-11-25 20:08:28 +00:00
{
2018-11-25 20:27:38 +00:00
sense = dev . ReadLong10 ( out buffer , out senseBuffer , false , false , 0 ,
2019-09-19 16:39:32 +01:00
( ushort ) report . SCSI . ReadCapabilities . LongBlockSize ,
dev . Timeout , out _ ) ;
if ( ! sense ) report . SCSI . ReadCapabilities . ReadLong10Data = buffer ;
2018-11-25 20:08:28 +00:00
}
}
break ;
}
}
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
break ;
2017-12-19 20:33:03 +00:00
default : throw new NotSupportedException ( "Unknown device type." ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
}
* commandline:
* DiscImageChef.Settings/Settings.cs:
* DiscImageChef.Settings/docs/README.txt:
* DiscImageChef.Settings/packages.config:
* DiscImageChef.Settings/docs/LICENSE.txt:
* DiscImageChef.Settings/docs/ChangeLog.txt:
* DiscImageChef.Settings/docs/mono/index.xml:
* DiscImageChef.Settings/docs/html/index.html:
* DiscImageChef.Settings/Properties/AssemblyInfo.cs:
* DiscImageChef.Settings/DiscImageChef.Settings.csproj:
* DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html:
Added supports for settings
* DiscImageChef/Commands/Configure.cs:
Added support for settings.
* DiscImageChef/Core/Statistics.cs:
* DiscImageChef/Commands/Verify.cs:
* DiscImageChef/Commands/Entropy.cs:
* DiscImageChef/Commands/Formats.cs:
* DiscImageChef/Commands/PrintHex.cs:
* DiscImageChef/Commands/MediaInfo.cs:
* DiscImageChef/Commands/Statistics.cs:
Added statistics.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
Corrected bug on inquiry decoding.
* DiscImageChef.Decoders/SCSI/Modes.cs:
Corrected bug on decoding mode page 2Ah without write
performance descriptors.
Corrected bug when there is a vendor page 0 in mode sense
decoding.
* DiscImageChef.Devices/Device/Constructor.cs:
Corrected detecting USB or FireWire attached CD/DVD/BD and
tape drives.
Try ATA identify on USB or FireWire that don't have SCSI
INQUIRY.
* DiscImageChef.DiscImages/CDRWin.cs:
Corrected CD-ROM XA vs CD-ROM detection.
* DiscImageChef.Partitions/AppleMap.cs:
Corrected big endian working.
Added debug output.
* DiscImageChef.sln:
Added supports for settings.
* DiscImageChef/Commands/Decode.cs:
* DiscImageChef/Commands/Analyze.cs:
* DiscImageChef/Commands/Compare.cs:
* DiscImageChef/Commands/Checksum.cs:
* DiscImageChef/Commands/Benchmark.cs:
* DiscImageChef/Commands/DeviceInfo.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Added statistics.
* DiscImageChef/Commands/DeviceReport.cs:
Added statistics.
Correct handling empty inquiry string fields.
Suppose it is not removable, til proved wrong.
Corrected MODE SENSE (6/10) detection and calling order.
If device is MMC type but reports neither mode page 2Ah
neither GET CONFIGURATION, try all CDs (old drives work like
that).
Try reading Lead-In and Lead-Out in Audio CD using Audio READ
CD commands.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Added support for DVD raw block (37856 bytes).
Check READ LONG up to 36 times the cooked block size. That
should be enough to detect huge blocked media (like DVD and
BD) without taking ages.
If READ LONG size had to be bruteforced, and debug is
activated, save the result.
* DiscImageChef/Commands/DumpMedia.cs:
Added statistics.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/Commands/MediaScan.cs:
Added statistics.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/DiscImageChef.csproj:
Added support for settings.
Added statistics.
* DiscImageChef/Main.cs:
* DiscImageChef/Options.cs:
Added support for settings.
Added statistics.
2016-02-03 18:58:11 +00:00
2019-09-19 16:39:32 +01:00
FileStream jsonFs = new FileStream ( jsonFile , FileMode . Create ) ;
2018-11-25 17:47:14 +00:00
StreamWriter jsonSw = new StreamWriter ( jsonFs ) ;
jsonSw . Write ( JsonConvert . SerializeObject ( report , Formatting . Indented ,
2019-09-19 16:39:32 +01:00
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling . Ignore
} ) ) ;
2018-11-25 17:47:14 +00:00
jsonSw . Close ( ) ;
jsonFs . Close ( ) ;
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
2019-09-19 16:39:32 +01:00
using ( var ctx = DicContext . Create ( Settings . Settings . LocalDbPath ) )
2018-11-27 01:42:38 +00:00
{
ctx . Reports . Add ( new Report ( report ) ) ;
ctx . SaveChanges ( ) ;
}
2018-11-25 17:47:14 +00:00
// TODO:
2019-09-19 16:39:32 +01:00
if ( Settings . Settings . Current . ShareReports ) Remote . SubmitReport ( report ) ;
return ( int ) ErrorNumber . NoError ;
* commandline:
* DiscImageChef.Settings/Settings.cs:
* DiscImageChef.Settings/docs/README.txt:
* DiscImageChef.Settings/packages.config:
* DiscImageChef.Settings/docs/LICENSE.txt:
* DiscImageChef.Settings/docs/ChangeLog.txt:
* DiscImageChef.Settings/docs/mono/index.xml:
* DiscImageChef.Settings/docs/html/index.html:
* DiscImageChef.Settings/Properties/AssemblyInfo.cs:
* DiscImageChef.Settings/DiscImageChef.Settings.csproj:
* DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html:
* DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml:
* DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html:
Added supports for settings
* DiscImageChef/Commands/Configure.cs:
Added support for settings.
* DiscImageChef/Core/Statistics.cs:
* DiscImageChef/Commands/Verify.cs:
* DiscImageChef/Commands/Entropy.cs:
* DiscImageChef/Commands/Formats.cs:
* DiscImageChef/Commands/PrintHex.cs:
* DiscImageChef/Commands/MediaInfo.cs:
* DiscImageChef/Commands/Statistics.cs:
Added statistics.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
Corrected bug on inquiry decoding.
* DiscImageChef.Decoders/SCSI/Modes.cs:
Corrected bug on decoding mode page 2Ah without write
performance descriptors.
Corrected bug when there is a vendor page 0 in mode sense
decoding.
* DiscImageChef.Devices/Device/Constructor.cs:
Corrected detecting USB or FireWire attached CD/DVD/BD and
tape drives.
Try ATA identify on USB or FireWire that don't have SCSI
INQUIRY.
* DiscImageChef.DiscImages/CDRWin.cs:
Corrected CD-ROM XA vs CD-ROM detection.
* DiscImageChef.Partitions/AppleMap.cs:
Corrected big endian working.
Added debug output.
* DiscImageChef.sln:
Added supports for settings.
* DiscImageChef/Commands/Decode.cs:
* DiscImageChef/Commands/Analyze.cs:
* DiscImageChef/Commands/Compare.cs:
* DiscImageChef/Commands/Checksum.cs:
* DiscImageChef/Commands/Benchmark.cs:
* DiscImageChef/Commands/DeviceInfo.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Added statistics.
* DiscImageChef/Commands/DeviceReport.cs:
Added statistics.
Correct handling empty inquiry string fields.
Suppose it is not removable, til proved wrong.
Corrected MODE SENSE (6/10) detection and calling order.
If device is MMC type but reports neither mode page 2Ah
neither GET CONFIGURATION, try all CDs (old drives work like
that).
Try reading Lead-In and Lead-Out in Audio CD using Audio READ
CD commands.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Added support for DVD raw block (37856 bytes).
Check READ LONG up to 36 times the cooked block size. That
should be enough to detect huge blocked media (like DVD and
BD) without taking ages.
If READ LONG size had to be bruteforced, and debug is
activated, save the result.
* DiscImageChef/Commands/DumpMedia.cs:
Added statistics.
Corrected READ LONG information handling, some drives return
2s-complement in 32 bit. Upper 16 bits are ignored.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/Commands/MediaScan.cs:
Added statistics.
Start trying with 64 blocks at a time. Some drives report to
be able to read 255 at a time, but they really don't, they
take a lot longer to read.
* DiscImageChef/DiscImageChef.csproj:
Added support for settings.
Added statistics.
* DiscImageChef/Main.cs:
* DiscImageChef/Options.cs:
Added support for settings.
Added statistics.
2016-02-03 18:58:11 +00:00
}
* DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs:
* DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
* DiscImageChef.Metadata/DeviceReport.cs:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DeviceReport.cs:
* DiscImageChef.Metadata/DiscImageChef.Metadata.csproj:
Added command to guess drive and media parameters and output
an XML report of them.
* DiscImageChef/Commands/DumpMedia.cs:
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Core/Checksum.cs:
* DiscImageChef/Commands/CreateSidecar.cs:
Moved checksum generation to a separate class.
* CICMMetadata:
Added support for ADIP.
* DiscImageChef.CommonTypes/MediaType.cs:
Added parameters of UDO media.
Moved DataPlay outside of Iomega, as it's not from that
manufacturer.
Added missing Exatape media and corrected 160m XL one.
Added SyJet media.
Added all ECMA defined magneto-optical (sectors calculated
from specifications, unchecked).
Added PD media.
Added Imation 320Gb RDX.
Added generic USB flash drives.
* DiscImageChef.Decoders/SCSI/Enums.cs:
Make enumerations public.
* DiscImageChef.Decoders/SCSI/Inquiry.cs:
* DiscImageChef.Devices/Device/Constructor.cs:
Trim space padded strings on SCSI INQUIRY.
* DiscImageChef.Devices/Device/ScsiCommands/MMC.cs:
Added PREVENT ALLOW MEDIUM REMOVAL.
Added START STOP UNIT.
* DiscImageChef.Devices/Device/ScsiCommands/NEC.cs:
Rename NEC methods.
* DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs:
Corrected Pioneer transfer length calculation.
* DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs:
Renamed Plextor methods.
* DiscImageChef.Devices/Device/ScsiCommands/SPC.cs:
Renamed SSC PREVENT ALLOW MEDIUM REMOVAL to uncollide with
MMC same name but different command.
* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
Set platform target to x86 (does it really matter?).
* DiscImageChef.Devices/Linux/Command.cs:
Reduced allocation for readlink() to current kernel
MAX_PATH.
* DiscImageChef.Devices/Linux/Enums.cs:
Modified Linux ioctl to 32-bit. Works on 64-bit also. Solves
commands not working on 32-bit environments.
* DiscImageChef.DiscImages/ZZZRawImage.cs:
Changed ECMA-184 and ECMA-183 enums.
* DiscImageChef.Metadata/Dimensions.cs:
Added all ECMA defined magneto-opticals.
Added PD media.
Added 320Gb RDX.
Corrected Exatape 160m XL.
Added Exatape 22m and 28m.
* DiscImageChef.Metadata/MediaType.cs:
Added 356mm magneto-optical media.
Changed ECMA-184 and ECMA-183 enums.
Added USB generic flash drive.
* DiscImageChef/Commands/DeviceInfo.cs:
Corrected SCSI INQUIRY naming.
Corrected SCSI MODE SENSE (6) parameters.
Reduced SCSI MODE SENSE timeout, some devices just get stuck
with unsupported MODE SENSE commanda and must be left to
timeout.
Changed FUJITSU vendor string comparison.
* DiscImageChef/Commands/MediaInfo.cs:
Added method to calculate MediaType from SCSI parameters
(mode, density, medium type, device type, etc).
Changed some error WriteLine() to debug ones. Too much
verbosity.
Added DVD media type decoding from PFI.
Found a drive that dumps ADIP, enabling it again (not
decoded).
* DiscImageChef/Commands/MediaScan.cs:
Added option to generate ImgBurn compatible log to
media-scan command.
* DiscImageChef/DiscImageChef.csproj:
Moved checksum generation to a separate class.
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Main.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
* DiscImageChef/Options.cs:
Added command to guess drive and media parameters and output
an XML report of them.
Added preliminary command to dump media. Only SCSI for now.
CDs and tapes are not supported. Errors are blalanty
ignored. Options are incomplete. Not yet usable.
Added option to generate ImgBurn compatible log to media-scan
command.
2016-01-31 08:05:56 +00:00
}
2017-12-19 20:33:03 +00:00
}