mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
init booted_kernel from environment kernelname (if there)
This commit is contained in:
parent
178e6e0fed
commit
492ecc5fbd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68713
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user