// do the chmod
int result = chmod(path.c_str(), hostMode);
if (result < 0)
- return errno;
+ return -errno;
return 0;
}
// do the fchmod
int result = fchmod(process->sim_fd(fd), hostMode);
if (result < 0)
- return errno;
+ return -errno;
return 0;
}
int result = stat(path.c_str(), &hostBuf);
if (result < 0)
- return errno;
+ return -errno;
OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
#endif
if (result < 0)
- return errno;
+ return -errno;
OS::copyOutStat64Buf(xc->mem, fd, xc->getSyscallArg(1), &hostBuf);
int result = statfs(path.c_str(), &hostBuf);
if (result < 0)
- return errno;
+ return -errno;
OS::copyOutStatfsBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
int result = fstatfs(fd, &hostBuf);
if (result < 0)
- return errno;
+ return -errno;
OS::copyOutStatfsBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
}
if (result < 0)
- return errno;
+ return -errno;
return 0;
}