rename memory_disc_size to md_root_size, so that kernels without
MEMORY_DISK_ROOT_SIZE option link also make local md_root_size size_t XXX is the load_memory_disc_from_floppy() stuff actually still being used?
This commit is contained in:
parent
177f0931bd
commit
05d0665f1c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md_hooks.c,v 1.3 2002/04/02 05:30:37 lukem Exp $ */
|
||||
/* $NetBSD: md_hooks.c,v 1.4 2002/05/06 21:18:25 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross
|
||||
|
@ -45,12 +45,12 @@
|
|||
* This array will be patched to contain a file-system image.
|
||||
* See the program: src/distrib/sun3/common/rdsetroot.c
|
||||
*/
|
||||
int md_root_size = ROOTBYTES;
|
||||
size_t md_root_size = ROOTBYTES;
|
||||
char md_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
|
||||
|
||||
#else /* MEMORY_DISK_ROOT_SIZE */
|
||||
|
||||
u_int memory_disc_size = 0; /* set by machdep.c */
|
||||
size_t md_root_size = 0; /* set by machdep.c */
|
||||
static struct md_conf *bootmd = NULL;
|
||||
|
||||
extern int load_memory_disc_from_floppy __P((struct md_conf *md, dev_t dev));
|
||||
|
@ -71,12 +71,12 @@ md_attach_hook(unit, md)
|
|||
md->md_type = MD_KMEM_FIXED;
|
||||
#else /* MEMORY_DISK_ROOT_SIZE */
|
||||
#ifdef OLD_MEMORY_DISK_SIZE
|
||||
if (memory_disc_size == 0 && OLD_MEMORY_DISK_SIZE)
|
||||
memory_disc_size = (OLD_MEMORY_DISK_SIZE << DEV_BSHIFT);
|
||||
if (md_root_size == 0 && OLD_MEMORY_DISK_SIZE)
|
||||
md_root_size = (OLD_MEMORY_DISK_SIZE << DEV_BSHIFT);
|
||||
#endif /* OLD_MEMORY_DISK_SIZE */
|
||||
if (memory_disc_size != 0) {
|
||||
md->md_size = round_page(memory_disc_size);
|
||||
md->md_addr = (caddr_t)uvm_km_zalloc(kernel_map, memory_disc_size);
|
||||
if (md_root_size != 0) {
|
||||
md->md_size = round_page(md_root_size);
|
||||
md->md_addr = (caddr_t)uvm_km_zalloc(kernel_map, md_root_size);
|
||||
md->md_type = MD_KMEM_FIXED;
|
||||
bootmd = md;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue