net-snmp/net-snmp-5.6.1-recognize-jfs-and-xfs.patch

31 lines
1.1 KiB
Diff

Index: net-snmp-5.6.1/agent/mibgroup/hardware/fsys/mnttypes.h
===================================================================
--- net-snmp-5.6.1.orig/agent/mibgroup/hardware/fsys/mnttypes.h
+++ net-snmp-5.6.1/agent/mibgroup/hardware/fsys/mnttypes.h
@@ -156,5 +156,12 @@
#ifndef MNTTYPE_RPCPIPE
#define MNTTYPE_RPCPIPE "rpc_pipefs"
#endif
+#ifndef MNTTYPE_XFS
+#define MNTTYPE_XFS "xfs"
+#endif
+#ifndef MNTTYPE_JFS
+#define MNTTYPE_JFS "jfs"
+#endif
+
#endif /* _NETSNMP_FSYS_MNTTYPES_H */
Index: net-snmp-5.6.1/agent/mibgroup/hardware/fsys/fsys_mntent.c
===================================================================
--- net-snmp-5.6.1.orig/agent/mibgroup/hardware/fsys/fsys_mntent.c
+++ net-snmp-5.6.1/agent/mibgroup/hardware/fsys/fsys_mntent.c
@@ -133,6 +133,8 @@ _fsys_type( char *typename )
!strcmp(typename, MNTTYPE_TMPFS) ||
!strcmp(typename, MNTTYPE_GFS) ||
!strcmp(typename, MNTTYPE_GFS2) ||
+ !strcmp(typename, MNTTYPE_XFS) ||
+ !strcmp(typename, MNTTYPE_JFS) ||
!strcmp(typename, MNTTYPE_LOFS))
return NETSNMP_FS_TYPE_OTHER;