This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: An importanta patch for glibc 2.1.1
- To: hjl@varesearch.com (H.J. Lu)
- Subject: Re: An importanta patch for glibc 2.1.1
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: 08 Apr 1999 14:33:08 +0200
- Cc: libc-hacker@cygnus.com (GNU C Library), gafton@redhat.com
- References: <m10UxKz-000AUPC@shanghai.varesearch.com>
hjl@varesearch.com (H.J. Lu) writes:
|> We need this patch for glibc 2.1.1.
IMHO this patch is more appriopriate. According to SunOS4 the f_bsize
member of struct statfs is the "fundamental file system block size" which
corresponds directly to f_frsize from statvfs. Any comments?
Thu Apr 8 14:29:14 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sysdeps/unix/sysv/linux/fstatvfs.c (fstatvfs): Set f_frsize, not
f_bsize, in struct statvfs from f_bsize in struct statfs.
Index: sysdeps/unix/sysv/linux/fstatvfs.c
===================================================================
RCS file: /glibc/cvsfiles/libc/sysdeps/unix/sysv/linux/fstatvfs.c,v
retrieving revision 1.7
diff -u -a -r1.7 fstatvfs.c
--- fstatvfs.c 1998/10/23 13:39:10 1.7
+++ fstatvfs.c 1999/04/08 12:31:45
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -40,7 +40,7 @@
return -1;
/* Now fill in the fields we have information for. */
- buf->f_bsize = fsbuf.f_bsize;
+ buf->f_frsize = fsbuf.f_bsize;
buf->f_blocks = fsbuf.f_blocks;
buf->f_bfree = fsbuf.f_bfree;
buf->f_bavail = fsbuf.f_bavail;
@@ -50,13 +50,13 @@
buf->f_namemax = fsbuf.f_namelen;
memset (buf->f_spare, '\0', 6 * sizeof (int));
- /* What remains to do is to fill the fields f_frsize, f_favail,
- and f_flag. */
+ /* What remains to do is to fill the fields f_bsize, f_favail, and
+ f_flag. */
switch (fsbuf.f_type)
{
case EXT2_SUPER_MAGIC:
/* This is not really correct since the fragment size can vary. */
- buf->f_frsize = 1024;
+ buf->f_bsize = 1024;
break;
case ADFS_SUPER_MAGIC:
@@ -81,7 +81,7 @@
case UFS_CIGAM:
default:
/* I hope it's safe to assume no fragmentation. */
- buf->f_frsize = buf->f_bsize;
+ buf->f_bsize = buf->f_frsize;
break;
}
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org