kern/81273: [request] remove dependency of tool 'netstat' on
'device mem' in the kernel
Joshua Piccari
yosh at yudirosen.com
Wed Aug 12 06:00:20 UTC 2009
The following reply was made to PR kern/81273; it has been noted by GNATS.
From: Joshua Piccari <yosh at joshuapiccari.com>
To: bug-followup at FreeBSD.org, bdluevel at heitec.net
Cc:
Subject: Re: kern/81273: [request] remove dependency of tool 'netstat' on
'device mem' in the kernel
Date: Tue, 11 Aug 2009 22:23:25 -0700
--0016e64601f4b902790470eb048d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
This PR looks rather old and seems that most of the work has been done.
However, I noticed that there is still an error, which can be removed by
removing the kread() call in the diff below. Can someone give advice? I
tracked the inclusion of this seemingly extra call in revision 1.86 of
main.c in netstat. Looking at the arguments that are passed, it seem it was
only used to verify that kvm was available or not. Here is possible patch.
Index: usr.bin/netstat/main.c
===================================================================
--- usr.bin/netstat/main.c (revision 196109)
+++ usr.bin/netstat/main.c (working copy)
@@ -530,7 +530,6 @@
* used for the queries, which is slower.
*/
#endif
- kread(0, NULL, 0);
if (iflag && !sflag) {
intpr(interval, nl[N_IFNET].n_value, NULL);
exit(0);
Joshua A Piccari
/dv/
--0016e64601f4b902790470eb048d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
This PR looks rather old and seems that most of the work has been done. How=
ever, I noticed that there is still an error, which can be removed by remov=
ing the kread() call in the diff below. Can someone give advice? I tracked =
the inclusion of this seemingly extra call in revision 1.86 of main.c in ne=
tstat. Looking at the arguments that are passed, it seem it was only used t=
o verify that kvm was available or not. Here is possible patch.<br>
<br>Index: usr.bin/netstat/main.c<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D<br>--- usr.bin/netstat/main.c=C2=A0=C2=A0=C2=A0 (revision 1=
96109)<br>+++ usr.bin/netstat/main.c=C2=A0=C2=A0=C2=A0 (working copy)<br>@@=
-530,7 +530,6 @@<br>
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0* used for the queries, which is slower.<br>=
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0*/<br>=C2=A0#endif<br>-=C2=A0=C2=A0=C2=A0 kr=
ead(0, NULL, 0);<br>=C2=A0=C2=A0=C2=A0=C2=A0 if (iflag && !sflag) {=
<br>=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 intpr(interval, nl[N_IFNET]=
.n_value, NULL);<br>=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 exit(0);<br=
><br><br clear=3D"all">
Joshua A Piccari<br>/dv/<br>
--0016e64601f4b902790470eb048d--
More information about the freebsd-bugs
mailing list