init booted_kernel from environment kernelname (if there)

This commit is contained in:
Matt Jacob 2000-11-14 08:11:03 +00:00
parent 178e6e0fed
commit 492ecc5fbd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68713

View File

@ -160,6 +160,7 @@ bi_load(struct bootinfo_v1 *bi, vm_offset_t *ffp_save,
struct preloaded_file *xp;
vm_offset_t addr, bootinfo_addr;
u_int pad;
char *kernelname;
vm_offset_t ssym, esym;
struct file_metadata *md;
@ -224,5 +225,10 @@ bi_load(struct bootinfo_v1 *bi, vm_offset_t *ffp_save,
>> PAGE_SHIFT;
*ffp_save += 2; /* XXX OSF/1 does this, no idea why. */
kernelname = getenv("kernelname");
if (kernelname) {
strncpy(bi->booted_kernel, kernelname, sizeof(bi->booted_kernel) - 1);
}
return(0);
}