From 95450710a8b8290a110686d78c2357d3920bcda5 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 22 Oct 2014 14:06:04 +0200 Subject: working on filesys and readdir syscall --- userspace/foolshell.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'userspace/foolshell.c') diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 173b0b2..15f26e3 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -1,6 +1,7 @@ #include #include #include "syscalls.c" +#include "../fs/fs.h" void hello() { puts( @@ -85,7 +86,7 @@ int process(char *buf) if(!strcmp(command,"HELP")) { - puts("foolshell: supported built-in commands: HELP, ECHO, TIME, MEM, PROC, TASKS, ALLOC, READ, SYSCALL."); + puts("foolshell: supported built-in commands: HELP, ECHO, TIME, MEM, PROC, TASKS, ALLOC, LS, SYSCALL."); } else if(!strcmp(command,"TIME")) { @@ -140,6 +141,18 @@ int process(char *buf) printf("system call returned %i\n",ebx); + } + else if(!strcmp(command,"LS")) + { + + fs_dirent dirs[5]; + int ls=readdir("/dupa",&dirs,5); + int i; + for(i=0;i