b5ae06
Bug 1073237 - "skipNFSInHostResources" option in net-snmp does not skip mvfs type filesystem (IBM clearcase)
b5ae06
Bug 1086606
b5ae06
b5ae06
Non-ABI and non-behavior breaking patch.
b5ae06
b5ae06
Upstream (upcoming 5.8.0 release) will report mvfs as 'NFS' filesystem, which
b5ae06
is then skipped when skipNFSInHostResources is set. We can't do so in RHEL
b5ae06
minor updates -> this patch.
b5ae06
b5ae06
diff -up net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c.mvfs net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c
b5ae06
--- net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c.mvfs	2014-04-08 12:56:42.419201488 +0200
b5ae06
+++ net-snmp-5.5/agent/mibgroup/hardware/fsys/fsys_mntent.c	2014-04-11 09:41:13.374316570 +0200
b5ae06
@@ -208,6 +208,12 @@ netsnmp_fsys_arch_load( void )
b5ae06
 
b5ae06
         if ( _fsys_remote( entry->device, entry->type ))
b5ae06
             entry->flags |= NETSNMP_FS_FLAG_REMOTE;
b5ae06
+        /* Mark also mvfs (reported as NETSNMP_FS_TYPE_OTHER) as remote.
b5ae06
+         * In upstream, it's solved as reporting mvfs as NFS
b5ae06
+         * (-> behavior change, forbidden in RHEL minor updates).
b5ae06
+         */
b5ae06
+        if (!strcmp(m->NSFS_TYPE, MNTTYPE_MVFS))
b5ae06
+            entry->flags |= NETSNMP_FS_FLAG_REMOTE;
b5ae06
 #if HAVE_HASMNTOPT
b5ae06
         if (hasmntopt( m, "ro" ))
b5ae06
             entry->flags |= NETSNMP_FS_FLAG_RONLY;