From: Oliver Kurth Date: Wed, 8 May 2019 22:27:20 +0000 (-0700) Subject: Hgfs fuse Client: fix max name length setting for statvfs X-Git-Tag: stable-11.0.0~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b096ae277428efd8f550c1bbb35e98bb0cdf565;p=thirdparty%2Fopen-vm-tools.git Hgfs fuse Client: fix max name length setting for statvfs Detected internally with Fedora 29 and reported in https://github.com/vmware/open-vm-tools/issues/337, the statvfs structure must provide a valid max name length field. Setting to NAME_MAX. This allows the GUI Files application to create new folders and rename existing ones correctly. --- diff --git a/open-vm-tools/vmhgfs-fuse/filesystem.c b/open-vm-tools/vmhgfs-fuse/filesystem.c index 1931a5d2e..fd5a0066b 100644 --- a/open-vm-tools/vmhgfs-fuse/filesystem.c +++ b/open-vm-tools/vmhgfs-fuse/filesystem.c @@ -256,6 +256,12 @@ HgfsStatfs(const char* path, // IN : Path to the file stat->f_blocks = (totalBytes + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE; stat->f_bfree = (freeBytes + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE; stat->f_bavail = stat->f_bfree; + + /* + * Files application requires this field see bug 2287577. + * This is using the same as the GNU C Library defined NAME_MAX + */ + stat->f_namemax = NAME_MAX; break; case -EPERM: diff --git a/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h b/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h index 30478abfc..f23d5d095 100644 --- a/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h +++ b/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h @@ -25,8 +25,8 @@ #ifndef _VMHGFS_VERSION_H_ #define _VMHGFS_VERSION_H_ -#define VMHGFS_DRIVER_VERSION 1.6.8.0 -#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,8,0 -#define VMHGFS_DRIVER_VERSION_STRING "1.6.8.0" +#define VMHGFS_DRIVER_VERSION 1.6.9.0 +#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,9,0 +#define VMHGFS_DRIVER_VERSION_STRING "1.6.9.0" #endif /* _VMHGFS_VERSION_H_ */