Merge pull request #140 from Konubinix/master

Allow extpass option in encfsctl cat command
This commit is contained in:
Valient Gough 2016-03-23 22:32:05 -07:00
commit 6ff6ee6cc8

View File

@ -93,7 +93,7 @@ struct CommandOpts {
{"showcruft", 1, 1, cmd_showcruft, "(root dir)",
// xgroup(usage)
gettext_noop(" -- show undecodable filenames in the volume")},
{"cat", 2, 2, cmd_cat, "(root dir) path",
{"cat", 2, 3, cmd_cat, "[--extpass=prog] (root dir) path",
// xgroup(usage)
gettext_noop(" -- decodes the file and cats it to standard out")},
{"decode", 1, 100, cmd_decode,
@ -403,12 +403,11 @@ class WriteOutput {
};
static int cmd_cat(int argc, char **argv) {
(void)argc;
RootPtr rootInfo = initRootInfo(argv[1]);
RootPtr rootInfo = initRootInfo(argc, argv);
if (!rootInfo) return EXIT_FAILURE;
const char *path = argv[2];
const char *path = argv[0];
WriteOutput output(STDOUT_FILENO);
int errCode = processContents(rootInfo, path, output);