Holger Levsen wrote:
> On Freitag, 18. Dezember 2015, Trent W. Buck wrote:
> > pxz accepts the equivalent option, but ignores it:
> [...]
> > Please make pxz honor -Ccrc32,
> > or at least stop accepting it (exit non-zero instead).
>
> I agree and am sure upstream would appreciate a patch as well.
> Could you maybe provide one?
Thanks for the quick reply.
I glanced at the source, but my C skills are weak.
I probably can't provide a patch.
Also I found that even though pixz has no -C/--check option, it works by
default!
So my immediate needs are met, though I'd prefer pxz because it's smaller and
simpler.
"Just don't honor -C" part should be a simple matter of commenting out
that part of the getopts block, as pxz already does for filter options:
diff --git a/pxz.c b/pxz.c
index 23f819a..496be75 100644
--- a/pxz.c
+++ b/pxz.c
@@ -103,7 +103,7 @@ const struct option long_opts[] = {
// { "files0", optional_argument, NULL, OPT_FILES0 },
// Basic compression settings
{ "format", required_argument, NULL, 'F' },
- { "check", required_argument, NULL, 'C' },
{ "memory", required_argument, NULL, 'M' },
{ "threads", required_argument, NULL, 'T' },
{ "context-size", required_argument, NULL, 'D' },
I suppose fixing it properly involves adding a 'C' case to parse_args(),
and fiddling with lzma_options after lzma_lzma_preset in main().
While we're at it, you/I/upstream should check that the rest of
long_opts[] array matches the dispatch in parse_args :-)
PS: I tested pxz on jessie, but not sid.
I suppose it's possible a commit since pxz/jessie has fixed this already.