From: Duje Mihanović Date: Thu, 9 Sep 2021 08:27:18 +0000 (+0200) Subject: kprint can accept a const string X-Git-Tag: 0.1.0~21 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0ef05b6c3cc6f4236f2d5ae35d64328d96bcff24;p=nameless-os.git kprint can accept a const string --- diff --git a/.gitignore b/.gitignore index 76d7ba6..988eea0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ boot boot.img **/*.o **/*.bin +**/*.elf diff --git a/include/arch/x86/tty.h b/include/arch/x86/tty.h index ced66d7..988d738 100644 --- a/include/arch/x86/tty.h +++ b/include/arch/x86/tty.h @@ -1,5 +1,5 @@ #ifndef X86_TTY_H #define X86_TTY_H extern void screen_clear(void); -extern void kprint(char *string); +extern void kprint(const char *string); #endif diff --git a/kernel/arch/x86/tty/tty.c b/kernel/arch/x86/tty/tty.c index 6d250c5..c1bb0a5 100644 --- a/kernel/arch/x86/tty/tty.c +++ b/kernel/arch/x86/tty/tty.c @@ -34,7 +34,7 @@ void scroll_up(void) cursor_y = VGA_HEIGHT - 1; } -void kprint(char *string) +void kprint(const char *string) { char next_char; next_char = *string;