FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 12-12-2007, 05:00 PM
Soren Hansen
 
Default UBUNTU: Update open-vm-tools kernel modules

Signed-off-by: Soren Hansen <soren@ubuntu.com>
---
ubuntu/vmblock/Makefile | 49 ++++++---
ubuntu/vmblock/Makefile.kernel | 57 +++-------
ubuntu/vmblock/Makefile.normal | 41 ++++----
ubuntu/vmblock/README | 4 +-
ubuntu/vmblock/autoconf/cachecreate.c | 8 +-
ubuntu/vmblock/autoconf/epoll.c | 8 +-
ubuntu/vmblock/autoconf/filldir1.c | 8 +-
ubuntu/vmblock/autoconf/geninclude.c | 8 +-
ubuntu/vmblock/autoconf/getsb1.c | 8 +-
ubuntu/vmblock/autoconf/setnice.c | 8 +-
ubuntu/vmblock/autoconf/skas1.c | 8 +-
ubuntu/vmblock/autoconf/statfs1.c | 8 +-
ubuntu/vmblock/include/compat_completion.h | 8 +-
ubuntu/vmblock/include/compat_file.h | 8 +-
ubuntu/vmblock/include/compat_fs.h | 10 +-
ubuntu/vmblock/include/compat_init.h | 8 +-
ubuntu/vmblock/include/compat_kernel.h | 8 +-
ubuntu/vmblock/include/compat_list.h | 18 +++-
ubuntu/vmblock/include/compat_mm.h | 8 +-
ubuntu/vmblock/include/compat_module.h | 8 +-
ubuntu/vmblock/include/compat_namei.h | 8 +-
ubuntu/vmblock/include/compat_page.h | 8 +-
ubuntu/vmblock/include/compat_sched.h | 36 ++++++-
ubuntu/vmblock/include/compat_semaphore.h | 8 +-
ubuntu/vmblock/include/compat_slab.h | 27 ++++-
ubuntu/vmblock/include/compat_spinlock.h | 8 +-
ubuntu/vmblock/include/compat_statfs.h | 8 +-
ubuntu/vmblock/include/compat_string.h | 8 +-
ubuntu/vmblock/include/compat_uaccess.h | 8 +-
ubuntu/vmblock/include/compat_version.h | 8 +-
ubuntu/vmblock/include/compat_wait.h | 8 +-
ubuntu/vmblock/include/driver-config.h | 8 +-
ubuntu/vmblock/include/vm_assert.h | 9 +-
ubuntu/vmblock/include/vm_basic_defs.h | 36 +++++--
ubuntu/vmblock/include/vm_basic_types.h | 157 +++++++++++++++++-----------
ubuntu/vmblock/include/vmblock.h | 8 +-
ubuntu/vmblock/include/vmware.h | 9 +-
ubuntu/vmblock/linux/block.c | 8 +-
ubuntu/vmblock/linux/block.h | 8 +-
ubuntu/vmblock/linux/control.c | 8 +-
ubuntu/vmblock/linux/dbllnklst.c | 8 +-
ubuntu/vmblock/linux/dbllnklst.h | 8 +-
ubuntu/vmblock/linux/dentry.c | 8 +-
ubuntu/vmblock/linux/file.c | 8 +-
ubuntu/vmblock/linux/filesystem.c | 8 +-
ubuntu/vmblock/linux/filesystem.h | 8 +-
ubuntu/vmblock/linux/inode.c | 8 +-
ubuntu/vmblock/linux/module.c | 8 +-
ubuntu/vmblock/linux/os.h | 8 +-
ubuntu/vmblock/linux/stubs.c | 8 +-
ubuntu/vmblock/linux/stubs.h | 8 +-
ubuntu/vmblock/linux/super.c | 8 +-
ubuntu/vmblock/linux/vmblockInt.h | 8 +-
ubuntu/vmblock/linux/vmblock_version.h | 8 +-
ubuntu/vmhgfs/Makefile | 49 ++++++---
ubuntu/vmhgfs/Makefile.kernel | 47 +++-----
ubuntu/vmhgfs/Makefile.normal | 40 ++++----
ubuntu/vmhgfs/autoconf/cachecreate.c | 8 +-
ubuntu/vmhgfs/autoconf/cachector.c | 40 +++++++
ubuntu/vmhgfs/autoconf/epoll.c | 8 +-
ubuntu/vmhgfs/autoconf/geninclude.c | 8 +-
ubuntu/vmhgfs/autoconf/getsb1.c | 8 +-
ubuntu/vmhgfs/autoconf/inode1.c | 8 +-
ubuntu/vmhgfs/autoconf/maxbytes.c | 8 +-
ubuntu/vmhgfs/autoconf/setnice.c | 8 +-
ubuntu/vmhgfs/autoconf/statfs1.c | 8 +-
ubuntu/vmhgfs/backdoor.c | 10 +-
ubuntu/vmhgfs/backdoor.h | 8 +-
ubuntu/vmhgfs/backdoorGcc32.c | 8 +-
ubuntu/vmhgfs/backdoorGcc64.c | 8 +-
ubuntu/vmhgfs/backdoorInt.h | 8 +-
ubuntu/vmhgfs/backdoor_def.h | 12 ++-
ubuntu/vmhgfs/bdhandler.c | 8 +-
ubuntu/vmhgfs/bdhandler.h | 8 +-
ubuntu/vmhgfs/compat_completion.h | 8 +-
ubuntu/vmhgfs/compat_dcache.h | 8 +-
ubuntu/vmhgfs/compat_file.h | 8 +-
ubuntu/vmhgfs/compat_fs.h | 10 +-
ubuntu/vmhgfs/compat_highmem.h | 8 +-
ubuntu/vmhgfs/compat_kernel.h | 8 +-
ubuntu/vmhgfs/compat_list.h | 18 +++-
ubuntu/vmhgfs/compat_mm.h | 8 +-
ubuntu/vmhgfs/compat_module.h | 8 +-
ubuntu/vmhgfs/compat_namei.h | 8 +-
ubuntu/vmhgfs/compat_page-flags.h | 8 +-
ubuntu/vmhgfs/compat_page.h | 8 +-
ubuntu/vmhgfs/compat_sched.h | 36 ++++++-
ubuntu/vmhgfs/compat_semaphore.h | 8 +-
ubuntu/vmhgfs/compat_slab.h | 27 ++++-
ubuntu/vmhgfs/compat_spinlock.h | 8 +-
ubuntu/vmhgfs/compat_statfs.h | 8 +-
ubuntu/vmhgfs/compat_string.h | 8 +-
ubuntu/vmhgfs/compat_uaccess.h | 8 +-
ubuntu/vmhgfs/compat_version.h | 8 +-
ubuntu/vmhgfs/compat_wait.h | 8 +-
ubuntu/vmhgfs/cpName.c | 8 +-
ubuntu/vmhgfs/cpName.h | 19 +++-
ubuntu/vmhgfs/cpNameInt.h | 8 +-
ubuntu/vmhgfs/cpNameLinux.c | 8 +-
ubuntu/vmhgfs/cpNameLite.c | 8 +-
ubuntu/vmhgfs/cpNameLite.h | 8 +-
ubuntu/vmhgfs/dbllnklst.h | 8 +-
ubuntu/vmhgfs/dentry.c | 8 +-
ubuntu/vmhgfs/dir.c | 8 +-
ubuntu/vmhgfs/driver-config.h | 8 +-
ubuntu/vmhgfs/escBitvector.h | 11 ++-
ubuntu/vmhgfs/file.c | 8 +-
ubuntu/vmhgfs/filesystem.c | 18 ++--
ubuntu/vmhgfs/filesystem.h | 8 +-
ubuntu/vmhgfs/fsutil.c | 11 ++-
ubuntu/vmhgfs/fsutil.h | 8 +-
ubuntu/vmhgfs/guest_msg_def.h | 8 +-
ubuntu/vmhgfs/hgfs.h | 9 +-
ubuntu/vmhgfs/hgfsBd.c | 10 +-
ubuntu/vmhgfs/hgfsBd.h | 8 +-
ubuntu/vmhgfs/hgfsDevLinux.h | 8 +-
ubuntu/vmhgfs/hgfsProto.h | 33 +++++-
ubuntu/vmhgfs/hgfsUtil.c | 10 +-
ubuntu/vmhgfs/hgfsUtil.h | 24 +++--
ubuntu/vmhgfs/includeCheck.h | 8 +-
ubuntu/vmhgfs/inode.c | 8 +-
ubuntu/vmhgfs/inode.h | 8 +-
ubuntu/vmhgfs/kernelStubs.h | 61 +++++++++--
ubuntu/vmhgfs/kernelStubsLinux.c | 15 ++-
ubuntu/vmhgfs/link.c | 8 +-
ubuntu/vmhgfs/message.c | 10 +-
ubuntu/vmhgfs/message.h | 8 +-
ubuntu/vmhgfs/messageBackdoor.c | 12 +-
ubuntu/vmhgfs/module.c | 8 +-
ubuntu/vmhgfs/module.h | 8 +-
ubuntu/vmhgfs/page.c | 8 +-
ubuntu/vmhgfs/request.c | 8 +-
ubuntu/vmhgfs/request.h | 8 +-
ubuntu/vmhgfs/rpcout.c | 20 ++--
ubuntu/vmhgfs/rpcout.h | 8 +-
ubuntu/vmhgfs/staticEscape.c | 19 +++-
ubuntu/vmhgfs/staticEscape.h | 8 +-
ubuntu/vmhgfs/stubs.c | 8 +-
ubuntu/vmhgfs/super.c | 8 +-
ubuntu/vmhgfs/vm_assert.h | 9 +-
ubuntu/vmhgfs/vm_basic_asm.h | 14 ++--
ubuntu/vmhgfs/vm_basic_asm_x86.h | 9 +-
ubuntu/vmhgfs/vm_basic_asm_x86_64.h | 9 +-
ubuntu/vmhgfs/vm_basic_defs.h | 36 +++++--
ubuntu/vmhgfs/vm_basic_types.h | 157 +++++++++++++++++-----------
ubuntu/vmhgfs/vmhgfs_version.h | 14 ++--
ubuntu/vmhgfs/vmware.h | 9 +-
ubuntu/vmhgfs/vmware_pack_begin.h | 8 +-
ubuntu/vmhgfs/vmware_pack_end.h | 8 +-
ubuntu/vmhgfs/vmware_pack_init.h | 8 +-
ubuntu/vmhgfs/x86cpuid.h | 92 +++++++++++------
ubuntu/vmmemctl/Makefile | 49 ++++++---
ubuntu/vmmemctl/Makefile.kernel | 46 +++-----
ubuntu/vmmemctl/Makefile.normal | 40 ++++----
ubuntu/vmmemctl/autoconf/epoll.c | 8 +-
ubuntu/vmmemctl/autoconf/geninclude.c | 8 +-
ubuntu/vmmemctl/autoconf/setnice.c | 8 +-
ubuntu/vmmemctl/backdoor.h | 8 +-
ubuntu/vmmemctl/backdoorGcc32.c | 8 +-
ubuntu/vmmemctl/backdoorGcc64.c | 8 +-
ubuntu/vmmemctl/backdoorInt.h | 8 +-
ubuntu/vmmemctl/backdoor_balloon.h | 8 +-
ubuntu/vmmemctl/balloon_def.h | 8 +-
ubuntu/vmmemctl/compat_completion.h | 8 +-
ubuntu/vmmemctl/compat_file.h | 8 +-
ubuntu/vmmemctl/compat_kernel.h | 8 +-
ubuntu/vmmemctl/compat_list.h | 18 +++-
ubuntu/vmmemctl/compat_mm.h | 8 +-
ubuntu/vmmemctl/compat_module.h | 8 +-
ubuntu/vmmemctl/compat_page.h | 8 +-
ubuntu/vmmemctl/compat_sched.h | 36 ++++++-
ubuntu/vmmemctl/compat_semaphore.h | 8 +-
ubuntu/vmmemctl/compat_spinlock.h | 8 +-
ubuntu/vmmemctl/compat_version.h | 8 +-
ubuntu/vmmemctl/compat_wait.h | 8 +-
ubuntu/vmmemctl/driver-config.h | 8 +-
ubuntu/vmmemctl/includeCheck.h | 8 +-
ubuntu/vmmemctl/os.c | 18 +++-
ubuntu/vmmemctl/os.h | 9 +-
ubuntu/vmmemctl/vm_assert.h | 9 +-
ubuntu/vmmemctl/vm_basic_defs.h | 36 +++++--
ubuntu/vmmemctl/vm_basic_types.h | 157 +++++++++++++++++-----------
ubuntu/vmmemctl/vmballoon.c | 14 ++-
ubuntu/vmmemctl/vmballoon.h | 8 +-
ubuntu/vmmemctl/vmmemctl_version.h | 8 +-
ubuntu/vmxnet/Makefile | 49 ++++++---
ubuntu/vmxnet/Makefile.kernel | 45 +++-----
ubuntu/vmxnet/Makefile.normal | 34 +++---
ubuntu/vmxnet/autoconf/geninclude.c | 8 +-
ubuntu/vmxnet/autoconf/skblin.c | 8 +-
ubuntu/vmxnet/bpf_meta.h | 59 +++++++++++
ubuntu/vmxnet/compat_ethtool.h | 8 +-
ubuntu/vmxnet/compat_highmem.h | 40 +++++++
ubuntu/vmxnet/compat_init.h | 8 +-
ubuntu/vmxnet/compat_interrupt.h | 8 +-
ubuntu/vmxnet/compat_ioport.h | 8 +-
ubuntu/vmxnet/compat_module.h | 8 +-
ubuntu/vmxnet/compat_netdevice.h | 62 ++++++++++--
ubuntu/vmxnet/compat_pci.h | 8 +-
ubuntu/vmxnet/compat_skbuff.h | 8 +-
ubuntu/vmxnet/compat_slab.h | 27 ++++-
ubuntu/vmxnet/compat_spinlock.h | 8 +-
ubuntu/vmxnet/compat_timer.h | 95 +++++++++++++++++
ubuntu/vmxnet/compat_version.h | 8 +-
ubuntu/vmxnet/driver-config.h | 8 +-
ubuntu/vmxnet/includeCheck.h | 8 +-
ubuntu/vmxnet/net.h | 8 +-
ubuntu/vmxnet/net_dist.h | 12 +-
ubuntu/vmxnet/net_sg.h | 8 +-
ubuntu/vmxnet/return_status.h | 8 +-
ubuntu/vmxnet/vm_basic_types.h | 157 +++++++++++++++++-----------
ubuntu/vmxnet/vm_device_version.h | 10 +-
ubuntu/vmxnet/vmkapi_status.h | 19 +++-
ubuntu/vmxnet/vmkapi_types.h | 23 +++-
ubuntu/vmxnet/vmnet_def.h | 10 +-
ubuntu/vmxnet/vmxnet.c | 144 ++++++++++++++++++++++++--
ubuntu/vmxnet/vmxnet2_def.h | 13 ++-
ubuntu/vmxnet/vmxnetInt.h | 9 +-
ubuntu/vmxnet/vmxnet_def.h | 11 +-
ubuntu/vmxnet/vmxnet_version.h | 8 +-
220 files changed, 2368 insertions(+), 1416 deletions(-)
create mode 100644 ubuntu/vmhgfs/autoconf/cachector.c
create mode 100644 ubuntu/vmxnet/bpf_meta.h
create mode 100644 ubuntu/vmxnet/compat_highmem.h
create mode 100644 ubuntu/vmxnet/compat_timer.h

