HOST-MIB, hr_filesys: Fix Check_HR_FileSys_AutoFs()
On Linux getmntent() is available but getfsstat() not. Hence remove #if
HAVE_GETFSSTAT from around the HRFS_type check.
See also https://sourceforge.net/p/net-snmp/patches/1350/.
Fixes: cf41e6e91015 ("HOST-MIB: Skip autofs entries").
Author: Bart Van Assche <bvanassche@acm.org>
Origin: upstream, bcb1a6b8af
Bug: https://sourceforge.net/p/net-snmp/patches/1350/
Bug-Ubuntu: https://launchpad.net/bugs/1843036
Gbp-Pq: Name fix-check-hr-filesys-autofs.patch
This commit is contained in:
parent
dbaba49fae
commit
d4e577609c
|
@ -841,18 +841,8 @@ Check_HR_FileSys_NFS (void)
|
||||||
int
|
int
|
||||||
Check_HR_FileSys_AutoFs(void)
|
Check_HR_FileSys_AutoFs(void)
|
||||||
{
|
{
|
||||||
#if HAVE_GETFSSTAT
|
return HRFS_entry->HRFS_type &&
|
||||||
if (HRFS_entry->HRFS_type != NULL &&
|
strcmp(HRFS_entry->HRFS_type, MNTTYPE_AUTOFS) == 0;
|
||||||
#if defined(MNTTYPE_AUTOFS)
|
|
||||||
!strcmp(HRFS_entry->HRFS_type, MNTTYPE_AUTOFS)
|
|
||||||
#else
|
|
||||||
!strcmp(HRFS_entry->HRFS_type, "autofs")
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
#endif /* HAVE_GETFSSTAT */
|
|
||||||
return 1; /* AUTOFS */
|
|
||||||
|
|
||||||
return 0; /* no AUTOFS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue