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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
$NetBSD: patch-ag,v 1.5 2009/05/01 12:56:50 apb Exp $
--- Configure.orig 2007-04-24 21:00:22.000000000 +0200
+++ Configure
@@ -86,6 +86,7 @@ LSOF_VF=version
# $LSOF_LOCALSUFFIX local suffix for Makefile
# $LSOF_NBSD_BUFQH NetBSD <sys/bufq.h> copy status
# $LSOF_NBSD_PTYFS NetBSD ${NETBSD_SYS}/sys/fs/ptyfs/ copy status
+# $LSOF_NBSD_TMPFS NetBSD ${NETBSD_SYS}/sys/fs/tmpfs/ copy status
# $LSOF_N_UNIXV *BSD system's kernel file
# $LSOF_PL patch level
# $LSOF_RANLIB randomizing command for the lsof library
@@ -2391,6 +2392,11 @@ return(0); }
# Validate the NetBSD version.
case $LSOF_VSTR in # {
+ 0*|1.[01]*)
+ LSOF_VERS="1006000"
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
+ echo "!!!WARNING!!! Configuring for NetBSD 1.2"
+ ;;
1.2*)
LSOF_VERS="1002000"
;;
@@ -2447,10 +2453,36 @@ return(0); }
echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
echo "!!!WARNING!!! Configuring for NetBSD 3.0"
;;
+ 4.0*)
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="4000000"
+ ;;
+ 4.99.*)
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="4099000"
+ ;;
+ 4*)
+ LSOF_VERS="4000000"
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
+ echo "!!!WARNING!!! Configuring for NetBSD 4.0"
+ ;;
+ 5.0*)
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="5000000"
+ ;;
+ 5.99.*)
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="5099000"
+ ;;
+ 5*)
+ LSOF_VERS="5000000"
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
+ echo "!!!WARNING!!! Configuring for NetBSD 5.0"
+ ;;
*)
+ LSOF_VERS="5000000"
echo "Unknown NetBSD release: $LSOF_VSTR"
- echo Assuming NetBSD 1.6
- LSOF_VERS="1006000"
+ echo "!!!WARNING!!! Configuring for NetBSD 5.0"
;;
esac # }
fi # }
@@ -2464,6 +2496,10 @@ return(0); }
;;
3000000|3099000)
;;
+ 4000000|4099000)
+ ;;
+ 5000000|5099000)
+ ;;
*)
echo "Unknown NetBSD version: $LSOF_VERS"
rm -f $LSOF_HLP
@@ -2472,7 +2508,10 @@ return(0); }
esac # }
LSOF_CFGF="-DNETBSDV=$LSOF_VERS"
LSOF_TMP1="-DN_UNIXV=/netbsd"
- if test -r ${LSOF_INCLUDE}/util.h # {
+ if test -r /dev/ksyms # {
+ then
+ LSOF_TMP1="-DN_UNIXV=/dev/ksyms"
+ elif test -r ${LSOF_INCLUDE}/util.h # } {
then
grep -q getbootfile ${LSOF_INCLUDE}/util.h
if test $? -eq 0 # {
@@ -2871,6 +2910,7 @@ return(0); }
fi # }
LSOF_TMP2="sys/vnode.h"
LSOF_NBSD_PTYFS=0
+ LSOF_NBSD_TMPFS=0
if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
then
LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
@@ -2948,6 +2988,24 @@ return(0); }
fi # }
fi # }
fi # }
+ grep -q VT_TMPFS $LSOF_TMP3
+ if test $? -eq 0 # {
+ then
+ LSOF_TMP2="fs/tmpfs/tmpfs.h"
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
+ else
+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
+ then
+ if test $NETBSD_SYS != $LSOF_INCLUDE # {
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
+ LSOF_NBSD_TMPFS=1
+ fi # }
+ fi # }
+ fi # }
+ fi # }
if test "X$NETBSD_UVM" = "X" # {
then
grep -q UVM $LSOF_TMP3
@@ -3233,6 +3291,28 @@ return(0); }
LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
fi # }
fi # }
+ if test $LSOF_NBSD_TMPFS -eq 1 # {
+ then
+
+ # Make a local copy of $NETBSD_SYS/sys/fs/tmpfs/tmpfs.h.
+
+ if test ! -d dialects/n+obsd/include # {
+ then
+ mkdir dialects/n+obsd/include
+ fi # }
+ if test ! -d dialects/n+obsd/include/fs # {
+ then
+ mkdir dialects/n+obsd/include/fs
+ fi # }
+ rm -rf dialects/n+obsd/include/fs/tmpfs
+ mkdir dialects/n+obsd/include/fs/tmpfs
+ cp $NETBSD_SYS/fs/tmpfs/tmpfs.h dialects/n+obsd/include/fs/tmpfs
+ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1
+ if test $? -ne 0 # {
+ then
+ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
+ fi # }
+ fi # }
LSOF_CFGL="$LSOF_CFGL -lkvm"
LSOF_DIALECT_DIR=n+obsd
;;
@@ -4833,7 +4913,7 @@ fi # }
echo "" >> $LSOF_MKFC
if test "X$LSOF_DEBUG" = "X" # {
then
- LSOF_DEBUG="-O"
+ LSOF_DEBUG=""
else
if test "X$LSOF_DEBUG" = "XNo-O" # {
then
|