projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests for module 'unicase/u16-is-uppercase'.
[gnulib.git]
/
lib
/
fsusage.c
diff --git
a/lib/fsusage.c
b/lib/fsusage.c
index
0bb6224
..
ade4195
100644
(file)
--- a/
lib/fsusage.c
+++ b/
lib/fsusage.c
@@
-1,12
+1,12
@@
/* fsusage.c -- return space usage of mounted file systems
/* fsusage.c -- return space usage of mounted file systems
- Copyright (C) 1991
, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005, 2006
+ Copyright (C) 1991
-1992, 1996, 1998-1999, 2002-2006, 2009
Free Software Foundation, Inc.
Free Software Foundation, Inc.
- This program is free software
;
you can redistribute it and/or modify
+ This program is free software
:
you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version
2, or (at your option)
- any later version.
+ the Free Software Foundation; either version
3 of the License, or
+
(at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-14,12
+14,9
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "fsusage.h"
#include "fsusage.h"
@@
-58,9
+55,10
@@
# include "full-read.h"
#endif
# include "full-read.h"
#endif
-#ifndef UINTMAX_MAX
-# define UINTMAX_MAX ((uintmax_t) -1)
-#endif
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+#undef open
+#undef close
/* Many space usage primitives use all 1 bits to denote a value that is
not applicable or unknown. Propagate this information by returning
/* Many space usage primitives use all 1 bits to denote a value that is
not applicable or unknown. Propagate this information by returning
@@
-71,7
+69,7
@@
&& (~ (x) == (sizeof (x) < sizeof (int) \
? - (1 << (sizeof (x) * CHAR_BIT)) \
: 0))) \
&& (~ (x) == (sizeof (x) < sizeof (int) \
? - (1 << (sizeof (x) * CHAR_BIT)) \
: 0))) \
- ? UINTMAX_MAX : (x))
+ ? UINTMAX_MAX : (
uintmax_t) (
x))
/* Extract the top bit of X as an uintmax_t value. */
#define EXTRACT_TOP_BIT(x) ((x) \
/* Extract the top bit of X as an uintmax_t value. */
#define EXTRACT_TOP_BIT(x) ((x) \
@@
-96,6
+94,7
@@
int
get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
{
int
get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
{
+ (void) disk; /* avoid argument-unused warning */
#if defined STAT_STATVFS /* POSIX */
struct statvfs fsd;
#if defined STAT_STATVFS /* POSIX */
struct statvfs fsd;