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>.
Loading...
Searching...
No Matches
qstorageinfo_linux_p.h File Reference

(72ee1df260d728a1e699bd4c6e03bf202c929cbd)

#include "qstorageinfo_p.h"
#include <QtCore/qsystemdetection.h>
#include <QtCore/private/qlocale_tools_p.h>
#include <sys/sysmacros.h>
+ Include dependency graph for qstorageinfo_linux_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using MountInfo = QStorageInfoPrivate::MountInfo
 

Enumerations

enum class  FilterMountInfo { All , Filtered }
 

Functions

static std::optional< dev_t > deviceNumber (QByteArrayView devno)
 
static QByteArray parseMangledPath (QByteArrayView path)
 
static void tokenizeLine (std::array< QByteArrayView, FieldCount > &fields, QByteArrayView line)
 
static std::vector< MountInfodoParseMountInfo (const QByteArray &mountinfo, FilterMountInfo filter=FilterMountInfo::All)
 

Variables

static const char MountInfoPath [] = "/proc/self/mountinfo"
 
static constexpr short DevNo = 2
 
static constexpr short FsRoot = 3
 
static constexpr short MountPoint = 4
 
static constexpr short MountOptions = 5
 
static constexpr short FsType = 8
 
static constexpr short MountSource = 9
 
static constexpr short SuperOptions = 10
 
static constexpr short FieldCount = 11
 

Typedef Documentation

◆ MountInfo

using MountInfo = QStorageInfoPrivate::MountInfo

Definition at line 31 of file qstorageinfo_linux_p.h.

Enumeration Type Documentation

◆ FilterMountInfo

enum class FilterMountInfo
strong
Enumerator
All 
Filtered 

Definition at line 159 of file qstorageinfo_linux_p.h.

Function Documentation

◆ deviceNumber()

static std::optional< dev_t > deviceNumber ( QByteArrayView devno)
static

Definition at line 35 of file qstorageinfo_linux_p.h.

References QSet< T >::cbegin(), it, qstrntoll(), and QSet< T >::size().

Referenced by doParseMountInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doParseMountInfo()

static std::vector< MountInfo > doParseMountInfo ( const QByteArray & mountinfo,
FilterMountInfo filter = FilterMountInfo::All )
static

Definition at line 165 of file qstorageinfo_linux_p.h.

References ba, QSet< T >::cbegin(), QString::data(), QFile::decodeName(), deviceNumber(), DevNo, Filtered, FsRoot, FsType, info, it, line, MountInfoPath, MountPoint, MountSource, parseMangledPath(), qDebug, shouldIncludeFs(), QString::size(), and tokenizeLine().

Referenced by parseMountInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseMangledPath()

static QByteArray parseMangledPath ( QByteArrayView path)
static

Definition at line 57 of file qstorageinfo_linux_p.h.

References ret.

Referenced by doParseMountInfo().

+ Here is the caller graph for this function:

◆ tokenizeLine()

static void tokenizeLine ( std::array< QByteArrayView, FieldCount > & fields,
QByteArrayView line )
static

Definition at line 111 of file qstorageinfo_linux_p.h.

References begin(), QString::constData(), QString::data(), FieldCount, FsType, QString::indexOf(), line, MountInfoPath, MountOptions, qCInfo, qCWarning, QString::size(), and SuperOptions.

Referenced by doParseMountInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DevNo

constexpr short DevNo = 2
staticconstexpr

Definition at line 98 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ FieldCount

constexpr short FieldCount = 11
staticconstexpr

Definition at line 107 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().

◆ FsRoot

constexpr short FsRoot = 3
staticconstexpr

Definition at line 99 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ FsType

constexpr short FsType = 8
staticconstexpr

Definition at line 104 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo(), and tokenizeLine().

◆ MountInfoPath

const char MountInfoPath[] = "/proc/self/mountinfo"
static

Definition at line 33 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo(), and tokenizeLine().

◆ MountOptions

constexpr short MountOptions = 5
staticconstexpr

Definition at line 101 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().

◆ MountPoint

constexpr short MountPoint = 4
staticconstexpr

Definition at line 100 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ MountSource

constexpr short MountSource = 9
staticconstexpr

Definition at line 105 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ SuperOptions

constexpr short SuperOptions = 10
staticconstexpr

Definition at line 106 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().