[snmp]: Stop spamming logs with statfs permission denied log message (#1668)
This commit is contained in:
parent
e082cd6d91
commit
74e8beaa12
@ -23,6 +23,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|||||||
dpkg-source -x net-snmp_$(SNMPD_VERSION_FULL).dsc
|
dpkg-source -x net-snmp_$(SNMPD_VERSION_FULL).dsc
|
||||||
|
|
||||||
pushd net-snmp-$(SNMPD_VERSION)
|
pushd net-snmp-$(SNMPD_VERSION)
|
||||||
|
patch -p0 < ../statfs_error.patch
|
||||||
fakeroot debian/rules -j$(SONIC_CONFIG_MAKE_JOBS) binary
|
fakeroot debian/rules -j$(SONIC_CONFIG_MAKE_JOBS) binary
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
22
src/snmpd/statfs_error.patch
Normal file
22
src/snmpd/statfs_error.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- agent/mibgroup/hardware/fsys/fsys_mntctl.c.old 2018-04-30 23:26:58.097636453 +0000
|
||||||
|
+++ agent/mibgroup/hardware/fsys/fsys_mntctl.c 2018-04-30 23:27:36.189499479 +0000
|
||||||
|
@@ -163,8 +163,6 @@
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( statfs( entry->path, &stat_buf ) < 0 ) {
|
||||||
|
- snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path );
|
||||||
|
- snmp_log_perror( tmpbuf );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
entry->units = stat_buf.f_bsize;
|
||||||
|
--- agent/mibgroup/hardware/fsys/fsys_mntent.c.old 2018-04-30 23:26:54.569649140 +0000
|
||||||
|
+++ agent/mibgroup/hardware/fsys/fsys_mntent.c 2018-04-30 23:27:22.001550497 +0000
|
||||||
|
@@ -238,8 +238,6 @@
|
||||||
|
if ( NSFS_STATFS( entry->path, &stat_buf ) < 0 )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
- snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path );
|
||||||
|
- snmp_log_perror( tmpbuf );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
entry->units = stat_buf.NSFS_SIZE;
|
Loading…
Reference in New Issue
Block a user