Add fs_delete() syscall
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user