Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstorageinfo_linux_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// Copyright (C) 2014 Ivan Komissarov <ABBAPOH@gmail.com>
3// Copyright (C) 2016 Intel Corporation.
4// Copyright (C) 2023 Ahmad Samir <a.samirh78@gmail.com>
5// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
6// Qt-Security score:significant reason:default
7
8#ifndef QSTORAGEINFO_LINUX_P_H
9#define QSTORAGEINFO_LINUX_P_H
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API.
16// This header file may change from version to
17// version without notice, or even be removed.
18//
19// We mean it.
20//
21
22#include "qstorageinfo_p.h"
23
24#include <sys/sysmacros.h> // makedev()
25
26QT_BEGIN_NAMESPACE
27
28using MountInfo = QStorageInfoPrivate::MountInfo;
29
30// parseMountInfo() is called from:
31// - QStorageInfoPrivate::initRootPath(), where a list of all mounted volumes is needed
32// - QStorageInfoPrivate::mountedVolumes(), where some filesystem types are ignored
33// (see shouldIncludefs())
38
39#ifdef QT_BUILD_INTERNAL
40Q_AUTOTEST_EXPORT
41#else
42static
43#endif
45 const QByteArray &mountinfo, FilterMountInfo filter = FilterMountInfo::All);
46
47QT_END_NAMESPACE
48
49#endif // QSTORAGEINFO_LINUX_P_H
static QString retrieveLabel(const QStorageInfoPrivate &d, int fd, quint64 deviceId)
static constexpr short MountId
static quint64 retrieveDeviceId(const QByteArray &device, quint64 deviceId=0)
static const char MountInfoPath[]
static constexpr short MountPoint
static constexpr short MountSource
static constexpr short FieldCount
static quint64 mountIdForPath(int fd)
static constexpr short MountOptions
std::vector< MountInfo > doParseMountInfo(const QByteArray &mountinfo, FilterMountInfo filter)
static constexpr short FsType
static std::optional< dev_t > deviceNumber(QByteArrayView devno)
static std::optional< QString > retrieveLabelViaIoctl(int fd)
#define FS_IOC_GETFSLABEL
static constexpr short DevNo
#define ST_RDONLY
static QByteArray parseMangledPath(QByteArrayView path)
static constexpr short SuperOptions
static QDirListing devicesByLabel()
static constexpr short FsRoot
static QString decodeFsEncString(QString &&str)
static std::vector< MountInfo > parseMountInfo(FilterMountInfo filter=FilterMountInfo::All)
static auto retrieveLabels()
static void tokenizeLine(std::array< QByteArrayView, FieldCount > &fields, QByteArrayView line)
static dev_t deviceIdForPath(const QString &device)
#define FSLABEL_MAX
static std::vector< MountInfo > doParseMountInfo(const QByteArray &mountinfo, FilterMountInfo filter=FilterMountInfo::All)