Closed taviso closed 9 years ago
I think it's more complicated than I thought, please ignore.
Well thanks for at least trying! :)
taviso: so what happened when you tried running with that patch / change in place?
(To not set the read and write values, and just leave them as NULL in vmhgfs-only/file.c)
Some stability issues, I didn't have time to investigate. Perhaps they're unrelated.
Looking at Viro's change in the kernel source (https://github.com/torvalds/linux/commit/5d5d568975307877e9195f5305f4240e506a2807), your patch looks correct.
I tried the patch with OSX host running Fedora 4.1.3-100.fc21.x86_64 with VMwareTools-9.9.2 (not 9.9.3), and it's working fine for me!
I ran a couple of cp -pr /mnt/hgfs/foo/bar ~/local/foo/bar, and then diff-ed the new directory (on linux) with the original on the OSX or hgfs mount, and also vice-a-versa with no problems.
I didn't reboot (the host or the linux on VM).
Given the above, this should be re-opened and commited to master.
I don't know why you're diff/patch looks slightly different than mine, I mean you added two lines of code around the functions that are now not exported.
i.e. this is my patch file:
--- vmhgfs-only.orig/file.c 2015-08-09 12:11:40.221267063 -0700 +++ vmhgfs-only/file.c 2015-08-09 12:11:29.197685431 -0700 @@ -170,8 +170,10 @@ .flush = HgfsFlush,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) .read = new_sync_read, .write = new_sync_write, +#endif .read_iter = HgfsFileRead, .write_iter = HgfsFileWrite,
Yes, I think my instability was unrelated.
Works with Fedora 21, Kernel 4.1.3, tools 9.9.3 Thanks
taviso's patch worked for me.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Wily Werewolf (development branch)
Release: 15.10
Codename: wily
$ uname -a
Linux sun 4.1.0-3-generic #3-Ubuntu SMP Tue Jul 28 12:22:42 UTC 2015 i686 i686 i686 GNU/Linux
I don't know why you're diff/patch looks slightly different than mine, I mean you added two lines of code around the functions that are now not exported.
The original patch adds another space in front of the two lines between the if/endif.
Worked fine, please merge :+1:
Looks good, but I can't test at the moment. Will test soon, though. Thanks!
Make vmhgfs compile after #61