mirror of
https://github.com/tailix/libkernaux.git
synced 2025-04-07 17:32:45 -04:00
Remove unnecessary example code
This commit is contained in:
parent
186e75ff44
commit
9a02e57a75
2 changed files with 5 additions and 19 deletions
|
@ -1,3 +1,5 @@
|
|||
all: run
|
||||
|
||||
CCPREFIX = i386-elftailix-
|
||||
|
||||
AS = $(CCPREFIX)as
|
||||
|
@ -23,14 +25,9 @@ CFLAGS = \
|
|||
|
||||
OBJS = main.c.o start.S.o
|
||||
|
||||
all: run0
|
||||
|
||||
run0: $(IMAGE)
|
||||
run: $(IMAGE)
|
||||
qemu-system-i386 -cdrom $< -serial stdio -display none
|
||||
|
||||
run1: $(IMAGE)
|
||||
qemu-system-i386 -cdrom $< -serial stdio
|
||||
|
||||
clean:
|
||||
rm -f $(IMAGE) $(KERNEL) $(OBJS)
|
||||
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
#include <kernaux/asm/i386.h>
|
||||
#include <kernaux/drivers/console.h>
|
||||
#include <kernaux/multiboot2.h>
|
||||
#include <kernaux/printf.h>
|
||||
|
||||
void halt();
|
||||
|
||||
static void panic(const char *str);
|
||||
static void printf(const char *format, ...);
|
||||
|
||||
void main(
|
||||
const uint32_t multiboot2_magic,
|
||||
|
@ -23,7 +21,7 @@ void main(
|
|||
panic("Multiboot 2 info is invalid");
|
||||
}
|
||||
|
||||
KernAux_Multiboot2_print(multiboot2_info, printf);
|
||||
KernAux_Multiboot2_print(multiboot2_info, kernaux_console_printf);
|
||||
}
|
||||
|
||||
void halt()
|
||||
|
@ -33,15 +31,6 @@ void halt()
|
|||
|
||||
void panic(const char *const str)
|
||||
{
|
||||
printf("panic: %s\n", str);
|
||||
kernaux_console_printf("panic: %s\n", str);
|
||||
kernaux_asm_i386_hang();
|
||||
}
|
||||
|
||||
void printf(const char *const format, ...)
|
||||
{
|
||||
va_list va;
|
||||
|
||||
va_start(va, format);
|
||||
kernaux_printf_va(kernaux_console_putc, format, va);
|
||||
va_end(va);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue