diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2013-04-17 09:46:27 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2013-04-17 09:46:27 +0200 |
commit | 0ca43761e7ed260055c692d7f2cf804bcaa647b3 (patch) | |
tree | 2901eeebc3bb0af27209939451267ada7b60b4a0 /TODO | |
parent | 80208e2c59fc426e2dc2ea4c9af2fa7f064a3331 (diff) | |
download | pgfuse-0ca43761e7ed260055c692d7f2cf804bcaa647b3.tar.gz pgfuse-0ca43761e7ed260055c692d7f2cf804bcaa647b3.tar.bz2 |
some code rearrangments around statfs functions
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 29 |
1 files changed, 0 insertions, 29 deletions
@@ -2,35 +2,6 @@ TODO list (in order of priority) --------- - integrate statfs patch: - -The real df -k: - -#include <mntent.h> -#include <stdio.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/vfs.h> -#include <unistd.h> - -int main(void) { - FILE* mtab = setmntent("/etc/mtab", "r"); - struct mntent* m; - struct mntent mnt; - char strings[4096]; - while ((m = getmntent_r(mtab, &mnt, strings, sizeof(strings)))) { - struct statfs fs; - if ((mnt.mnt_dir != NULL) && (statfs(mnt.mnt_dir, &fs) == 0)) { - unsigned long long int size = fs.f_blocks * fs.f_bsize; - unsigned long long int free = fs.f_bfree * fs.f_bsize; - unsigned long long int avail = fs.f_bavail * fs.f_bsize; - printf("%s %s size=%lld free=%lld avail=%lld\n", - mnt.mnt_fsname, mnt.mnt_dir, size, free, avail); - } - } - - endmntent(mtab); -} - - no Perl, Shell, Posix df dependency - handling of most file system metadata - ownership: how is this done depending on |