projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git]
/
src
/
utils_mount.c
diff --git
a/src/utils_mount.c
b/src/utils_mount.c
index
c53431f
..
b63a81a
100644
(file)
--- a/
src/utils_mount.c
+++ b/
src/utils_mount.c
@@
-21,20
+21,18
@@
* Niki W. Waibel <niki.waibel@gmx.net>
**/
* Niki W. Waibel <niki.waibel@gmx.net>
**/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "collectd.h"
+#include "utils_mount.h"
+
+#include "common.h" /* sstrncpy() et alii */
+#include "plugin.h" /* ERROR() macro */
-#include "common.h"
#if HAVE_XFS_XQM_H
# include <xfs/xqm.h>
#define XFS_SUPER_MAGIC_STR "XFSB"
#define XFS_SUPER_MAGIC2_STR "BSFX"
#endif
#if HAVE_XFS_XQM_H
# include <xfs/xqm.h>
#define XFS_SUPER_MAGIC_STR "XFSB"
#define XFS_SUPER_MAGIC2_STR "BSFX"
#endif
-#include "plugin.h"
-#include "utils_mount.h"
-
#if HAVE_GETVFSSTAT
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
#if HAVE_GETVFSSTAT
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
@@
-659,11
+657,11
@@
cu_mount_t *cu_mount_getlist(cu_mount_t **list)
#elif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT
new = cu_mount_gen_getmntent ();
#elif HAVE_SEQ_GETMNTENT
#elif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT
new = cu_mount_gen_getmntent ();
#elif HAVE_SEQ_GETMNTENT
-#
warn
"This version of `getmntent' hat not yet been implemented!"
+#
error
"This version of `getmntent' hat not yet been implemented!"
#elif HAVE_ONE_GETMNTENT
new = cu_mount_getmntent ();
#else
#elif HAVE_ONE_GETMNTENT
new = cu_mount_getmntent ();
#else
- new = NULL;
+# error "Could not determine how to find mountpoints."
#endif
if (first != NULL)
#endif
if (first != NULL)
@@
-752,9
+750,6
@@
cu_mount_getoptionvalue(char *line, char *keyword)
r += strlen(keyword);
p = strchr(r, ',');
if(p == NULL) {
r += strlen(keyword);
p = strchr(r, ',');
if(p == NULL) {
- if(strlen(r) == 0) {
- return NULL;
- }
return sstrdup(r);
} else {
char *m;
return sstrdup(r);
} else {
char *m;