mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: fuse: fuse_intf_GetVolumeInfo: return default info when statfs unimplemented
This commit is contained in:
parent
ba46d9fef8
commit
0980365082
@ -636,13 +636,13 @@ static NTSTATUS fsp_fuse_intf_GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
struct fuse_statvfs stbuf;
|
struct fuse_statvfs stbuf;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (0 == f->ops.statfs)
|
|
||||||
return STATUS_INVALID_DEVICE_REQUEST;
|
|
||||||
|
|
||||||
memset(&stbuf, 0, sizeof stbuf);
|
memset(&stbuf, 0, sizeof stbuf);
|
||||||
|
if (0 != f->ops.statfs)
|
||||||
|
{
|
||||||
err = f->ops.statfs("/", &stbuf);
|
err = f->ops.statfs("/", &stbuf);
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
return fsp_fuse_ntstatus_from_errno(f->env, err);
|
return fsp_fuse_ntstatus_from_errno(f->env, err);
|
||||||
|
}
|
||||||
|
|
||||||
VolumeInfo->TotalSize = (UINT64)stbuf.f_blocks * (UINT64)stbuf.f_frsize;
|
VolumeInfo->TotalSize = (UINT64)stbuf.f_blocks * (UINT64)stbuf.f_frsize;
|
||||||
VolumeInfo->FreeSize = (UINT64)stbuf.f_bfree * (UINT64)stbuf.f_frsize;
|
VolumeInfo->FreeSize = (UINT64)stbuf.f_bfree * (UINT64)stbuf.f_frsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user