summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2021-08-10 11:16:49 +0900
committerMichele Calgaro <[email protected]>2021-08-10 11:16:49 +0900
commitde4f27a2eea6f7b8e723dc8966a34ce1de0952d0 (patch)
tree5f523092e771be83b87ed7700836063ec132f83a /tdecore
parenta2edae37ace5b2b9172721a8ca9f63b9b441aacf (diff)
downloadtdelibs-de4f27a2eea6f7b8e723dc8966a34ce1de0952d0.tar.gz
tdelibs-de4f27a2eea6f7b8e723dc8966a34ce1de0952d0.zip
tdehw lib: removed unused and seemingly unnecessary method in storage device.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp53
-rw-r--r--tdecore/tdehw/tdestoragedevice.h7
2 files changed, 0 insertions, 60 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index a9b9ab206..4e4d92c82 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -1201,57 +1201,4 @@ TQStringVariantMap TDEStorageDevice::lockDevice()
return result;
}
-TQString TDEStorageDevice::determineFileSystemType(TQString path) {
- TQStringList mountTable;
- TQString prevPath = path;
- dev_t prevDev = 0;
- int pos;
- struct stat directory_info;
- if (path.startsWith("/")) {
- stat(path.local8Bit(), &directory_info);
- prevDev = directory_info.st_dev;
- // Walk the directory tree up to the root, checking for any change in st_dev
- // If a change is found, the previous value of path is the mount point itself
- while (path != "/") {
- pos = path.findRev("/", -1, true);
- if (pos < 0) {
- break;
- }
- path = path.mid(0, pos);
- if (path == "") {
- path = "/";
- }
- stat(path.local8Bit(), &directory_info);
- if (directory_info.st_dev != prevDev) {
- break;
- }
- prevPath = path;
- prevDev = directory_info.st_dev;
- }
- }
-
- // Read in mount table
- mountTable.clear();
- TQFile file( "/proc/mounts" );
- if ( file.open( IO_ReadOnly ) ) {
- TQTextStream stream( &file );
- while ( !stream.atEnd() ) {
- mountTable.append(stream.readLine());
- }
- file.close();
- }
-
- // Parse mount table
- TQStringList::Iterator it;
- for ( it = mountTable.begin(); it != mountTable.end(); ++it ) {
- TQStringList mountInfo = TQStringList::split(" ", (*it), true);
- if ((*mountInfo.at(1)) == prevPath) {
- return (*mountInfo.at(2));
- }
- }
-
- // Unknown file system type
- return TQString::null;
-}
-
#include "tdestoragedevice.moc"
diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h
index 61ef6daad..0a8ef7283 100644
--- a/tdecore/tdehw/tdestoragedevice.h
+++ b/tdecore/tdehw/tdestoragedevice.h
@@ -350,13 +350,6 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
TQStringVariantMap ejectDrive();
/**
- * @param path Full path to arbitrary file or directory
- * @return TQString with type of file system containing the given file,
- * or TQString::null if file system type unknown
- */
- static TQString determineFileSystemType(TQString path);
-
- /**
* Set the unlock password to use in subsequent LUKS operations
* @see cryptClearOperationsUnlockPassword
*