mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
cryptsetup: add close --cancel-deferred
Allows to remove a previously set deferred removal from the command line. [mbroz: ported to new CLI parsing]
This commit is contained in:
committed by
Milan Broz
parent
3062a9ba91
commit
53d3ca0062
@@ -617,6 +617,8 @@ static int action_close(void)
|
||||
|
||||
if (ARG_SET(OPT_DEFERRED_ID))
|
||||
flags |= CRYPT_DEACTIVATE_DEFERRED;
|
||||
if (ARG_SET(OPT_CANCEL_DEFERRED_ID))
|
||||
flags |= CRYPT_DEACTIVATE_DEFERRED_CANCEL;
|
||||
|
||||
r = crypt_init_by_name(&cd, action_argv[0]);
|
||||
if (r == 0)
|
||||
@@ -3679,6 +3681,11 @@ int main(int argc, const char **argv)
|
||||
_("Options --refresh and --test-passphrase are mutually exclusive."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
if (ARG_SET(OPT_CANCEL_DEFERRED_ID) && ARG_SET(OPT_DEFERRED_ID))
|
||||
usage(popt_context, EXIT_FAILURE,
|
||||
_("Options --cancel-deferred and --deferred cannot be used at the same time."),
|
||||
poptGetInvocationName(popt_context));
|
||||
|
||||
/* open action specific check */
|
||||
if (ARG_SET(OPT_SHARED_ID) && strcmp_or_null(device_type, "plain"))
|
||||
usage(popt_context, EXIT_FAILURE,
|
||||
|
||||
Reference in New Issue
Block a user