This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: An importanta patch for glibc 2.1.1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]