diff options
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 |