Browse Source

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>
master
Michele Calgaro 1 week ago
parent
commit
56e992ab54
Signed by: MicheleC GPG Key ID: 2A75B7CA8ADED5CF
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp

+ 5
- 2
tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp View File

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


Loading…
Cancel
Save