diff --git a/ubuntu/vmblock/Makefile b/ubuntu/vmblock/Makefile
index 8a7ae56..ae0c286 100644
--- a/ubuntu/vmblock/Makefile
+++ b/ubuntu/vmblock/Makefile
@@ -1,20 +1,21 @@
#!/usr/bin/make -f
-################################################## ###########
-# Copyright 1998 VMware, Inc. All rights reserved.
-################################################## ###########
-####
-#### This program is free software; you can redistribute it and/or modify it
-#### under the terms of the GNU General Public License as published by the
-#### Free Software Foundation version 2 and no later version.
-####
-#### This program is distributed in the hope that it will be useful, but
-#### WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-#### or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-#### for more details.
-####
-#### You should have received a copy of the GNU General Public License along
-#### with this program; if not, write to the Free Software Foundation, Inc.,
-#### 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+################################################# #########
+# Copyright (C) 1998 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation version 2 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+################################################# #########

####
#### VMware kernel module Makefile to be distributed externally
@@ -107,6 +108,22 @@ endif

endif

+vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)
+ $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL)
+ $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default
+ -DKBUILD_BASENAME="$(DRIVER)"
+ -Werror -S -o /dev/null -xc $(1)
+ > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
+
+CC_WARNINGS := -Wall -Wstrict-prototypes
+CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS) -DVMW_USING_KBUILD
+ifdef VMX86_DEVEL
+CC_OPTS += -DVMX86_DEVEL
+endif
+ifdef VMX86_DEBUG
+CC_OPTS += -DVMX86_DEBUG
+endif
+
include $(SRCROOT)/Makefile.kernel

