summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-10-14 12:12:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-10-31 13:26:27 +0100
commit7245599a8c7102de04a41a995b19e37ed7f1b7f0 (patch)
tree14120515ca5e9050eae1f1d842e6c257253ab0a2 /src/corelib/io
parent85ea2434b101bd8c3674bc7a564eca1a3f57127a (diff)
Handle mounts under /run
We shouldn't excluded all volumes under /run since some distos will mount filesystems there. Instead we should exclude all filesystems with the type "tmpfs" that /run has, and rpc_pipefs that is mounted below /run. Tmpfs" is excluded for all UNIX systems since the BSDs have a similarly named filesystem. Change-Id: I03fdac515c0bfb1b824b2e3eae1022dd699c0998 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index 481de6ee38..e82737c51c 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -90,17 +90,16 @@ static bool isPseudoFs(const QString &mountDir, const QByteArray &type)
{
if (mountDir.startsWith(QLatin1String("/dev"))
|| mountDir.startsWith(QLatin1String("/proc"))
- || mountDir.startsWith(QLatin1String("/run"))
|| mountDir.startsWith(QLatin1String("/sys"))
|| mountDir.startsWith(QLatin1String("/var/run"))
|| mountDir.startsWith(QLatin1String("/var/lock"))) {
return true;
}
+ if (type == "tmpfs")
+ return true;
#if defined(Q_OS_LINUX)
- if (type == "rootfs")
+ if (type == "rootfs" || type == "rpc_pipefs")
return true;
-#else
- Q_UNUSED(type);
#endif
return false;