mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added PCMCIA support.
This commit is contained in:
@@ -36,6 +36,7 @@ using DiscImageChef.Devices;
|
||||
using DiscImageChef.Metadata;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Decoders.PCMCIA;
|
||||
|
||||
namespace DiscImageChef.Commands
|
||||
{
|
||||
@@ -174,6 +175,44 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
}
|
||||
|
||||
if(dev.IsPCMCIA)
|
||||
{
|
||||
report.PCMCIA = new pcmciaType();
|
||||
report.PCMCIA.CIS = dev.CIS;
|
||||
Decoders.PCMCIA.Tuple[] tuples = CIS.GetTuples(dev.CIS);
|
||||
if(tuples != null)
|
||||
{
|
||||
foreach(Decoders.PCMCIA.Tuple tuple in tuples)
|
||||
{
|
||||
if(tuple.Code == TupleCodes.CISTPL_MANFID)
|
||||
{
|
||||
ManufacturerIdentificationTuple manfid = CIS.DecodeManufacturerIdentificationTuple(tuple);
|
||||
|
||||
if(manfid != null)
|
||||
{
|
||||
report.PCMCIA.ManufacturerCode = manfid.ManufacturerID;
|
||||
report.PCMCIA.CardCode = manfid.CardID;
|
||||
report.PCMCIA.ManufacturerCodeSpecified = true;
|
||||
report.PCMCIA.CardCodeSpecified = true;
|
||||
}
|
||||
}
|
||||
else if(tuple.Code == TupleCodes.CISTPL_VERS_1)
|
||||
{
|
||||
Level1VersionTuple vers = CIS.DecodeLevel1VersionTuple(tuple);
|
||||
|
||||
if(vers != null)
|
||||
{
|
||||
report.PCMCIA.Manufacturer = vers.Manufacturer;
|
||||
report.PCMCIA.ProductName = vers.Product;
|
||||
report.PCMCIA.Compliance = string.Format("{0}.{1}", vers.MajorVersion, vers.MinorVersion);
|
||||
report.PCMCIA.AdditionalInformation = vers.AdditionalInformation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DicConsole.WriteLine("Querying ATA IDENTIFY...");
|
||||
|
||||
dev.AtaIdentify(out buffer, out errorRegs, timeout, out duration);
|
||||
|
||||
Reference in New Issue
Block a user