ifdef TOPDIR
diff --git a/ubuntu/vmblock/Makefile.kernel b/ubuntu/vmblock/Makefile.kernel
index 9f0e14c..a5276ab 100644
--- a/ubuntu/vmblock/Makefile.kernel
+++ b/ubuntu/vmblock/Makefile.kernel
@@ -1,44 +1,21 @@
#!/usr/bin/make -f
-################################################## ###########
-# Copyright 2006 VMware, Inc. All rights reserved.
-################################################## ###########
-####
-#### This program is free software; you can redistribute it and/or modify it
-#### under the terms of the GNU General Public License as published by the
-#### Free Software Foundation version 2 and no later version.
-####
-#### This program is distributed in the hope that it will be useful, but
-#### WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-#### or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-#### for more details.
-####
-#### You should have received a copy of the GNU General Public License along
-#### with this program; if not, write to the Free Software Foundation, Inc.,
-#### 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-####
-#### VMware vmblock Makefile to be distributed externally
-####
-####
-
-vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL)
- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default
- -DKBUILD_BASENAME="$(DRIVER)"
- -Werror -S -o /dev/null -xc $(1)
- > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
-
-CC_WARNINGS := -Wall -Wstrict-prototypes
-
-CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS)
-
-CC_OPTS += -DVMW_USING_KBUILD
-
-ifdef VMX86_DEVEL
-CC_OPTS += -DVMX86_DEVEL
-endif
-ifdef VMX86_DEBUG
-CC_OPTS += -DVMX86_DEBUG
-endif
+################################################# #########
+# Copyright (C) 2006 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation version 2 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+################################################# #########

