summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-13 22:59:42 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-13 22:59:42 -0400
commit20853582d5385d12421433d21910e783caa00764 (patch)
tree446bbd18353cfe0897d293a822458b7960a3645e /src/kernel
parent44d29a33df81ac07163d5146a9e43a0c4fb80af0 (diff)
downloadportland-os-20853582d5385d12421433d21910e783caa00764.tar.gz
dirinfo command
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/idt.c7
-rw-r--r--src/kernel/isrs.asm2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/kernel/idt.c b/src/kernel/idt.c
index 4ffa1e2..90d8dc3 100644
--- a/src/kernel/idt.c
+++ b/src/kernel/idt.c
@@ -96,6 +96,10 @@ static void sc_wait_for_task(uint32_t handle) {
active_task->wait_arg = handle;
}
+static uint32_t sc_enumerate_dir(uint32_t drive_number, const char *path, struct directory_content_info *buffer, uint32_t max_entries) {
+ return drives[drive_number].enumerate_dir(drives + drive_number, path, buffer, max_entries);
+}
+
void const *syscall_table[] = {
&sc_open_file,
&sc_close_file,
@@ -106,7 +110,8 @@ void const *syscall_table[] = {
&get_key_code,
&sc_allocate_ram,
&sc_memory_info,
- &sc_wait_for_task
+ &sc_wait_for_task,
+ &sc_enumerate_dir
};
//these aren't really void ()'s, but gcc complains if we take an address of a void, so we give it a type
diff --git a/src/kernel/isrs.asm b/src/kernel/isrs.asm
index 8a27d57..6ad469d 100644
--- a/src/kernel/isrs.asm
+++ b/src/kernel/isrs.asm
@@ -23,7 +23,7 @@ extern on_kbd_isr
extern make_sure_tasks
extern exception_halt
-n_syscalls equ 0xa
+n_syscalls equ 0xb
;section .bss
;_debug_is_start_task resb 1