Re: [PATCH] systat -netstat fix

看板DFBSD_submit作者時間21年前 (2004/11/13 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
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; > + }
文章代碼(AID): #11bMhy00 (DFBSD_submit)
文章代碼(AID): #11bMhy00 (DFBSD_submit)