From f97b8fcc3a6636837ca8bb1aa923ad80ed83d928 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Tue, 12 Feb 2019 11:51:07 +0100 Subject: [PATCH] Fix #213 and a typo in macro FSP_FUSE_CTLCODE_FROM_IOCTL --- inc/fuse/winfsp_fuse.h | 2 +- src/dll/fuse/fuse_intf.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/fuse/winfsp_fuse.h b/inc/fuse/winfsp_fuse.h index ccb8666e..591600ee 100644 --- a/inc/fuse/winfsp_fuse.h +++ b/inc/fuse/winfsp_fuse.h @@ -59,7 +59,7 @@ extern "C" { #define FSP_FUSE_DEVICE_TYPE (0x8000 | 'W' | 'F' * 0x100) /* DeviceIoControl -> ioctl */ #define FSP_FUSE_CTLCODE_FROM_IOCTL(cmd)\ - (FSP_FUSE_DEVICE_TYPE << 16) | (((c) & 0x0fff) << 2) + (FSP_FUSE_DEVICE_TYPE << 16) | (((cmd) & 0x0fff) << 2) #define FSP_FUSE_IOCTL(cmd, isiz, osiz) \ ( \ (((osiz) != 0) << 31) | \ diff --git a/src/dll/fuse/fuse_intf.c b/src/dll/fuse/fuse_intf.c index 2b1716ee..31e9ae55 100644 --- a/src/dll/fuse/fuse_intf.c +++ b/src/dll/fuse/fuse_intf.c @@ -2168,6 +2168,7 @@ static NTSTATUS fsp_fuse_intf_Control(FSP_FILE_SYSTEM *FileSystem, memcpy(OutputBuffer, InputBuffer, InputBufferLength); err = f->ops.ioctl(filedesc->PosixPath, cmd, 0, &fi, 0, OutputBuffer); } + *PBytesTransferred = OutputBufferLength; return fsp_fuse_ntstatus_from_errno(f->env, err); }