libstorage-ng
UsedFeatures.h
1 /*
2  * Copyright (c) [2016-2022] 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 <stdint.h>
28 #include <string>
29 
30 
31 namespace storage
32 {
33 
38  {
42  REQUIRED,
43 
48  SUGGESTED
49  };
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 
85  UF_PLAIN_ENCRYPTION = 1 << 26,
86  UF_LUKS = 1 << 11,
87 
88  UF_LVM = 1 << 12,
89  UF_MDRAID = 1 << 13,
90  UF_DMRAID = 1 << 14,
91  UF_MULTIPATH = 1 << 15,
92  UF_BCACHE = 1 << 16,
93 
94  UF_ISCSI = 1 << 17,
95  UF_FCOE = 1 << 18,
96  UF_FC = 1 << 19,
97  UF_DASD = 1 << 20,
98  UF_PMEM = 1 << 29,
99  UF_NVME = 1 << 28,
100 
102  UF_QUOTA = 1 << 21,
103 
104  UF_SNAPSHOTS = 1 << 22
105  };
106 
107 
111  std::string get_used_features_names(uf_t used_features);
112 
113 }
114 
115 #endif
std::string get_used_features_names(uf_t used_features)
Return a string with the names of the used features.
uint64_t uf_t
Type for used features.
Definition: UsedFeatures.h:63
Suggested used features include compared to the required used features also filesystems that have no ...
UsedFeaturesDependencyType
Enum specifying the dependency type of used features.
Definition: UsedFeatures.h:37
Quota for ext4 or xfs.
Definition: UsedFeatures.h:102
std::string get_used_features_dependency_type_name(UsedFeaturesDependencyType used_features_dependency_type)
Convert the UsedFeaturesDependencyType used_features_dependency_type to a string. ...
The storage namespace.
Definition: Actiongraph.h:39
Required used features only include the minimal set of used features.