dll: fuse: improve volname option handling

This commit is contained in:
Bill Zissimopoulos
2017-03-19 18:06:21 -07:00
parent 8a369bd48a
commit a29611fa2a
3 changed files with 19 additions and 17 deletions

View File

@ -646,13 +646,8 @@ static NTSTATUS fsp_fuse_intf_GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
VolumeInfo->TotalSize = (UINT64)stbuf.f_blocks * (UINT64)stbuf.f_frsize;
VolumeInfo->FreeSize = (UINT64)stbuf.f_bfree * (UINT64)stbuf.f_frsize;
memcpy(&VolumeInfo->VolumeLabel, &f->VolumeLabel, sizeof f->VolumeLabel);
int i;
for(i = 0; i < sizeof VolumeInfo->VolumeLabel; i++)
if(VolumeInfo->VolumeLabel[i] == L'\0')
break;
VolumeInfo->VolumeLabelLength = (UINT16)i;
VolumeInfo->VolumeLabelLength = f->VolumeLabelLength;
memcpy(&VolumeInfo->VolumeLabel, &f->VolumeLabel, f->VolumeLabelLength);
return STATUS_SUCCESS;
}