new: 将sys_rmdir更改为sys_unlink,.且完成删除文件操作的vfs部分 (#69)

This commit is contained in:
login
2022-10-25 23:02:35 +08:00
committed by GitHub
parent e002152383
commit 8a080f3cce
12 changed files with 304 additions and 76 deletions

View File

@ -18,7 +18,7 @@ extern void syscall_int(void);
extern uint64_t sys_clock(struct pt_regs *regs);
extern uint64_t sys_mstat(struct pt_regs *regs);
extern uint64_t sys_open(struct pt_regs *regs);
extern uint64_t sys_rmdir(struct pt_regs *regs);
extern uint64_t sys_unlink_at(struct pt_regs *regs);
/**
* @brief 导出系统调用处理函数的符号
@ -607,7 +607,7 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] = {
[19] = sys_clock,
[20] = sys_pipe,
[21] = sys_mstat,
[22] = sys_rmdir,
[22] = sys_unlink_at,
[23 ... 254] = system_call_not_exists,
[255] = sys_ahci_end_req,
};

View File

@ -33,7 +33,7 @@
#define SYS_PIPE 20
#define SYS_MSTAT 21 // 获取系统的内存状态信息
#define SYS_RMDIR 22 // 删除文件夹
#define SYS_UNLINK_AT 22 // 删除文件夹/删除文件链接
#define SYS_AHCI_END_REQ 255 // AHCI DMA请求结束end_request的系统调用