FreeBSD Bugzilla – Attachment 86609 Details for
Bug 123073
[patch] fix for net-mgmt/net-snmp 5.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
NET-SNMP-MEMORY-BUFFER.patch
NET-SNMP-MEMORY-BUFFER.patch (text/plain), 1.64 KB, created by
Valerio Daelli
on 2008-04-25 13:40:00 UTC
(
hide
)
Description:
NET-SNMP-MEMORY-BUFFER.patch
Filename:
MIME Type:
Creator:
Valerio Daelli
Created:
2008-04-25 13:40:00 UTC
Size:
1.64 KB
patch
obsolete
>diff -ruN /usr/ports/net-mgmt/net-snmp.orig/files/patch-memory_freebsd.c /usr/ports/net-mgmt/net-snmp/files/patch-memory_freebsd.c >--- /usr/ports/net-mgmt/net-snmp.orig/files/patch-memory_freebsd.c 1970-01-01 01:00:00.000000000 +0100 >+++ /usr/ports/net-mgmt/net-snmp/files/patch-memory_freebsd.c 2008-04-14 17:03:37.000000000 +0200 >@@ -0,0 +1,39 @@ >+--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-06 17:23:52.000000000 +0100 >++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-04-14 16:45:19.000000000 +0200 >+@@ -47,6 +47,9 @@ >+ int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM }; >+ int user_mem_mib[] = { CTL_HW, HW_USERMEM }; >+ >++ long bufspace; >++ >++ >+ /* >+ * Retrieve the memory information from the underlying O/S... >+ */ >+@@ -54,6 +57,7 @@ >+ sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0); >+ sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0); >+ auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem)); >++ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace)); >+ #ifndef freebsd4 >+ pagesize = 1024; >+ #else >+@@ -129,6 +133,18 @@ >+ mem->free = -1; >+ } >+ >++ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 ); >++ if (!mem) { >++ snmp_log_perror("No Memory Buffer info entry"); >++ } else { >++ if (!mem->descr) >++ mem->descr = strdup("Memory Buffer"); >++ mem->units = pagesize; >++ mem->size = bufspace/pagesize; >++ mem->free = -1; >++ } >++ >++ >+ nswap = swapmode(pagesize); >+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 ); >+ if (!mem) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 123073
: 86609