diff options
author | delphij <delphij@FreeBSD.org> | 2007-07-12 01:17:14 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-07-12 01:17:14 +0000 |
commit | 1f75e6a1254a7cba32e7866028f470f6da00741a (patch) | |
tree | c210bc08c4b13173700518c97171bcbcd9098d33 /usr.bin/gzip | |
parent | f4045f00c6cc1030ae22fd3585b5b945c009e1ec (diff) | |
download | FreeBSD-src-1f75e6a1254a7cba32e7866028f470f6da00741a.zip FreeBSD-src-1f75e6a1254a7cba32e7866028f470f6da00741a.tar.gz |
- Simulate GNU gzip(1) behavior where full filename is
being output in verbose mode when doing recursive[1].
- Use better representation of S:
PR: bin/114470
Submitted by: Ighighi <ighighi gmail com> [1]
Approved by: re (hrs)
Diffstat (limited to 'usr.bin/gzip')
-rw-r--r-- | usr.bin/gzip/gzip.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c index a3a2a91..8711a20 100644 --- a/usr.bin/gzip/gzip.c +++ b/usr.bin/gzip/gzip.c @@ -143,7 +143,7 @@ static suffixes_t suffixes[] = { }; #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) -static const char gzip_version[] = "FreeBSD gzip 20070528"; +static const char gzip_version[] = "FreeBSD gzip 20070711"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -1806,7 +1806,7 @@ handle_dir(char *dir) path_argv[0] = dir; path_argv[1] = 0; - fts = fts_open(path_argv, FTS_PHYSICAL, NULL); + fts = fts_open(path_argv, FTS_PHYSICAL | FTS_NOCHDIR, NULL); if (fts == NULL) { warn("couldn't fts_open %s", dir); return; @@ -1824,7 +1824,7 @@ handle_dir(char *dir) maybe_warn("%s", entry->fts_path); continue; case FTS_F: - handle_file(entry->fts_name, entry->fts_statp); + handle_file(entry->fts_path, entry->fts_statp); } } (void)fts_close(fts); @@ -1981,8 +1981,10 @@ usage(void) fprintf(stderr, "%s\n", gzip_version); fprintf(stderr, - "usage: %s [-" OPT_LIST "] [<file> [<file> ...]]\n" -#ifndef SMALL +#ifdef SMALL + "usage: %s [-" OPT_LIST "] [<file> [<file> ...]]\n", +#else + "usage: %s [-123456789acdfhklLNnqrtVv] [-S .suffix] [<file> [<file> ...]]\n" " -1 --fast fastest (worst) compression\n" " -2 .. -8 set compression level\n" " -9 --best best (slowest) compression\n" @@ -2003,8 +2005,6 @@ usage(void) " -t --test test compressed file\n" " -V --version display program version\n" " -v --verbose print extra statistics\n", -#else - , #endif getprogname()); exit(0); |