aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>2003-03-23 23:01:23 +0800
committeralex <alex@FreeBSD.org>2003-03-23 23:01:23 +0800
commit575e47dcfc1611e7c481d1970a3700f68b8a19d1 (patch)
tree9d11d47b76b229ea90d7436bab02604018435bcd /emulators
parent17413c40d6c8cbd154756c4656e646ca27bbc5aa (diff)
downloadfreebsd-ports-gnome-575e47dcfc1611e7c481d1970a3700f68b8a19d1.tar.gz
freebsd-ports-gnome-575e47dcfc1611e7c481d1970a3700f68b8a19d1.tar.zst
freebsd-ports-gnome-575e47dcfc1611e7c481d1970a3700f68b8a19d1.zip
Fix for -CURRENT with the recent struct cdevsw changes and
cdevsw_add()/remove() removal. This outputs a WARNING: driver "vmmon" used unreserved major device number 200 message, but as the vmware application really requires to use a major of 200 (error otherwise, tested), we need to use a fixed one, and I don't want to register a major for this.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/vmware2/Makefile3
-rw-r--r--emulators/vmware2/files/devfs.patch61
-rw-r--r--emulators/vmware3/Makefile3
-rw-r--r--emulators/vmware3/files/devfs.patch61
4 files changed, 128 insertions, 0 deletions
diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile
index c2aa01a35e12..0c5857c5603b 100644
--- a/emulators/vmware2/Makefile
+++ b/emulators/vmware2/Makefile
@@ -118,6 +118,9 @@ post-patch:
cat ${FILESDIR}/filedesc.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1
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
+.endif
setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
diff --git a/emulators/vmware2/files/devfs.patch b/emulators/vmware2/files/devfs.patch
new file mode 100644
index 000000000000..518fc1889d9e
--- /dev/null
+++ b/emulators/vmware2/files/devfs.patch
@@ -0,0 +1,61 @@
+--- vmmon-only/freebsd/driver.c.orig Tue Mar 18 22:11:29 2003
++++ vmmon-only/freebsd/driver.c Tue Mar 18 22:17:07 2003
+@@ -146,29 +146,20 @@
+
+ static timeout_t FreeBSD_DriverSelectTimeout;
+
+ #define CDEV_MAJOR 200
+ #if defined(CDEV_MAJOR_) && CDEV_MAJOR != CDEV_MAJOR_
+ #error "CDEV_MAJOR != CDEV_MAJOR_"
+ #endif
+
+ #define CDEV_MINOR 0
+
+-/* static struct cdevsw vmmon_cdevsw = { */
+ static struct cdevsw vmmon_cdevsw = {
+- /* open */ FreeBSD_Driver_Open,
+- /* close */ FreeBSD_Driver_Close,
+- /* read */ noread,
+- /* write */ nowrite,
+- /* ioctl */ FreeBSD_Driver_Ioctl,
+- /* poll */ FreeBSD_Driver_Poll,
+- /* mmap */ nommap,
+- /* strategy */ nostrategy,
+- /* name */ DEVICE_NAME,
+- /* maj */ CDEV_MAJOR,
+- /* dump */ nodump,
+- /* psize */ nopsize,
+- /* flags */ 0,
+- /* bmaj */ -1
++ .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,
+
+
+ };
+@@ -242,14 +229,9 @@
+ sprintf(freebsdState.deviceBuf,DEVICE_NAME);
+ freebsdState.major = CDEV_MAJOR;
+ freebsdState.minor = CDEV_MINOR;
+- retval = cdevsw_add(&vmmon_cdevsw);
+
+ #endif
+- if (retval) {
+- Warning("Module %s: error registering with major=%d minor=%d tag=%s\n", freebsdState.deviceBuf,freebsdState.major, freebsdState.minor, TAGNAME);
+- return ENOENT;
+- }
+ vmmon_dev = make_dev(&vmmon_cdevsw, 0 , UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME);
+ HostIF_InitSpinLock();
+ Log("Module %s: registered with major=%d minor=%d tag=%s\n", freebsdState.deviceBuf, freebsdState.major, freebsdState.minor, TAGNAME);
+
+@@ -273,7 +257,6 @@
+ int retval=0;
+
+ destroy_dev(vmmon_dev);
+- retval = cdevsw_remove(&vmmon_cdevsw);
+ if (retval) {
+ Warning("Module %s: error unregistering\n", freebsdState.deviceBuf);
+ } else {
diff --git a/emulators/vmware3/Makefile b/emulators/vmware3/Makefile
index c2aa01a35e12..0c5857c5603b 100644
--- a/emulators/vmware3/Makefile
+++ b/emulators/vmware3/Makefile
@@ -118,6 +118,9 @@ post-patch:
cat ${FILESDIR}/filedesc.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1
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
+.endif
setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
diff --git a/emulators/vmware3/files/devfs.patch b/emulators/vmware3/files/devfs.patch
new file mode 100644
index 000000000000..518fc1889d9e
--- /dev/null
+++ b/emulators/vmware3/files/devfs.patch
@@ -0,0 +1,61 @@
+--- vmmon-only/freebsd/driver.c.orig Tue Mar 18 22:11:29 2003
++++ vmmon-only/freebsd/driver.c Tue Mar 18 22:17:07 2003
+@@ -146,29 +146,20 @@
+
+ static timeout_t FreeBSD_DriverSelectTimeout;
+
+ #define CDEV_MAJOR 200
+ #if defined(CDEV_MAJOR_) && CDEV_MAJOR != CDEV_MAJOR_
+ #error "CDEV_MAJOR != CDEV_MAJOR_"
+ #endif
+
+ #define CDEV_MINOR 0
+
+-/* static struct cdevsw vmmon_cdevsw = { */
+ static struct cdevsw vmmon_cdevsw = {
+- /* open */ FreeBSD_Driver_Open,
+- /* close */ FreeBSD_Driver_Close,
+- /* read */ noread,
+- /* write */ nowrite,
+- /* ioctl */ FreeBSD_Driver_Ioctl,
+- /* poll */ FreeBSD_Driver_Poll,
+- /* mmap */ nommap,
+- /* strategy */ nostrategy,
+- /* name */ DEVICE_NAME,
+- /* maj */ CDEV_MAJOR,
+- /* dump */ nodump,
+- /* psize */ nopsize,
+- /* flags */ 0,
+- /* bmaj */ -1
++ .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,
+
+
+ };
+@@ -242,14 +229,9 @@
+ sprintf(freebsdState.deviceBuf,DEVICE_NAME);
+ freebsdState.major = CDEV_MAJOR;
+ freebsdState.minor = CDEV_MINOR;
+- retval = cdevsw_add(&vmmon_cdevsw);
+
+ #endif
+- if (retval) {
+- Warning("Module %s: error registering with major=%d minor=%d tag=%s\n", freebsdState.deviceBuf,freebsdState.major, freebsdState.minor, TAGNAME);
+- return ENOENT;
+- }
+ vmmon_dev = make_dev(&vmmon_cdevsw, 0 , UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME);
+ HostIF_InitSpinLock();
+ Log("Module %s: registered with major=%d minor=%d tag=%s\n", freebsdState.deviceBuf, freebsdState.major, freebsdState.minor, TAGNAME);
+
+@@ -273,7 +257,6 @@
+ int retval=0;
+
+ destroy_dev(vmmon_dev);
+- retval = cdevsw_remove(&vmmon_cdevsw);
+ if (retval) {
+ Warning("Module %s: error unregistering\n", freebsdState.deviceBuf);
+ } else {