Merge branch 'ff/kstat' into collectd-4.10
authorFlorian Forster <octo@collectd.org>
Mon, 10 Sep 2012 19:10:45 +0000 (21:10 +0200)
committerFlorian Forster <octo@collectd.org>
Mon, 10 Sep 2012 19:10:45 +0000 (21:10 +0200)
src/df.c
src/snmp.c

index 22264d3..dc7be1e 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -257,6 +257,8 @@ static int df_read (void)
                {
                        if (strcmp (mnt_ptr->dir, "/") == 0)
                        {
+                               if (strcmp (mnt_ptr->type, "rootfs") == 0)
+                                       continue;
                                sstrncpy (disk_name, "root", sizeof (disk_name));
                        }
                        else
index 5c6cce2..2b0b463 100644 (file)
@@ -302,7 +302,7 @@ static int csnmp_config_add_data_shift (data_definition_t *dd, oconfig_item_t *c
   if ((ci->values_num != 1)
       || (ci->values[0].type != OCONFIG_TYPE_NUMBER))
   {
-    WARNING ("snmp plugin: The `Scale' config option needs exactly one number argument.");
+    WARNING ("snmp plugin: The `Shift' config option needs exactly one number argument.");
     return (-1);
   }
 
@@ -886,10 +886,12 @@ static int csnmp_check_res_left_subtree (const host_definition_t *host,
       vb = vb->next_variable, i++)
   {
     num_checked++;
-    if (snmp_oid_ncompare (data->values[i].oid,
-         data->values[i].oid_len,
-         vb->name, vb->name_length,
-         data->values[i].oid_len) != 0)
+
+    if ((vb->type == SNMP_ENDOFMIBVIEW)
+       || (snmp_oid_ncompare (data->values[i].oid,
+           data->values[i].oid_len,
+           vb->name, vb->name_length,
+           data->values[i].oid_len) != 0))
       num_left_subtree++;
   }