Back to index

glibc  2.9
statfs.h
Go to the documentation of this file.
00001 /* Definition of `struct statfs', information about a filesystem.
00002    Copyright (C) 1996, 97, 98, 2000 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _SYS_STATFS_H
00021 # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
00022 #endif
00023 
00024 #include <bits/types.h>
00025 
00026 /* GNU Hurd NOTE: The size of this structure (16 ints) is known in
00027    <hurd/hurd_types.defs>, since it is used in the `file_statfs' RPC.  MiG
00028    does not cope at all well with the passed C structure not being of the
00029    expected size.  There are some filler words at the end to allow for
00030    future expansion.  To increase the size of the structure used in the RPC
00031    and retain binary compatibility, we would need to assign a new message
00032    number.
00033 
00034    Note also that `struct statvfs' in <bits/statvfs.h> is laid out
00035    identically to `struct statfs', so they can be used interchangeably.
00036    Any changes made here must also be made in that file.  */
00037 
00038 struct statfs
00039   {
00040     unsigned int f_type;
00041     unsigned int f_bsize;
00042 #ifndef __USE_FILE_OFFSET64
00043     __fsblkcnt_t f_blocks;
00044     __fsblkcnt_t f_bfree;
00045     __fsblkcnt_t f_bavail;
00046     __fsblkcnt_t f_files;
00047     __fsblkcnt_t f_ffree;
00048 #else
00049     __fsblkcnt64_t f_blocks;
00050     __fsblkcnt64_t f_bfree;
00051     __fsblkcnt64_t f_bavail;
00052     __fsblkcnt64_t f_files;
00053     __fsblkcnt64_t f_ffree;
00054 #endif
00055     __fsid_t f_fsid;
00056     unsigned int f_namelen;
00057 #ifndef __USE_FILE_OFFSET64
00058     __fsfilcnt_t f_favail;
00059 #else
00060     __fsfilcnt64_t f_favail;
00061 #endif
00062     unsigned int f_frsize;
00063     unsigned int f_flag;
00064     unsigned int f_spare[3];
00065   };
00066 
00067 #ifdef __USE_LARGEFILE64
00068 struct statfs64
00069   {
00070     unsigned int f_type;
00071     unsigned int f_bsize;
00072     __fsblkcnt64_t f_blocks;
00073     __fsblkcnt64_t f_bfree;
00074     __fsblkcnt64_t f_bavail;
00075     __fsblkcnt64_t f_files;
00076     __fsblkcnt64_t f_ffree;
00077     __fsid_t f_fsid;
00078     unsigned int f_namelen;
00079     __fsfilcnt64_t f_favail;
00080     unsigned int f_frsize;
00081     unsigned int f_flag;
00082     unsigned int f_spare[3];
00083   };
00084 #endif
00085 
00086 /* Tell code we have this member.  */
00087 #define _STATFS_F_NAMELEN