INCLUDE := -I$(SRCROOT)/include

diff --git a/ubuntu/vmblock/Makefile.normal b/ubuntu/vmblock/Makefile.normal
index ae778c8..9721d11 100644
--- a/ubuntu/vmblock/Makefile.normal
+++ b/ubuntu/vmblock/Makefile.normal
@@ -1,20 +1,21 @@
#!/usr/bin/make -f
-################################################## ###########
-# Copyright 2006 VMware, Inc. All rights reserved.
-################################################## ###########
-####
-#### This program is free software; you can redistribute it and/or modify it
-#### under the terms of the GNU General Public License as published by the
-#### Free Software Foundation version 2 and no later version.
-####
-#### This program is distributed in the hope that it will be useful, but
-#### WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-#### or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-#### for more details.
-####
-#### You should have received a copy of the GNU General Public License along
-#### with this program; if not, write to the Free Software Foundation, Inc.,
-#### 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+################################################# #########
+# Copyright (C) 2006 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation version 2 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+################################################# #########

####
#### VMware vmblock Makefile to be distributed externally
@@ -99,20 +100,20 @@ OBJS := $(LINUX_OBJS)
####

driver: setup deps
- $(MAKE) -C $(DESTDIR) -f ../Makefile SRCROOT=../$(SRCROOT) $(DRIVERNAME)
+ $(MAKE) -C $(DESTDIR) -f ../Makefile SRCROOT=../$(SRCROOT) $(DRIVER).o
INCLUDE_DEPS=1

setup:
@if [ -d $(DESTDIR) ] ; then true ; else mkdir $(DESTDIR); chmod 755 $(DESTDIR) ; fi

-$(DRIVER): $(DRIVERNAME)
+$(DRIVER) $(DRIVER).o: $(DRIVERNAME)
cp -f $< $@

$(DRIVERNAME): $(OBJS)
- $(ECHO) "Building $(DRIVERNAME)"
+ $(ECHO) "Building $(DRIVERNAME)"
ld -r -o $(DRIVERNAME) $^

-auto-build:
+auto-build:
$(MAKE) driver QUIET=1
cp -f $(DESTDIR)/$(DRIVERNAME) $(SRCROOT)/../$(DRIVER).o

diff --git a/ubuntu/vmblock/README b/ubuntu/vmblock/README
index 3cae243..fdb750f 100644
--- a/ubuntu/vmblock/README
+++ b/ubuntu/vmblock/README
@@ -6,9 +6,9 @@ Makefile is correct and then just type

from this directory. A copy of the module will be left in

- driver-<kernel version>/vmblock-<kernel-version>
+ driver-<kernel version>/vmblock.o

-(e.g. driver-up-2.4.20/vmblock-up-2.4.20) for 2.4 series kernels and in
+(e.g. driver-up-2.4.20/vmblock.o) for 2.4 series kernels and in

../vmblock.o

diff --git a/ubuntu/vmblock/autoconf/cachecreate.c b/ubuntu/vmblock/autoconf/cachecreate.c
index 98c82eb..88c51c1 100644
--- a/ubuntu/vmblock/autoconf/cachecreate.c
+++ b/ubuntu/vmblock/autoconf/cachecreate.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#include <linux/autoconf.h>
#include <linux/version.h>
diff --git a/ubuntu/vmblock/autoconf/epoll.c b/ubuntu/vmblock/autoconf/epoll.c
index fc6ac4c..44083c6 100644
--- a/ubuntu/vmblock/autoconf/epoll.c
+++ b/ubuntu/vmblock/autoconf/epoll.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2004 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2004 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* Detect whether we have 'struct poll_wqueues'
diff --git a/ubuntu/vmblock/autoconf/filldir1.c b/ubuntu/vmblock/autoconf/filldir1.c
index 8c8b700..754da62 100644
--- a/ubuntu/vmblock/autoconf/filldir1.c
+++ b/ubuntu/vmblock/autoconf/filldir1.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#include <linux/autoconf.h>
#include <linux/version.h>
diff --git a/ubuntu/vmblock/autoconf/geninclude.c b/ubuntu/vmblock/autoconf/geninclude.c
index 681bb52..f37a20f 100644
--- a/ubuntu/vmblock/autoconf/geninclude.c
+++ b/ubuntu/vmblock/autoconf/geninclude.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2003 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2003 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#include <linux/autoconf.h>

