summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/media')
-rw-r--r--tdeioslave/media/mediamanager/medialist.cpp3
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp28
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp14
-rw-r--r--tdeioslave/media/tdeio_media.cpp1
4 files changed, 17 insertions, 29 deletions
diff --git a/tdeioslave/media/mediamanager/medialist.cpp b/tdeioslave/media/mediamanager/medialist.cpp
index 6ac7dc341..09ff198d9 100644
--- a/tdeioslave/media/mediamanager/medialist.cpp
+++ b/tdeioslave/media/mediamanager/medialist.cpp
@@ -138,8 +138,7 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification)
TQString fs_type = medium.fsType();
bool mounted = medium.isMounted();
- m->mountableState( device_node, clear_device_udi, mount_point,
- fs_type, mounted );
+ m->mountableState( device_node, clear_device_udi, mount_point, fs_type, mounted );
}
else
{
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index 31481b6e8..625b4e251 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -751,7 +751,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name)
value = config.readBoolEntry("automount", false);
}
else {
- QString current_group = config.group();
+ TQString current_group = config.group();
config.setGroup(drive_udi);
value = config.readBoolEntry("automount", false);
config.setGroup(current_group);
@@ -1125,8 +1125,9 @@ TQString TDEBackend::mount(const Medium *medium)
TQString TDEBackend::mount(const TQString &_udi)
{
const Medium* medium = m_mediaList.findById(_udi);
- if (!medium)
+ if (!medium) {
return i18n("No such medium: %1").arg(_udi);
+ }
return mount(medium);
}
@@ -1135,11 +1136,13 @@ TQString TDEBackend::unmount(const TQString &_udi)
{
const Medium* medium = m_mediaList.findById(_udi);
- if ( !medium )
+ if ( !medium ) {
return i18n("No such medium: %1").arg(_udi);
+ }
- if (!medium->isMounted())
+ if (!medium->isMounted()) {
return TQString(); // that was easy
+ }
TQString mountPoint = isInFstab(medium);
if (!mountPoint.isNull())
@@ -1222,23 +1225,6 @@ TQString TDEBackend::unmount(const TQString &_udi)
if (!checkDN.exists()) {
m_mediaList.removeMedium(uid, true);
}
- else {
- TQString mountedPath = sdevice->mountPath();
- if (!mountedPath.isNull()) {
- // Because the TDE hardware backend is event driven it might take a little while for the device to show up as unmounted
- // Wait up to 30 seconds for the mount to disappear...
- for (int i=0;i<300;i++) {
- mountedPath = sdevice->mountPath();
- if (mountedPath.isNull()) {
- break;
- }
- tqApp->processEvents(50);
- usleep(50000);
- }
- }
-
- ResetProperties(sdevice, false);
- }
return TQString();
}
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
index 230d69715..4dbb427f5 100644
--- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
+++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
@@ -149,8 +149,9 @@ MountHelper::MountHelper() : TDEApplication()
if (medium.isMounted())
{
DCOPReply reply = mediamanager.call( "unmount", medium.id());
- if (reply.isValid())
- reply.get(m_errorStr);
+ if (reply.isValid()) {
+ reply.get(m_errorStr);
+ }
}
/* If this is a decrypted volume and there is no error yet
@@ -158,14 +159,17 @@ MountHelper::MountHelper() : TDEApplication()
if (m_errorStr.isNull() && medium.isEncrypted() && !medium.clearDeviceUdi().isNull())
{
DCOPReply reply = mediamanager.call( "undecrypt", medium.id());
- if (reply.isValid())
+ if (reply.isValid()) {
reply.get(m_errorStr);
+ }
}
- if (m_errorStr.isNull())
+ if (m_errorStr.isNull()) {
invokeEject(device, true);
- else
+ }
+ else {
error();
+ }
}
else
{
diff --git a/tdeioslave/media/tdeio_media.cpp b/tdeioslave/media/tdeio_media.cpp
index 1d32b14c2..9ed37e82f 100644
--- a/tdeioslave/media/tdeio_media.cpp
+++ b/tdeioslave/media/tdeio_media.cpp
@@ -80,7 +80,6 @@ bool MediaProtocol::rewriteURL(const KURL &url, KURL &newUrl)
return false;
}
-
if ( !m_impl.realURL(name, path, newUrl) )
{
error( m_impl.lastErrorCode(), m_impl.lastErrorMessage() );