From 7245599a8c7102de04a41a995b19e37ed7f1b7f0 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 14 Oct 2014 12:12:13 +0200 Subject: 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 --- src/corelib/io/qstorageinfo_unix.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/corelib/io/qstorageinfo_unix.cpp') 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; -- cgit v1.2.3