main: report close(2) errors

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2019-07-20 22:50:47 +02:00
parent 9e2e1cbbd1
commit beeafcfc62
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED

5
main.c
View File

@ -2901,13 +2901,14 @@ ovl_write_buf (fuse_req_t req, fuse_ino_t ino,
static void
ovl_release (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
{
int ret;
(void) ino;
if (ovl_debug (req))
fprintf (stderr, "ovl_release(ino=%" PRIu64 ")\n", ino);
close (fi->fh);
fuse_reply_err (req, 0);
ret = close (fi->fh);
fuse_reply_err (req, ret == 0 ? 0 : errno);
}
static int