summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-11-21 18:19:40 +0800
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-11-21 18:19:40 +0800
commit56e992ab54d3c2c9460f4c3515dad138674dd993 (patch)
treed1f95f78194c041dda7ec9a42a97181030c67559
parentd39c407bf49fab58fa53c20bb3d301ee6e709c32 (diff)
downloadtdebase-56e992ab54d3c2c9460f4c3515dad138674dd993.tar.gz
tdebase-56e992ab54d3c2c9460f4c3515dad138674dd993.zip
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>
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
index 080fe7fa9..8d1e33c82 100644
--- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
+++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
@@ -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);
}