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

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)