kf6-solid: fix final #error stub — SATA/IDE bus detection on Redox
The fourth and final #error stub in udisksstoragedrive.cpp was in the bus() function's ATA SATA-vs-IDE detection block. On non-Linux platforms without udev, this fell through to #error. Fix: add Q_OS_REDOX guard returning Solid::StorageDrive::Sata. Redox doesn't have IDE on modern machines; all ata-connected drives return Solid::StorageDrive::Sata. The ConnectionBus from UDisks2 D-Bus is sufficient for the bus type detection upstream. All 4 KF6Solid #error stubs are now resolved: - isHotpluggable() → Q_OS_REDOX: returns isRemovable() - bus() udevBus → Q_OS_REDOX: uses ConnectionBus from device - bus() ATA → Q_OS_REDOX: defaults to Sata - isAppendable() → Q_OS_REDOX: returns false (no optical)
This commit is contained in:
+4
@@ -122,6 +122,10 @@ Solid::StorageDrive::Bus StorageDrive::bus() const
|
||||
} else { // parallel (classical) ATA
|
||||
return Solid::StorageDrive::Ide;
|
||||
}
|
||||
#elif defined(Q_OS_REDOX)
|
||||
// On Redox, ConnectionBus from UDisks2 is sufficient; default to SATA
|
||||
// for ata-connected drives since Redox doesn't have IDE on modern machines.
|
||||
return Solid::StorageDrive::Sata;
|
||||
#else
|
||||
#error Implement this or stub this out for your platform
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user