Write code

This commit is contained in:
Alex Kotov 2022-01-13 19:50:52 +05:00
parent e2c60d3819
commit bd88af3f9a
1 changed files with 60 additions and 22 deletions

View File

@ -134,76 +134,114 @@ bool KernAux_Multiboot2_HTagBase_is_valid(
bool KernAux_Multiboot2_HTag_None_is_valid(
const struct KernAux_Multiboot2_HTag_None *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_NONE &&
tag->base.size == 8
);
}
bool KernAux_Multiboot2_HTag_InfoReq_is_valid(
const struct KernAux_Multiboot2_HTag_InfoReq *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_INFO_REQ &&
tag->base.size > 8 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_Addr_is_valid(
const struct KernAux_Multiboot2_HTag_Addr *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_ADDR &&
tag->base.size == 24 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_EntryAddr_is_valid(
const struct KernAux_Multiboot2_HTag_EntryAddr *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_ENTRY_ADDR &&
tag->base.size == 12 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_Flags_is_valid(
const struct KernAux_Multiboot2_HTag_Flags *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_FLAGS &&
tag->base.size == 12 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_Framebuffer_is_valid(
const struct KernAux_Multiboot2_HTag_Framebuffer *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_FRAMEBUFFER &&
tag->base.size == 20 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_ModuleAlign_is_valid(
const struct KernAux_Multiboot2_HTag_ModuleAlign *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_MODULE_ALIGN &&
tag->base.size == 8
);
}
bool KernAux_Multiboot2_HTag_EFIBootServices_is_valid(
const struct KernAux_Multiboot2_HTag_EFIBootServices *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_EFI_BOOT_SERVICES &&
tag->base.size == 8
);
}
bool KernAux_Multiboot2_HTag_EFII386EntryAddr_is_valid(
const struct KernAux_Multiboot2_HTag_EFII386EntryAddr *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_EFI_I386_ENTRY_ADDR &&
tag->base.size == 12 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_EFIAmd64EntryAddr_is_valid(
const struct KernAux_Multiboot2_HTag_EFIAmd64EntryAddr *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_EFI_AMD64_ENTRY_ADDR &&
tag->base.size == 12 &&
// TODO: write this
true
);
}
bool KernAux_Multiboot2_HTag_RelocatableHeader_is_valid(
const struct KernAux_Multiboot2_HTag_RelocatableHeader *tag
) {
// TODO: write this
return false;
return (
tag->base.type == KERNAUX_MULTIBOOT2_HTAG_RELOCATABLE_HEADER &&
tag->base.size == 24 &&
// TODO: write this
true
);
}