First, go to /usr/lib/vmware-tools/modules/source and unpack vmhgfs.tar like this:
******************ggggggggggg************************
tar -xf vmhgfs.tar
********************************************************
Now you should have a new directory called vmhgfs-only. You need to get the following patch to make it work:
vmhgfs-i_node-fix.patch(http://home.sztoltzteixeira.com/vmhgfs-i_node-fix.patch)
To apply it, simply run:
patch -p1 < /wherever/you/saved/it/vmhgfs-i_node-fix.patch
This will patch vmhgfs-only/driver.c to conform with the kernel changes. Now you will have to repack it and reconfigure the VMware Tools. Simply run the following two commands:
tar -cf vmhgfs.tar vmhgfs-only
************************ggggggggggggggg*******************
run the command:
/usr/bin/vmware-config-tools.pl
**********************************************************
If all you want is to get the module compiled, you're all set. If you actually need to access a shared folder, then you should know that this workaround will not work while SELinux is enabled. If you want to use the files, you will have to disable SELinux by going to System -> Administration -> Security Level and Firewall. You will have to reboot, but after that, everything should work fine.
One more thing. If your host is Windows, you may notice that the files on the shared folders will appear as only accessible by root (they are in fact fully modifiable by everyone, but GNOME won't see it and this can be an annoyance.) If you want, the patch below will make all files appear with proper permissions (all permissions for everyone.) Apply it using the same steps used for the patch above.
vmhgfs-perm-fix.patch (http://home.sztoltzteixeira.com/vmhgfs-perm-fix.patch)
Now,all the ok.
下面是两个patch文件的内容:
1
diff -Naur vmhgfs-only/driver.c vmhgfs-only-new/driver.c
--- vmhgfs-only/driver.c 2006-08-04 14:25:52.000000000 -0300
+++ vmhgfs-only-new/driver.c 2006-10-28 15:26:14.000000000 -0300
@@ -41,8 +41,8 @@
#define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info)
#endif
-#define INODE_SET_II_P(inode, info) do { (inode)->u.generic_ip = (info); } while (0)
-#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->u.generic_ip)
+#define INODE_SET_II_P(inode, info) do { (inode)->i_private = (info); } while (0)
+#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private)
/*
* 2.5.x kernels support nanoseconds timestamps.
@@ -760,7 +760,6 @@
inode->i_uid = 0; /* This is bogus, should be the mount owner. */
inode->i_gid = 0; /* This is bogus, should be the mount owner. */
inode->i_rdev = 0; /* Device nodes are not supported */
- inode->i_blksize = HGFS_BLOCKSIZE;
inode->i_blocks = (attr->size + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE;
inode->i_size = attr->size;
HGFS_SET_TIME(inode->i_atime, attr->accessTime);
2
--- vmhgfs-only/driver.c 2006-10-28 15:26:14.000000000 -0300
+++ vmhgfs-only/driver.c-new 2006-10-28 15:34:07.000000000 -0300
@@ -755,7 +755,7 @@
/* Set the access mode. */
inode->i_mode &= ~S_IRWXUGO;
- inode->i_mode |= (attr->permissions << 6); /* Only applies to owner. */
+ inode->i_mode |= attr->permissions * 0111; /* Only applies to owner. */
inode->i_nlink = 1; /* Bogus? */
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一页 1 23 4 下一页
上一篇:Fedora Core6中IPtables日志管理技巧 下一篇:《Fedora Core 6 多国语言 x86_32/64 DVD版》FC6.0[ISO]
|