* Replace not safe option --non-exclusive with --disable-uuid.
authorMilan Broz <gmazyland@gmail.com>
Mon, 31 Aug 2009 17:03:10 +0000 (17:03 +0000)
committerMilan Broz <gmazyland@gmail.com>
Mon, 31 Aug 2009 17:03:10 +0000 (17:03 +0000)
(just formal change, code already contains the change)

Signed-off-by: Milan Broz <mbroz@redhat.com>
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@101 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
man/cryptsetup.8
src/cryptsetup.c

index 2854b41..dd6fe96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
        * Implement old API calls using new functions.
        * Remove old API code helper functions.
        * Add --master-key-file option for luksFormat and luksAddKey.
+       * Replace not safe option --non-exclusive with --disable-uuid.
 
 2009-08-17  Milan Broz  <mbroz@redhat.com>
        * Fix PBKDF2 speed calculation for large passhrases.
index fcac832..30b9f54 100644 (file)
@@ -134,6 +134,9 @@ This option is only relevant for \fIcreate\fR action.
 .B "\-\-readonly"
 set up a read-only mapping.
 .TP
+.B "\-\-disable-uuid"
+Activate device without UUID. Useful for \fIluksOpen\fR to activate cloned LUKS device or its snapshot.
+.TP
 .B "\-\-iter-time, \-i"
 The number of milliseconds to spend with PBKDF2 password processing. This option is only relevant to the LUKS operations as \fIluksFormat\fR or \fIluksAddKey\fR.
 .TP
index 12c7e5f..253a420 100644 (file)
@@ -34,7 +34,7 @@ static int opt_version_mode = 0;
 static int opt_timeout = 0;
 static int opt_tries = 3;
 static int opt_align_payload = 0;
-static int opt_non_exclusive = 0;
+static int opt_disable_uuid = 0;
 
 static const char **action_argv;
 static int action_argc;
@@ -371,7 +371,7 @@ static int action_luksOpen(int arg)
 
        if (opt_readonly)
                options.flags |= CRYPT_FLAG_READONLY;
-       if (opt_non_exclusive)
+       if (opt_disable_uuid) /* Abuse old flag */
                options.flags |= CRYPT_FLAG_NON_EXCLUSIVE_ACCESS;
        return crypt_luksOpen(&options);
 }
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
                { "timeout",           't',  POPT_ARG_INT,                                &opt_timeout,           0, N_("Timeout for interactive passphrase prompt (in seconds)"),          N_("secs") },
                { "tries",             'T',  POPT_ARG_INT,                                &opt_tries,             0, N_("How often the input of the passphrase canbe retried"),            NULL },
                { "align-payload",     '\0',  POPT_ARG_INT,                               &opt_align_payload,     0, N_("Align payload at <n> sector boundaries - for luksFormat"),         N_("SECTORS") },
-               { "non-exclusive",     '\0',  POPT_ARG_NONE,                              &opt_non_exclusive,     0, N_("Allows non-exclusive access for luksOpen, WARNING see manpage."),        NULL },
+               { "disable-uuid",      '\0',  POPT_ARG_NONE,                              &opt_disable_uuid,      0, N_("Do not set UUID for device luksOpen."), NULL },
                POPT_TABLEEND
        };
        poptContext popt_context;