Fixed some bugs and changed ASCII logo

This commit is contained in:
ice-bit 2019-09-14 00:38:11 +02:00
parent a0809ba70b
commit c020b7270f
7 changed files with 21 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -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

View File

@ -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) {

View File

@ -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);

View File

@ -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)

View File

@ -35,5 +35,4 @@ void kernel_main() {
iceos_ascii_logo();
init_prompt(); // Initialize frame buffer
}

View File

@ -120,13 +120,19 @@ 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",
"\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);
}