Menu

#1753 os-specific NetBSD memory_ module has wrong defines

netBSD
closed
nobody
agent (1105)
5
2012-11-08
2007-01-10
Ed Ravin
No

Net-SNMP 5.4 / NetBSD 3.1

memory_netbsd1.c, as well as several other memory_* os-specific modules (memory_aix4.c, memory_darwin7.c, memory_dynix.c, memory_freebsd2.c, memory_hpux.c, memory_solaris2.c) have undefined identifiers. It looks like these identifiers:

#define MEMAVAILSWAP 4
#define MEMTOTALREAL 5
#define MEMAVAILREAL 6
#define MEMTOTALSWAPTXT 7
#define MEMUSEDSWAPTXT 8
#define MEMTOTALREALTXT 9
#define MEMUSEDREALTXT 10
#define MEMTOTALFREE 11
#define MEMSWAPMINIMUM 12
#define MEMSHARED 13
#define MEMBUFFER 14
#define MEMCACHED 15
#define MEMSWAPERROR 16

Have all been changed in other files in the build to:

#define MEMORY_INDEX 1
#define MEMORY_ERRNAME 2
#define MEMORY_SWAP_TOTAL 3
#define MEMORY_SWAP_AVAIL 4
#define MEMORY_REAL_TOTAL 5
#define MEMORY_REAL_AVAIL 6
#define MEMORY_STXT_TOTAL 7
#define MEMORY_STXT_AVAIL 8 /* Deprecated */
#define MEMORY_RTXT_TOTAL 9
#define MEMORY_RTXT_AVAIL 10 /* Deprecated */
#define MEMORY_FREE 11
#define MEMORY_SWAP_MIN 12
#define MEMORY_SHARED 13
#define MEMORY_BUFFER 14
#define MEMORY_CACHED 15
#define MEMORY_STXT_USED 16
#define MEMORY_RTXT_USED 17
#define MEMORY_SWAP_ERROR 100
#define MEMORY_SWAP_ERRMSG 101

When I hand-edited the identifiers to the obvious fixes, I was able to compile the module and it seems mostly OK.

Discussion

  • Thomas Anders

    Thomas Anders - 2007-01-10

    Logged In: YES
    user_id=848638
    Originator: NO

    Can you post your patch, please?

     
  • Ed Ravin

    Ed Ravin - 2007-01-10

    Logged In: YES
    user_id=21104
    Originator: YES

    Sorry, I'm mistaken, those files mentioned above appear to be no longer used. I was compiling memory_netbsd1.c due to an outdated build script. Those files probably need to be removed from the distribution.

     

Log in to post a comment.