summaryrefslogtreecommitdiff
path: root/sysutils/lsof
diff options
context:
space:
mode:
authoratatat <atatat>2004-11-30 02:02:13 +0000
committeratatat <atatat>2004-11-30 02:02:13 +0000
commitc49decbe7a7c179242e42932ef1a0154cfe06639 (patch)
tree354b3756fc4a82abdf2ca1d3b75933eed47a4cb3 /sysutils/lsof
parent47fcab375c06f78173e067bbe55aecdc31f106dc (diff)
downloadpkgsrc-c49decbe7a7c179242e42932ef1a0154cfe06639.tar.gz
Redo three patches to address build failure on NetBSD <= 1.6ZC, to
change the reported node number for the master side of ptyfs devices, and to deal more cleanly with some header files.
Diffstat (limited to 'sysutils/lsof')
-rw-r--r--sysutils/lsof/Makefile3
-rw-r--r--sysutils/lsof/distinfo8
-rw-r--r--sysutils/lsof/patches/patch-ab14
-rw-r--r--sysutils/lsof/patches/patch-ac297
-rw-r--r--sysutils/lsof/patches/patch-ae60
5 files changed, 216 insertions, 166 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile
index 1cf1cc251bd..3d94879ebcd 100644
--- a/sysutils/lsof/Makefile
+++ b/sysutils/lsof/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.79 2004/11/28 22:39:07 atatat Exp $
+# $NetBSD: Makefile,v 1.80 2004/11/30 02:02:13 atatat Exp $
#
DISTNAME= lsof_4.73
@@ -31,7 +31,6 @@ SRCBALL_NAME= ${DISTNAME}_src
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_BUILDLINK3= yes
-BUILDLINK_PASSTHRU_DIRS= /usr/src/sys
.include "../../mk/bsd.prefs.mk"
diff --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo
index 726d082a3fd..940d8b62f2c 100644
--- a/sysutils/lsof/distinfo
+++ b/sysutils/lsof/distinfo
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.46 2004/11/28 22:39:07 atatat Exp $
+$NetBSD: distinfo,v 1.47 2004/11/30 02:02:13 atatat Exp $
SHA1 (lsof_4.73.tar.bz2) = 3e8112f854fc83f5e5dfdc9271c8d27d31aefc6c
Size (lsof_4.73.tar.bz2) = 725530 bytes
SHA1 (patch-aa) = 4878381537330258e9270c9d198d49a426283fab
-SHA1 (patch-ab) = f35db0c78d3b6a743d132900649d1bf31617ca63
-SHA1 (patch-ac) = e8388f7e6925c89b0a2264a35dd3e264f9d135e4
+SHA1 (patch-ab) = 96c7ec1b1b710b10182da370c0c13e741d4687d8
+SHA1 (patch-ac) = b844e10f4df066bb65bfc644bd387f0d13935726
SHA1 (patch-ad) = 49f3d0899e8055815c8b25d304281f83e7b1a98d
-SHA1 (patch-ae) = fc314546f0b3769414939cf22894e69c13589f1e
+SHA1 (patch-ae) = 1c0b0f11351f7e3ab449ac210332a08a16042def
SHA1 (patch-af) = 0a5ca7b243be925cba841b1358427e86b65ccde1
SHA1 (patch-ag) = 06a5a07cf550136c8b58f82d4aa0f75d85378db0
SHA1 (patch-ah) = 35dc2b9ec90a1f418d3cd103b951db46df19bf3c
diff --git a/sysutils/lsof/patches/patch-ab b/sysutils/lsof/patches/patch-ab
index 5bf6635f75a..613f9da6291 100644
--- a/sysutils/lsof/patches/patch-ab
+++ b/sysutils/lsof/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.31 2004/11/28 22:39:07 atatat Exp $
+$NetBSD: patch-ab,v 1.32 2004/11/30 02:02:13 atatat Exp $
Incorporate a patch from the author that widens the NETBSDV definition
to account for new current versioning system, properly handles the
@@ -76,13 +76,19 @@ support.
&& __NetBSD_Version__<106060000 */
#include <miscfs/nullfs/null.h>
#undef _KERNEL
-@@ -357,10 +365,20 @@ struct sockproto {
+@@ -357,10 +365,26 @@ struct sockproto {
#define Pstatus PFSstatus
#define Pnote PFSnote
#define Pnotepg PFSnotepg
++# if defined(NetBSDV)
++# if NETBSDV>=2000000
+#define Pfd PFSfd
++# endif /* NETBSDV>=2000000 */
++# if NETBSDV>=1006000
+#define Pmap PFSmap
+#define Pmaps PFSmaps
++# endif /* NETBSDV>=1006000 */
++# endif /* defined(NetBSDV) */
# endif /* defined(HASPROCFS_PFSROOT) */
#include <machine/reg.h>
# endif /* defined(HASPROCFS) */
@@ -97,7 +103,7 @@ support.
#define KERNEL
#define _KERNEL
#include <sys/file.h>
-@@ -515,9 +533,9 @@ struct sfile {
+@@ -515,9 +539,9 @@ struct sfile {
*/
# if defined(HASNCACHE)
@@ -109,7 +115,7 @@ support.
#include <sys/uio.h>
#include <sys/namei.h>
-@@ -527,15 +545,15 @@ struct sfile {
+@@ -527,15 +551,15 @@ struct sfile {
#define NCACHE_NODEADDR nc_vp /* node address in NCACHE */
#define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */
diff --git a/sysutils/lsof/patches/patch-ac b/sysutils/lsof/patches/patch-ac
index 51311ba3a36..4882acf5666 100644
--- a/sysutils/lsof/patches/patch-ac
+++ b/sysutils/lsof/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.20 2004/11/28 22:39:07 atatat Exp $
+$NetBSD: patch-ac,v 1.21 2004/11/30 02:02:13 atatat Exp $
Incorporate a patch from the author that widens the NETBSDV definition
to account for new current versioning system, properly handles the
@@ -15,7 +15,7 @@ support.
LSOF_TSTXO=""
LSOF_TSTXOC="${LSOF_TSTSUBD}/config.xobj"
if test "X$LSOF_VERS" = "X" # {
-@@ -2264,51 +2279,49 @@ return(0); }
+@@ -2264,51 +2265,49 @@ return(0); }
# Validate the NetBSD version.
case $LSOF_VSTR in # {
@@ -82,7 +82,7 @@ support.
;;
esac # }
fi # }
-@@ -2316,7 +2329,7 @@ return(0); }
+@@ -2316,7 +2315,7 @@ return(0); }
# Test for legal NetBSD version.
case $LSOF_VERS in # {
@@ -91,21 +91,19 @@ support.
;;
*)
echo "Unknown NetBSD version: $LSOF_VERS"
-@@ -2336,166 +2349,656 @@ return(0); }
+@@ -2336,166 +2335,637 @@ return(0); }
fi # }
fi # }
LSOF_CFGF="$LSOF_CFGF $LSOF_TMP1"
- if test -r ${LSOF_INCLUDE}/nfs/nfsproto.h # {
+ if test -r ${LSOF_INCLUDE}/kvm.h # {
- then
-- LSOF_CFGF="$LSOF_CFGF -DHASNFSPROTO"
++ then
+ grep -q kvm_getproc2 ${LSOF_INCLUDE}/kvm.h
+ if test $? -eq 0 # {
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASKVMGETPROC2"
+ fi # }
- fi # }
-- if test -r ${LSOF_INCLUDE}/netinet/ip6.h # {
++ fi # }
+
+ # Here begin the dual tests on header files that may be in $LSOF_INCLUDE
+ # or $NETBSD_SYS.
@@ -115,14 +113,16 @@ support.
+
+ LSOF_TMP1=0
+ if test "X$NETBSD_SYS" = "X" # {
-+ then
-+ if test -d /usr/src/sys # {
+ then
+- LSOF_CFGF="$LSOF_CFGF -DHASNFSPROTO"
++ if test -d /usr/src # {
+ then
+ NETBSD_SYS="/usr/src/sys"
+ else
+ NETBSD_SYS=$LSOF_INCLUDE
+ fi # }
-+ fi # }
+ fi # }
+- if test -r ${LSOF_INCLUDE}/netinet/ip6.h # {
+ LSOF_TMP2="nfs/nfsproto.h"
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
@@ -298,52 +298,22 @@ support.
+ fi # }
+ fi # }
+ LSOF_TMP2="sys/bufq.h"
++ LSOF_NBSD_BUFQH=0
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
-+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
-+ LSOF_TMP4=0
++ LSOF_CFGF="$LSOF_CFGF -DHASBUFQ_H"
+ else
+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
then
- LSOF_CFGF="$LSOF_CFGF -DHASPROCFS_PFSROOT"
- fi # }
-+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2"
-+ LSOF_TMP4=1
-+ else
-+ LSOF_TMP3=""
-+ fi # }
- fi # }
-- if test -d ${NETBSD_SYS}/isofs/cd9660 # {
-+ if test "X$LSOF_TMP3" != "X" # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHASBUFQ_H"
-+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
-+ then
-+ LSOF_TMP1=1
-+ fi # }
-+ fi # }
-+ LSOF_TMP2="fs/ptyfs/ptyfs.h"
-+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
-+ then
-+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
-+ LSOF_TMP4=0
-+ else
-+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
-+ then
-+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2"
-+ LSOF_TMP4=1
-+ else
-+ LSOF_TMP3=""
++ if test $NETBSD_SYS != $LSOF_INCLUDE # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASBUFQ_H"
++ LSOF_NBSD_BUFQH=1
++ fi # }
+ fi # }
+ fi # }
-+ if test "X$LSOF_TMP3" != "X" # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHASPTYFS"
-+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
-+ then
-+ LSOF_TMP1=1
-+ fi # }
-+ fi # }
+ LSOF_TMP2="isofs/cd9660"
+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
@@ -357,7 +327,8 @@ support.
+ else
+ LSOF_TMP3=""
+ fi # }
-+ fi # }
+ fi # }
+- if test -d ${NETBSD_SYS}/isofs/cd9660 # {
+ if test "X$LSOF_TMP3" != "X" # {
then
LSOF_CFGF="$LSOF_CFGF -DHAS9660FS=1"
@@ -391,8 +362,9 @@ support.
+ then
+ LSOF_TMP1=1
+ fi # }
-+ fi # }
-+ fi # }
+ fi # }
+ fi # }
+- if test -d ${NETBSD_SYS}/msdosfs # {
+ LSOF_TMP2="msdosfs"
+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
@@ -405,9 +377,8 @@ support.
+ LSOF_TMP4=1
+ else
+ LSOF_TMP3=""
- fi # }
- fi # }
-- if test -d ${NETBSD_SYS}/msdosfs # {
++ fi # }
++ fi # }
+ if test "X$LSOF_TMP3" != "X" # {
then
LSOF_CFGF="$LSOF_CFGF -DHASMSDOSFS=1"
@@ -441,13 +412,11 @@ support.
+ then
+ LSOF_TMP1=1
+ fi # }
- fi # }
- fi # }
-- if test -r ${NETBSD_SYS}/miscfs/kernfs/kernfs.h # {
++ fi # }
++ fi # }
+ LSOF_TMP2="miscfs/kernfs/kernfs.h"
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
- then
-- grep -q "kt_name;" ${NETBSD_SYS}/miscfs/kernfs/kernfs.h
++ then
+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
+ LSOF_TMP4=0
+ else
@@ -457,10 +426,12 @@ support.
+ LSOF_TMP4=1
+ else
+ LSOF_TMP3=""
-+ fi # }
-+ fi # }
+ fi # }
+ fi # }
+- if test -r ${NETBSD_SYS}/miscfs/kernfs/kernfs.h # {
+ if test "X$LSOF_TMP3" != "X" # {
-+ then
+ then
+- grep -q "kt_name;" ${NETBSD_SYS}/miscfs/kernfs/kernfs.h
+ grep -q "kt_name;" $LSOF_TMP3
if test $? -eq 0 # {
then
@@ -554,10 +525,20 @@ support.
+ LSOF_TMP1=1
+ fi # }
+ fi # }
++ fi # }
++ grep -q i_ffs_effnlink $LSOF_TMP3
++ if test $? -eq 0 # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASEFFNLINK=i_ffs_effnlink"
++ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
++ then
++ LSOF_TMP1=1
++ fi # }
fi # }
fi # }
- if test -r ${LSOF_INCLUDE}/nfs/nfsnode.h # {
+ LSOF_TMP2="sys/vnode.h"
++ LSOF_NBSD_PTYFS=0
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
then
- grep -q "*n_vattr" ${LSOF_INCLUDE}/nfs/nfsnode.h
@@ -585,8 +566,7 @@ support.
- if test $? -eq 0 # {
+ LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS"
+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
- then
-- NETBSD_UVM="Y"
++ then
+ LSOF_TMP1=1
+ fi # }
+ LSOF_TMP2="ufs/ufs/inode.h"
@@ -604,7 +584,8 @@ support.
+ fi # }
+ fi # }
+ if test "X$LSOF_TMP5" != "X" # {
-+ then
+ then
+- NETBSD_UVM="Y"
+ grep -q "*e2fs_din" $LSOF_TMP5
+ if test $? -eq 0 # {
+ then
@@ -614,38 +595,55 @@ support.
+ LSOF_TMP1=$LSOF_TMP6
+ fi # }
+ fi # }
-+ fi # }
-+ fi # }
-+ grep -q VT_LFS $LSOF_TMP3
-+ if test $? -eq 0 # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHASLFS"
-+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
-+ then
-+ LSOF_TMP1=1
fi # }
fi # }
- if test "X$NETBSD_UVM" = "X" # {
+- if test "X$NETBSD_UVM" = "X" # {
++ grep -q VT_LFS $LSOF_TMP3
++ if test $? -eq 0 # {
then
- if test -r ${LSOF_INCLUDE}/sys/vnode.h # {
-+ grep -q UVM $LSOF_TMP3
-+ if test $? -ne 0 # {
++ LSOF_CFGF="$LSOF_CFGF -DHASLFS"
++ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
then
- grep -q UVM ${LSOF_INCLUDE}/sys/vnode.h
- if test $? -ne 0 # {
-+ egrep -q "v_uvm;|v_uobj;" $LSOF_TMP3
-+ if test $? -eq 0 # {
++ LSOF_TMP1=1
++ fi # }
++ fi # }
++ grep -q VT_PTYFS $LSOF_TMP3
++ if test $? -eq 0 # {
++ then
++ LSOF_TMP2="fs/ptyfs/ptyfs.h"
++ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASPTYFS"
++ else
++ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
then
- egrep -q "v_uvm;|v_uobj;" ${LSOF_INCLUDE}/sys/vnode.h
- if test $? -eq 0 # {
-- then
++ if test $NETBSD_SYS != $LSOF_INCLUDE # {
+ then
- NETBSD_UVM="Y"
-- fi # }
-+ NETBSD_UVM="Y"
++ LSOF_CFGF="$LSOF_CFGF -DHASPTYFS"
++ LSOF_NBSD_PTYFS=1
+ fi # }
fi # }
fi # }
fi # }
- fi # }
++ if test "X$NETBSD_UVM" = "X" # {
++ then
++ grep -q UVM $LSOF_TMP3
++ if test $? -ne 0 # {
++ then
++ egrep -q "v_uvm;|v_uobj;" $LSOF_TMP3
++ if test $? -eq 0 # {
++ then
++ NETBSD_UVM="Y"
++ fi # }
++ fi # }
++ fi # }
++ fi # }
+ LSOF_TMP2="nfs/nfsnode.h"
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
@@ -685,7 +683,7 @@ support.
+ else
+ LSOF_TMP3=""
+ fi # }
-+ fi # }
+ fi # }
+ if test "X$LSOF_TMP3" != "X" # {
+ then
+ grep -q vop_advlock_args $LSOF_TMP3
@@ -777,30 +775,12 @@ support.
+ LSOF_TMP1=1
+ fi # }
+ fi # }
-+ LSOF_TMP2="sys/statvfs.h"
-+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
-+ then
-+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
-+ LSOF_TMP4=0
-+ else
-+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
-+ then
-+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2"
-+ LSOF_TMP4=1
-+ else
-+ LSOF_TMP3=""
-+ fi # }
-+ fi # }
-+ if test "X$LSOF_TMP3" != "X" # {
++ if test -r ${LSOF_INCLUDE}/sys/statvfs.h # {
+ then
-+ grep -q '^struct statvfs {' $LSOF_TMP3
++ grep -q '^struct statvfs {' ${LSOF_INCLUDE}/sys/statvfs.h
+ if test $? -eq 0 # {
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASSTATVFS"
-+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # {
-+ then
-+ LSOF_TMP1=1
-+ fi # }
+ fi # }
+ fi # }
+
@@ -819,7 +799,7 @@ support.
rm -rf dialects/n+obsd/include
if test "X$NETBSD_UVM" = "XY" -o "X$NETBSD_UVM" = "Xy" # {
then
-@@ -2508,7 +3011,21 @@ return(0); }
+@@ -2508,10 +2978,22 @@ return(0); }
LSOF_CFGF="$LSOF_CFGF -DHAS_UVM_INCL"
fi # }
fi # }
@@ -828,12 +808,10 @@ support.
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
+ then
+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
-+ LSOF_TMP4=0
+ else
+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
+ then
+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2"
-+ LSOF_TMP4=1
+ else
+ LSOF_TMP3=""
+ fi # }
@@ -841,25 +819,38 @@ support.
+ if test "X$LSOF_TMP3" != "X" # {
then
- # Build the netexport.h header file for NetBSD.
-@@ -2553,59 +3070,6 @@ return(0); }
+- # Build the netexport.h header file for NetBSD.
++ # Build a local NetBSD netexport.h header file.
+
+ LSOF_TMP1=${LSOF_TMPC}.edscr
+ LSOF_TMP2=${LSOF_TMPC}.netcred
+@@ -2553,59 +3035,48 @@ return(0); }
if test $? -ne 0 # {
then
LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
- fi
-- fi # }
++ fi # }
+ fi # }
- if test -r ${LSOF_INCLUDE}/sys/lockf.h # {
-- then
++ if test $LSOF_NBSD_BUFQH -eq 1 # {
+ then
- grep vop_advlock_args ${LSOF_INCLUDE}/sys/lockf.h > /dev/null
- if test $? -eq 0 # {
-- then
++
++ # Make a local copy of $NETBSD_SYS/sys/bufq.h.
++
++ if test ! -d dialects/n+obsd/include # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHAS_ADVLOCK_ARGS"
-- fi # }
++ mkdir dialects/n+obsd/include
+ fi # }
- grep lf_lwp ${LSOF_INCLUDE}/sys/lockf.h > /dev/null
- if test $? -eq 0 # {
-- then
++ if test ! -d dialects/n+obsd/include/sys # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHAS_LF_LWP"
-- fi # }
++ mkdir dialects/n+obsd/include/sys
+ fi # }
- fi # }
- if test -r ${LSOF_INCLUDE}/sys/lwp.h # {
- then
@@ -869,17 +860,27 @@ support.
- then
- grep IPV6_INRIA_VERSION ${LSOF_INCLUDE}/netinet/in.h > /dev/null
- if test $? -eq 0 # {
-- then
++ cp $NETBSD_SYS/sys/bufq.h dialects/n+obsd/include/sys
++ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1
++ if test $? -ne 0 # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHASIPv6 -DHASINRIAIPv6"
-- fi # }
-- fi # }
++ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
+ fi # }
+ fi # }
- if test -r ${LSOF_INCLUDE}/sys/filedesc.h # {
-- then
++ if test $LSOF_NBSD_PTYFS -eq 1 # {
+ then
- grep -q "^struct cwdinfo {" ${LSOF_INCLUDE}/sys/filedesc.h
- if test $? -eq 0 # {
-- then
++
++ # Make a local copy of $NETBSD_SYS/sys/fs/ptyfs/.
++
++ if test ! -d dialects/n+obsd/include # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHASCWDINFO"
-- fi # }
++ mkdir dialects/n+obsd/include
+ fi # }
- fi # }
- if test -r ${LSOF_INCLUDE}/sys/pipe.h # {
- then
@@ -889,43 +890,39 @@ support.
- then
- grep -q '^struct statvfs {' ${LSOF_INCLUDE}/sys/statvfs.h
- if test $? -eq 0 # {
-- then
++ if test ! -d dialects/n+obsd/include/fs # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHASSTATVFS"
-- fi # }
++ mkdir dialects/n+obsd/include/fs
+ fi # }
- fi # }
- if test -r ${LSOF_INCLUDE}/kvm.h # {
- then
- grep -q kvm_getproc2 ${LSOF_INCLUDE}/kvm.h
- if test $? -eq 0 # {
-- then
++ rm -rf dialects/n+obsd/include/fs/ptyfs
++ mkdir dialects/n+obsd/include/fs/ptyfs
++ cp $NETBSD_SYS/fs/ptyfs/*.h dialects/n+obsd/include/fs/ptyfs
++ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1
++ if test $? -ne 0 # {
+ then
- LSOF_CFGF="$LSOF_CFGF -DHASKVMGETPROC2"
++ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
fi # }
fi # }
LSOF_CFGL="$LSOF_CFGL -lkvm"
-@@ -3594,6 +4058,15 @@ return(0); }
- # DEBUG -- End temporary hack for Solaris 10, build s10_44.
-
- fi # }
-+ if test -r ${LSOF_INCLUDE}/sys/vnode.h # {
-+ then
-+ grep v_path ${LSOF_INCLUDE}/sys/vnode.h > /dev/null 2>&1
-+ if test $? -eq 0 # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHAS_V_PATH"
-+ LSOF_TSTVPATH=1
-+ fi # }
-+ fi # }
+@@ -2897,6 +3368,14 @@ return(0); }
fi # }
- if test -r ${LSOF_INCLUDE}/sys/zone.h # {
- then
-@@ -4192,6 +4665,10 @@ then
- echo "-DLT_K64" >> $LSOF_TSTCFLG
- fi # }
- echo "-DLT_VERS=$LSOF_VERS" >> $LSOF_TSTCFLG
-+if test $LSOF_TSTVPATH -eq 1 # {
-+then
-+ echo "-DLT_VPATH" >> $LSOF_TSTCFLG
-+fi # }
- echo "$LSOF_TSTCFLG created"
-
- # Create tests loader flags file.
+ LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS=$LSOF_TMP1"
+ fi # }
++ if test -r ${LSOF_INCLUDE}/ufs/ufs/inode.h # {
++ then
++ grep -q i_effnlink ${LSOF_INCLUDE}/ufs/ufs/inode.h
++ if test $? -eq 0 # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASEFFNLINK=i_effnlink"
++ fi # }
++ fi # }
+ if test -r ${LSOF_INCLUDE}/sys/namei.h
+ then
+ grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
diff --git a/sysutils/lsof/patches/patch-ae b/sysutils/lsof/patches/patch-ae
index 66b92b5e55c..decdff58322 100644
--- a/sysutils/lsof/patches/patch-ae
+++ b/sysutils/lsof/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.5 2004/11/28 22:39:07 atatat Exp $
+$NetBSD: patch-ae,v 1.6 2004/11/30 02:02:13 atatat Exp $
Incorporate a patch from the author that widens the NETBSDV definition
to account for new current versioning system, properly handles the
@@ -70,13 +70,16 @@ support.
}
/*
* Obtain the inode number.
-@@ -836,6 +869,13 @@ process_overlaid_node:
+@@ -836,6 +869,16 @@ process_overlaid_node:
break;
#endif /* defined(HASPROCFS) */
+#if defined(HASPTYFS)
+ case PTYFSNODE:
-+ Lf->inode = (unsigned long)pt.ptyfs_fileno;
++ if (pt.ptyfs_type == PTYFSptc)
++ Lf->inode = (unsigned long)(pt.ptyfs_fileno & 0x3fffffff);
++ else
++ Lf->inode = (unsigned long)pt.ptyfs_fileno;
+ Lf->inp_ty = 1;
+ break;
+#endif /* defined(HASPTYFS) */
@@ -84,7 +87,42 @@ support.
}
/*
-@@ -1152,7 +1192,8 @@ process_overlaid_node:
+@@ -1009,27 +1052,26 @@ process_overlaid_node:
+ switch (nty) {
+ case INODE:
+
++#if defined(HASEFFNLINK)
++ Lf->nlink = (long)i.HASEFFNLINK;
++#else /* !defined(HASEFFNLINK) */
+ # if defined(HASI_FFS)
+ Lf->nlink = (long)i.i_ffs_nlink;
+- Lf->nlink_def = 1;
+ # else /* !defined(HASI_FFS) */
+ # if defined(HASI_FFS1)
+ if (ffs == 1) {
+- if (u1s) {
++ if (u1s)
+ Lf->nlink = (long)u1.di_nlink;
+- Lf->nlink_def = 1;
+- }
+ } else if (ffs == 2) {
+- if (u2s) {
++ if (u2s)
+ Lf->nlink = (long)u2.di_nlink;
+- Lf->nlink_def = 1;
+- }
+ }
+ # else /* !defined(HASI_FFS1) */
++
+ Lf->nlink = (long)i.i_nlink;
+- Lf->nlink_def = 1;
+ # endif /* defined(HASI_FFS1) */
+ # endif /* defined(HASI_FFS) */
++#endif /* defined(HASEFFNLINK) */
+
+ Lf->nlink_def = 1;
+ break;
+@@ -1152,7 +1194,8 @@ process_overlaid_node:
* ioctl(fd, TIOCNOTTY) files;
* /kern files
* memory node files;
@@ -94,25 +132,35 @@ support.
*/
if (type == VBAD)
-@@ -1222,14 +1263,52 @@ process_overlaid_node:
+@@ -1222,14 +1265,62 @@ process_overlaid_node:
(void) snpf(ep, sz, "/%d/notepg", p.pfs_pid);
ty = "PGID";
break;
++
++# if defined(Pfd)
+ case Pfd:
+ ep = endnm(&sz);
+ (void) snpf(ep, sz, "/%d/fd", p.pfs_pid);
+ ty = "PFD";
+ break;
++# endif /* defined(Pfd) */
++
++# if defined(Pmap)
+ case Pmap:
+ ep = endnm(&sz);
+ (void) snpf(ep, sz, "/%d/map", p.pfs_pid);
+ ty = "PMAP";
+ break;
++# endif /* defined(Pmap) */
++
++# if defined(Pmaps)
+ case Pmaps:
+ ep = endnm(&sz);
+ (void) snpf(ep, sz, "/%d/maps", p.pfs_pid);
+ ty = "PMPS";
+ break;
++# endif /* defined(Pmaps) */
++
}
if (ty)
(void) snpf(Lf->type, sizeof(Lf->type), ty);
@@ -149,7 +197,7 @@ support.
#if defined(HASBLKDEV)
/*
* If this is a VBLK file and it's missing an inode number, try to
-@@ -1283,7 +1362,9 @@ process_overlaid_node:
+@@ -1283,7 +1374,9 @@ process_overlaid_node:
if (Sfile && is_file_named((char *)NULL,
((type == VCHR) || (type == VBLK)) ? 1
: 0))