diff options
author | phk <phk@FreeBSD.org> | 1995-04-25 05:27:04 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-04-25 05:27:04 +0000 |
commit | 81382a3eb25fdc01ab972f489b6ec1921d1f00ac (patch) | |
tree | bafd2e9c46892cd4967753f59ca15507919f8cf5 /usr.bin/kzip | |
parent | 9389f84a984b3ab889429f4cfd2d2f5dae3599a6 (diff) | |
download | FreeBSD-src-81382a3eb25fdc01ab972f489b6ec1921d1f00ac.zip FreeBSD-src-81382a3eb25fdc01ab972f489b6ec1921d1f00ac.tar.gz |
Do kernels up to 2Mb.
Diffstat (limited to 'usr.bin/kzip')
-rw-r--r-- | usr.bin/kzip/kzip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/kzip/kzip.c b/usr.bin/kzip/kzip.c index 34a8b3e..fe3cc0a 100644 --- a/usr.bin/kzip/kzip.c +++ b/usr.bin/kzip/kzip.c @@ -9,7 +9,7 @@ * Copyright (C) 1993 Hannu Savolainen * Ported to 386bsd by Serge Vakulenko * based on tools/build.c by Linus Torvalds - * $Id$ + * $Id: kzip.c,v 1.1 1995/04/15 08:18:20 phk Exp $ * */ @@ -22,6 +22,11 @@ #include <a.out.h> #include <string.h> +#define MAXIMAGE (2*1024*1024) + /* This is the limit because a kzip'ed kernel loads at 3Mb and + * ends up at 1Mb + */ + int main(int argc, char **argv) { @@ -206,7 +211,7 @@ piggyback(char *file) { int n, len; struct exec hdr; /* object header */ - char image[1024*1024]; /* kernel image buffer */ + char image[MAXIMAGE]; /* kernel image buffer */ len = 0; while ((n = read (0, &image[len], sizeof(image)-len+1)) > 0) |