1RFIO_STATFS(3)                   Rfio      Library      Functions
2RFIO_STATFS(3)
3
4
5
6[1mNAME[0m
7       rfio_statfs ‐ get information about a mounted filesystem
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "rfio_api.h"[0m
12
13       [1mint rfio_statfs (const char *[4m[22mpath[24m[1m, struct
14rfstatfs *[4m[22mstatfsbuf[24m[1m);[0m
15
16       Under Linux, for large files:
17       [1m#define _LARGEFILE64_SOURCE[0m
18       [1m#include <sys/types.h>[0m
19       [1m#include "rfio_api.h"[0m
20
21       [1mint   rfio_statfs64  (const  char  *[4m[22mpath[24m[1m,
22struct rfstatfs64 *[4m[22mstatfsbuf[24m[1m);[0m
23
24       For large files, under other systems:
25       [1m#include <sys/types.h>[0m
26       [1m#include "rfio_api.h"[0m
27
28       [1mint  rfio_statfs64  (const  char   *[4m[22mpath[24m[1m,
29struct rfstatfs64 *[4m[22mstatfsbuf[24m[1m);[0m
30
31[1mDESCRIPTION[0m
32       [1mrfio_statfs   [22mgets   information  about  a  mounted
33filesystem.
34
35       [4mpath[24m    specifies  the  logical  pathname  relative
36to the current direc‐
37               tory  or  the  full  pathname  of any file in this
38filesystem.
39
40       [4mstatfsbuf[0m
41               is a pointer to a rfstatfs structure:
42               struct rfstatfs {
43                       long totblks  ;      /*  Total  number  of
44blocks       */
45                       long  freeblks  ;       /*  Number of free
46blocks        */
47                       long  bsize     ;        /*   Block   size
48*/
49                       long  totnods   ;       /* Total number of
50inodes       */
51                       long freenods ;      /* Number of free in‐
52odes        */
53               };
54               struct rfstatfs64 {
55                       signed64  totblks   ;   /* Total number of
56blocks       */
57                       signed64 freeblks ;   /*  Number  of  free
58blocks        */
59                       long   bsize          ;    /*  Block  size
60*/
61                       signed64 totnods  ;  /*  Total  number  of
62inodes       */
63                       signed64 freenods ;  /* Number of free in‐
64odes        */
65               };
66
67       The 64 bits function must be used for large   filesystems.
68It  has  the
69       same   syntax   as  the normal statfs function except that
70it uses a [1mrfs‐[0m
71       [1mtatfs64 [22mstructure.
72
73[1mRETURN VALUE[0m
74       This routine returns 0 if the operation was successful  or
75‐1  if  the
76       operation failed. In the latter case, [1mserrno [22mis set
77appropriately.
78
79[1mERRORS[0m
80       [1mENOENT       [22mThe named file/directory does not  ex‐
81ist or is a null path‐
82                    name.
83
84       [1mEACCES       [22mSearch permission is denied on a  com‐
85ponent  of  the  [4mpath[0m
86                    prefix.
87
88       [1mEFAULT       [4m[22mpath[24m or [4mstatfsbuf[24m  is  a
89NULL pointer.
90
91       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
92not a directory.
93
94       [1mENAMETOOLONG [22mThe   length  of  [4mpath[24m  exceeds
95[1mCA_MAXPATHLEN [22mor the length of
96                    a  [4mpath[24m  component  exceeds [1mCA_MAX‐
97NAMELEN[22m.
98
99       [1mSENOSHOST    [22mHost unknown.
100
101       [1mSENOSSERV    [22mService unknown.
102
103       [1mSECOMERR     [22mCommunication error.
104
105[1mSEE ALSO[0m
106       [1mCastor_limits(4)[0m
107
108[1mAUTHOR[0m
109       [1mLCG Grid Deployment [22mTeam
110
111
112
113LCG                         $Date:    2005/09/20    12:07:09    $
114RFIO_STATFS(3)
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum