virt: Fetch block info stats from libvirt only if needed
[collectd.git] / src / utils_mount.c
index 2cab481..279f8e2 100644 (file)
@@ -519,7 +519,6 @@ static cu_mount_t *cu_mount_gen_getmntent(void) {
 
   return first;
 } /* static cu_mount_t *cu_mount_gen_getmntent (void) */
-/* #endif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT */
 
 #elif HAVE_SEQ_GETMNTENT
 #warn "This version of `getmntent' hat not yet been implemented!"
@@ -652,6 +651,8 @@ cu_mount_t *cu_mount_getlist(cu_mount_t **list) {
   new = cu_mount_gen_getmntent();
 #elif HAVE_SEQ_GETMNTENT
 #error "This version of `getmntent' hat not yet been implemented!"
+#elif HAVE_GETMNTENT_R
+  new = cu_mount_getmntent();
 #elif HAVE_ONE_GETMNTENT
   new = cu_mount_getmntent();
 #else
@@ -689,7 +690,7 @@ void cu_mount_freelist(cu_mount_t *list) {
 
 char *cu_mount_checkoption(char *line, const char *keyword, int full) {
   char *line2, *l2, *p1, *p2;
-  int l;
+  size_t l;
 
   if (line == NULL || keyword == NULL) {
     return NULL;