tdeioslave media: fixed FTBFS caused by previous commit and functionality of

tdeio_media_mounthelper when ejecting drives.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/159/head
Michele Calgaro 3 years ago
parent d39c407bf4
commit 56e992ab54
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -177,9 +177,12 @@ void MountHelper::eject(const TQString &device, bool quiet)
// Try TDE HW library eject first... // Try TDE HW library eject first...
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device); TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device);
if (hwdevice->type() == TDEGenericDeviceType::Disk) { if (hwdevice->type() == TDEGenericDeviceType::Disk)
{
TDEStorageDevice *sdevice = static_cast<TDEStorageDevice*>(hwdevice); TDEStorageDevice *sdevice = static_cast<TDEStorageDevice*>(hwdevice);
if (sdevice->ejectDrive()) { TQStringVariantMap ejectResult = sdevice->ejectDrive();
if (ejectResult["result"].toBool() == true)
{
// Success! // Success!
::exit(0); ::exit(0);
} }

Loading…
Cancel
Save