From 8be0bbfabb95d6884f534f2d46b523140b5d0059 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 23 Oct 2016 13:54:53 -0700 Subject: [PATCH] gzip, gunzip: accept -n option --- programs/gzip.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/programs/gzip.c b/programs/gzip.c index 81f0c8b..259fdac 100644 --- a/programs/gzip.c +++ b/programs/gzip.c @@ -47,7 +47,7 @@ struct options { const tchar *suffix; }; -static const tchar *const optstring = T("1::2::3::4::5::6::7::8::9::cdfhkS:V"); +static const tchar *const optstring = T("1::2::3::4::5::6::7::8::9::cdfhknS:V"); static void show_usage(FILE *fp) @@ -530,6 +530,14 @@ tmain(int argc, tchar *argv[]) case 'k': options.keep = true; break; + case 'n': + /* + * -n means don't save or restore the original filename + * in the gzip header. Currently this implementation + * already behaves this way by default, so accept the + * option as a no-op. + */ + break; case 'S': options.suffix = toptarg; if (options.suffix[0] == T('\0')) {