mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-17 05:40:13 +01:00
Allow to specify --align-payload only for luksFormat.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
2012-03-16 Milan Broz <gmazyland@gmail.com>
|
2012-03-16 Milan Broz <gmazyland@gmail.com>
|
||||||
* Add --keyfile-offset and --new-keyfile-offset parameters to API and CLI.
|
* Add --keyfile-offset and --new-keyfile-offset parameters to API and CLI.
|
||||||
* Add repair command and crypt_repair() for known LUKS metadata problems repair.
|
* Add repair command and crypt_repair() for known LUKS metadata problems repair.
|
||||||
|
* Allow to specify --align-payload only for luksFormat.
|
||||||
|
|
||||||
2012-03-16 Milan Broz <mbroz@redhat.com>
|
2012-03-16 Milan Broz <mbroz@redhat.com>
|
||||||
* Unify password verification option.
|
* Unify password verification option.
|
||||||
|
|||||||
@@ -1443,6 +1443,7 @@ int main(int argc, const char **argv)
|
|||||||
if (opt_random && opt_urandom)
|
if (opt_random && opt_urandom)
|
||||||
usage(popt_context, EXIT_FAILURE, _("Only one of --use-[u]random options is allowed."),
|
usage(popt_context, EXIT_FAILURE, _("Only one of --use-[u]random options is allowed."),
|
||||||
poptGetInvocationName(popt_context));
|
poptGetInvocationName(popt_context));
|
||||||
|
|
||||||
if ((opt_random || opt_urandom) && strcmp(aname, "luksFormat"))
|
if ((opt_random || opt_urandom) && strcmp(aname, "luksFormat"))
|
||||||
usage(popt_context, EXIT_FAILURE, _("Option --use-[u]random is allowed only for luksFormat."),
|
usage(popt_context, EXIT_FAILURE, _("Option --use-[u]random is allowed only for luksFormat."),
|
||||||
poptGetInvocationName(popt_context));
|
poptGetInvocationName(popt_context));
|
||||||
@@ -1451,6 +1452,10 @@ int main(int argc, const char **argv)
|
|||||||
usage(popt_context, EXIT_FAILURE, _("Option --uuid is allowed only for luksFormat and luksUUID."),
|
usage(popt_context, EXIT_FAILURE, _("Option --uuid is allowed only for luksFormat and luksUUID."),
|
||||||
poptGetInvocationName(popt_context));
|
poptGetInvocationName(popt_context));
|
||||||
|
|
||||||
|
if (opt_align_payload && strcmp(aname, "luksFormat"))
|
||||||
|
usage(popt_context, EXIT_FAILURE, _("Option --align-payload is allowed only for luksFormat."),
|
||||||
|
poptGetInvocationName(popt_context));
|
||||||
|
|
||||||
if (opt_skip && strcmp(aname, "create") && strcmp(aname, "loopaesOpen"))
|
if (opt_skip && strcmp(aname, "create") && strcmp(aname, "loopaesOpen"))
|
||||||
usage(popt_context, EXIT_FAILURE,
|
usage(popt_context, EXIT_FAILURE,
|
||||||
_("Option --skip is supported only for create and loopaesOpen commands.\n"),
|
_("Option --skip is supported only for create and loopaesOpen commands.\n"),
|
||||||
|
|||||||
Reference in New Issue
Block a user