solid: implement floppy detection

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-03-04 15:58:43 +02:00
parent 32f682f54f
commit bcd564506e
2 changed files with 3 additions and 3 deletions

View file

@ -60,12 +60,12 @@ Solid::StorageDrive::DriveType StorageDrive::driveType() const
if (idtype == "cd") {
return Solid::StorageDrive::CdromDrive;
} else if (m_device->property("ID_DRIVE_FLOPPY").toInt() == 1) {
return Solid::StorageDrive::Floppy;
// TODO: other types and remove this generic one
} else if (idbus == "usb") {
return Solid::StorageDrive::CompactFlash;
#if 0
} else if (idtype == "floppy") {
return Solid::StorageDrive::Floppy;
} else if (idtype == "flash_cf") {
return Solid::StorageDrive::CompactFlash;
} else if (idtype == "flash_ms") {

View file

@ -74,7 +74,7 @@ Solid::StorageVolume::UsageType StorageVolume::usage() const
return Solid::StorageVolume::PartitionTable;
// TODO: how to detect it?
#if 0
} else if (usage == "raid") {
} else if (devtype == "raid") {
return Solid::StorageVolume::Raid;
#endif
} else {