mirror of
https://github.com/tailix/kernel.git
synced 2025-08-14 22:13:50 -04:00
Fix code
This commit is contained in:
parent
a53b34e31e
commit
9c34fcf975
1 changed files with 4 additions and 3 deletions
|
@ -83,7 +83,8 @@ void kernel_info_init_from_multiboot2(
|
||||||
|
|
||||||
for (
|
for (
|
||||||
const struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase *entry =
|
const struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase *entry =
|
||||||
(struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase*)tag->data;
|
(struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase*)
|
||||||
|
KERNAUX_MULTIBOOT2_DATA(tag);
|
||||||
(unsigned char*)entry < (unsigned char*)tag + tag->base.size;
|
(unsigned char*)entry < (unsigned char*)tag + tag->base.size;
|
||||||
entry =
|
entry =
|
||||||
(struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase*)
|
(struct KernAux_Multiboot2_Tag_MemoryMap_EntryBase*)
|
||||||
|
@ -125,7 +126,7 @@ void kernel_info_init_from_multiboot2(
|
||||||
panic("Too many modules in Multiboot 2 info.");
|
panic("Too many modules in Multiboot 2 info.");
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int slen = strlen(tag->cmdline);
|
unsigned int slen = strlen((char*)KERNAUX_MULTIBOOT2_DATA(tag));
|
||||||
|
|
||||||
if (slen > KERNEL_INFO_CMDLINE_SLEN_MAX) {
|
if (slen > KERNEL_INFO_CMDLINE_SLEN_MAX) {
|
||||||
panic("Multiboot 2 module cmd line is too long.");
|
panic("Multiboot 2 module cmd line is too long.");
|
||||||
|
@ -134,7 +135,7 @@ void kernel_info_init_from_multiboot2(
|
||||||
struct Kernel_Info_Module *const module =
|
struct Kernel_Info_Module *const module =
|
||||||
&kinfo->modules[kinfo->modules_count];
|
&kinfo->modules[kinfo->modules_count];
|
||||||
|
|
||||||
strcpy(module->cmdline, tag->cmdline);
|
strcpy(module->cmdline, (char*)KERNAUX_MULTIBOOT2_DATA(tag));
|
||||||
|
|
||||||
module->base = tag->mod_start;
|
module->base = tag->mod_start;
|
||||||
module->limit = tag->mod_end;
|
module->limit = tag->mod_end;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue