From 56e992ab54d3c2c9460f4c3515dad138674dd993 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 21 Nov 2020 18:19:40 +0800 Subject: [PATCH] tdeioslave media: fixed FTBFS caused by previous commit and functionality of tdeio_media_mounthelper when ejecting drives. Signed-off-by: Michele Calgaro --- tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 7 +++++-- 1 file 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(hwdevice); - if (sdevice->ejectDrive()) { + TQStringVariantMap ejectResult = sdevice->ejectDrive(); + if (ejectResult["result"].toBool() == true) + { // Success! ::exit(0); }