Code

fix for (tracker id 1420741)
authorM. Sean Finney <seanius@users.sourceforge.net>
Mon, 13 Mar 2006 17:59:23 +0000 (17:59 +0000)
committerM. Sean Finney <seanius@users.sourceforge.net>
Mon, 13 Mar 2006 17:59:23 +0000 (17:59 +0000)
"check_swap: incorrect totals for multiple partitions (BSD)"
thanks to scott thompson

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1323 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_swap.c

index 21a3bc8be9c2c0538d1f759910d09c6c58f74e77..fa989746d025d09569e5cb0ff5e977114cbea8c8 100644 (file)
@@ -290,8 +290,8 @@ main (int argc, char **argv)
        }
 
        for(i=0;i<nswaps;i++){
-               dsktotal_mb = (float) ent->se_nblks / conv_factor;
-               dskused_mb = (float) ent->se_inuse / conv_factor;
+               dsktotal_mb = (float) ent[i].se_nblks / conv_factor;
+               dskused_mb = (float) ent[i].se_inuse / conv_factor;
                dskfree_mb = ( dsktotal_mb - dskused_mb );
 
                if(allswaps && dsktotal_mb > 0){