diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-11-17 23:07:49 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-05-09 06:04:36 +0000 |
commit | 0453897f1ee1cdf6dc216bec975a198e386428e6 (patch) | |
tree | 41062730c4fa538821510dc1afd2d82c7c877f82 | |
parent | 4aba3dbcb3832cb70253b7100e2a8555261a69c8 (diff) |
QStorageInfo: allow getting the info of pseudo filesystems too
They won't be listed in QStorageInfo::mountedVolumes, but we can now
obtain their info if you know their mountpoint. For example, on Linux:
$ ./qstorageinfo /dev /proc /sys
Filesystem (Type) Size Available BSize Label Mounted on
devtmpfs (devtmpfs) RW 4029772 4029764 4096 /dev
proc (proc) RW 0 0 4096 /proc
sysfs (sysfs) RW 0 0 4096 /sys
Change-Id: I3e15a26e0e424169ac2bffff1417ba2429d6d9f4
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/io/qstorageinfo_unix.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index bf33c160fc..1d1b2907b7 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -458,8 +458,6 @@ void QStorageInfoPrivate::initRootPath() while (it.next()) { const QString mountDir = it.rootPath(); const QByteArray fsName = it.fileSystemType(); - if (isPseudoFs(it)) - continue; // we try to find most suitable entry if (isParentOf(mountDir, oldRootPath) && maxLength < mountDir.length()) { maxLength = mountDir.length(); |