diff --git a/ubuntu/vmblock/autoconf/getsb1.c b/ubuntu/vmblock/autoconf/getsb1.c
index c76388a..862ae2b 100644
--- a/ubuntu/vmblock/autoconf/getsb1.c
+++ b/ubuntu/vmblock/autoconf/getsb1.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#include <linux/autoconf.h>
#include <linux/version.h>
diff --git a/ubuntu/vmblock/autoconf/setnice.c b/ubuntu/vmblock/autoconf/setnice.c
index ebd452a..8d5ebf2 100644
--- a/ubuntu/vmblock/autoconf/setnice.c
+++ b/ubuntu/vmblock/autoconf/setnice.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2005 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2005 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* set_user_nice appeared in 2.4.21. But some distros
diff --git a/ubuntu/vmblock/autoconf/skas1.c b/ubuntu/vmblock/autoconf/skas1.c
index e8eab9f..015232f 100644
--- a/ubuntu/vmblock/autoconf/skas1.c
+++ b/ubuntu/vmblock/autoconf/skas1.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2004 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2004 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* SKAS patch adds 'struct mm *mm' as first argument to do_mmap_pgoff.
diff --git a/ubuntu/vmblock/autoconf/statfs1.c b/ubuntu/vmblock/autoconf/statfs1.c
index 57c3f14..8501cab 100644
--- a/ubuntu/vmblock/autoconf/statfs1.c
+++ b/ubuntu/vmblock/autoconf/statfs1.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#include <linux/autoconf.h>
#include <linux/version.h>
diff --git a/ubuntu/vmblock/include/compat_completion.h b/ubuntu/vmblock/include/compat_completion.h
index 35f081f..e690fff 100644
--- a/ubuntu/vmblock/include/compat_completion.h
+++ b/ubuntu/vmblock/include/compat_completion.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2004 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2004 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_COMPLETION_H__
# define __COMPAT_COMPLETION_H__
diff --git a/ubuntu/vmblock/include/compat_file.h b/ubuntu/vmblock/include/compat_file.h
index 9d16904..5af3010 100644
--- a/ubuntu/vmblock/include/compat_file.h
+++ b/ubuntu/vmblock/include/compat_file.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_FILE_H__
# define __COMPAT_FILE_H__
diff --git a/ubuntu/vmblock/include/compat_fs.h b/ubuntu/vmblock/include/compat_fs.h
index 01d39a6..d1c083a 100644
--- a/ubuntu/vmblock/include/compat_fs.h
+++ b/ubuntu/vmblock/include/compat_fs.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_FS_H__
# define __COMPAT_FS_H__
@@ -159,7 +159,7 @@
#define compat_i_size_read(inode) ((inode)->i_size)
#define compat_i_size_write(inode, size) ((inode)->i_size = size)
#else
-#define compat_i_size_read(node) i_size_read(inode)
+#define compat_i_size_read(inode) i_size_read(inode)
#define compat_i_size_write(inode, size) i_size_write(inode, size)
#endif

diff --git a/ubuntu/vmblock/include/compat_init.h b/ubuntu/vmblock/include/compat_init.h
index 0115d9e..48d7075 100644
--- a/ubuntu/vmblock/include/compat_init.h
+++ b/ubuntu/vmblock/include/compat_init.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright 1999 VMware, Inc. All rights reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 1999 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* compat_init.h: Initialization compatibility wrappers.
diff --git a/ubuntu/vmblock/include/compat_kernel.h b/ubuntu/vmblock/include/compat_kernel.h
index d278ae7..76b47cf 100644
--- a/ubuntu/vmblock/include/compat_kernel.h
+++ b/ubuntu/vmblock/include/compat_kernel.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2004 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2004 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_KERNEL_H__
# define __COMPAT_KERNEL_H__
diff --git a/ubuntu/vmblock/include/compat_list.h b/ubuntu/vmblock/include/compat_list.h
index baaa8ac..333557b 100644
--- a/ubuntu/vmblock/include/compat_list.h
+++ b/ubuntu/vmblock/include/compat_list.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_LIST_H__
# define __COMPAT_LIST_H__
@@ -22,6 +22,16 @@
#include <linux/list.h>

/*
+ * list_add_tail is with us since 2.4.0, or something like that.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
+#define list_add_tail(newe, head) do {
+ struct list_head *__h = (head);
+ __list_add((newe), __h->prev, __h);
+} while (0)
+#endif
+
+/*
* list_for_each_safe() showed up in 2.4.10, but it may be backported so we
* just check for its existence.
*/
diff --git a/ubuntu/vmblock/include/compat_mm.h b/ubuntu/vmblock/include/compat_mm.h
index 9e9605b..9265a82 100644
--- a/ubuntu/vmblock/include/compat_mm.h
+++ b/ubuntu/vmblock/include/compat_mm.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_MM_H__
# define __COMPAT_MM_H__
diff --git a/ubuntu/vmblock/include/compat_module.h b/ubuntu/vmblock/include/compat_module.h
index 6576fb6..66fc469 100644
--- a/ubuntu/vmblock/include/compat_module.h
+++ b/ubuntu/vmblock/include/compat_module.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright 2007 VMware, Inc. All rights reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2007 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* compat_module.h --
diff --git a/ubuntu/vmblock/include/compat_namei.h b/ubuntu/vmblock/include/compat_namei.h
index 9ca3290..a3176f5 100644
--- a/ubuntu/vmblock/include/compat_namei.h
+++ b/ubuntu/vmblock/include/compat_namei.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_NAMEI_H__
# define __COMPAT_NAMEI_H__
diff --git a/ubuntu/vmblock/include/compat_page.h b/ubuntu/vmblock/include/compat_page.h
index 3aeab98..0bf0e25 100644
--- a/ubuntu/vmblock/include/compat_page.h
+++ b/ubuntu/vmblock/include/compat_page.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_PAGE_H__
# define __COMPAT_PAGE_H__
diff --git a/ubuntu/vmblock/include/compat_sched.h b/ubuntu/vmblock/include/compat_sched.h
index e54e1b6..6fc79dc 100644
--- a/ubuntu/vmblock/include/compat_sched.h
+++ b/ubuntu/vmblock/include/compat_sched.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_SCHED_H__
# define __COMPAT_SCHED_H__
@@ -42,6 +42,34 @@
# define cond_resched() (need_resched() ? schedule() : (void) 0)
#endif

