diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-20 17:05:08 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-07-06 03:59:50 +0000 |
commit | b6345a515be9b8649738e812290f03e848f64378 (patch) | |
tree | e9dbcef5b81f887ed9b83cf0b1a3117f98435257 /src/dbus | |
parent | 5fcac27359e66295c8cb15608b89599057c46425 (diff) |
QStorageInfo: update the algorithm for ignored filesystems on Unix
Use the criterion that GNU coreutils' df uses: if the total size of the
filesystem is zero, then it's pseudo. After all, if it contains files in
a zero-sized volume, it has to be pseudo; if it contains nothing, then
it's not very useful anyway.
This would have caught most Linux pseudo-fs anyway, but the mount point
check beforehand allows us to skip quite a few statfs() syscalls.
The new algorithm also solves the following cases which had been
mistakenly interpreted:
* fuse and ZFS (source devices don't usually start with /)
* pseudo-fs that were mounted from a device starting with /
(the source device is usually ignored by the OS)
This change is not testable automatically. Manual testing shows it still
reports the same entries it used to on Linux, plus now shows FUSE
(sshfs) mounts.
Task-number: QTBUG-54235
Change-Id: Ib57b52598e2f452985e9fffd1459f06dcefcc5c6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/dbus')
0 files changed, 0 insertions, 0 deletions