2006-05-18 18:05:43 -04:00
|
|
|
/* fsusage.h -- declarations for file system space usage info
|
2004-11-11 19:49:51 -05:00
|
|
|
|
2013-08-19 17:27:12 -04:00
|
|
|
Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2013 Free Software
|
2006-05-18 18:05:43 -04:00
|
|
|
Foundation, Inc.
|
2003-03-18 02:47:37 -05:00
|
|
|
|
2008-02-12 06:07:18 -05:00
|
|
|
This program is free software: you can redistribute it and/or modify
|
2003-03-18 02:47:37 -05:00
|
|
|
it under the terms of the GNU General Public License as published by
|
2008-02-12 06:07:18 -05:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
2003-03-18 02:47:37 -05:00
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2008-02-12 06:07:18 -05:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2003-03-18 02:47:37 -05:00
|
|
|
|
2006-05-18 18:05:43 -04:00
|
|
|
/* Space usage statistics for a file system. Blocks are 512-byte. */
|
2003-03-18 02:47:37 -05:00
|
|
|
|
|
|
|
|
#if !defined FSUSAGE_H_
|
|
|
|
|
# define FSUSAGE_H_
|
|
|
|
|
|
2007-01-24 17:47:25 -05:00
|
|
|
# include <stdint.h>
|
2006-05-18 18:05:43 -04:00
|
|
|
# include <stdbool.h>
|
|
|
|
|
|
2003-03-18 02:47:37 -05:00
|
|
|
struct fs_usage
|
|
|
|
|
{
|
2010-04-07 21:11:46 -04:00
|
|
|
uintmax_t fsu_blocksize; /* Size of a block. */
|
|
|
|
|
uintmax_t fsu_blocks; /* Total blocks. */
|
|
|
|
|
uintmax_t fsu_bfree; /* Free blocks available to superuser. */
|
|
|
|
|
uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */
|
|
|
|
|
bool fsu_bavail_top_bit_set; /* 1 if fsu_bavail represents a value < 0. */
|
|
|
|
|
uintmax_t fsu_files; /* Total file nodes. */
|
2018-12-08 15:51:05 -05:00
|
|
|
uintmax_t fsu_ffree; /* Free file nodes to superuser. */
|
|
|
|
|
uintmax_t fsu_favail; /* Free file nodes to non-superuser. */
|
2003-03-18 02:47:37 -05:00
|
|
|
};
|
|
|
|
|
|
2006-05-18 18:05:43 -04:00
|
|
|
int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp);
|
2003-03-18 02:47:37 -05:00
|
|
|
|
|
|
|
|
#endif
|