summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-10-03 23:14:48 +0000
committerphk <phk@FreeBSD.org>1994-10-03 23:14:48 +0000
commitd92766a8ef47948a8139d65f37f5c6dc79809085 (patch)
tree4407e209341729616bfabdc60b5100ae0e7478f9
parent8e4232db5733fb672d0bdd8f81cc35e98a724f2f (diff)
downloadFreeBSD-src-d92766a8ef47948a8139d65f37f5c6dc79809085.zip
FreeBSD-src-d92766a8ef47948a8139d65f37f5c6dc79809085.tar.gz
First bug-fix. This this depends on something odd. I am looking at it,
but every now and then it will fail without an explanation :-(
-rw-r--r--sys/kern/imgact_gzip.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c
index 1313650..01d0de6 100644
--- a/sys/kern/imgact_gzip.c
+++ b/sys/kern/imgact_gzip.c
@@ -7,7 +7,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id$
+ * $Id: imgact_gzip.c,v 1.1 1994/10/03 05:23:01 phk Exp $
*
* This module handles execution of a.out files which have been run through
* "gzip -9".
@@ -252,6 +252,7 @@ do_aout_hdr(struct gzip *gz)
gz->ip->entry_addr = gz->a_out.a_entry;
gz->ip->proc->p_sysent = &aout_sysvec;
+printf("a.out ok, entry=%08x\n",gz->ip->entry_addr);
return 0;
}
@@ -352,10 +353,16 @@ Flush(struct gzip *gz,u_long siz)
gz->error = i;
return i;
}
+ if(gz->file_offset < sizeof gz->a_out) {
+ q = (u_char*) gz->virtual_offset + gz->output - gz->file_offset;
+ bcopy(&gz->a_out,q,sizeof gz->a_out);
+ }
}
}
if(gz->output >= gz->file_offset &&
- gz->output < (gz->file_offset+gz->a_out.a_text)) {
+ gz->output < (gz->file_offset+
+ gz->a_out.a_text+
+ gz->a_out.a_data)) {
i = min(siz,
(gz->file_offset+
@@ -623,7 +630,6 @@ int inflate_stored OF((struct gzip *));
int inflate_fixed OF((struct gzip *));
int inflate_dynamic OF((struct gzip *));
int inflate_block OF((struct gzip *,int *));
-int inflate OF((struct gzip *));
int inflate_free OF((struct gzip *));
OpenPOWER on IntegriCloud