diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-10 15:25:45 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-10 15:25:45 +0900 |
commit | b6953843f5d84e806cdb8ecf50eb2ac58ee9e065 (patch) | |
tree | 2216ac092a2e9902ba295cd18e72b36bd5d41c8e /tdeioslave | |
parent | 94515be234e926611355ec174f91b3abdf1cf13a (diff) | |
download | tdelibs-b6953843f5d84e806cdb8ecf50eb2ac58ee9e065.tar.gz tdelibs-b6953843f5d84e806cdb8ecf50eb2ac58ee9e065.zip |
Added back build options for UDISKS2, UDISKS and UDEVIL as requested by
some users.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeioslave')
-rw-r--r-- | tdeioslave/file/file.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tdeioslave/file/file.cc b/tdeioslave/file/file.cc index c445230e6..fda72f2d5 100644 --- a/tdeioslave/file/file.cc +++ b/tdeioslave/file/file.cc @@ -1670,16 +1670,19 @@ void FileProtocol::unmount( const TQString& _point ) bool FileProtocol::pmount(const TQString &dev) { - TQString mountProg; + TQString mountProg = TQString::null; TQCString buffer; +#ifdef WITH_UDISKS2 // Use 'udisksctl' (UDISKS2) if available 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 +#ifdef WITH_UDISKS // Use 'udisks' (UDISKS1) if available if (mountProg.isEmpty()) { mountProg = TDEGlobal::dirs()->findExe("udisks"); @@ -1688,6 +1691,7 @@ bool FileProtocol::pmount(const TQString &dev) TQFile::encodeName(TDEProcess::quote(dev)).data() ); } } +#endif // Use 'pmount', if available if (mountProg.isEmpty()) { @@ -1731,16 +1735,19 @@ bool FileProtocol::pumount(const TQString &point) if (dev.isEmpty()) return false; if (dev.endsWith("/")) dev.truncate(dev.length()-1); - TQString umountProg; + TQString umountProg = TQString::null; TQCString buffer; +#ifdef WITH_UDISKS2 // Use 'udisksctl' (UDISKS2), if available 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 +#ifdef WITH_UDISKS // Use 'udisks' (UDISKS1), if available if (umountProg.isEmpty()) { umountProg = TDEGlobal::dirs()->findExe("udisks"); @@ -1749,6 +1756,7 @@ bool FileProtocol::pumount(const TQString &point) TQFile::encodeName(TDEProcess::quote(dev)).data() ); } } +#endif // Use 'pumount', if available if (umountProg.isEmpty()) { |