diff options
author | phk <phk@FreeBSD.org> | 1994-10-22 11:55:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-22 11:55:16 +0000 |
commit | c6bdff31321d5e3a2497a09bc77e107315cc83f8 (patch) | |
tree | f94103924a33a4493249d4332ba9d269629c2922 /sys/kern/imgact_gzip.c | |
parent | ab856e27b3ef2606215e6f6c3265a6fe14ad871b (diff) | |
download | FreeBSD-src-c6bdff31321d5e3a2497a09bc77e107315cc83f8.zip FreeBSD-src-c6bdff31321d5e3a2497a09bc77e107315cc83f8.tar.gz |
Make the diagnostics a little more useful.
A word of wisdom, don't do this:
| cd /usr/bin
| for i in *
| do
| cp $i /tmp/a
| gzip -9 < /tmp/a > $i
| done
It will compress files with multiple links several times. do it this way:
| cd /usr/bin
| for i in *
| do
| gunzip -f < $i > /tmp/a
| gzip -9 < /tmp/a > $i
| done
Diffstat (limited to 'sys/kern/imgact_gzip.c')
-rw-r--r-- | sys/kern/imgact_gzip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c index a84477e..87de995 100644 --- a/sys/kern/imgact_gzip.c +++ b/sys/kern/imgact_gzip.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: imgact_gzip.c,v 1.9 1994/10/22 11:40:27 phk Exp $ * * This module handles execution of a.out files which have been run through * "gzip". This saves diskspace, but wastes cpu-cycles and VM. @@ -327,7 +327,8 @@ Flush(void *vp, u_char * ptr, u_long siz) if (gz->output == sizeof gz->a_out) { i = do_aout_hdr(gz); if (i == -1) { - gz->where = __LINE__; + if (!gz->where) + gz->where = __LINE__; gz->error = ENOEXEC; return ENOEXEC; } else if (i) { |