Chinaunix首页 | 论坛 | 博客
  • 博客访问: 593414
  • 博文数量: 197
  • 博客积分: 7001
  • 博客等级: 大校
  • 技术积分: 2155
  • 用 户 组: 普通用户
  • 注册时间: 2005-02-24 00:29
文章分类

全部博文(197)

文章存档

2022年(1)

2019年(2)

2015年(1)

2012年(100)

2011年(69)

2010年(14)

2007年(3)

2005年(7)

分类: LINUX

2011-09-28 21:12:43

FC 5.0是Vmware workstation 6.0时安装的,到Vmware workstation 8.0是vmware tools更新出了问题。

出现如下信息:
/tmp/vmware-root/modules/vmhgfs-only/dir.c: 在函数 ‘HgfsDirLlseek’ 中:
/tmp/vmware-root/modules/vmhgfs-only/dir.c:697: 错误:‘struct inode’ 没有名为 ‘i_sem’ 的成员

2.6.15的struct inode’ 有名为 ‘i_sem’ 的成员,2.6.16改成了i_mutex. FC5 实际是2.6.15的内核,但是吸收了一些补丁,已经改成了i_mutex。

所以我们只要修改vmhgfs-only/dir.c,将里面的16改成15即可
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
   mtx = &inode->i_sem;
#else
   mtx = &inode->i_mutex;
#endif

具体的做法参见

If you’re trying to install vmware-tools inside a linux guest and get the dreaded
super.c:73: error: unknown field ‘clear_inode’ specified in initializer
error while compiling vmhgfs for shared folder support (which I use a lot), this will help (thanks to Anjo from ):

  • unpack /usr/lib/vmware-tools/modules/source/vmhgfs.tar to somewhere
  • open vmhgfs-only/super.c in your favorite text editor
  • edit from #ifndef VMW_USE_IGET_LOCKED
    .read_inode = HgfsReadInode,
    #endif
    .clear_inode = HgfsClearInode,
    .put_super = HgfsPutSuper,
    .statfs = HgfsStatfs,
    };

    to (note .clear_inode -> .evict_inode)

    #ifndef VMW_USE_IGET_LOCKED
    .read_inode = HgfsReadInode,
    #endif
    .evict_inode = HgfsClearInode,
    .put_super = HgfsPutSuper,
    .statfs = HgfsStatfs,
    };
  • repack vmhgfs.tar including edited super.c
  • execute vmware-config-tools.pl

阅读(999) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~