diff options
author | Ondrej Kozina <okozina@redhat.com> | 2023-11-01 12:35:59 +0100 |
---|---|---|
committer | Ondrej Kozina <okozina@redhat.com> | 2023-11-02 17:15:14 +0100 |
commit | 45ddc623bc45c2f5b3d21cadcbaec2397f0abf5a (patch) | |
tree | 2f1e18492cb803521b1e9e7a51ca243675bad5b9 | |
parent | 52b2dc5148e3b7bb8456ab9840937236a0ab9656 (diff) | |
download | cryptsetup-45ddc623bc45c2f5b3d21cadcbaec2397f0abf5a.tar.gz |
Restrict --hw-opal options only to luksFormat action.
-rw-r--r-- | src/cryptsetup_arg_list.h | 4 | ||||
-rw-r--r-- | src/cryptsetup_args.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptsetup_arg_list.h b/src/cryptsetup_arg_list.h index 28c63d4b..00a7563a 100644 --- a/src/cryptsetup_arg_list.h +++ b/src/cryptsetup_arg_list.h @@ -71,11 +71,11 @@ ARG(OPT_HEADER_BACKUP_FILE, '\0', POPT_ARG_STRING, N_("File with LUKS header and ARG(OPT_HOTZONE_SIZE, '\0', POPT_ARG_STRING, N_("Maximal reencryption hotzone size"), N_("bytes"), CRYPT_ARG_UINT64, {}, OPT_HOTZONE_SIZE_ACTIONS) -ARG(OPT_HW_OPAL, '\0', POPT_ARG_NONE, N_("Use HW OPAL encryption together with SW encryption"), NULL, CRYPT_ARG_BOOL, {}, {}) +ARG(OPT_HW_OPAL, '\0', POPT_ARG_NONE, N_("Use HW OPAL encryption together with SW encryption"), NULL, CRYPT_ARG_BOOL, {}, OPT_HW_OPAL_ACTIONS) ARG(OPT_HW_OPAL_FACTORY_RESET, '\0', POPT_ARG_NONE, N_("Wipe WHOLE OPAL disk on luksErase"), NULL, CRYPT_ARG_BOOL, {}, OPT_ERASE_ACTIONS) -ARG(OPT_HW_OPAL_ONLY, '\0', POPT_ARG_NONE, N_("Use only HW OPAL encryption"), NULL, CRYPT_ARG_BOOL, {}, {}) +ARG(OPT_HW_OPAL_ONLY, '\0', POPT_ARG_NONE, N_("Use only HW OPAL encryption"), NULL, CRYPT_ARG_BOOL, {}, OPT_HW_OPAL_ONLY_ACTIONS) ARG(OPT_INIT_ONLY, '\0', POPT_ARG_NONE, N_("Initialize LUKS2 reencryption in metadata only"), NULL, CRYPT_ARG_BOOL, {}, {}) diff --git a/src/cryptsetup_args.h b/src/cryptsetup_args.h index be95b4b3..fa21f228 100644 --- a/src/cryptsetup_args.h +++ b/src/cryptsetup_args.h @@ -63,6 +63,8 @@ #define OPT_ERASE_ACTIONS { ERASE_ACTION } #define OPT_FORCE_OFFLINE_REENCRYPT_ACTIONS { REENCRYPT_ACTION } #define OPT_HOTZONE_SIZE_ACTIONS { REENCRYPT_ACTION } +#define OPT_HW_OPAL_ACTIONS { FORMAT_ACTION } +#define OPT_HW_OPAL_ONLY_ACTIONS OPT_HW_OPAL_ACTIONS #define OPT_INTEGRITY_ACTIONS { FORMAT_ACTION, REENCRYPT_ACTION } #define OPT_INTEGRITY_NO_WIPE_ACTIONS { FORMAT_ACTION, REENCRYPT_ACTION } #define OPT_ITER_TIME_ACTIONS { BENCHMARK_ACTION, FORMAT_ACTION, ADDKEY_ACTION, CHANGEKEY_ACTION, CONVERTKEY_ACTION, REENCRYPT_ACTION } |