Commit 0453897f authored by Thiago Macieira's avatar Thiago Macieira
Browse files

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: default avatarIvan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Showing with 0 additions and 2 deletions
...@@ -458,8 +458,6 @@ void QStorageInfoPrivate::initRootPath() ...@@ -458,8 +458,6 @@ void QStorageInfoPrivate::initRootPath()
while (it.next()) { while (it.next()) {
const QString mountDir = it.rootPath(); const QString mountDir = it.rootPath();
const QByteArray fsName = it.fileSystemType(); const QByteArray fsName = it.fileSystemType();
if (isPseudoFs(it))
continue;
// we try to find most suitable entry // we try to find most suitable entry
if (isParentOf(mountDir, oldRootPath) && maxLength < mountDir.length()) { if (isParentOf(mountDir, oldRootPath) && maxLength < mountDir.length()) {
maxLength = mountDir.length(); maxLength = mountDir.length();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment