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, 1997 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 struct statfs
00035   {
00036     unsigned int f_type;
00037     unsigned int f_bsize;
00038 #ifndef __USE_FILE_OFFSET64
00039     __fsblkcnt_t f_blocks;
00040     __fsblkcnt_t f_bfree;
00041     __fsblkcnt_t f_bavail;
00042     __fsblkcnt_t f_files;
00043     __fsblkcnt_t f_ffree;
00044 #else
00045     __fsblkcnt64_t f_blocks;
00046     __fsblkcnt64_t f_bfree;
00047     __fsblkcnt64_t f_bavail;
00048     __fsblkcnt64_t f_files;
00049     __fsblkcnt64_t f_ffree;
00050 #endif
00051     __fsid_t f_fsid;
00052     unsigned int f_namelen;
00053     unsigned int f_spare[6];
00054   };
00055 
00056 #ifdef __USE_LARGEFILE64
00057 struct statfs64
00058   {
00059     unsigned int f_type;
00060     unsigned int f_bsize;
00061     __fsblkcnt64_t f_blocks;
00062     __fsblkcnt64_t f_bfree;
00063     __fsblkcnt64_t f_bavail;
00064     __fsblkcnt64_t f_files;
00065     __fsblkcnt64_t f_ffree;
00066     __fsid_t f_fsid;
00067     unsigned int f_namelen;
00068     unsigned int f_spare[6];
00069   };
00070 #endif