mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-20 07:10:08 +01:00
Fix offset option for loopaesOpen.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@476 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -1249,9 +1249,15 @@ int main(int argc, char **argv)
|
||||
usage(popt_context, EXIT_FAILURE, _("Option --uuid is allowed only for luksFormat and luksUUID."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if ((opt_offset || opt_skip) && strcmp(aname, "create"))
|
||||
usage(popt_context, EXIT_FAILURE, _("Options --offset and --skip are supported only for create command.\n"),
|
||||
poptGetInvocationName(popt_context));
|
||||
if (opt_skip && strcmp(aname, "create"))
|
||||
usage(popt_context, EXIT_FAILURE,
|
||||
_("Option --skip is supported only for create command.\n"),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if (opt_offset && strcmp(aname, "create") && strcmp(aname, "loopaesOpen"))
|
||||
usage(popt_context, EXIT_FAILURE,
|
||||
_("Option --offset is supported only for create and loopaesOpen commands.\n"),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if (opt_debug) {
|
||||
opt_verbose = 1;
|
||||
|
||||
Reference in New Issue
Block a user