From: Milan Broz Date: Fri, 15 Jun 2012 13:16:49 +0000 (+0200) Subject: Remove new file header option for now. X-Git-Tag: upstream/1.6~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=fbba97552e8fc4c8014275c01a52c38722d3f0de;p=platform%2Fupstream%2Fcryptsetup.git Remove new file header option for now. --- diff --git a/src/crypt_reencrypt.c b/src/crypt_reencrypt.c index 93cd0a3..9077898 100644 --- a/src/crypt_reencrypt.c +++ b/src/crypt_reencrypt.c @@ -63,10 +63,8 @@ static int opt_version_mode = 0; static int opt_random = 0; static int opt_urandom = 0; static int opt_bsize = 4; -static int opt_new = 0; static int opt_directio = 0; static int opt_write_log = 0; -static const char *opt_new_file = NULL; static const char **action_argv; @@ -749,12 +747,7 @@ static int initialize_context(const char *device) if (!(rnc.device = strndup(device, PATH_MAX))) return -ENOMEM; -/* - if (opt_new_file && !create_uuid()) { - log_err("Cannot create fake header.\n"); - return -EINVAL; - } -*/ + if (initialize_uuid()) { log_err("No header found on device.\n"); return -EINVAL; @@ -882,8 +875,6 @@ int main(int argc, const char **argv) { "verbose", 'v', POPT_ARG_NONE, &opt_verbose, 0, N_("Shows more detailed error messages"), NULL }, { "debug", '\0', POPT_ARG_NONE, &opt_debug, 0, N_("Show debug messages"), NULL }, { "block-size", 'B', POPT_ARG_INT, &opt_bsize, 0, N_("Reencryption block size"), N_("MB") }, - { "new-header", 'N', POPT_ARG_INT, &opt_new, 0, N_("Create new header, need size on the end of device"), N_("MB") }, - { "new-crypt", 'f', POPT_ARG_STRING, &opt_new_file, 0, N_("Log suffix for new reencryption file."), NULL }, { "cipher", 'c', POPT_ARG_STRING, &opt_cipher, 0, N_("The cipher used to encrypt the disk (see /proc/crypto)"), NULL }, { "hash", 'h', POPT_ARG_STRING, &opt_hash, 0, N_("The hash used to create the encryption key from the passphrase"), NULL }, { "key-file", 'd', POPT_ARG_STRING, &opt_key_file, 0, N_("Read the key from a file."), NULL }, @@ -934,10 +925,6 @@ int main(int argc, const char **argv) usage(popt_context, EXIT_FAILURE, _("Only one of --use-[u]random options is allowed."), poptGetInvocationName(popt_context)); - if (opt_new && !opt_new_file) - usage(popt_context, EXIT_FAILURE, _("You have to use -f with -N."), - poptGetInvocationName(popt_context)); - if (opt_debug) { opt_verbose = 1; crypt_set_debug_level(-1);