[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kio] src/core: [KMountPoint] Remove traces of supermount
From: Stefan_Brüns <null () kde ! org>
Date: 2018-08-30 21:14:46
Message-ID: E1fvUH8-00086v-GM () code ! kde ! org
[Download RAW message or body]
Git commit c8207aafa14a787c84beda076713ad8eaee34a56 by Stefan Brüns.
Committed on 30/08/2018 at 21:14.
Pushed by bruns into branch 'master'.
[KMountPoint] Remove traces of supermount
Summary:
supermount was a out-of-tree linux kernel patch for linux 2.6.x, for
automatic mounting of removable media (see e.g.
https://wiki.debian.org/Supermount ). It is obsolete and dead for a long
time.
Test Plan: make
Reviewers: #frameworks, broulik
Reviewed By: broulik
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15156
M +0 -4 src/core/kcoredirlister.cpp
M +2 -25 src/core/kmountpoint.cpp
https://commits.kde.org/kio/c8207aafa14a787c84beda076713ad8eaee34a56
diff --git a/src/core/kcoredirlister.cpp b/src/core/kcoredirlister.cpp
index efc8085e..82111273 100644
--- a/src/core/kcoredirlister.cpp
+++ b/src/core/kcoredirlister.cpp
@@ -532,10 +532,6 @@ static bool manually_mounted(const QString &path, const \
KMountPoint::List &possi }
return true;
}
- const bool supermount = mp->mountType() == QLatin1String("supermount");
- if (supermount) {
- return true;
- }
// noauto -> manually mounted. Otherwise, mounted at boot time, won't be \
unmounted any time soon hopefully. return \
mp->mountOptions().contains(QStringLiteral("noauto")); }
diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp
index 56a0e809..022a241f 100644
--- a/src/core/kmountpoint.cpp
+++ b/src/core/kmountpoint.cpp
@@ -139,27 +139,8 @@ KMountPoint::~KMountPoint()
#define FSNAME(var) var.mnt_special
#endif
-/**
- * When using supermount, the device name is in the options field
- * as dev=/my/device
- */
-static QString devNameFromOptions(const QStringList &options)
-{
- // Search options to find the device name
- for (QStringList::ConstIterator it = options.begin(); it != options.end(); ++it) \
{
- if ((*it).startsWith(QLatin1String("dev="))) {
- return (*it).mid(4);
- }
- }
- return QStringLiteral("none");
-}
-
void KMountPoint::Private::finalizePossibleMountPoint(DetailsNeededFlags infoNeeded)
{
- if (mountType == QLatin1String("supermount")) {
- mountedFrom = devNameFromOptions(mountOptions);
- }
-
if (mountedFrom.startsWith(QLatin1String("UUID="))) {
const QString uuid = mountedFrom.mid(5);
const QString potentialDevice = \
QFile::symLinkTarget(QLatin1String("/dev/disk/by-uuid/") + uuid); @@ -214,9 +195,7 @@ \
KMountPoint::List KMountPoint::possibleMountPoints(DetailsNeededFlags infoNeeded \
mp->d->mountPoint = QFile::decodeName(MOUNTPOINT(fe)); mp->d->mountType = \
QFile::decodeName(MOUNTTYPE(fe));
- //Devices using supermount have their device names in the mount options
- //instead of the device field. That's why we need to read the mount options
- if (infoNeeded & NeedMountOptions || (mp->d->mountType == \
QLatin1String("supermount"))) { + if (infoNeeded & NeedMountOptions) {
QString options = QFile::decodeName(MOUNTOPTIONS(fe));
mp->d->mountOptions = options.split(QLatin1Char(','));
}
@@ -349,9 +328,7 @@ KMountPoint::List \
KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded) mp->d->mountPoint = \
QFile::decodeName(MOUNTPOINT(fe)); mp->d->mountType = \
QFile::decodeName(MOUNTTYPE(fe));
- //Devices using supermount have their device names in the mount options
- //instead of the device field. That's why we need to read the mount options
- if (infoNeeded & NeedMountOptions || (mp->d->mountType == \
QLatin1String("supermount"))) { + if (infoNeeded & NeedMountOptions) {
QString options = QFile::decodeName(MOUNTOPTIONS(fe));
mp->d->mountOptions = options.split(QLatin1Char(','));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic