new: FAT32删除文件的功能 (#73)

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

* new: fat32删除文件

*bugfix: 解决创建文件时的bug
This commit is contained in:
login
2022-11-02 15:42:44 +08:00
committed by GitHub
parent 8e3f5674f8
commit 31b7b49d8c
11 changed files with 424 additions and 151 deletions

View File

@ -161,6 +161,17 @@ int rmdir(const char *path)
return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, AT_REMOVEDIR, 0, 0, 0, 0, 0);
}
/**
* @brief 删除文件
*
* @param path 绝对路径
* @return int
*/
int rm(const char * path)
{
return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, 0, 0, 0, 0, 0, 0);
}
/**
* @brief 交换n字节
* @param src 源地址

View File

@ -106,6 +106,8 @@ extern int usleep(useconds_t usec);
*/
int rmdir(const char *path);
int rm(const char * path);
/**
* @brief 交换n字节
* @param src 源地址