Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "qstorageinfo_linux_p.h"
#include "qdirlisting.h"
#include <private/qcore_unix_p.h>
#include <private/qtools_p.h>
#include <q20memory.h>
#include <sys/ioctl.h>
#include <sys/statfs.h>
Go to the source code of this file.
Macros | |
#define | FSLABEL_MAX 256 |
#define | FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX]) |
#define | ST_RDONLY 0x0001 /* mount read-only */ |
Functions | |
static QString | decodeFsEncString (QString &&str) |
static dev_t | deviceIdForPath (const QString &device) |
static quint64 | retrieveDeviceId (const QByteArray &device, quint64 deviceId=0) |
static QDirListing | devicesByLabel () |
static auto | retrieveLabels () |
static std::optional< QString > | retrieveLabelViaIoctl (const QString &path) |
static QString | retrieveLabel (const QStorageInfoPrivate &d, quint64 deviceId) |
static std::vector< MountInfo > | parseMountInfo (FilterMountInfo filter=FilterMountInfo::All) |
#define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX]) |
Definition at line 23 of file qstorageinfo_linux.cpp.
Referenced by retrieveLabelViaIoctl().
#define FSLABEL_MAX 256 |
Definition at line 20 of file qstorageinfo_linux.cpp.
Referenced by retrieveLabelViaIoctl().
#define ST_RDONLY 0x0001 /* mount read-only */ |
Definition at line 28 of file qstorageinfo_linux.cpp.
Definition at line 38 of file qstorageinfo_linux.cpp.
References QString::begin(), QString::indexOf(), out, ptr(), Q_ASSERT, Q_UNLIKELY, QString::resize(), QString::size(), and str.
Referenced by retrieveLabel(), and retrieveLabels().
|
inlinestatic |
Definition at line 74 of file qstorageinfo_linux.cpp.
References device, and QFile::encodeName().
|
static |
Definition at line 106 of file qstorageinfo_linux.cpp.
References QDir::AllEntries, QDir::Hidden, QDir::NoDotAndDotDot, and QDir::System.
Referenced by retrieveLabel(), and retrieveLabels().
|
static |
Definition at line 182 of file qstorageinfo_linux.cpp.
References QFileDevice::close(), doParseMountInfo(), file, QFile::open(), QIODevice::readAll(), QIODeviceBase::ReadOnly, and QIODeviceBase::Text.
|
inlinestatic |
Definition at line 82 of file qstorageinfo_linux.cpp.
References device.
Referenced by retrieveLabel(), and retrieveLabels().
Definition at line 149 of file qstorageinfo_linux.cpp.
References d, decodeFsEncString(), devicesByLabel(), QFile::encodeName(), retrieveDeviceId(), and retrieveLabelViaIoctl().
|
inlinestatic |
Definition at line 115 of file qstorageinfo_linux.cpp.
References decodeFsEncString(), devicesByLabel(), QFile::encodeName(), and retrieveDeviceId().
Definition at line 132 of file qstorageinfo_linux.cpp.
References QFile::encodeName(), QString::fromUtf8(), FS_IOC_GETFSLABEL, FSLABEL_MAX, and qt_safe_open().
Referenced by retrieveLabel().