monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit-dev] [monit] r315 committed - [No log message]


From: monit
Subject: [monit-dev] [monit] r315 committed - [No log message]
Date: Sun, 19 Dec 2010 22:13:59 +0000

Revision: 315
Author: address@hidden
Date: Sun Dec 19 14:13:05 2010
Log: [No log message]
http://code.google.com/p/monit/source/detail?r=315

Modified:
 /trunk/device/sysdep_DARWIN.c

=======================================
--- /trunk/device/sysdep_DARWIN.c       Fri Dec 17 16:35:24 2010
+++ /trunk/device/sysdep_DARWIN.c       Sun Dec 19 14:13:05 2010
@@ -46,19 +46,19 @@
 #include <errno.h>
 #endif

-#if defined HAVE_STRING_H
+#ifdef HAVE_STRING_H
 #include <string.h>
 #endif

-#if defined HAVE_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif

-#if defined HAVE_SYS_UCRED_H
+#ifdef HAVE_SYS_UCRED_H
 #include <sys/ucred.h>
 #endif

-#if defined HAVE_SYS_MOUNT_H
+#ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif

@@ -108,26 +108,22 @@
  * @return    TRUE if informations were succesfully read otherwise FALSE
  */
 int filesystem_usage_sysdep(Info_T inf) {
-
   struct statfs usage;

   ASSERT(inf);

-  if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
-        prog, inf->mntpath, STRERROR);
+  if (statfs(inf->mntpath, &usage) != 0) {
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n", prog, inf->mntpath, STRERROR);
     return FALSE;
   }
-
-  inf->f_bsize=           usage.f_bsize;
-  inf->f_blocks=          usage.f_blocks;
-  inf->f_blocksfree=      usage.f_bavail;
-  inf->f_blocksfreetotal= usage.f_bfree;
-  inf->f_files=           usage.f_files;
-  inf->f_filesfree=       usage.f_ffree;
-  inf->flags=             usage.f_flags;
+  inf->f_bsize =           usage.f_bsize;
+  inf->f_blocks =          usage.f_blocks;
+  inf->f_blocksfree =      usage.f_bavail;
+  inf->f_blocksfreetotal = usage.f_bfree;
+  inf->f_files =           usage.f_files;
+  inf->f_filesfree =       usage.f_ffree;
+  inf->flags =             usage.f_flags;

   return TRUE;
-
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]