Add fs_delete() syscall

This commit is contained in:
2025-10-15 20:10:26 +02:00
parent 371d777a7c
commit ac6ebce112
4 changed files with 23 additions and 0 deletions

View File

@ -224,3 +224,23 @@ int32_t SYSCALL1(sys_fs_mkdir, opath1) {
done:
return ret;
}
int32_t SYSCALL1(sys_fs_delete, opath1) {
int32_t ret = E_BADIO;
const char *opath = (const char *)opath1;
if (opath == NULL) {
ret = E_INVALIDARGUMENT;
goto done;
}
char mp[_MP_MAX];
char path[_PATH_MAX];
path_parse(opath, mp, path);
ret = vfs_delete(mp, path);
done:
return ret;
}