From ce409990e75966d38b929902a35d507cee4e922b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 29 Aug 2021 10:15:14 +0300 Subject: [PATCH 1/2] Spelling fixes. --- ChangeLog | 2 +- README.md | 2 +- doc/README.benchmarks | 2 +- doc/lrzip.conf.example | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4afa085..82f0cfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -88,7 +88,7 @@ anyway * fake_mremap is only used when defined to mremap * Remove unused cksem functions * Fix remaining use of mutexes lock/unlocking in different threads with cksems, -corecting cksem usage on osx +correcting cksem usage on osx * Update copyright dates * Make match_len a function completely removing all indirect calls to get_sb, significantly speeding up the single_get_sb case diff --git a/README.md b/README.md index 3403c5c..9bab3e0 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Two different ways of doing this: Stable: Packaged tarball that is known to work: -Go to and downlaod the `tar.gz` +Go to and download the `tar.gz` file from the top. `cd` to the directory you downloaded, and use `tar xvzf lrzip-X.X.tar.gz` to extract the files (don't forget to replace `X.X` with the correct version). Finally, cd into the directory you just extracted. diff --git a/doc/README.benchmarks b/doc/README.benchmarks index cb295f1..7e3dd10 100644 --- a/doc/README.benchmarks +++ b/doc/README.benchmarks @@ -45,7 +45,7 @@ purpose compressor at the moment: These are benchmarks performed on a 2.53Ghz dual core Intel Core2 with 4GB ram using lrzip v0.5.1. Note that it was running with a 32 bit userspace so only -2GB addressing was posible. However the benchmark was run with the -U option +2GB addressing was possible. However the benchmark was run with the -U option allowing the whole file to be treated as one large compression window. Tarball of 6 consecutive kernel trees. diff --git a/doc/lrzip.conf.example b/doc/lrzip.conf.example index 7eaa0d9..00428ae 100644 --- a/doc/lrzip.conf.example +++ b/doc/lrzip.conf.example @@ -13,7 +13,7 @@ # Use -U setting, Unlimited ram. Yes or No # UNLIMITED = NO # Compression Method, rzip, gzip, bzip2, lzo, or lzma (default), or zpaq. (-n -g -b -l --lzma -z) -# May be overriden by command line compression choice. +# May be overridden by command line compression choice. # COMPRESSIONMETHOD = lzma # Perform LZO Test. Default = YES (-T ) # LZOTEST = NO From 8aaf5be82afa644b261db02721dbb0edb02f463a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 29 Aug 2021 10:32:15 +0300 Subject: [PATCH 2/2] Exit status fixes. Previously help and all usage errors resulted in exit status 255, which is unconventional. Treat help as non-error, and error with status 2 for usage errors to match more common command behavior. The exit status of -? changes to that of an usage error, even though it is listed as one of the help invoking options, due to getopt_long behavior. --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index f70c53a..4519a63 100644 --- a/main.c +++ b/main.c @@ -409,9 +409,9 @@ int main(int argc, char *argv[]) control->flags |= FLAG_FORCE_REPLACE; break; case 'h': - case '?': usage(compat); - return -1; + exit(0); + break; case 'H': control->flags |= FLAG_HASH; break; @@ -544,6 +544,9 @@ int main(int argc, char *argv[]) case '9': control->compression_level = c - '0'; break; + default: + usage(compat); + return 2; } }