1RFIO_STATFS(3)              Rfio Library Functions              RFIO_STATFS(3)
2
3
4

NAME

6       rfio_statfs - get information about a mounted filesystem
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "rfio_api.h"
11
12       int rfio_statfs (const char *path, struct rfstatfs *statfsbuf);
13
14       Under Linux, for large files:
15       #define _LARGEFILE64_SOURCE
16       #include <sys/types.h>
17       #include "rfio_api.h"
18
19       int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);
20
21       For large files, under other systems:
22       #include <sys/types.h>
23       #include "rfio_api.h"
24
25       int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);
26

DESCRIPTION

28       rfio_statfs gets information about a mounted filesystem.
29
30       path    specifies  the  logical pathname relative to the current direc‐
31               tory or the full pathname of any file in this filesystem.
32
33       statfsbuf
34               is a pointer to a rfstatfs structure:
35               struct rfstatfs {
36                       long totblks  ;      /* Total number of blocks       */
37                       long freeblks ;      /* Number of free blocks        */
38                       long bsize    ;      /* Block size                   */
39                       long totnods  ;      /* Total number of inodes       */
40                       long freenods ;      /* Number of free inodes        */
41               };
42               struct rfstatfs64 {
43                       signed64 totblks  ;  /* Total number of blocks       */
44                       signed64 freeblks ;  /* Number of free blocks        */
45                       long bsize        ;  /* Block size                   */
46                       signed64 totnods  ;  /* Total number of inodes       */
47                       signed64 freenods ;  /* Number of free inodes        */
48               };
49
50       The 64 bits function must be used for large  filesystems.  It  has  the
51       same  syntax  as  the normal statfs function except that it uses a rfs‐
52       tatfs64 structure.
53

RETURN VALUE

55       This routine returns 0 if the operation was successful  or  -1  if  the
56       operation failed. In the latter case, serrno is set appropriately.
57

ERRORS

59       ENOENT       The named file/directory does not exist or is a null path‐
60                    name.
61
62       EACCES       Search permission is denied on a  component  of  the  path
63                    prefix.
64
65       EFAULT       path or statfsbuf is a NULL pointer.
66
67       ENOTDIR      A component of path prefix is not a directory.
68
69       ENAMETOOLONG The  length of path exceeds CA_MAXPATHLEN or the length of
70                    a path component exceeds CA_MAXNAMELEN.
71
72       SENOSHOST    Host unknown.
73
74       SENOSSERV    Service unknown.
75
76       SECOMERR     Communication error.
77

SEE ALSO

79       Castor_limits(4)
80

AUTHOR

82       LCG Grid Deployment Team
83
84
85
86LCG                      $Date: 2005/09/20 12:07:09 $           RFIO_STATFS(3)
Impressum