aboutsummaryrefslogtreecommitdiffstats
path: root/x11/nvidia-driver
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-03-24 21:49:54 +0800
committermux <mux@FreeBSD.org>2003-03-24 21:49:54 +0800
commit4c3b6e47ed7c5d417fa635757039be3b0cea7a9f (patch)
treeedcaa2add094d4d68b172dd6ed9fa468d9da46c0 /x11/nvidia-driver
parent12e61726256290c04db8ba31c48e78e3dc8e29c6 (diff)
downloadfreebsd-ports-gnome-4c3b6e47ed7c5d417fa635757039be3b0cea7a9f.tar.gz
freebsd-ports-gnome-4c3b6e47ed7c5d417fa635757039be3b0cea7a9f.tar.zst
freebsd-ports-gnome-4c3b6e47ed7c5d417fa635757039be3b0cea7a9f.zip
- Update to the latest version of my patch to fix malloc() flags
for -CURRENT. This fixes the printing of annoying backtraces. - Don't try to run mknod on -CURRENT where we have devfs. - Bump PORTREVISION.
Diffstat (limited to 'x11/nvidia-driver')
-rw-r--r--x11/nvidia-driver/Makefile3
-rw-r--r--x11/nvidia-driver/files/patch-nvidia_subr.c35
2 files changed, 37 insertions, 1 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 4723b5e6c3f7..3748f0fda85e 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nvidia-driver
PORTVERSION= 1.0.3203
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://download.nvidia.com/freebsd/1.0-3203/
DISTNAME= NVIDIA_FreeBSD-${PORTVERSION:S/0./0-/}
@@ -53,12 +54,14 @@ pre-install:
.endif
post-install:
+.if ${OSVERSION} < 500000
.for dev in 0 1 2 3
@mknod /dev/nvidia${dev} c 180 ${dev}
@${CHMOD} 0666 /dev/nvidia${dev}
.endfor
@mknod /dev/nvidiactl c 180 255
@${CHMOD} 0666 /dev/nvidiactl
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/x11/nvidia-driver/files/patch-nvidia_subr.c b/x11/nvidia-driver/files/patch-nvidia_subr.c
index edd6fa4da0e6..4a4b40234a82 100644
--- a/x11/nvidia-driver/files/patch-nvidia_subr.c
+++ b/x11/nvidia-driver/files/patch-nvidia_subr.c
@@ -1,5 +1,29 @@
--- src/nvidia_subr.c.orig Wed Oct 30 15:30:58 2002
-+++ src/nvidia_subr.c Thu Mar 6 01:25:20 2003
++++ src/nvidia_subr.c Fri Mar 14 20:47:44 2003
+@@ -130,7 +130,7 @@
+ sc = device_get_softc(dev);
+ sc->dev = dev;
+
+- sc->nv_state = malloc(sizeof(nv_state_t), M_DEVBUF, M_ZERO);
++ sc->nv_state = malloc(sizeof(nv_state_t), M_DEVBUF, M_WAITOK | M_ZERO);
+ if (sc->nv_state == NULL) {
+ error = ENOMEM;
+ goto fail;
+@@ -901,12 +901,12 @@
+ void *vm;
+ u_int32_t i, size = count * PAGE_SIZE;
+
+- at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_ZERO);
++ at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!at) {
+ return -ENOMEM;
+ }
+
+- vm = malloc(size, M_NVIDIA, M_ZERO);
++ vm = malloc(size, M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!vm) {
+ /*
+ * This error condition is not unlikely to occur. We allocate our
@@ -925,7 +925,9 @@
* prevent random crashes.
*/
@@ -26,6 +50,15 @@
free(at, M_NVIDIA);
free(address, M_NVIDIA);
+@@ -993,7 +997,7 @@
+ vm_page_t m;
+ vm_object_t object;
+
+- at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_ZERO);
++ at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!at) {
+ return -ENOMEM;
+ }
@@ -1007,13 +1011,19 @@
* will be allocated.
*/