On Wed, Aug 25, 2010 at 8:33 PM, Wes Hardaker <
harda...@users.sourceforge.net> wrote:

> >>>>> On Wed, 25 Aug 2010 19:37:54 +0200, Bart Van Assche <
> bvanass...@acm.org> said:
>
> BVA> Code bloat ? All that is needed to test whether or not /dev/kmem
> exists is
> BVA> something like the code below, which can e.g. be put in a function in
> such a
> BVA> way that the stat() system call is only invoked once:
>
> No, not from the test.  But from all the usages.  We're talking about
> trying to include both nlist invocation (when possible) and code for
> other alternatives all at once.  Unless I missed something (very likely;
> my brain is spinning on a zillion topics this week)


I might be missing something, but as far as I can see the text string
"/dev/kmem" occurs only twice outside of source code comments:

$ find-svn | grep '[ch]$' | xargs grep -Hn dev/kmem
snmplib/system.c:594:    if ((kmem = open("/dev/kmem", 0)) < 0)
include/net-snmp/system/darwin8.h:67: * return null because /dev/kmem was
removed in OS X 10.4 for Intel.
include/net-snmp/system/darwin9.h:107: * return null because /dev/kmem was
removed completely in OS X 10.5.
include/net-snmp/system/darwin10.h:107: * return null because /dev/kmem was
removed completely in OS X 10.5.
agent/snmp_vars.c:286:    init_kmem("/dev/kmem");

Bart.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to