diff options
Diffstat (limited to 'src/user/include')
-rw-r--r-- | src/user/include/pland/syscall.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index 75383fc..e16a7fb 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -45,9 +45,16 @@ enum _scn { _SCN_GET_KEY, _SCN_ALLOCATE_RAM, _SCN_MEMORY_INFO, - _SCN_WAIT_FOR_TASK + _SCN_WAIT_FOR_TASK, + _SCN_ENUMERATE_DIR }; +typedef struct { + bool is_dir; + char name[100]; + uint32_t size; +} _dir_info_entry; + static inline uint32_t _sc0(enum _scn eax) { volatile uint32_t out; asm ( @@ -166,4 +173,8 @@ static inline void _wait_for_task(_process_handle_t handle) { _sc1(_SCN_WAIT_FOR_TASK, handle); } +static inline uint32_t _enumerate_dir(_drive_number_t drive_number, const char *path, _dir_info_entry *buffer, uint32_t max_count) { + return _sc4(_SCN_ENUMERATE_DIR, drive_number, (uint32_t)path, (uint32_t)buffer, max_count); +} + #endif
\ No newline at end of file |