summaryrefslogtreecommitdiffstats
path: root/gl/mountlist.c
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2009-05-19 22:32:10 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2009-05-19 22:32:10 (GMT)
commit50b3ff7b91e78a61aca93247bee586d6d7eb27c8 (patch)
treedb4c7eee24479ac7ee6888ce1562facf60159b71 /gl/mountlist.c
parent2701ccd500e60537a8c2977a81549ff33eeaef3f (diff)
downloadmonitoring-plugins-50b3ff7b91e78a61aca93247bee586d6d7eb27c8.tar.gz
Sync with the latest Gnulib code (cb75dc5)
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Diffstat (limited to 'gl/mountlist.c')
-rw-r--r--gl/mountlist.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gl/mountlist.c b/gl/mountlist.c
index 4c975c6..50e90ee 100644
--- a/gl/mountlist.c
+++ b/gl/mountlist.c
@@ -1,7 +1,6 @@
1/* mountlist.c -- return a list of mounted file systems 1/* mountlist.c -- return a list of mounted file systems
2 2
3 Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 3 Copyright (C) 1991, 1992, 1997-2009 Free Software Foundation, Inc.
4 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 4
6 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
@@ -24,6 +23,7 @@
24#include <stdio.h> 23#include <stdio.h>
25#include <stdlib.h> 24#include <stdlib.h>
26#include <string.h> 25#include <string.h>
26#include <stdint.h>
27 27
28#include "xalloc.h" 28#include "xalloc.h"
29 29
@@ -134,10 +134,6 @@
134# include "unlocked-io.h" 134# include "unlocked-io.h"
135#endif 135#endif
136 136
137#ifndef SIZE_MAX
138# define SIZE_MAX ((size_t) -1)
139#endif
140
141/* The results of open() in this file are not used with fchdir, 137/* The results of open() in this file are not used with fchdir,
142 therefore save some unnecessary work in fchdir.c. */ 138 therefore save some unnecessary work in fchdir.c. */
143#undef open 139#undef open
@@ -300,7 +296,6 @@ fstype_to_string (int t)
300 296
301/* Return the device number from MOUNT_OPTIONS, if possible. 297/* Return the device number from MOUNT_OPTIONS, if possible.
302 Otherwise return (dev_t) -1. */ 298 Otherwise return (dev_t) -1. */
303
304static dev_t 299static dev_t
305dev_from_mount_options (char const *mount_options) 300dev_from_mount_options (char const *mount_options)
306{ 301{
@@ -327,7 +322,7 @@ dev_from_mount_options (char const *mount_options)
327 } 322 }
328 323
329# endif 324# endif
330 325 (void) mount_options;
331 return -1; 326 return -1;
332} 327}
333 328
@@ -344,6 +339,7 @@ read_file_system_list (bool need_fs_type)
344 struct mount_entry *mount_list; 339 struct mount_entry *mount_list;
345 struct mount_entry *me; 340 struct mount_entry *me;
346 struct mount_entry **mtail = &mount_list; 341 struct mount_entry **mtail = &mount_list;
342 (void) need_fs_type;
347 343
348#ifdef MOUNTED_LISTMNTENT 344#ifdef MOUNTED_LISTMNTENT
349 { 345 {
@@ -378,7 +374,7 @@ read_file_system_list (bool need_fs_type)
378#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ 374#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
379 { 375 {
380 struct mntent *mnt; 376 struct mntent *mnt;
381 char *table = MOUNTED; 377 char const *table = MOUNTED;
382 FILE *fp; 378 FILE *fp;
383 379
384 fp = setmntent (table, "r"); 380 fp = setmntent (table, "r");