X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_mount.c;h=da53b980eee91537c9aecdbfef118b835bcea8d1;hb=b4cc5c7399adf79198aea816d44a42df25431d15;hp=36d8d640b3176ca28e91680c8bd9c2db3eaf8bfd;hpb=f7f5868ee0378791ccd8d1788e27ebf2a02737dc;p=collectd.git diff --git a/src/utils_mount.c b/src/utils_mount.c index 36d8d640..da53b980 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -20,18 +20,24 @@ * Niki W. Waibel **/ -#include "collectd.h" -#include "utils_mount.h" - -#include "common.h" /* sstrncpy() et alii */ -#include "plugin.h" /* ERROR() macro */ +#if HAVE_CONFIG_H +# include "config.h" +#endif #if HAVE_XFS_XQM_H +# define _GNU_SOURCE # include #define XFS_SUPER_MAGIC_STR "XFSB" #define XFS_SUPER_MAGIC2_STR "BSFX" #endif +#include "collectd.h" +#include "utils_mount.h" + +#include "common.h" /* sstrncpy() et alii */ +#include "plugin.h" /* ERROR() macro */ + + #if HAVE_GETVFSSTAT # if HAVE_SYS_TYPES_H # include @@ -429,16 +435,16 @@ static cu_mount_t *cu_mount_listmntent (void) #elif HAVE_GETVFSSTAT || HAVE_GETFSSTAT static cu_mount_t *cu_mount_getfsstat (void) { -#if HAVE_GETVFSSTAT -# define STRUCT_STATFS struct statvfs -# define CMD_STATFS getvfsstat -# define FLAGS_STATFS ST_NOWAIT -/* #endif HAVE_GETVFSSTAT */ -#elif HAVE_GETFSSTAT +#if HAVE_GETFSSTAT # define STRUCT_STATFS struct statfs # define CMD_STATFS getfsstat # define FLAGS_STATFS MNT_NOWAIT -#endif /* HAVE_GETFSSTAT */ +/* #endif HAVE_GETFSSTAT */ +#elif HAVE_GETVFSSTAT +# define STRUCT_STATFS struct statvfs +# define CMD_STATFS getvfsstat +# define FLAGS_STATFS ST_NOWAIT +#endif /* HAVE_GETVFSSTAT */ int bufsize; STRUCT_STATFS *buf;