Add --new alias for --encrypt parameter.

To be compatible with cryptsetup-reencrypt utility.
This commit is contained in:
Ondrej Kozina
2021-10-15 16:06:14 +02:00
parent 686acf82a2
commit 06fd461bd8

View File

@@ -2824,6 +2824,9 @@ static void basic_options_cb(poptContext popt_context,
_("Key size must be a multiple of 8 bits"), _("Key size must be a multiple of 8 bits"),
poptGetInvocationName(popt_context)); poptGetInvocationName(popt_context));
break; break;
case OPT_NEW_ID:
ARG_SET_TRUE(OPT_ENCRYPT_ID);
break;
case OPT_REDUCE_DEVICE_SIZE_ID: case OPT_REDUCE_DEVICE_SIZE_ID:
if (ARG_UINT64(OPT_REDUCE_DEVICE_SIZE_ID) > 1024 * 1024 * 1024) if (ARG_UINT64(OPT_REDUCE_DEVICE_SIZE_ID) > 1024 * 1024 * 1024)
usage(popt_context, EXIT_FAILURE, _("Maximum device reduce size is 1 GiB."), usage(popt_context, EXIT_FAILURE, _("Maximum device reduce size is 1 GiB."),