]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/statvfs64.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / statvfs64.c
CommitLineData
47b33891 1/* Return information about the filesystem on which FILE resides.
6d7e8eda 2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
47b33891
RM
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
47b33891
RM
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
47b33891 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
47b33891 18
52f527d6
AZ
19#define __statvfs __statvfs_disable
20#define statvfs statvfs_disable
21#include <sys/statvfs.h>
08c9a553 22#include <sys/statfs.h>
52f527d6
AZ
23#include <internal_statvfs.h>
24#include <time.h>
25#include <kernel_stat.h>
08c9a553 26
47b33891
RM
27/* Return information about the filesystem on which FILE resides. */
28int
87d2f3f0 29__statvfs64 (const char *file, struct statvfs64 *buf)
47b33891 30{
08c9a553 31 struct statfs64 fsbuf;
52f527d6
AZ
32 if (__statfs64 (file, &fsbuf) < 0)
33 return -1;
08c9a553 34
52f527d6 35 /* Convert the result. */
1566d3c4 36 __internal_statvfs64 (buf, &fsbuf);
08c9a553 37
52f527d6 38 return 0;
47b33891 39}
87d2f3f0 40weak_alias (__statvfs64, statvfs64)
52f527d6
AZ
41
42#undef __statvfs
43#undef statvfs
44
45#if STATFS_IS_STATFS64
46weak_alias (__statvfs64, __statvfs)
47weak_alias (__statvfs64, statvfs)
48#endif