summaryrefslogtreecommitdiffstats
path: root/emulators/vmware3/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/vmware3/files')
-rw-r--r--emulators/vmware3/files/freebsd4.patch17
-rw-r--r--emulators/vmware3/files/patch-ab58
2 files changed, 62 insertions, 13 deletions
diff --git a/emulators/vmware3/files/freebsd4.patch b/emulators/vmware3/files/freebsd4.patch
index 9d2a48d..a927f14 100644
--- a/emulators/vmware3/files/freebsd4.patch
+++ b/emulators/vmware3/files/freebsd4.patch
@@ -55,15 +55,16 @@
#endif
};
-@@ -364,24 +374,37 @@
+@@ -364,28 +374,37 @@
* Based on dev/streams/streams.c
*/
static int
-+#if __FreeBSD_version >= 500000
- vmmon_clone(dev_t dev, int flags, void *data, struct thread *td)
-+#else
+ #if __FreeBSD_version >= 502017
+ vmmon_clone(struct cdev *dev, int flags, void *data, struct thread *td)
+ #else
+-vmmon_clone(dev_t dev, int flags, void *data, struct thread *td)
+vmmon_clone(dev_t dev, int flags, void *data, struct proc *p)
-+#endif
+ #endif
{
int fd, error;
struct file *fp;
@@ -104,12 +105,16 @@
PROC_UNLOCK(p);
vmmon_ref_count++;
-@@ -415,7 +438,7 @@
+@@ -415,11 +438,11 @@
*----------------------------------------------------------------------
*/
static int
+ #if __FreeBSD_version >= 502017
+ FreeBSD_Driver_Open(struct cdev *dev, int oflag, int devtype, struct thread *td)
+ #else
-FreeBSD_Driver_Open(dev_t dev, int oflag, int devtype, struct thread *td)
+FreeBSD_Driver_Open(dev_t dev, int oflag, int devtype, struct proc *p)
+ #endif
{
VMFreeBSD *vmFreeBSD;
diff --git a/emulators/vmware3/files/patch-ab b/emulators/vmware3/files/patch-ab
index 37b59b9..31395f2 100644
--- a/emulators/vmware3/files/patch-ab
+++ b/emulators/vmware3/files/patch-ab
@@ -1,6 +1,14 @@
---- vmmon-only/freebsd/driver.c.orig Sat Mar 13 04:04:55 2004
-+++ vmmon-only/freebsd/driver.c Sat Mar 13 04:07:43 2004
-@@ -163,9 +163,14 @@
+--- vmmon-only/freebsd/driver.c.orig Wed Jun 23 22:11:40 2004
++++ vmmon-only/freebsd/driver.c Wed Jun 23 22:14:46 2004
+@@ -50,6 +50,7 @@
+ #include <sys/filedesc.h>
+ #include <sys/fcntl.h>
+ #include <sys/malloc.h>
++#include <sys/module.h>
+ #include <sys/proc.h>
+ #include <sys/ioccom.h>
+ #include <sys/syslog.h>
+@@ -163,9 +164,14 @@
static struct cdevsw vmmon_cdevsw = {
#if __FreeBSD_version >= 500104
@@ -16,15 +24,51 @@
#else
/* open */ FreeBSD_Driver_Open,
/* close */ noclose,
-@@ -390,6 +395,11 @@
- fp->f_ops = &vmmon_fileops;
+@@ -224,7 +230,11 @@
+ *----------------------------------------------------------------------
+ */
+
++#if __FreeBSD_version >= 502017
++static struct cdev *vmmon_dev;
++#else
+ static dev_t vmmon_dev;
++#endif
+
+ static int
+ init_module(void)
+@@ -364,7 +374,11 @@
+ * Based on dev/streams/streams.c
+ */
+ static int
++#if __FreeBSD_version >= 502017
++vmmon_clone(struct cdev *dev, int flags, void *data, struct thread *td)
++#else
+ vmmon_clone(dev_t dev, int flags, void *data, struct thread *td)
++#endif
+ {
+ int fd, error;
+ struct file *fp;
+@@ -391,6 +405,11 @@
fp->f_type = DTYPE_VNODE;
FILEDESC_UNLOCK(p->p_fd);
-+
+
+#if __FreeBSD_version >= 501111
+ /* falloc now returns TWO references to the file, not one. */
+ fdrop(fp, td);
+#endif
-
++
PROC_LOCK(p);
td->td_dupfd = fd;
+ PROC_UNLOCK(p);
+@@ -415,7 +434,11 @@
+ *----------------------------------------------------------------------
+ */
+ static int
++#if __FreeBSD_version >= 502017
++FreeBSD_Driver_Open(struct cdev *dev, int oflag, int devtype, struct thread *td)
++#else
+ FreeBSD_Driver_Open(dev_t dev, int oflag, int devtype, struct thread *td)
++#endif
+ {
+ VMFreeBSD *vmFreeBSD;
+
OpenPOWER on IntegriCloud