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())
34enum class FilterMountInfo {
35 All,
36 Filtered,
37};
38
39#ifdef QT_BUILD_INTERNAL
40Q_AUTOTEST_EXPORT
41#else
42static
43#endif
44std::vector<MountInfo> doParseMountInfo(
45 const QByteArray &mountinfo, FilterMountInfo filter = FilterMountInfo::All);
46
47QT_END_NAMESPACE
48
49#endif // QSTORAGEINFO_LINUX_P_H
50

source code of qtbase/src/corelib/io/qstorageinfo_linux_p.h