libstorage-ng
Loading...
Searching...
No Matches
UsedFeatures.h
1/*
2 * Copyright (c) [2016-2025] SUSE LLC
3 *
4 * All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, contact Novell, Inc.
17 *
18 * To contact Novell about this file by physical or electronic mail, you may
19 * find current contact information at www.novell.com.
20 */
21
22
23#ifndef STORAGE_USED_FEATURES_H
24#define STORAGE_USED_FEATURES_H
25
26
27#include <cstdint>
28#include <string>
29
30
31namespace storage
32{
33
50
51
57 std::string get_used_features_dependency_type_name(UsedFeaturesDependencyType used_features_dependency_type);
58
59
63 using uf_t = uint64_t;
64
65
66 enum : uint64_t // TODO use uf_t
67 {
68 UF_EXT2 = 1 << 0,
69 UF_EXT3 = 1 << 1,
70 UF_EXT4 = 1 << 2,
71 UF_BTRFS = 1 << 3,
72 UF_XFS = 1 << 4,
73 UF_REISERFS = 1 << 5,
74 UF_SWAP = 1 << 6,
75 UF_NTFS = 1 << 7,
76 UF_VFAT = 1 << 8,
77 UF_NFS = 1 << 9,
78 UF_JFS = 1 << 10,
79 UF_F2FS = 1 << 23,
80 UF_NILFS2 = 1 << 30,
81 UF_EXFAT = 1 << 24,
82 UF_UDF = 1 << 25,
83 UF_BITLOCKER = 1 << 27,
84 UF_BCACHEFS = 1ULL << 31,
85
86 UF_PLAIN_ENCRYPTION = 1 << 26,
87 UF_LUKS = 1 << 11,
88
89 UF_LVM = 1 << 12,
90 UF_MDRAID = 1 << 13,
91 UF_DMRAID = 1 << 14,
92 UF_MULTIPATH = 1 << 15,
93 UF_BCACHE = 1 << 16,
94
95 UF_ISCSI = 1 << 17,
96 UF_FCOE = 1 << 18,
97 UF_FC = 1 << 19,
98 UF_DASD = 1 << 20,
99 UF_PMEM = 1 << 29,
100 UF_NVME = 1 << 28,
101
103 UF_QUOTA = 1 << 21,
104
105 UF_SNAPSHOTS = 1 << 22
106 };
107
108
112 std::string get_used_features_names(uf_t used_features);
113
114}
115
116#endif
The storage namespace.
Definition Actiongraph.h:40
std::string get_used_features_names(uf_t used_features)
Return a string with the names of the used features.
@ UF_QUOTA
Quota for ext4 or xfs.
Definition UsedFeatures.h:103
UsedFeaturesDependencyType
Enum specifying the dependency type of used features.
Definition UsedFeatures.h:38
@ SUGGESTED
Suggested used features include compared to the required used features also filesystems that have no ...
Definition UsedFeatures.h:48
@ REQUIRED
Required used features only include the minimal set of used features.
Definition UsedFeatures.h:42
uint64_t uf_t
Type for used features.
Definition UsedFeatures.h:63
std::string get_used_features_dependency_type_name(UsedFeaturesDependencyType used_features_dependency_type)
Convert the UsedFeaturesDependencyType used_features_dependency_type to a string.