"Fossies" - the Fresh Open Source Software Archive 
Member "cryptsetup-2.4.3/src/cryptsetup_args.h" (13 Jan 2022, 4091 Bytes) of package /linux/misc/cryptsetup-2.4.3.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "cryptsetup_args.h" see the
Fossies "Dox" file reference documentation.
1 /*
2 * Command line arguments helpers
3 *
4 * Copyright (C) 2020-2021 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2020-2021 Ondrej Kozina
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #ifndef CRYPTSETUP_ARGS_H
23 #define CRYPTSETUP_ARGS_H
24
25 #include "utils_arg_names.h"
26 #include "utils_arg_macros.h"
27
28 #define BITLKDUMP_ACTION "bitlkDump"
29 #define BENCHMARK_ACTION "benchmark"
30 #define CLOSE_ACTION "close"
31 #define CONFIG_ACTION "config"
32 #define CONVERT_ACTION "convert"
33 #define ERASE_ACTION "erase"
34 #define ISLUKS_ACTION "isLuks"
35 #define ADDKEY_ACTION "luksAddKey"
36 #define CHANGEKEY_ACTION "luksChangeKey"
37 #define CONVERTKEY_ACTION "luksConvertKey"
38 #define LUKSDUMP_ACTION "luksDump"
39 #define FORMAT_ACTION "luksFormat"
40 #define HEADERBACKUP_ACTION "luksHeaderBackup"
41 #define HEADERRESTORE_ACTION "luksHeaderRestore"
42 #define KILLKEY_ACTION "luksKillSlot"
43 #define REMOVEKEY_ACTION "luksRemoveKey"
44 #define RESUME_ACTION "luksResume"
45 #define SUSPEND_ACTION "luksSuspend"
46 #define UUID_ACTION "luksUUID"
47 #define OPEN_ACTION "open"
48 #define REENCRYPT_ACTION "reencrypt"
49 #define REPAIR_ACTION "repair"
50 #define RESIZE_ACTION "resize"
51 #define STATUS_ACTION "status"
52 #define TCRYPTDUMP_ACTION "tcryptDump"
53 #define TOKEN_ACTION "token"
54
55 /* avoid unshielded commas in ARG() macros later */
56 #define OPT_ALIGN_PAYLOAD_ACTIONS { FORMAT_ACTION }
57 #define OPT_ALLOW_DISCARDS_ACTIONS { OPEN_ACTION }
58 #define OPT_DEFERRED_ACTIONS { CLOSE_ACTION }
59 #define OPT_HOTZONE_SIZE_ACTIONS { REENCRYPT_ACTION }
60 #define OPT_INTEGRITY_ACTIONS { FORMAT_ACTION }
61 #define OPT_KEY_SIZE_ACTIONS { OPEN_ACTION, BENCHMARK_ACTION, FORMAT_ACTION, REENCRYPT_ACTION, ADDKEY_ACTION }
62 #define OPT_KEY_SLOT_ACTIONS { OPEN_ACTION, REENCRYPT_ACTION, CONFIG_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, LUKSDUMP_ACTION, TOKEN_ACTION }
63 #define OPT_LABEL_ACTIONS { CONFIG_ACTION, FORMAT_ACTION }
64 #define OPT_LUKS2_KEYSLOTS_SIZE_ACTIONS { REENCRYPT_ACTION, FORMAT_ACTION }
65 #define OPT_LUKS2_METADATA_SIZE_ACTIONS { REENCRYPT_ACTION, FORMAT_ACTION }
66 #define OPT_OFFSET_ACTIONS { OPEN_ACTION, REENCRYPT_ACTION, FORMAT_ACTION }
67 #define OPT_PERSISTENT_ACTIONS { OPEN_ACTION }
68 #define OPT_PRIORITY_ACTIONS { CONFIG_ACTION }
69 #define OPT_REFRESH_ACTIONS { OPEN_ACTION }
70 #define OPT_SECTOR_SIZE_ACTIONS { OPEN_ACTION, REENCRYPT_ACTION, FORMAT_ACTION }
71 #define OPT_SERIALIZE_MEMORY_HARD_PBKDF_ACTIONS { OPEN_ACTION }
72 #define OPT_SKIP_ACTIONS { OPEN_ACTION }
73 #define OPT_SUBSYSTEM_ACTIONS { CONFIG_ACTION, FORMAT_ACTION }
74 #define OPT_TCRYPT_BACKUP_ACTIONS { OPEN_ACTION, TCRYPTDUMP_ACTION }
75 #define OPT_TCRYPT_HIDDEN_ACTIONS { OPEN_ACTION, TCRYPTDUMP_ACTION }
76 #define OPT_TCRYPT_SYSTEM_ACTIONS { OPEN_ACTION, TCRYPTDUMP_ACTION }
77 #define OPT_TEST_PASSPHRASE_ACTIONS { OPEN_ACTION }
78 #define OPT_UNBOUND_ACTIONS { ADDKEY_ACTION, LUKSDUMP_ACTION }
79 #define OPT_USE_RANDOM_ACTIONS { FORMAT_ACTION }
80 #define OPT_USE_URANDOM_ACTIONS { FORMAT_ACTION }
81 #define OPT_UUID_ACTIONS { FORMAT_ACTION, UUID_ACTION }
82
83 enum {
84 OPT_UNUSED_ID = 0, /* leave unused due to popt library */
85 #define ARG(A, B, C, D, E, F, G, H) A ## _ID,
86 #include "cryptsetup_arg_list.h"
87 #undef ARG
88 };
89
90 static struct tools_arg tool_core_args[] = { { NULL, false, CRYPT_ARG_BOOL }, /* leave unused due to popt library */
91 #define ARG(A, B, C, D, E, F, G, H) { A, false, F, G, H },
92 #include "cryptsetup_arg_list.h"
93 #undef ARG
94 };
95
96 #endif