sysdeps/managarm: Handle missing errors in sys_fallocate
@@ -2081,9 +2081,18 @@ int sys_fallocate(int fd, off_t offset, size_t size) {
managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recv_resp.data(), recv_resp.length());
+ if(resp.error() == managarm::fs::Errors::ILLEGAL_OPERATION_TARGET) {
+ return EINVAL;
+ }else if(resp.error() == managarm::fs::Errors::INSUFFICIENT_PERMISSIONS) {
+ return EPERM;
+ }else if(resp.error() == managarm::fs::Errors::ILLEGAL_ARGUMENT) {
+ return EINVAL;
+ }else{
__ensure(resp.error() == managarm::fs::Errors::SUCCESS);
return 0;
}
+ return 0;
+}
int sys_unlinkat(int fd, const char *path, int flags) {
SignalGuard sguard;
