diff options
author | Denis Vlasenko | 2008-03-30 13:11:47 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-03-30 13:11:47 +0000 |
commit | 5297809c03271977cc1187b82dd1756684edf93a (patch) | |
tree | a9a702075041efeb4e976e09b8387f30b4703e0a /archival/bbunzip.c | |
parent | 1b2058fe986a183d6b2f71145b166d683df82770 (diff) | |
download | busybox-5297809c03271977cc1187b82dd1756684edf93a.zip busybox-5297809c03271977cc1187b82dd1756684edf93a.tar.gz |
g[un]zip: accept and ignore -n (needed for kernel compile)
Diffstat (limited to 'archival/bbunzip.c')
-rw-r--r-- | archival/bbunzip.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 327b3cf..90d39f6 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c @@ -256,10 +256,24 @@ USE_DESKTOP(long long) int unpack_gunzip(void) return status; } +/* + * Linux kernel build uses gzip -d -n. We accept and ignore it. + * Man page says: + * -n --no-name + * gzip: do not save the original file name and time stamp. + * (The original name is always saved if the name had to be truncated.) + * gunzip: do not restore the original file name/time even if present + * (remove only the gzip suffix from the compressed file name). + * This option is the default when decompressing. + * -N --name + * gzip: always save the original file name and time stamp (this is the default) + * gunzip: restore the original file name and time stamp if present. + */ + int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv) { - getopt32(argv, "cfvdt"); + getopt32(argv, "cfvdtn"); argv += optind; /* if called as zcat */ if (applet_name[1] == 'c') |