Date: Sun, 05 Mar 2000 16:05:47 +0900 From: Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp> To: joe@team7.cba.ualr.edu Cc: dnelson@emsphone.com, freebsd-questions@FreeBSD.ORG Subject: Re: sockstat not reporting all Message-ID: <20000305160547N.shin@nd.net.fujitsu.co.jp> In-Reply-To: <Pine.BSF.4.10.10003042328140.362-100000@njal.ualr.edu> References: <20000304204815.A87662@dan.emsphone.com> <Pine.BSF.4.10.10003042328140.362-100000@njal.ualr.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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, <FSTAT> chunk 34. > Use of uninitialized value at sockstat.pl line 40, <FSTAT> chunk 34. > Use of uninitialized value at sockstat.pl line 40, <FSTAT> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000305160547N.shin>