mirror of
https://github.com/tailix/libkernaux.git
synced 2025-02-24 15:55:41 -05:00
Add func KernAux_Multiboot2_ITag_BootLoaderName_print
This commit is contained in:
parent
608f61946d
commit
8479208501
2 changed files with 21 additions and 6 deletions
|
@ -556,6 +556,12 @@ void KernAux_Multiboot2_ITag_BootCmdLine_print(
|
||||||
__attribute__((format(printf, 1, 2)))
|
__attribute__((format(printf, 1, 2)))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void KernAux_Multiboot2_ITag_BootLoaderName_print(
|
||||||
|
const struct KernAux_Multiboot2_ITag_BootLoaderName *tag,
|
||||||
|
void (*printf)(const char *format, ...)
|
||||||
|
__attribute__((format(printf, 1, 2)))
|
||||||
|
);
|
||||||
|
|
||||||
void KernAux_Multiboot2_ITag_MemoryMap_print(
|
void KernAux_Multiboot2_ITag_MemoryMap_print(
|
||||||
const struct KernAux_Multiboot2_ITag_MemoryMap *tag,
|
const struct KernAux_Multiboot2_ITag_MemoryMap *tag,
|
||||||
void (*printf)(const char *format, ...)
|
void (*printf)(const char *format, ...)
|
||||||
|
|
|
@ -57,11 +57,9 @@ void KernAux_Multiboot2_ITagBase_print(
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME:
|
case KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME:
|
||||||
printf(
|
KernAux_Multiboot2_ITag_BootLoaderName_print(
|
||||||
" name: %s\n",
|
(struct KernAux_Multiboot2_ITag_BootLoaderName*)tag_base,
|
||||||
KERNAUX_MULTIBOOT2_DATA(
|
printf
|
||||||
(struct KernAux_Multiboot2_ITag_BootLoaderName*)tag_base
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case KERNAUX_MULTIBOOT2_ITAG_MODULE:
|
case KERNAUX_MULTIBOOT2_ITAG_MODULE:
|
||||||
|
@ -220,7 +218,6 @@ void KernAux_Multiboot2_ITagBase_print(
|
||||||
void KernAux_Multiboot2_ITag_BootCmdLine_print(
|
void KernAux_Multiboot2_ITag_BootCmdLine_print(
|
||||||
const struct KernAux_Multiboot2_ITag_BootCmdLine *const tag,
|
const struct KernAux_Multiboot2_ITag_BootCmdLine *const tag,
|
||||||
void (*printf)(const char *format, ...)
|
void (*printf)(const char *format, ...)
|
||||||
__attribute__((format(printf, 1, 2)))
|
|
||||||
) {
|
) {
|
||||||
if (!KernAux_Multiboot2_ITag_BootCmdLine_is_valid(tag)) {
|
if (!KernAux_Multiboot2_ITag_BootCmdLine_is_valid(tag)) {
|
||||||
printf(" invalid!\n");
|
printf(" invalid!\n");
|
||||||
|
@ -230,6 +227,18 @@ void KernAux_Multiboot2_ITag_BootCmdLine_print(
|
||||||
printf(" cmdline: %s\n", KERNAUX_MULTIBOOT2_DATA(tag));
|
printf(" cmdline: %s\n", KERNAUX_MULTIBOOT2_DATA(tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KernAux_Multiboot2_ITag_BootLoaderName_print(
|
||||||
|
const struct KernAux_Multiboot2_ITag_BootLoaderName *const tag,
|
||||||
|
void (*printf)(const char *format, ...)
|
||||||
|
) {
|
||||||
|
if (!KernAux_Multiboot2_ITag_BootLoaderName_is_valid(tag)) {
|
||||||
|
printf(" invalid!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf(" name: %s\n", KERNAUX_MULTIBOOT2_DATA(tag));
|
||||||
|
}
|
||||||
|
|
||||||
void KernAux_Multiboot2_ITag_MemoryMap_print(
|
void KernAux_Multiboot2_ITag_MemoryMap_print(
|
||||||
const struct KernAux_Multiboot2_ITag_MemoryMap *const tag,
|
const struct KernAux_Multiboot2_ITag_MemoryMap *const tag,
|
||||||
void (*printf)(const char *format, ...)
|
void (*printf)(const char *format, ...)
|
||||||
|
|
Loading…
Add table
Reference in a new issue