From owner-freebsd-questions Sat Mar 4 23: 5:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fgwmail6.fujitsu.co.jp (fgwmail6.fujitsu.co.jp [192.51.44.36]) by hub.freebsd.org (Postfix) with ESMTP id 6842937B8EA for ; Sat, 4 Mar 2000 23:05:44 -0800 (PST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from m3.gw.fujitsu.co.jp by fgwmail6.fujitsu.co.jp (8.9.3/3.7W-MX0002-Fujitsu Gateway) id QAA07567; Sun, 5 Mar 2000 16:04:57 +0900 (JST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from incapgw.fujitsu.co.jp by m3.gw.fujitsu.co.jp (8.9.3/3.7W-0002-Fujitsu Domain Master) id QAA01639; Sun, 5 Mar 2000 16:04:56 +0900 (JST) Received: from localhost ([192.168.245.84]) by incapgw.fujitsu.co.jp (8.9.3/3.7W-0002) id QAA29932; Sun, 5 Mar 2000 16:04:54 +0900 (JST) To: joe@team7.cba.ualr.edu Cc: dnelson@emsphone.com, freebsd-questions@FreeBSD.ORG Subject: Re: sockstat not reporting all In-Reply-To: References: <20000304204815.A87662@dan.emsphone.com> X-Mailer: Mew version 1.94 on Emacs 20.4 / Mule 4.0 (HANANOEN) X-Prom-Mew: Prom-Mew 1.93.4 (procmail reader for Mew) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000305160547N.shin@nd.net.fujitsu.co.jp> Date: Sun, 05 Mar 2000 16:05:47 +0900 From: Yoshinobu Inoue X-Dispatcher: imput version 990905(IM130) Lines: 38 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > bash-2.03$ perl -w sockstat.pl > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS > Use of uninitialized value at sockstat.pl line 40, chunk 34. > Use of uninitialized value at sockstat.pl line 40, chunk 34. > Use of uninitialized value at sockstat.pl line 40, chunk 34. > root sshd1 14580 5 > > Do you think I found the problem? > > -Joe Hi, I tried to fix it on an alpha machine, and the following patch seemd to fix it. (And as far as the compile warning showed, there seems to be also other several part where pointer printing format need to be fixed.) Cheers, Yoshinobu Inoue --- fstat.c.orig Mon Feb 21 03:06:01 2000 +++ fstat.c Sun Mar 5 14:57:50 2000 @@ -696,11 +696,11 @@ (void *)so.so_pcb); goto bad; } - printf(" %x", (int)inpcb.inp_ppcb); + printf(" %8lx", (u_long)inpcb.inp_ppcb); } } else if (so.so_pcb) - printf(" %x", (int)so.so_pcb); + printf(" %8lx", (u_long)so.so_pcb); break; case AF_UNIX: /* print address of pcb and connected pcb */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message