From 20853582d5385d12421433d21910e783caa00764 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 22:59:42 -0400 Subject: dirinfo command --- src/kernel/idt.c | 7 ++++++- src/kernel/isrs.asm | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/kernel') 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 -- cgit v1.2.3