Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F100640159
D36575.id110650.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36575.id110650.diff
View Options
diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c
--- a/stand/i386/libi386/bootinfo32.c
+++ b/stand/i386/libi386/bootinfo32.c
@@ -42,7 +42,7 @@
#include "geliboot.h"
#endif
-static struct bootinfo bi;
+static struct bootinfo *bi;
/*
* Load the information expected by an i386 kernel.
@@ -91,11 +91,12 @@
/* XXX - use a default bootdev of 0. Is this ok??? */
bootdevnr = 0;
+ bi = calloc(sizeof(*bi), 1);
switch(rootdev->dd.d_dev->dv_type) {
case DEVT_CD:
case DEVT_DISK:
/* pass in the BIOS device number of the current disk */
- bi.bi_bios_dev = bd_unit2bios(rootdev);
+ bi->bi_bios_dev = bd_unit2bios(rootdev);
bootdevnr = bd_getdev(rootdev);
break;
@@ -172,22 +173,22 @@
/* legacy bootinfo structure */
kernelname = getenv("kernelname");
i386_getdev(NULL, kernelname, &kernelpath);
- bi.bi_version = BOOTINFO_VERSION;
- bi.bi_size = sizeof(bi);
- bi.bi_memsizes_valid = 1;
- bi.bi_basemem = bios_basemem / 1024;
- bi.bi_extmem = bios_extmem / 1024;
- bi.bi_envp = envp;
- bi.bi_modulep = *modulep;
- bi.bi_kernend = kernend;
- bi.bi_kernelname = VTOP(kernelpath);
- bi.bi_symtab = ssym; /* XXX this is only the primary kernel symtab */
- bi.bi_esymtab = esym;
+ bi->bi_version = BOOTINFO_VERSION;
+ bi->bi_size = sizeof(bi);
+ bi->bi_memsizes_valid = 1;
+ bi->bi_basemem = bios_basemem / 1024;
+ bi->bi_extmem = bios_extmem / 1024;
+ bi->bi_envp = envp;
+ bi->bi_modulep = *modulep;
+ bi->bi_kernend = kernend;
+ bi->bi_kernelname = VTOP(kernelpath);
+ bi->bi_symtab = ssym; /* XXX this is only the primary kernel symtab */
+ bi->bi_esymtab = esym;
/* legacy boot arguments */
*howtop = howto | RB_BOOTINFO;
*bootdevp = bootdevnr;
- *bip = VTOP(&bi);
+ *bip = VTOP(bi);
return(0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 18, 5:50 PM (8 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14232818
Default Alt Text
D36575.id110650.diff (1 KB)
Attached To
Mode
D36575: stand: Allocate bootinfo rather than have it be static
Attached
Detach File
Event Timeline
Log In to Comment