Back to index

glibc  2.9
statvfs.h
Go to the documentation of this file.
00001 /* Definition of `struct statvfs', information about a filesystem.
00002    Copyright (C) 1998 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_STATVFS_H
00021 # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.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 statvfs
00035   {
00036     unsigned long int f_bsize;
00037     unsigned long int f_frsize;
00038 #ifndef __USE_FILE_OFFSET64
00039     __fsblkcnt_t f_blocks;
00040     __fsblkcnt_t f_bfree;
00041     __fsblkcnt_t f_bavail;
00042     __fsfilcnt_t f_files;
00043     __fsfilcnt_t f_ffree;
00044     __fsfilcnt_t f_favail;
00045 #else
00046     __fsblkcnt64_t f_blocks;
00047     __fsblkcnt64_t f_bfree;
00048     __fsblkcnt64_t f_bavail;
00049     __fsfilcnt64_t f_files;
00050     __fsfilcnt64_t f_ffree;
00051     __fsfilcnt64_t f_favail;
00052 #endif
00053     __fsid_t f_fsid;
00054     unsigned long int f_flag;
00055     unsigned long int f_namemax;
00056     unsigned int f_spare[6];
00057   };
00058 
00059 #ifdef __USE_LARGEFILE64
00060 struct statvfs64
00061   {
00062     unsigned long int f_bsize;
00063     unsigned long int f_frsize;
00064     __fsblkcnt64_t f_blocks;
00065     __fsblkcnt64_t f_bfree;
00066     __fsblkcnt64_t f_bavail;
00067     __fsfilcnt64_t f_files;
00068     __fsfilcnt64_t f_ffree;
00069     __fsfilcnt64_t f_favail;
00070     __fsid_t f_fsid;
00071     unsigned long int f_flag;
00072     unsigned long int f_namemax;
00073     unsigned int f_spare[6];
00074   };
00075 #endif
00076 
00077 /* Definitions for the flag in `f_flag'.  */
00078 enum
00079 {
00080   ST_RDONLY = 1,
00081 #define ST_RDONLY    ST_RDONLY
00082   ST_NOSUID = 2
00083 #define ST_NOSUID    ST_NOSUID
00084 };