Skip to content

Commit 0476f84

Browse files
committed
main: fix type for ioctl
fuse_reply_ioctl expects a int. Closes: #330 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1 parent 6d4dbb8 commit 0476f84

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

main.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5131,12 +5131,6 @@ ovl_fsyncdir (fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_inf
51315131
return do_fsync (req, ino, datasync, -1);
51325132
}
51335133

5134-
static int
5135-
direct_ioctl (struct ovl_layer *l, int fd, int cmd, unsigned long *r)
5136-
{
5137-
return ioctl (fd, cmd, &r);
5138-
}
5139-
51405134
static void
51415135
ovl_ioctl (fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
51425136
struct fuse_file_info *fi, unsigned int flags,
@@ -5147,7 +5141,7 @@ ovl_ioctl (fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
51475141
cleanup_close int cleaned_fd = -1;
51485142
struct ovl_node *node;
51495143
int fd = -1;
5150-
unsigned long r;
5144+
int r = 0;
51515145

51525146
if (flags & FUSE_IOCTL_COMPAT)
51535147
{
@@ -5203,7 +5197,7 @@ ovl_ioctl (fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
52035197

52045198
l = release_big_lock ();
52055199

5206-
if (direct_ioctl (node->layer, fd, cmd, &r) < 0)
5200+
if (ioctl (fd, cmd, &r, sizeof (r)) < 0)
52075201
fuse_reply_err (req, errno);
52085202
else
52095203
fuse_reply_ioctl (req, 0, &r, out_bufsz ? sizeof (r) : 0);

0 commit comments

Comments
 (0)