kzipboot uses kern/inflate.c outside the kernel by providing its own
minimal malloc/free implementation. Stop passing M_GZIP to it.
This commit is contained in:
parent
4e61198e8f
commit
5ad3d2212f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41057
@ -36,9 +36,8 @@
|
||||
extern unsigned char *storage;
|
||||
|
||||
void *
|
||||
malloc(nbytes, junk1, junk2) /* junk? not used */
|
||||
malloc(nbytes)
|
||||
size_t nbytes;
|
||||
int junk1, junk2;
|
||||
{
|
||||
unsigned char *p = storage;
|
||||
storage += nbytes;
|
||||
@ -51,8 +50,7 @@ malloc(nbytes, junk1, junk2) /* junk? not used */
|
||||
}
|
||||
|
||||
void
|
||||
free(cp, junk) /* junk not used */
|
||||
free(cp)
|
||||
void *cp;
|
||||
int junk;
|
||||
{
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: inflate.c,v 1.10 1997/10/11 18:31:20 phk Exp $
|
||||
* $Id: inflate.c,v 1.11 1997/10/12 20:23:40 phk Exp $
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ -16,10 +16,13 @@
|
||||
#include <sys/inflate.h>
|
||||
#ifdef KERNEL
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#endif
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
|
||||
#endif
|
||||
|
||||
/* needed to make inflate() work */
|
||||
#define uch u_char
|
||||
@ -47,8 +50,10 @@ extern void putstr (char *);
|
||||
static const int qflag = 0;
|
||||
|
||||
#ifndef KERNEL /* want to use this file in kzip also */
|
||||
extern unsigned char *malloc (int, int, int);
|
||||
extern void free (void*, int);
|
||||
extern unsigned char *kzipmalloc (int);
|
||||
extern void kzipfree (void*);
|
||||
#define malloc(x, y, z) kzipmalloc((x))
|
||||
#define free(x, y) kzipfree((x))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user