diff options
author | Martin Blapp <mbr@FreeBSD.org> | 2003-04-10 12:29:07 +0000 |
---|---|---|
committer | Martin Blapp <mbr@FreeBSD.org> | 2003-04-10 12:29:07 +0000 |
commit | c56bfed62cbbdaaa4f902411770f816b340d3ea6 (patch) | |
tree | dbadb0c467fd1ac42d898b175dde83c083ef1841 /emulators/vmware2 | |
parent | a2d562e1b64167c954080903d1847af8554e8a08 (diff) | |
download | ports-c56bfed62cbbdaaa4f902411770f816b340d3ea6.tar.gz ports-c56bfed62cbbdaaa4f902411770f816b340d3ea6.zip |
Notes
Diffstat (limited to 'emulators/vmware2')
-rw-r--r-- | emulators/vmware2/Makefile | 6 | ||||
-rw-r--r-- | emulators/vmware2/files/cdevsw.patch | 130 | ||||
-rw-r--r-- | emulators/vmware2/files/hostif_c.patch | 11 | ||||
-rw-r--r-- | emulators/vmware2/files/vm_types_h.patch | 13 | ||||
-rw-r--r-- | emulators/vmware2/pkg-plist | 1 |
5 files changed, 160 insertions, 1 deletions
diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile index 0c5857c5603b..41fe0830bd22 100644 --- a/emulators/vmware2/Makefile +++ b/emulators/vmware2/Makefile @@ -119,7 +119,11 @@ post-patch: cat ${FILESDIR}/m_waitok.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 .endif .if ${OSVERSION} >= 500104 - cat ${FILESDIR}/devfs.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 + cat ${FILESDIR}/cdevsw.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 +.endif +.if ${OSVERSION} >= 500109 + cat ${FILESDIR}/hostif_c.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 + cat ${FILESDIR}/vm_types_h.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 .endif setoptions: diff --git a/emulators/vmware2/files/cdevsw.patch b/emulators/vmware2/files/cdevsw.patch new file mode 100644 index 000000000000..e8f15423009a --- /dev/null +++ b/emulators/vmware2/files/cdevsw.patch @@ -0,0 +1,130 @@ +--- vmmon-only/freebsd/driver.c_original Wed Mar 5 19:22:35 2003 ++++ vmmon-only/freebsd/driver.c Wed Mar 5 19:22:44 2003 +@@ -155,6 +155,14 @@ + + /* static struct cdevsw vmmon_cdevsw = { */ + static struct cdevsw vmmon_cdevsw = { ++#if __FreeBSD_version >= 500104 ++ .d_open = FreeBSD_Driver_Open, ++ .d_close = FreeBSD_Driver_Close, ++ .d_ioctl = FreeBSD_Driver_Ioctl, ++ .d_poll = FreeBSD_Driver_Poll, ++ .d_name = DEVICE_NAME, ++ .d_maj = CDEV_MAJOR ++#else + /* open */ FreeBSD_Driver_Open, + /* close */ FreeBSD_Driver_Close, + /* read */ noread, +@@ -169,8 +177,7 @@ + /* psize */ nopsize, + /* flags */ 0, + /* bmaj */ -1 +- +- ++#endif + }; + + +@@ -242,7 +249,11 @@ + sprintf(freebsdState.deviceBuf,DEVICE_NAME); + freebsdState.major = CDEV_MAJOR; + freebsdState.minor = CDEV_MINOR; ++#if __FreeBSD_version < 500104 + retval = cdevsw_add(&vmmon_cdevsw); ++#else ++ retval = 0; ++#endif + + #endif + if (retval) { +@@ -273,12 +284,14 @@ + int retval=0; + + destroy_dev(vmmon_dev); ++#if __FreeBSD_version < 500104 + retval = cdevsw_remove(&vmmon_cdevsw); + if (retval) { + Warning("Module %s: error unregistering\n", freebsdState.deviceBuf); + } else { + Log("Module %s: unloaded\n", freebsdState.deviceBuf); + } ++#endif + + return 0; + } +--- vmnet-only/freebsd/vmnet.c_original Wed Mar 5 19:21:51 2003 ++++ vmnet-only/freebsd/vmnet.c Wed Mar 5 19:22:00 2003 +@@ -103,6 +103,16 @@ + static int vmnet_modeevent(module_t mod, int cmd, void *arg); + + static struct cdevsw vmnet_cdevsw = { ++#if __FreeBSD_version >= 500104 ++ .d_open = vmnet_open, ++ .d_close = vmnet_close, ++ .d_read = vmnet_read, ++ .d_write = vmnet_write, ++ .d_ioctl = vmnet_ioctl, ++ .d_poll = vmnet_poll, ++ .d_name = DEVICE_NAME, ++ .d_maj = CDEV_MAJOR ++#else + /* open */ vmnet_open, + /* close */ vmnet_close, + /* read */ vmnet_read, +@@ -115,10 +125,11 @@ + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, +- /* flags */ 0, +- /* bmaj */ -1 ++ /* flags */ 0, -/* bmaj */ -1 ++#endif + }; + ++ + /* + * Now declare the module to the system. + * IMPORTANT: Must be before netgraph node declaration. +@@ -164,7 +175,7 @@ + + s = splimp(); + if_attach(ifp); +- ether_ifattach(ifp, ETHER_BPF_SUPPORTED); ++ ether_ifattach(ifp); + bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); + splx(s); + +@@ -604,11 +615,13 @@ + static int + init_module(void) + { +-int error; ++ int error = 0; + ++#if __FreeBSD_version < 500104 + error = cdevsw_add(&vmnet_cdevsw); + if (error) + return error; ++#endif + + return error; + } +@@ -618,7 +631,7 @@ + static int + cleanup_module(void) + { +- int error; ++ int error = 0; + struct vmnet_softc *sc; + + DLog(Lenter, ""); +@@ -629,7 +642,9 @@ + return error; + } + } ++#if __FreeBSD_version < 500104 + error = cdevsw_remove(&vmnet_cdevsw); ++#endif + DLog(Linfo, "return %d", error); + return error; + } diff --git a/emulators/vmware2/files/hostif_c.patch b/emulators/vmware2/files/hostif_c.patch new file mode 100644 index 000000000000..58499ba714d3 --- /dev/null +++ b/emulators/vmware2/files/hostif_c.patch @@ -0,0 +1,11 @@ +--- vmmon-only/freebsd/hostif.c.patched Tue Apr 8 15:15:20 2003 ++++ vmmon-only/freebsd/hostif.c Tue Apr 8 15:16:21 2003 +@@ -183,7 +183,7 @@ + { + #define DEB(x) + caddr_t addr = (caddr_t)VPN_2_VA(ppn); +- pt_entry_t *pteptr = vtopte(addr); ++ pt_entry_t *pteptr = vtopte((vm_offset_t)addr); + PTE pte; + + DEB(printf("FindMPN: for page %d address %p(phys %p) pteptr %p", ppn, addr, (caddr_t)vtophys(addr), pteptr)); diff --git a/emulators/vmware2/files/vm_types_h.patch b/emulators/vmware2/files/vm_types_h.patch new file mode 100644 index 000000000000..5a864a3b6a5d --- /dev/null +++ b/emulators/vmware2/files/vm_types_h.patch @@ -0,0 +1,13 @@ +--- vmmon-only/include/vm_types.h.patched Tue Apr 8 15:10:25 2003 ++++ vmmon-only/include/vm_types.h Tue Apr 8 15:12:07 2003 +@@ -144,10 +144,6 @@ + #define offsetof(type, member) ( (int) & ((type*)0) -> member ) + #endif + +- +-#define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b)) +-#define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b)) +- + #define ROUNDUP(x,y) (((x) + (y) - 1) / (y) * (y)) + #define ROUNDDOWN(x,y) ((x) / (y) * (y)) + #define ROUNDUPBITS(x, bits) (((uint32) (x) + MASK(bits)) & ~MASK(bits)) diff --git a/emulators/vmware2/pkg-plist b/emulators/vmware2/pkg-plist index 3410eb1b03ed..9a7ccbebb54f 100644 --- a/emulators/vmware2/pkg-plist +++ b/emulators/vmware2/pkg-plist @@ -70,6 +70,7 @@ lib/vmware/lib/help/Wiznetwork.htm lib/vmware/lib/help/Wizos.htm lib/vmware/lib/help/Wizpath.htm lib/vmware/lib/help/toc.htm +lib/vmware/lib/modules/linker.hints lib/vmware/lib/modules/vmmon_smp.ko lib/vmware/lib/modules/vmmon_up.ko lib/vmware/lib/xkeymap/be101 |