From 65bda3f73a933718a3048defe656b1eacf4ffeeb Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 14 Jan 2022 09:46:46 +0500 Subject: [PATCH] Add field multiboot2_header_example2.tag_relocatable_header --- tests/multiboot2_header_example2.h | 14 ++++++++++++++ tests/test_multiboot2_header_print.c | 8 ++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/multiboot2_header_example2.h b/tests/multiboot2_header_example2.h index bae1767..c8b2330 100644 --- a/tests/multiboot2_header_example2.h +++ b/tests/multiboot2_header_example2.h @@ -32,6 +32,8 @@ static const struct { uint8_t _align5[4]; + struct KernAux_Multiboot2_HTag_RelocatableHeader tag_relocatable_header; + struct KernAux_Multiboot2_HTag_None tag_none; } multiboot2_header_example2 = { .multiboot2_header = { @@ -146,6 +148,18 @@ static const struct { }, .entry_addr = 0, }, + .tag_relocatable_header = { + .base = { + .type = KERNAUX_MULTIBOOT2_HTAG_RELOCATABLE_HEADER, + .flags = 0, + .size = sizeof(multiboot2_header_example2.tag_relocatable_header), + }, + .min_addr = 0, + .max_addr = 0, + .align = 0, + .preferences = + KERNAUX_MULTIBOOT2_HTAG_RELOCATABLE_HEADER_PREFERENCE_LOWEST, + }, .tag_none = { .base = { .type = KERNAUX_MULTIBOOT2_HTAG_NONE, diff --git a/tests/test_multiboot2_header_print.c b/tests/test_multiboot2_header_print.c index 7c6be69..16a075b 100644 --- a/tests/test_multiboot2_header_print.c +++ b/tests/test_multiboot2_header_print.c @@ -14,8 +14,8 @@ static const char output2[] = "Multiboot 2 header\n" " magic: 920085129\n" " arch: 1\n" - " size: 248\n" - " checksum: 3374881918\n" + " size: 272\n" + " checksum: 3374881894\n" "Multiboot 2 header tag\n" " type: 1 (information request)\n" " flags: 0\n" @@ -53,6 +53,10 @@ static const char output2[] = " flags: 0\n" " size: 12\n" "Multiboot 2 header tag\n" + " type: 10 (relocatable header)\n" + " flags: 0\n" + " size: 24\n" + "Multiboot 2 header tag\n" " type: 0 (none)\n" " flags: 0\n" " size: 8\n";