diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-20 17:53:42 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-09-03 06:41:33 +0000 |
commit | 590ca436032cb828fc882fde9c0e99e0f450a061 (patch) | |
tree | 57deac0f3a730ca71b211f3b30405cfa661da99b /src/corelib/io/qstorageinfo.h | |
parent | 6cabb18bc2c983fc7013273841739a3490b55f55 (diff) |
QStorageInfo: Add support for obtaining subvolume names
[ChangeLog][QtCore][QStorageInfo] Added QStorageInfo::subvolume(), which
returns the name of the subvolume of a volume that was mounted, if one
was detected. This is currently implemented only for btrfs on Linux.
Change-Id: Ib57b52598e2f452985e9fffd1459f3145d733ce5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstorageinfo.h')
-rw-r--r-- | src/corelib/io/qstorageinfo.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qstorageinfo.h b/src/corelib/io/qstorageinfo.h index 8941c11a16..e2d9747ceb 100644 --- a/src/corelib/io/qstorageinfo.h +++ b/src/corelib/io/qstorageinfo.h @@ -71,6 +71,7 @@ public: QString rootPath() const; QByteArray device() const; + QByteArray subvolume() const; QByteArray fileSystemType() const; QString name() const; QString displayName() const; @@ -100,7 +101,7 @@ inline bool operator==(const QStorageInfo &first, const QStorageInfo &second) { if (first.d == second.d) return true; - return first.device() == second.device(); + return first.device() == second.device() && first.rootPath() == second.rootPath(); } inline bool operator!=(const QStorageInfo &first, const QStorageInfo &second) |