summaryrefslogtreecommitdiffstats
path: root/tdeioslave
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave')
-rw-r--r--tdeioslave/file/file.cc32
1 files changed, 10 insertions, 22 deletions
diff --git a/tdeioslave/file/file.cc b/tdeioslave/file/file.cc
index ad1cc5574..45c482620 100644
--- a/tdeioslave/file/file.cc
+++ b/tdeioslave/file/file.cc
@@ -1668,18 +1668,13 @@ bool FileProtocol::pmount(const TQString &dev)
TQString mountProg;
TQCString buffer;
-#ifdef WITH_UDISKS2
// Use 'udisksctl' (UDISKS2) if available
- if (mountProg.isEmpty()) {
- mountProg = TDEGlobal::dirs()->findExe("udisksctl");
- if (!mountProg.isEmpty()) {
- buffer.sprintf( "%s mount -b %s", TQFile::encodeName(mountProg).data(),
- TQFile::encodeName(TDEProcess::quote(dev)).data() );
- }
- }
-#endif // WITH_UDISKS2
+ mountProg = TDEGlobal::dirs()->findExe("udisksctl");
+ if (!mountProg.isEmpty()) {
+ buffer.sprintf( "%s mount -b %s", TQFile::encodeName(mountProg).data(),
+ TQFile::encodeName(TDEProcess::quote(dev)).data() );
+ }
-#ifdef WITH_UDISKS
// Use 'udisks' (UDISKS1) if available
if (mountProg.isEmpty()) {
mountProg = TDEGlobal::dirs()->findExe("udisks");
@@ -1688,7 +1683,6 @@ bool FileProtocol::pmount(const TQString &dev)
TQFile::encodeName(TDEProcess::quote(dev)).data() );
}
}
-#endif // WITH_UDISKS
// Use 'pmount', if available
if (mountProg.isEmpty()) {
@@ -1735,18 +1729,13 @@ bool FileProtocol::pumount(const TQString &point)
TQString umountProg;
TQCString buffer;
-#ifdef WITH_UDISKS2
// Use 'udisksctl' (UDISKS2), if available
- if (umountProg.isEmpty()) {
- umountProg = TDEGlobal::dirs()->findExe("udisksctl");
- if (!umountProg.isEmpty()) {
- buffer.sprintf( "%s unmount -b %s", TQFile::encodeName(umountProg).data(),
- TQFile::encodeName(TDEProcess::quote(dev)).data() );
- }
- }
-#endif // WITH_UDISKS2
+ umountProg = TDEGlobal::dirs()->findExe("udisksctl");
+ if (!umountProg.isEmpty()) {
+ buffer.sprintf( "%s unmount -b %s", TQFile::encodeName(umountProg).data(),
+ TQFile::encodeName(TDEProcess::quote(dev)).data() );
+ }
-#ifdef WITH_UDISKS
// Use 'udisks' (UDISKS1), if available
if (umountProg.isEmpty()) {
umountProg = TDEGlobal::dirs()->findExe("udisks");
@@ -1755,7 +1744,6 @@ bool FileProtocol::pumount(const TQString &point)
TQFile::encodeName(TDEProcess::quote(dev)).data() );
}
}
-#endif // WITH_UDISKS
// Use 'pumount', if available
if (umountProg.isEmpty()) {