minor cleanup

git-svn-id: http://encfs.googlecode.com/svn/trunk@122 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
Valient Gough 2013-10-19 22:42:44 +00:00
parent a89752dfe7
commit 88f041a0b2
2 changed files with 12 additions and 37 deletions

View File

@ -80,7 +80,6 @@ class CipherFileIO : public BlockFileIO {
int headerLen; int headerLen;
bool perFileIV; bool perFileIV;
bool externalIVChaining;
uint64_t externalIV; uint64_t externalIV;
uint64_t fileIV; uint64_t fileIV;
int lastFlags; int lastFlags;

View File

@ -74,15 +74,13 @@ struct CommandOpts {
const char *argStr; const char *argStr;
const char *usageStr; const char *usageStr;
} commands[] = { } commands[] = {
{"info", 1, 1, {"info", 1, 1, showInfo, "(root dir)",
showInfo, "(root dir)",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- show information (Default command)")}, gettext_noop(" -- show information")},
{"showKey", 1, 1, cmd_showKey, "(root dir)", {"showKey", 1, 1, cmd_showKey, "(root dir)",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- show key")}, gettext_noop(" -- show key")},
{"passwd", 1, 1, {"passwd", 1, 1, chpasswd, "(root dir)",
chpasswd, "(root dir)",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- change password for volume")}, gettext_noop(" -- change password for volume")},
{"autopasswd", 1, 1, chpasswdAutomaticly, "(root dir)", {"autopasswd", 1, 1, chpasswdAutomaticly, "(root dir)",
@ -91,56 +89,34 @@ struct CommandOpts {
" -- change password for volume, taking password" " -- change password for volume, taking password"
" from standard input.\n\tNo prompts are issued.")}, " from standard input.\n\tNo prompts are issued.")},
{"ls", 1, 2, cmd_ls, 0, 0}, {"ls", 1, 2, cmd_ls, 0, 0},
{"showcruft", {"showcruft", 1, 1, cmd_showcruft, "(root dir)",
1,
1,
cmd_showcruft,
"(root dir)",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- show undecodable filenames in the volume")}, gettext_noop(" -- show undecodable filenames in the volume")},
{"cat", {"cat", 2, 2, cmd_cat, "(root dir) path",
2,
2,
cmd_cat,
"(root dir) path",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- decodes the file and cats it to standard out")}, gettext_noop(" -- decodes the file and cats it to standard out")},
{"decode", {"decode", 1, 100, cmd_decode,
1,
100,
cmd_decode,
"[--extpass=prog] (root dir) [encoded-name ...]", "[--extpass=prog] (root dir) [encoded-name ...]",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- decodes name and prints plaintext version")}, gettext_noop(" -- decodes name and prints plaintext version")},
{"encode", 1, {"encode", 1, 100, cmd_encode,
100, cmd_encode,
"[--extpass=prog] (root dir) [plaintext-name ...]", "[--extpass=prog] (root dir) [plaintext-name ...]",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- encodes a filename and print result")}, gettext_noop(" -- encodes a filename and print result")},
{"export", {"export", 2, 2, cmd_export, "(root dir) path",
2,
2,
cmd_export,
"(root dir) path",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- decrypts a volume and writes results to path")}, gettext_noop(" -- decrypts a volume and writes results to path")},
{"ciphers", 0, 0, showCiphers, "", {"ciphers", 0, 0, showCiphers, "",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- show available ciphers")}, gettext_noop(" -- show available ciphers")},
{"version", 0, 0, showVersion, "", {"version", 0, 0, showVersion, "",
// xgroup(usage) // xgroup(usage)
gettext_noop(" -- print version number and exit")}, gettext_noop(" -- print version number and exit")},
{0, 0, 0, 0, 0, 0}}; {0, 0, 0, 0, 0, 0}};
static void usage(const char *name) { static void usage(const char *name) {
cerr << autosprintf(_("encfsctl version %s"), VERSION) << "\n" cerr << autosprintf(_("encfsctl version %s"), VERSION) << "\n"
<< _("Usage:\n") << _("Usage:\n");
// displays usage commands, eg "./encfs (root dir) ..."
// xgroup(usage)
<< autosprintf(
_("%s (root dir)\n"
" -- displays information about the filesystem, or \n"),
name);
int offset = 0; int offset = 0;
while (commands[offset].name != 0) { while (commands[offset].name != 0) {