mirror of
https://github.com/tailix/kernel.git
synced 2025-03-03 16:04:28 -05:00
Refactoring: move code to function "print_multiboot_tag"
This commit is contained in:
parent
8316053ef7
commit
9d0d45b52a
1 changed files with 49 additions and 42 deletions
|
@ -69,6 +69,8 @@ struct multiboot_tag_mmap
|
|||
static void itoa(char *buf, int base, int d);
|
||||
static void printf(const char *format, ...);
|
||||
|
||||
static void print_multiboot_tag(const struct multiboot_tag *tag);
|
||||
|
||||
void print_multiboot_info(struct KernelMQ_Multiboot_Info info)
|
||||
{
|
||||
if (info.magic == MULTIBOOT_1_MAGIC) {
|
||||
|
@ -91,6 +93,12 @@ void print_multiboot_info(struct KernelMQ_Multiboot_Info info)
|
|||
tag->type != MULTIBOOT_TAG_TYPE_END;
|
||||
tag = (struct multiboot_tag*)((unsigned char*)tag + ((tag->size + 7) & ~7))
|
||||
) {
|
||||
print_multiboot_tag(tag);
|
||||
}
|
||||
}
|
||||
|
||||
void print_multiboot_tag(const struct multiboot_tag *const tag)
|
||||
{
|
||||
switch (tag->type)
|
||||
{
|
||||
case MULTIBOOT_TAG_TYPE_CMDLINE:
|
||||
|
@ -139,7 +147,6 @@ void print_multiboot_info(struct KernelMQ_Multiboot_Info info)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void itoa(char *buf, int base, int d)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue