Blame SOURCES/net-snmp-5.7.2-snmpd-log-once.patch

19bbc3
diff -urNp O/agent/mibgroup/hardware/fsys/fsys_mntctl.c N/agent/mibgroup/hardware/fsys/fsys_mntctl.c
19bbc3
--- O/agent/mibgroup/hardware/fsys/fsys_mntctl.c	2019-03-18 12:22:21.655280129 +0100
19bbc3
+++ N/agent/mibgroup/hardware/fsys/fsys_mntctl.c	2019-03-18 12:24:38.481898394 +0100
19bbc3
@@ -89,7 +89,6 @@ netsnmp_fsys_arch_load( void )
19bbc3
     char          *path;
19bbc3
     struct statfs  stat_buf;
19bbc3
     netsnmp_fsys_info *entry;
19bbc3
-    char               tmpbuf[1024];
19bbc3
 
19bbc3
     /*
19bbc3
      * Retrieve information about the currently mounted filesystems...
19bbc3
@@ -163,8 +162,7 @@ netsnmp_fsys_arch_load( void )
19bbc3
             continue;
19bbc3
 
19bbc3
         if ( statfs( entry->path, &stat_buf ) < 0 ) {
19bbc3
-            snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s\n", entry->path );
19bbc3
-            snmp_log_perror( tmpbuf );
19bbc3
+            NETSNMP_LOGONCE(( LOG_ERROR, "Cannot statfs %s\n", entry->path ));
19bbc3
             continue;
19bbc3
         }
19bbc3
         entry->units =  stat_buf.f_bsize;