]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Hgfs fuse Client: fix max name length setting for statvfs
authorOliver Kurth <okurth@vmware.com>
Wed, 8 May 2019 22:27:20 +0000 (15:27 -0700)
committerOliver Kurth <okurth@vmware.com>
Wed, 8 May 2019 22:27:20 +0000 (15:27 -0700)
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.

open-vm-tools/vmhgfs-fuse/filesystem.c
open-vm-tools/vmhgfs-fuse/vmhgfs_version.h

index 1931a5d2eea937558e5d9baec3ff1d1a1829077f..fd5a0066b635570f3e94e433d937f3e24542f7cb 100644 (file)
@@ -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:
index 30478abfcc902bc7bfcb6986c74b2c793d289f4c..f23d5d0958787cfefe09e1177837376bc0315d91 100644 (file)
@@ -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_ */