From owner-freebsd-questions Sun Mar 5 7: 8: 8 2000 Delivered-To: freebsd-questions@freebsd.org Received: from team7.cba.ualr.edu (team7.cba.ualr.edu [144.167.120.24]) by hub.freebsd.org (Postfix) with ESMTP id 16EF037B516 for ; Sun, 5 Mar 2000 07:08:06 -0800 (PST) (envelope-from joe@team7.cba.ualr.edu) Received: from access23.mod1.ualr.edu (access23.mod1.ualr.edu [144.167.7.23]) by team7.cba.ualr.edu (8.9.3/8.9.3) with ESMTP id JAA15496; Sun, 5 Mar 2000 09:07:58 -0600 (CST) (envelope-from joe@team7.cba.ualr.edu) Date: Sun, 5 Mar 2000 09:07:59 -0600 (CST) From: Joe X-Sender: joe@njal.ualr.edu To: Yoshinobu Inoue Cc: dnelson@emsphone.com, freebsd-questions@FreeBSD.ORG Subject: Re: sockstat not reporting all In-Reply-To: <20000305160547N.shin@nd.net.fujitsu.co.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Thanks for your help, I'll try this out. _joe On Sun, 5 Mar 2000, Yoshinobu Inoue wrote: > > 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 > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message