DragonFly BSD
DragonFly submit List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [PATCH] systat -netstat fix


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Sat, 13 Nov 2004 10:46:32 +0900

On Fri, Nov 12, 2004 at 08:17:45PM +0100, Joerg Sonnenberger wrote:
> On Sat, Nov 13, 2004 at 03:26:54AM +0900, YONETANI Tomokazu wrote:
> > And I split off the enhancement as a separate patch, in case
> > you don't like it (contains two patches):
> >  http://les.ath.cx/DragonFly/systat-netstat.tar.gz
> 
> Thanks, I've commited the bugfix. What do you think of the attached
> version of the CPU ID patch? It skips the CPU column if only one
> processor exists.

Thanks.
Yeah, I thought of doing that but didn't have an idea. BTW I noticed an
extra tab in front of `showcpu = 1;', please remove it before you commit it.

> Index: netstat.c
> +	len = sizeof(ncpu);
> +	if (sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0) == -1) {
> +		warn("cannot determine number of CPUs, assuming SMP");
> +		showcpu = 1;
> +	} else if (ncpu != 1) {
> +			showcpu = 1;
> +	}



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]