Pass actual loaded kernel file in bootinfo[].
This commit is contained in:
parent
61c214b2fe
commit
d6197003e5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.10 2001/06/21 03:13:05 uwe Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.11 2002/03/28 15:46:20 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -206,10 +206,26 @@ main()
|
|||
#else
|
||||
/* Should work with both a.out and ELF, but somehow ELF is busted */
|
||||
bootinfo = bi_init(marks[MARK_END]);
|
||||
|
||||
bi_sym.nsym = marks[MARK_NSYM];
|
||||
bi_sym.ssym = marks[MARK_SYM];
|
||||
bi_sym.esym = marks[MARK_END];
|
||||
bi_add(&bi_sym, BTINFO_SYMTAB, sizeof(bi_sym));
|
||||
|
||||
/*
|
||||
* Add kernel path to bootinfo
|
||||
*/
|
||||
i = sizeof(struct btinfo_common) + strlen(kernel) + 1;
|
||||
/* Impose limit (somewhat arbitrary) */
|
||||
if (i < BOOTINFO_SIZE / 2) {
|
||||
union {
|
||||
struct btinfo_kernelfile bi_file;
|
||||
char x[i];
|
||||
} U;
|
||||
strcpy(U.bi_file.name, kernel);
|
||||
bi_add(&U.bi_file, BTINFO_KERNELFILE, i);
|
||||
}
|
||||
|
||||
(*(entry_t)marks[MARK_ENTRY])(arg, 0, 0, 0, bootinfo, DDB_MAGIC2);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue