mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Having a globally accessed static SCSI Peripheral Device Type
allows easier command filtering.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Device/Variables.cs:
|
||||||
|
* Device/Constructor.cs:
|
||||||
|
Having a globally accessed static SCSI Peripheral Device
|
||||||
|
Type allows easier command filtering.
|
||||||
|
|
||||||
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
2015-10-19 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Device/Constructor.cs:
|
* Device/Constructor.cs:
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ namespace DiscImageChef.Devices
|
|||||||
}
|
}
|
||||||
|
|
||||||
type = DeviceType.Unknown;
|
type = DeviceType.Unknown;
|
||||||
|
scsiType = Decoders.SCSI.PeripheralDeviceTypes.UnknownDevice;
|
||||||
|
|
||||||
AtaErrorRegistersCHS errorRegisters;
|
AtaErrorRegistersCHS errorRegisters;
|
||||||
|
|
||||||
@@ -115,6 +116,8 @@ namespace DiscImageChef.Devices
|
|||||||
|
|
||||||
revision = ATAID.Value.FirmwareRevision;
|
revision = ATAID.Value.FirmwareRevision;
|
||||||
serial = ATAID.Value.SerialNumber;
|
serial = ATAID.Value.SerialNumber;
|
||||||
|
|
||||||
|
scsiType = Decoders.SCSI.PeripheralDeviceTypes.DirectAccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -152,6 +155,8 @@ namespace DiscImageChef.Devices
|
|||||||
revision = StringHandlers.SpacePaddedToString(Inquiry.Value.ProductRevisionLevel);
|
revision = StringHandlers.SpacePaddedToString(Inquiry.Value.ProductRevisionLevel);
|
||||||
model = StringHandlers.SpacePaddedToString(Inquiry.Value.ProductIdentification);
|
model = StringHandlers.SpacePaddedToString(Inquiry.Value.ProductIdentification);
|
||||||
manufacturer = StringHandlers.SpacePaddedToString(Inquiry.Value.VendorIdentification);
|
manufacturer = StringHandlers.SpacePaddedToString(Inquiry.Value.VendorIdentification);
|
||||||
|
|
||||||
|
scsiType = (Decoders.SCSI.PeripheralDeviceTypes)Inquiry.Value.PeripheralDeviceType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace DiscImageChef.Devices
|
|||||||
string model;
|
string model;
|
||||||
string revision;
|
string revision;
|
||||||
string serial;
|
string serial;
|
||||||
|
Decoders.SCSI.PeripheralDeviceTypes scsiType;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Platform ID for this device
|
/// Gets the Platform ID for this device
|
||||||
@@ -169,6 +170,14 @@ namespace DiscImageChef.Devices
|
|||||||
return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Decoders.SCSI.PeripheralDeviceTypes SCSIType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return scsiType;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user