1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00

- 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.
This commit is contained in:
Maxime Henrion 2003-03-24 13:49:54 +00:00
parent 67802c159a
commit 57a8c90d83
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77382
2 changed files with 37 additions and 1 deletions

View File

@ -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>

View File

@ -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.
*/