mirror of
https://github.com/tailix/libkernaux.git
synced 2025-02-17 15:45:32 -05:00
Rename and move enum
This commit is contained in:
parent
95ad99e49c
commit
e363c8dbcf
3 changed files with 15 additions and 19 deletions
|
@ -38,25 +38,21 @@ extern "C" {
|
|||
#define KERNAUX_MULTIBOOT2_HTAG_FLAGS_REQUIRE_CONSOLE (1 << 0)
|
||||
#define KERNAUX_MULTIBOOT2_HTAG_FLAGS_EGA_SUPPORT (1 << 1)
|
||||
|
||||
/****************
|
||||
* Common types *
|
||||
****************/
|
||||
|
||||
enum KernAux_Multiboot2_Arch {
|
||||
KERNAUX_MULTIBOOT2_ARCH_NONE = 0,
|
||||
KERNAUX_MULTIBOOT2_ARCH_I386 = 1,
|
||||
KERNAUX_MULTIBOOT2_ARCH_MIPS32 = 4,
|
||||
};
|
||||
|
||||
/***********************
|
||||
* Header common types *
|
||||
***********************/
|
||||
|
||||
enum KernAux_Multiboot2_Header_Arch {
|
||||
KERNAUX_MULTIBOOT2_HEADER_ARCH_NONE = 0,
|
||||
KERNAUX_MULTIBOOT2_HEADER_ARCH_I386 = 1,
|
||||
KERNAUX_MULTIBOOT2_HEADER_ARCH_MIPS32 = 4,
|
||||
};
|
||||
|
||||
struct KernAux_Multiboot2_Header {
|
||||
unsigned magic : 32;
|
||||
enum KernAux_Multiboot2_Arch arch : 32;
|
||||
unsigned total_size : 32;
|
||||
unsigned checksum : 32;
|
||||
unsigned magic : 32;
|
||||
enum KernAux_Multiboot2_Header_Arch arch : 32;
|
||||
unsigned total_size : 32;
|
||||
unsigned checksum : 32;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ bool KernAux_Multiboot2_Header_is_valid(
|
|||
return false;
|
||||
}
|
||||
|
||||
if (multiboot2_header->arch != KERNAUX_MULTIBOOT2_ARCH_NONE &&
|
||||
multiboot2_header->arch != KERNAUX_MULTIBOOT2_ARCH_I386 &&
|
||||
multiboot2_header->arch != KERNAUX_MULTIBOOT2_ARCH_MIPS32)
|
||||
if (multiboot2_header->arch != KERNAUX_MULTIBOOT2_HEADER_ARCH_NONE &&
|
||||
multiboot2_header->arch != KERNAUX_MULTIBOOT2_HEADER_ARCH_I386 &&
|
||||
multiboot2_header->arch != KERNAUX_MULTIBOOT2_HEADER_ARCH_MIPS32)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ static const struct {
|
|||
} multiboot2_header_example2 = {
|
||||
.multiboot2_header = {
|
||||
.magic = KERNAUX_MULTIBOOT2_HEADER_MAGIC,
|
||||
.arch = KERNAUX_MULTIBOOT2_ARCH_I386,
|
||||
.arch = KERNAUX_MULTIBOOT2_HEADER_ARCH_I386,
|
||||
.total_size = sizeof(multiboot2_header_example2),
|
||||
.checksum = KERNAUX_MULTIBOOT2_HEADER_CHECKSUM(
|
||||
KERNAUX_MULTIBOOT2_ARCH_I386,
|
||||
KERNAUX_MULTIBOOT2_HEADER_ARCH_I386,
|
||||
sizeof(multiboot2_header_example2)
|
||||
),
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue