From owner-freebsd-ports Sun May 14 10:12:51 2000 Delivered-To: freebsd-ports@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 5899D37BE03; Sun, 14 May 2000 10:12:42 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12r01t-0004FW-00; Sun, 14 May 2000 16:10:05 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12r01t-000C1R-00; Sun, 14 May 2000 16:10:05 +0100 Date: Sun, 14 May 2000 16:10:05 +0100 From: Ben Smithurst To: obrien@FreeBSD.org, ports@FreeBSD.org Subject: FreeBSD lsof port seems broken on -current Message-ID: <20000514161005.S10128@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, lsof doesn't seem to compile on current. The first problem was about an incomplete type, which is easy to fix: --- dialects/freebsd/dlsof.h.orig Sun May 14 15:44:13 2000 +++ dialects/freebsd/dlsof.h Sun May 14 15:45:28 2000 @@ -208,6 +208,9 @@ # if FREEBSDV>=220 #undef B_NEEDCOMMIT +# if FREEBSDV>=500 +#include +# endif /* FREEBSDV>=500 */ #include #include #include The second problem is about Fctty, which has been removed from the fdesc code, so it doesn't seem as easy to fix. Simply removing the code which mentions it: --- dialects/freebsd/dnode.c.orig Sun Nov 28 11:40:27 1999 +++ dialects/freebsd/dnode.c Sun May 14 15:57:18 2000 @@ -426,15 +426,6 @@ if (f->fd_link && kread((KA_T)f->fd_link, Namech, sizeof(Namech) - 1) == 0) Namech[sizeof(Namech) - 1] = '\0'; - else if (f->fd_type == Fctty) { - if (f_tty_s == 0) - f_tty_s = lkup_dev_tty(&f_tty_dev, &f_tty_ino); - if (f_tty_s == 1) { - dev = f_tty_dev; - Lf->inode = f_tty_ino; - devs = Lf->inp_ty = 1; - } - } } #endif /* defined(HASFDESCFS) */ ... allows lsof to compile, but the output isn't good, e.g.: lsof 7877 ben 0u VCHR 5,1 0t529851 8188 / (/dev/ad0s1a) lsof 7877 ben 1u VCHR 5,1 0t529851 8188 / (/dev/ad0s1a) lsof 7877 ben 2u VCHR 5,1 0t529851 8188 / (/dev/ad0s1a) instead of: lsof 72993 ben 0u VCHR 5,1 0t962089 538 /dev/ttyp1 lsof 72993 ben 1u VCHR 5,1 0t962089 538 /dev/ttyp1 lsof 72993 ben 2u VCHR 5,1 0t962089 538 /dev/ttyp1 Is this a known problem, and is there a known fix? -- Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message