+/* Oh well. We need yield... Happy us! */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 20)
+# ifdef __x86_64__
+# define compat_yield() there_is_nothing_like_yield()
+# else
+# include <linux/unistd.h>
+# include <linux/kernel.h>
+
+/*
+ * Used by _syscallX macros. Note that this is global variable, so
+ * do not rely on its contents too much. As exit() is only function
+ * we use, and we never check return value from exit(), we have
+ * no problem...
+ */
+extern int errno;
+
+/*
+ * compat_exit() provides an access to the exit() function. It must
+ * be named compat_exit(), as exit() (with different signature) is
+ * provided by x86-64, arm and other (but not by i386).
+ */
+# define __NR_compat_yield __NR_sched_yield
+static inline _syscall0(int, compat_yield);
+# endif
+#else
+# define compat_yield() yield()
+#endif
+

/*
* Since 2.5.34 there are two methods to enumerate tasks:
diff --git a/ubuntu/vmblock/include/compat_semaphore.h b/ubuntu/vmblock/include/compat_semaphore.h
index 23f92f3..8c6df97 100644
--- a/ubuntu/vmblock/include/compat_semaphore.h
+++ b/ubuntu/vmblock/include/compat_semaphore.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_SEMAPHORE_H__
# define __COMPAT_SEMAPHORE_H__
diff --git a/ubuntu/vmblock/include/compat_slab.h b/ubuntu/vmblock/include/compat_slab.h
index c0d504b..8654a9a 100644
--- a/ubuntu/vmblock/include/compat_slab.h
+++ b/ubuntu/vmblock/include/compat_slab.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2005 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2005 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_SLAB_H__
# define __COMPAT_SLAB_H__
@@ -40,7 +40,10 @@
#endif

/*
- * Destructor is gone since 2.6.23-pre1.
+ * Up to 2.6.22 kmem_cache_create has 6 arguments - name, size, alignment, flags,
+ * constructor, and destructor. Then for some time kernel was asserting that
+ * destructor is NULL, and since 2.6.23-pre1 kmem_cache_create takes only 5
+ * arguments - destructor is gone.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) || defined(VMW_KMEMCR_HAS_DTOR)
#define compat_kmem_cache_create(name, size, align, flags, ctor)
@@ -50,4 +53,18 @@
kmem_cache_create(name, size, align, flags, ctor)
#endif

+/*
+ * Up to 2.6.23 kmem_cache constructor has three arguments - pointer to block to
+ * prepare (aka "this"), from which cache it came, and some unused flags. After
+ * 2.6.23 flags were removed, and order of "this" and cache parameters was swapped...
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) && !defined(VMW_KMEMCR_CTOR_HAS_3_ARGS)
+# define VMW_KMEMCR_CTOR_HAS_3_ARGS
+#endif
+#ifdef VMW_KMEMCR_CTOR_HAS_3_ARGS
+typedef void compat_kmem_cache_ctor(void *, compat_kmem_cache *, unsigned long);
+#else
+typedef void compat_kmem_cache_ctor(compat_kmem_cache *, void *);
+#endif
+
#endif /* __COMPAT_SLAB_H__ */
diff --git a/ubuntu/vmblock/include/compat_spinlock.h b/ubuntu/vmblock/include/compat_spinlock.h
index c069db9..ea867f2 100644
--- a/ubuntu/vmblock/include/compat_spinlock.h
+++ b/ubuntu/vmblock/include/compat_spinlock.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2005 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2005 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_SPINLOCK_H__
# define __COMPAT_SPINLOCK_H__
diff --git a/ubuntu/vmblock/include/compat_statfs.h b/ubuntu/vmblock/include/compat_statfs.h
index 0dc191d..29ec4f8 100644
--- a/ubuntu/vmblock/include/compat_statfs.h
+++ b/ubuntu/vmblock/include/compat_statfs.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_STATFS_H__
# define __COMPAT_STATFS_H__
diff --git a/ubuntu/vmblock/include/compat_string.h b/ubuntu/vmblock/include/compat_string.h
index 6ea0ebf..b74f875 100644
--- a/ubuntu/vmblock/include/compat_string.h
+++ b/ubuntu/vmblock/include/compat_string.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2007 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2007 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_STRING_H__
# define __COMPAT_STRING_H__
diff --git a/ubuntu/vmblock/include/compat_uaccess.h b/ubuntu/vmblock/include/compat_uaccess.h
index d272269..d58ee05 100644
--- a/ubuntu/vmblock/include/compat_uaccess.h
+++ b/ubuntu/vmblock/include/compat_uaccess.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_UACCESS_H__
# define __COMPAT_UACCESS_H__
diff --git a/ubuntu/vmblock/include/compat_version.h b/ubuntu/vmblock/include/compat_version.h
index 2f4c546..baf9634 100644
--- a/ubuntu/vmblock/include/compat_version.h
+++ b/ubuntu/vmblock/include/compat_version.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright 1998 VMware, Inc. All rights reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 1998 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_VERSION_H__
# define __COMPAT_VERSION_H__
diff --git a/ubuntu/vmblock/include/compat_wait.h b/ubuntu/vmblock/include/compat_wait.h
index e3aca6c..ebcf087 100644
--- a/ubuntu/vmblock/include/compat_wait.h
+++ b/ubuntu/vmblock/include/compat_wait.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2002 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2002 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

