protux-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Protux-devel] help on disk free detection


From: tapio laxström
Subject: Re: [Protux-devel] help on disk free detection
Date: Fri, 25 Jul 2003 10:23:37 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Since we currently work only on linux, how about statfs:

---clip from man statfs---

NAME
       statfs, fstatfs - get file system statistics

SYNOPSIS
       #include <sys/vfs.h>

       int statfs(const char *path, struct statfs *buf);
       int fstatfs(int fd, struct statfs *buf);

DESCRIPTION
statfs returns information about a mounted file system. path is the path name of any file within the mounted filesystem. buf is a pointer
       to a statfs structure defined as follows:

              struct statfs {
                 long    f_type;     /* type of filesystem (see below) */
                 long    f_bsize;    /* optimal transfer block size */
                 long    f_blocks;   /* total data blocks in file system */
                 long    f_bfree;    /* free blocks in fs */
long f_bavail; /* free blocks avail to non-superuser */
                 long    f_files;    /* total file nodes in file system */
                 long    f_ffree;    /* free file nodes in fs */
                 fsid_t  f_fsid;     /* file system id */
                 long    f_namelen;  /* maximum length of filenames */
                 long    f_spare[6]; /* spare for later */
              };
---end clip---

--
best regards
--
tapio laxström
now playing:  - WFMU





reply via email to

[Prev in Thread] Current Thread [Next in Thread]