Fixed some bugs and changed ASCII logo
This commit is contained in:
parent
a0809ba70b
commit
c020b7270f
BIN
imgs/example.png
BIN
imgs/example.png
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 13 KiB |
@ -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
|
CC = i686-elf-gcc # cross-compiler
|
||||||
CFLAGS = -m32 -fno-stack-protector -ffreestanding -Wall -Wextra -Werror -g -c
|
CFLAGS = -m32 -fno-stack-protector -ffreestanding -Wall -Wextra -Werror -g -c
|
||||||
|
@ -18,20 +18,16 @@ uint32_t write_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buff
|
|||||||
return 0;
|
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
|
// Check if inode got a open callback from the kernel
|
||||||
if(node->open != 0)
|
if(node->open != 0)
|
||||||
return node->open(node);
|
return node->open(node);
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void close_fs(fs_node_t *node) {
|
void close_fs(fs_node_t *node) {
|
||||||
// Check if inode got a close callback from the kernel
|
// Check if inode got a close callback from the kernel
|
||||||
if(node->close =! 0)
|
if(node->close != 0)
|
||||||
return node->close(node);
|
return node->close(node);
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dirent *readdir_fs(fs_node_t *node, uint32_t index) {
|
struct dirent *readdir_fs(fs_node_t *node, uint32_t index) {
|
||||||
|
@ -76,7 +76,7 @@ extern fs_node_t *fs_root;
|
|||||||
* the second one deals with file descriptors. */
|
* 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 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);
|
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);
|
void close_fs(fs_node_t *node);
|
||||||
struct dirent *readdir_fs(fs_node_t *node, uint32_t index);
|
struct dirent *readdir_fs(fs_node_t *node, uint32_t index);
|
||||||
fs_node_t *finddir_fs(fs_node_t *node, char *name);
|
fs_node_t *finddir_fs(fs_node_t *node, char *name);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
void init_timer(uint32_t frequency);
|
void init_timer(uint32_t frequency);
|
||||||
uint32_t tick;
|
uint32_t tick;
|
||||||
/* Since regs parameter(from timer_callback) will be unused
|
/* 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
|
* using the following macro
|
||||||
*/
|
*/
|
||||||
#define UNUSED_PAR(x) (void)(x)
|
#define UNUSED_PAR(x) (void)(x)
|
||||||
|
@ -35,5 +35,4 @@ void kernel_main() {
|
|||||||
|
|
||||||
iceos_ascii_logo();
|
iceos_ascii_logo();
|
||||||
init_prompt(); // Initialize frame buffer
|
init_prompt(); // Initialize frame buffer
|
||||||
|
|
||||||
}
|
}
|
@ -119,14 +119,20 @@ void processCommand(uint8_t *cmd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void iceos_ascii_logo() {
|
void iceos_ascii_logo() {
|
||||||
printf_color(
|
printf_color(
|
||||||
"\n\n### ##### ####### ####### #####\n"
|
"\n\n"
|
||||||
" # # # # # # # #\n"
|
" MMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"
|
||||||
" # # # # # # \n"
|
" MMMMMMMMMMMM...?MMM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"
|
||||||
" # # ##### # # ##### \n"
|
" MMMMMMMMM ........M .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"
|
||||||
" # # # # # # \n"
|
" MMMMMMMM...........M .MMMMMMMM..MMO ........MMM....MM..MMMMM\n"
|
||||||
" # # # # # # # # \n"
|
" MMMMM ..............M..MMMMMMM..M...........M.....,.M.. MMMM\n"
|
||||||
"### ##### ####### ####### ##### \n"
|
" MMMM................MM,.. .MMM....MMMM......M..MMMM..M,..MMM\n"
|
||||||
"\n (c) Marco Cetica 2019\n",
|
" MMM ................... MMMMMM....MMMM......M..MMMM..MMN..MM\n"
|
||||||
LIGHT_MAGENTA, BLACK);
|
" 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);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user