#ifndef __COMPAT_WAIT_H__
# define __COMPAT_WAIT_H__
diff --git a/ubuntu/vmblock/include/driver-config.h b/ubuntu/vmblock/include/driver-config.h
index b9aec7f..3722731 100644
--- a/ubuntu/vmblock/include/driver-config.h
+++ b/ubuntu/vmblock/include/driver-config.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright 1998 VMware, Inc. All rights reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 1998 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* Sets the proper defines from the Linux header files
diff --git a/ubuntu/vmblock/include/vm_assert.h b/ubuntu/vmblock/include/vm_assert.h
index 07b987f..12b67f3 100644
--- a/ubuntu/vmblock/include/vm_assert.h
+++ b/ubuntu/vmblock/include/vm_assert.h
@@ -1,7 +1,5 @@
-/* ************************************************** ********
- * Copyright 1998-2004 VMware, Inc. All rights reserved.
- *
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 1998-2004 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -15,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* vm_assert.h --
diff --git a/ubuntu/vmblock/include/vm_basic_defs.h b/ubuntu/vmblock/include/vm_basic_defs.h
index e01cb24..8da371b 100644
--- a/ubuntu/vmblock/include/vm_basic_defs.h
+++ b/ubuntu/vmblock/include/vm_basic_defs.h
@@ -1,7 +1,5 @@
-/* ************************************************** ********
- * Copyright 2003 VMware, Inc. All rights reserved.
- *
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2003 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -15,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* vm_basic_defs.h --
@@ -152,8 +151,6 @@ Max(int a, int b)
#ifndef PAGE_SHIFT // {
#if defined VM_I386
#define PAGE_SHIFT 12
-#elif defined VM_IA64
- #define PAGE_SHIFT 14 // On IA-64, the default page size is 16K
#elif defined __APPLE__
#define PAGE_SHIFT 12
#else
@@ -382,6 +379,31 @@ typedef int pid_t;

#endif // }

+#ifndef va_copy
+#ifdef _WIN32
+
+/*
+ * Windows needs va_copy. This works for both 32 and 64-bit Windows
+ * based on inspection of how varags.h from the Visual C CRTL is
+ * implemented. (Future versions of the RTL may break this).
+ */
+
+#define va_copy(dest, src) ((dest) = (src))
+
+#endif // _WIN32
+
+#if defined(__APPLE__) && defined(KERNEL)
+
+/*
+ * MacOS kernel-mode needs va_copy. Based on inspection of stdarg.h
+ * from the MacOSX10.4u.sdk kernel framework, this should work.
+ * (Future versions of the SDK may break this).
+ */
+
+#define va_copy(dest, src) ((dest) = (src))
+
+#endif // __APPLE__ && KERNEL
+#endif // va_copy

/*
* This one is outside USERLEVEL because it's used by
diff --git a/ubuntu/vmblock/include/vm_basic_types.h b/ubuntu/vmblock/include/vm_basic_types.h
index 5fc0231..bdefa6f 100644
--- a/ubuntu/vmblock/include/vm_basic_types.h
+++ b/ubuntu/vmblock/include/vm_basic_types.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (c) 1998-2007 VMware, Inc. All rights reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 1998-2007 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
*
@@ -63,10 +63,6 @@ typedef char Bool;
#define VM_I386
#endif

-#ifdef __ia64__
-#define VM_IA64
-#endif
-
#ifdef _WIN64
#define __x86_64__
#endif
@@ -86,10 +82,6 @@ typedef char Bool;
#define VM_I386
#endif

-#if defined VM_I386 && defined VM_IA64
-#error "Only one CPU platform is allowed."
-#endif
-
#ifdef _MSC_VER
typedef unsigned __int64 uint64;
typedef signed __int64 int64;
@@ -109,7 +101,7 @@ typedef signed __int64 int64;
#elif __GNUC__
/* The Xserver source compiles with -ansi -pendantic */
#ifndef __STRICT_ANSI__
-#if defined(VM_IA64) || defined(VM_X86_64)
+#if defined(VM_X86_64)
typedef unsigned long uint64;
typedef long int64;
#else
@@ -140,54 +132,71 @@ typedef char int8;
* This applies to Solaris as well.
*/

