summaryrefslogtreecommitdiff
path: root/sysutils/lsof/patches/patch-ac
blob: 70f857283d01bd0d6f408bc701b26c8dc2e347a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ac,v 1.12 2003/10/04 20:22:35 atatat Exp $

Patch for vnode/DNLC interface change courtesy of lsof maintainer.

--- dialects/n+obsd/dnode.c.orig	2003-06-11 07:45:16.000000000 -0400
+++ dialects/n+obsd/dnode.c
@@ -68,8 +68,14 @@
 		if (!p->P_VMSPACE
 		||  kread((KA_T)p->P_VMSPACE, (char *)&vm, sizeof(vm)))
 		    return;
+# if	defined(OPENBSDV)
+		Lf->sz = (SZOFFTYPE)((vm.vm_tsize + vm.vm_dsize
+		       + vm.vm_ssize) * sysconf(_SC_PAGESIZE));
+# else	/* !defined(OPENBSDV */
 		Lf->sz = (SZOFFTYPE)ctob(vm.vm_tsize + vm.vm_dsize
 						     + vm.vm_ssize);
+# endif	/* defined(OPENBSDV) */
+
 		Lf->sz_def = 1;
 		return;
 	    }
@@ -301,9 +307,9 @@
 
 #if	defined(HASNCACHE)
 	Lf->na = va;
-# if	defined(HASNCAPID)
+# if	defined(HASNCVPID)
 	Lf->id = v->v_id;
-# endif	/* defined(HASNCAPID) */
+# endif	/* defined(HASNCVPID) */
 #endif	/* defined(HASNCACHE) */
 
 #if	defined(HASFSTRUCT)