1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* sysdeps/unix/sysv/linux/fstatvfs.c: Move actual code in...
	* sysdeps/unix/sysv/linux/internal_statvfs.c: ...here.  New file.
	* sysdeps/unix/sysv/linux/statvfs.c: Don't use fstatvfs since the
	open call would require read permission.
	Patch by James Antill <james@and.org>.

	* sysdeps/unix/sysv/linux/Dist: Add internal_fnmatch.c.

	* inet/getnameinfo.c: Terminate host name for NI_NOFQDN.
	PR1515.  Patches by Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>.
This commit is contained in:
Ulrich Drepper
2000-01-18 10:17:32 +00:00
parent 3a47453d29
commit 6e9b72d3ab
6 changed files with 123 additions and 97 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1998 Free Software Foundation, Inc.
/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@ -26,21 +26,15 @@
int
statvfs (const char *file, struct statvfs *buf)
{
int save_errno;
int retval;
int fd;
struct statfs fsbuf;
struct stat st;
fd = __open (file, O_RDONLY);
if (fd < 0)
/* Get as much information as possible from the system. */
if (__statfs (fd, &fsbuf) < 0)
return -1;
/* Let fstatvfs do the real work. */
retval = fstatvfs (fd, buf);
/* Close the file while preserving the error number. */
save_errno = errno;
__close (fd);
__set_errno (save_errno);
return retval;
#include "internal_statvfs.c"
/* We signal success if the statfs call succeeded. */
return 0;
}