-#if defined(__FreeBSD__) || defined(sun)
-# ifdef KLD_MODULE
-# include <sys/types.h>
-# else
-# if (BSD_VERSION >= 50) || defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
+/*
+ * Before trying to do the includes based on OS defines, see if we can use
+ * feature-based defines to get as much functionality as possible
+ */
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_INTTYPES_H
+#include <sys/inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#if !defined(USING_AUTOCONF)
+# if defined(__FreeBSD__) || defined(sun)
+# ifdef KLD_MODULE
# include <sys/types.h>
# else
-# include <sys/inttypes.h>
-# endif
-# endif
-#elif defined __APPLE__
-# if KERNEL
-# include <sys/types.h> /* mostly for size_t */
-# include <stdint.h>
-# else
-# include <inttypes.h>
-# include <stdlib.h>
-# include <stdint.h>
-# endif
-#else
-# if !defined(__intptr_t_defined) && !defined(intptr_t)
-# define __intptr_t_defined
-# define intptr_t intptr_t
-# ifdef VM_I386
-# ifdef VM_X86_64
- typedef int64 intptr_t;
+# if (BSD_VERSION >= 50)
+# include <inttypes.h>
+# include <sys/types.h>
# else
- typedef int32 intptr_t;
+# include <sys/inttypes.h>
# endif
# endif
-
-# ifdef VM_IA64
- typedef int64 intptr_t;
+# elif defined __APPLE__
+# if KERNEL
+# include <sys/unistd.h>
+# include <sys/types.h> /* mostly for size_t */
+# include <stdint.h>
+# else
+# include <unistd.h>
+# include <inttypes.h>
+# include <stdlib.h>
+# include <stdint.h>
# endif
-# endif
-
-# ifndef _STDINT_H
-# ifdef VM_I386
-# ifdef VM_X86_64
- typedef uint64 uintptr_t;
-# else
- typedef uint32 uintptr_t;
+# else
+# if !defined(__intptr_t_defined) && !defined(intptr_t)
+# define __intptr_t_defined
+# define intptr_t intptr_t
+# ifdef VM_I386
+# ifdef VM_X86_64
+typedef int64 intptr_t;
+# else
+typedef int32 intptr_t;
+# endif
# endif
# endif

-# ifdef VM_IA64
- typedef uint64 uintptr_t;
+# ifndef _STDINT_H
+# ifdef VM_I386
+# ifdef VM_X86_64
+typedef uint64 uintptr_t;
+# else
+typedef uint32 uintptr_t;
+# endif
+# endif
# endif
# endif
#endif
@@ -233,10 +242,20 @@ typedef int64 VmTimeVirtualClock; /* Virtual Clock kept in CPU cycles */
#define FMTSZ ""
#define FMTPD ""
#endif
- #else
+ #elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
+ || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L)
+ || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L)
/* BSD/Darwin, Linux */
#define FMTSZ "z"
#define FMTPD "t"
+ #else
+ /* Systems with a pre-C99 libc */
+ #define FMTSZ "Z"
+ #ifdef VM_X86_64
+ #define FMTPD "l"
+ #else
+ #define FMTPD ""
+ #endif
#endif
#ifdef VM_X86_64
#define FMT64 "l"
@@ -618,6 +637,16 @@ typedef void * UserVA;
#define ALIGNED(n)
#endif

+/*
+ * __func__ is a stringified function name that is part of the C99 standard. The block
+ * below defines __func__ on older systems where the compiler does not support that
+ * macro.
+ */
+#if defined(__GNUC__)
+ && ((__GNUC__ == 2 && __GNUC_MINOR < 96)
+ || (__GNUC__ < 2))
+# define __func__ __FUNCTION__
+#endif

/*
* Once upon a time, this was used to silence compiler warnings that
@@ -642,9 +671,6 @@ typedef void * UserVA;
# endif
# endif /* VM_I386 */

-# ifdef VM_IA64
- typedef uint64 size_t;
-# endif
# endif
#else
# ifndef _SIZE_T
@@ -657,9 +683,6 @@ typedef void * UserVA;
# endif
# endif /* VM_I386 */

-# ifdef VM_IA64
- typedef uint64 size_t;
-# endif
# endif
# if !defined(FROBOS) && !defined(_SSIZE_T) && !defined(ssize_t) && !defined(__ssize_t_defined) && !defined(_SSIZE_T_DECLARED)
# define _SSIZE_T
@@ -673,9 +696,6 @@ typedef void * UserVA;
# endif
# endif /* VM_I386 */

-# ifdef VM_IA64
- typedef int64 ssize_t;
-# endif
# endif
#endif

@@ -724,4 +744,17 @@ typedef void * UserVA;
# define FMTMODE "o"
#endif

+/*
+ * Format modifier for printing time_t. Most platforms define a time_t to be
+ * a long int, but on FreeBSD (as of 5.0, it seems), the time_t is a signed
+ * size quantity. Refer to the definition of FMTSZ to see why we need silly
+ * preprocessor arithmetic.
+ * Use this like this: printf("The mode is %"FMTTIME".
", time);
+ */
+#if defined(__FreeBSD__) && (__FreeBSD__ + 0) && ((__FreeBSD__ + 0) >= 5)
+# define FMTTIME FMTSZ"d"
+#else
+# define FMTTIME "ld"
+#endif
+
#endif /* _VM_BASIC_TYPES_H_ */
diff --git a/ubuntu/vmblock/include/vmblock.h b/ubuntu/vmblock/include/vmblock.h
index db15220..b6c6727 100644
--- a/ubuntu/vmblock/include/vmblock.h
+++ b/ubuntu/vmblock/include/vmblock.h
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -14,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* vmblock.h --
diff --git a/ubuntu/vmblock/include/vmware.h b/ubuntu/vmblock/include/vmware.h
index 1bf3dab..b7cf86c 100644
--- a/ubuntu/vmblock/include/vmware.h
+++ b/ubuntu/vmblock/include/vmware.h
@@ -1,7 +1,5 @@
-/* ************************************************** ********
- * Copyright 2003 VMware, Inc. All rights reserved.
- *
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2003 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -15,7 +13,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ *
+ ************************************************** *******/

/*
* vmware.h --
diff --git a/ubuntu/vmblock/linux/block.c b/ubuntu/vmblock/linux/block.c
index cb3f91c..b559f4e 100644
--- a/ubuntu/vmblock/linux/block.c
+++ b/ubuntu/vmblock/linux/block.c
@@ -1,6 +1,5 @@
-/* ************************************************** ********
- * Copyright (C) 2006 VMware, Inc. All Rights Reserved.
- * ************************************************** ********
+/************************************************** *******
+ * Copyright (C) 2006 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistrib
 

Thread Tools




All times are GMT. The time now is 04:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org