fix:修复函数返回错误等问题

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
This commit is contained in:
zhangdengyu
2022-09-24 17:04:38 +08:00
parent 453c376198
commit dd8d48a2bf
34 changed files with 83 additions and 79 deletions

View File

@@ -83,6 +83,10 @@ int GetFullpath(int fd, const char *path, char **fullpath)
fd = GetAssociatedSystemFd(fd);
}
ret = fs_getfilep(fd, &file);
if (ret < 0) {
ret = -EPERM;
goto OUT;
}
if (file) {
ret = stat(file->f_path, &bufRet);
if (!ret) {