mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 04:56:30 +00:00
new: FAT32删除文件的功能 (#73)
* new: 将sys_rmdir更改为sys_unlink,.且完成删除文件操作的vfs部分 * new: fat32删除文件 *bugfix: 解决创建文件时的bug
This commit is contained in:
@ -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 源地址
|
||||
|
@ -106,6 +106,8 @@ extern int usleep(useconds_t usec);
|
||||
*/
|
||||
int rmdir(const char *path);
|
||||
|
||||
int rm(const char * path);
|
||||
|
||||
/**
|
||||
* @brief 交换n字节
|
||||
* @param src 源地址
|
||||
|
Reference in New Issue
Block a user