Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qstorageinfo_linux_p.h File Reference
#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.

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< MountInfo > doParseMountInfo (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
 

Enumeration Type Documentation

◆ FilterMountInfo

enum class FilterMountInfo
strong
Enumerator
All 
Filtered 

Definition at line 168 of file qstorageinfo_linux_p.h.

Function Documentation

◆ deviceNumber()

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

Definition at line 34 of file qstorageinfo_linux_p.h.

References QByteArrayView::cbegin(), it, qstrntoll(), and QByteArrayView::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 174 of file qstorageinfo_linux_p.h.

References ba, QByteArray::cbegin(), QByteArray::cend(), 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 56 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 110 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 97 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ FieldCount

constexpr short FieldCount = 11
staticconstexpr

Definition at line 106 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().

◆ FsRoot

constexpr short FsRoot = 3
staticconstexpr

Definition at line 98 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ FsType

constexpr short FsType = 8
staticconstexpr

Definition at line 103 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo(), and tokenizeLine().

◆ MountInfoPath

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

Definition at line 32 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo(), and tokenizeLine().

◆ MountOptions

constexpr short MountOptions = 5
staticconstexpr

Definition at line 100 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().

◆ MountPoint

constexpr short MountPoint = 4
staticconstexpr

Definition at line 99 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ MountSource

constexpr short MountSource = 9
staticconstexpr

Definition at line 104 of file qstorageinfo_linux_p.h.

Referenced by doParseMountInfo().

◆ SuperOptions

constexpr short SuperOptions = 10
staticconstexpr

Definition at line 105 of file qstorageinfo_linux_p.h.

Referenced by tokenizeLine().