diff -c -b vmhgfs-only-orig/driver.c vmhgfs-only/driver.c *** vmhgfs-only-orig/driver.c 2007-05-23 22:21:25.000000000 -0400 --- vmhgfs-only/driver.c 2007-07-31 16:50:19.000000000 -0400 *************** *** 41,48 **** --- 41,53 ---- #define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info) #endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) #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) + #else + #define INODE_SET_II_P(inode, info) do { (inode)->i_private = ((void*)info); } while (0) + #define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private) + #endif /* * 2.5.x kernels support nanoseconds timestamps. *************** *** 760,766 **** --- 765,773 ---- 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 */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) inode->i_blksize = HGFS_BLOCKSIZE; + #endif inode->i_blocks = (attr->size + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE; inode->i_size = attr->size; HGFS_SET_TIME(inode->i_atime, attr->accessTime); *************** *** 4419,4424 **** --- 4426,4459 ---- #if KERNEL_25_FS + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) + /* + *----------------------------------------------------------------------------- + * + * HgfsGetSb -- + * + * Invokes generic kernel code to prepare superblock for + * deviceless filesystem. + * + * Results: + * 0 on success + * non-zero on failure + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + static int + HgfsGetSb(struct file_system_type *fs_type, + int flags, + const char *dev_name, + void *rawData, + struct vfsmount *mnt) + { + return get_sb_nodev(fs_type, flags, rawData, HgfsReadSuper, mnt); + } + #else /* *----------------------------------------------------------------------------- * *************** *** 4453,4458 **** --- 4488,4494 ---- { return get_sb_nodev(fs_type, flags, rawData, HgfsReadSuper); } + #endif #else