diff --git a/imgs/example.png b/imgs/example.png index b0901b6..10f8455 100644 Binary files a/imgs/example.png and b/imgs/example.png differ diff --git a/kernel/drivers/Makefile b/kernel/drivers/Makefile index 49d4ba9..fd21c5f 100644 --- a/kernel/drivers/Makefile +++ b/kernel/drivers/Makefile @@ -1,4 +1,4 @@ -OBJS = tty.o gdt.o idt.o isr.o timer.o keyboard.o +OBJS = tty.o gdt.o idt.o isr.o timer.o keyboard.o fs.o CC = i686-elf-gcc # cross-compiler CFLAGS = -m32 -fno-stack-protector -ffreestanding -Wall -Wextra -Werror -g -c diff --git a/kernel/drivers/fs.c b/kernel/drivers/fs.c index 622d857..7a49a6a 100644 --- a/kernel/drivers/fs.c +++ b/kernel/drivers/fs.c @@ -18,20 +18,16 @@ uint32_t write_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buff return 0; } -void open_fs(fs_node_t *node, uint8_t read, uint8_t write) { +void open_fs(fs_node_t *node) { // Check if inode got a open callback from the kernel if(node->open != 0) return node->open(node); - else - return 0; } void close_fs(fs_node_t *node) { // Check if inode got a close callback from the kernel - if(node->close =! 0) + if(node->close != 0) return node->close(node); - else - return 0; } struct dirent *readdir_fs(fs_node_t *node, uint32_t index) { diff --git a/kernel/drivers/fs.h b/kernel/drivers/fs.h index 03e5b11..c2e4a37 100644 --- a/kernel/drivers/fs.h +++ b/kernel/drivers/fs.h @@ -76,7 +76,7 @@ extern fs_node_t *fs_root; * the second one deals with file descriptors. */ uint32_t read_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); uint32_t write_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); -void open_fs(fs_node_t *node, uint8_t read, uint8_t write); +void open_fs(fs_node_t *node); void close_fs(fs_node_t *node); struct dirent *readdir_fs(fs_node_t *node, uint32_t index); fs_node_t *finddir_fs(fs_node_t *node, char *name); diff --git a/kernel/drivers/timer.h b/kernel/drivers/timer.h index a8c0de9..9c1c056 100644 --- a/kernel/drivers/timer.h +++ b/kernel/drivers/timer.h @@ -33,7 +33,7 @@ void init_timer(uint32_t frequency); uint32_t tick; /* Since regs parameter(from timer_callback) will be unused - * GCC(with -Werror flag) will dump an error, so we avoid this + * GCC(with -Werror flag) will throw an error, so we can avoid this * using the following macro */ #define UNUSED_PAR(x) (void)(x) diff --git a/kernel/kernel_main.c b/kernel/kernel_main.c index 8373436..f10adc0 100644 --- a/kernel/kernel_main.c +++ b/kernel/kernel_main.c @@ -35,5 +35,4 @@ void kernel_main() { iceos_ascii_logo(); init_prompt(); // Initialize frame buffer - } \ No newline at end of file diff --git a/kernel/shell/shell.c b/kernel/shell/shell.c index d433a31..8cd7af7 100644 --- a/kernel/shell/shell.c +++ b/kernel/shell/shell.c @@ -119,14 +119,20 @@ void processCommand(uint8_t *cmd) { } void iceos_ascii_logo() { - printf_color( -"\n\n### ##### ####### ####### #####\n" -" # # # # # # # #\n" -" # # # # # # \n" -" # # ##### # # ##### \n" -" # # # # # # \n" -" # # # # # # # # \n" -"### ##### ####### ####### ##### \n" -"\n (c) Marco Cetica 2019\n", - LIGHT_MAGENTA, BLACK); +printf_color( + "\n\n" + " MMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n" + " MMMMMMMMMMMM...?MMM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n" + " MMMMMMMMM ........M .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n" + " MMMMMMMM...........M .MMMMMMMM..MMO ........MMM....MM..MMMMM\n" + " MMMMM ..............M..MMMMMMM..M...........M.....,.M.. MMMM\n" + " MMMM................MM,.. .MMM....MMMM......M..MMMM..M,..MMM\n" + " MMM ................... MMMMMM....MMMM......M..MMMM..MMN..MM\n" + " M ......................,MMMMM..M.. ........M.......M... .~M\n" + " ........................MMMMM..MMM.........MMM...MMM....MMMM\n" + " .........................MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n" + " M .....................DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n" + " MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n", + LIGHT_MAGENTA, BLACK); + printf_color(" (c) Marco Cetica 2019\n", LIGHT_GREEN, BLACK); } \ No newline at end of file