diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 00:58:07 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 00:58:07 +0000 |
| commit | 6c1b63bb06db416d81139f6990384aa84f6ec37c (patch) | |
| tree | 7d92b05fb08d593b7c04d6f0b25df8582ba83016 /usr.bin | |
| parent | 5bc74cd68fec1c862dfe6b5ef358badb2a8ee1c0 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/compress/compress.1 | 7 | ||||
| -rw-r--r-- | usr.bin/compress/compress.c | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/compress/compress.1 b/usr.bin/compress/compress.1 index 9b6e4c038c56f..cb69bcbe2da48 100644 --- a/usr.bin/compress/compress.1 +++ b/usr.bin/compress/compress.1 @@ -150,6 +150,13 @@ coding (as used in the historical command compact), and takes less time to compute. .Sh DIAGNOSTICS .Ex -std compress uncompress +.Pp +The +.Nm compress +utility exits 2 if attempting to compress the file would not reduce its size +and the +.Fl f +option was not specified. .Sh SEE ALSO .Xr gunzip 1 , .Xr gzexe 1 , diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index bcdfd691e4694..b69422c8e6341 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -249,6 +249,7 @@ compress(in, out, bits) if (!force && sb.st_size >= isb.st_size) { if (verbose) (void)printf("%s: file would grow; left unmodified\n", in); + eval = 2; if (unlink(out)) cwarn("%s", out); goto err; |
