Back to index

nordugrid-arc-nox  1.1.0~rc6
fsusage.h
Go to the documentation of this file.
00001 /* fsusage.h -- declarations for file system space usage info
00002 
00003    Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005, 2006 Free Software
00004    Foundation, Inc.
00005 
00006    This program is free software: you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 /* Space usage statistics for a file system.  Blocks are 512-byte. */
00020 
00021 #if !defined FSUSAGE_H_
00022 # define FSUSAGE_H_
00023 
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027 
00028 #include <inttypes.h>
00029 #include <stdbool.h>
00030 
00031 struct fs_usage
00032 {
00033   uintmax_t fsu_blocksize;  /* Size of a block.  */
00034   uintmax_t fsu_blocks;            /* Total blocks. */
00035   uintmax_t fsu_bfree;             /* Free blocks available to superuser. */
00036   uintmax_t fsu_bavail;            /* Free blocks available to non-superuser. */
00037   bool fsu_bavail_top_bit_set;     /* 1 if fsu_bavail represents a value < 0.  */
00038   uintmax_t fsu_files;             /* Total file nodes. */
00039   uintmax_t fsu_ffree;             /* Free file nodes. */
00040 };
00041 
00042 int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp);
00043 
00044 #ifdef __cplusplus
00045  }
00046 #endif
00047 #endif