Merge pull request #248 from progrunner17/patch-1

fix errno
This commit is contained in:
Giuseppe Scrivano 2020-10-20 19:27:31 +02:00 committed by GitHub
commit 428bc7bdec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
main.c
View File

@ -2134,7 +2134,7 @@ ovl_opendir (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
if (d == NULL)
{
errno = ENOENT;
errno = ENOMEM;
goto out_errno;
}
@ -2289,7 +2289,7 @@ ovl_do_readdir (fuse_req_t req, fuse_ino_t ino, size_t size,
buffer = malloc (size);
if (buffer == NULL)
{
fuse_reply_err (req, ENOMEM);
fuse_reply_err (req, errno);
return;
}
p = buffer;
@ -2446,7 +2446,7 @@ ovl_listxattr (fuse_req_t req, fuse_ino_t ino, size_t size)
buf = malloc (size);
if (buf == NULL)
{
fuse_reply_err (req, ENOMEM);
fuse_reply_err (req, errno);
return;
}
}
@ -2525,7 +2525,7 @@ ovl_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
buf = malloc (size);
if (buf == NULL)
{
fuse_reply_err (req, ENOMEM);
fuse_reply_err (req, errno);
return;
}
}
@ -4607,7 +4607,7 @@ ovl_readlink (fuse_req_t req, fuse_ino_t ino)
buf = malloc (current_size);
if (buf == NULL)
{
fuse_reply_err (req, ENOENT);
fuse_reply_err (req, errno);
return;
}