smoverlay/app-emulation/vmware-modules/files/305-vmblock.patch

37 lines
1.5 KiB
Diff

diff -ruN work.orig/vmblock-only/linux/control.c work/vmblock-only/linux/control.c
--- work.orig/vmblock-only/linux/control.c 2013-11-02 18:05:39.960226399 +0100
+++ work/vmblock-only/linux/control.c 2013-11-02 18:09:11.760231432 +0100
@@ -208,17 +208,14 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
- if (!controlProcEntry) {
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps);
+ if (controlProcEntry == NULL) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL);
return -EINVAL;
}
- controlProcEntry->proc_fops = &ControlFileOps;
return 0;
}
--- a/vmblock-only/linux/inode.c 2014-04-15 00:41:40.000000000 +0300
+++ b/vmblock-only/linux/inode.c 2014-04-23 12:44:50.005954179 +0300
@@ -135,7 +135,8 @@ InodeOpLookup(struct inode *dir, //
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
- inode->i_uid = inode->i_gid = 0;
+ inode->i_uid = GLOBAL_ROOT_UID;
+ inode->i_gid = GLOBAL_ROOT_GID;
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);