From 7dca66d0121a415623a8515c132dc6acede36cf4 Mon Sep 17 00:00:00 2001 From: unknown <2232324209@qq.com> Date: Thu, 23 Jun 2022 10:58:18 +0800 Subject: [PATCH] getdents finish and can use to linux --- mysystem_call.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mysystem_call.c b/mysystem_call.c index 4b6f9e9..742f2fa 100644 --- a/mysystem_call.c +++ b/mysystem_call.c @@ -24,7 +24,7 @@ struct dirent { }; /*参数count指定该缓冲区的大小*/ -int sys_getdents(unsigned int fd,struct linux_dirent *dirp,unsigned int count); +int sys_getdents(unsigned int fd,struct linux_dirent *dirp,unsigned int count) { if(!count)return -1;/*count is zero*/ if(fd>=NR_OPEN)return -EINVAL;/*fd is over range*/ @@ -76,3 +76,16 @@ int sys_getdents(unsigned int fd,struct linux_dirent *dirp,unsigned int count); return ldi; } +int sys_execve2(const char * filename, char ** argv, char ** envp) +{ + return 0; +} + +long sys_getcwd(char *buf,size_t size) +{ + return 0; +} +int sys_sleep(unsigned int seconds) +{ + return 0; +} \ No newline at end of file