~ubuntu-branches/ubuntu/saucy/manpages/saucy

« back to all changes in this revision

Viewing changes to man2/statfs.2

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-10-30 17:16:44 UTC
  • mfrom: (1.1.43 upstream) (2.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20101030171644-keybyul2o3qsj4r3
Tags: 3.25-1ubuntu1
* Merge from debian unstable (LP: #668739), remaining changes:
  - prctl.2: add notes about PR_SET_PTRACER, specific to Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
.\" Modified 2003-08-17 by Walter Harms
24
24
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
25
25
.\"
26
 
.TH STATFS 2 2004-06-23 "Linux" "Linux Programmer's Manual"
 
26
.TH STATFS 2 2010-06-13 "Linux" "Linux Programmer's Manual"
27
27
.SH NAME
28
28
statfs, fstatfs \- get file system statistics
29
29
.SH SYNOPSIS
45
45
 
46
46
.in +4n
47
47
.nf
 
48
#if __WORDSIZE == 32            /* System word size */
 
49
# define __UWORD_TYPE           unsigned int
 
50
#else /* __WORDSIZE == 64 */
 
51
# define __SWORD_TYPE           long int
 
52
#endif
 
53
 
48
54
struct statfs {
49
 
   long    f_type;     /* type of file system (see below) */
50
 
   long    f_bsize;    /* optimal transfer block size */
51
 
   long    f_blocks;   /* total data blocks in file system */
52
 
   long    f_bfree;    /* free blocks in fs */
53
 
   long    f_bavail;   /* free blocks avail to unprivileged user */
54
 
   long    f_files;    /* total file nodes in file system */
55
 
   long    f_ffree;    /* free file nodes in fs */
56
 
   fsid_t  f_fsid;     /* file system id */
57
 
   long    f_namelen;  /* maximum length of filenames */
 
55
    __SWORD_TYPE f_type;    /* type of file system (see below) */
 
56
    __SWORD_TYPE f_bsize;   /* optimal transfer block size */
 
57
    fsblkcnt_t   f_blocks;  /* total data blocks in file system */
 
58
    fsblkcnt_t   f_bfree;   /* free blocks in fs */
 
59
    fsblkcnt_t   f_bavail;  /* free blocks available to
 
60
                               unprivileged user */
 
61
    fsfilcnt_t   f_files;   /* total file nodes in file system */
 
62
    fsfilcnt_t   f_ffree;   /* free file nodes in fs */
 
63
    fsid_t       f_fsid;    /* file system id */
 
64
    __SWORD_TYPE f_namelen; /* maximum length of filenames */
 
65
    __SWORD_TYPE f_frsize;  /* fragment size (since Linux 2.6) */
 
66
    __SWORD_TYPE f_spare[5];
58
67
};
59
68
 
60
69
File system types:
73
82
   EXT2_OLD_SUPER_MAGIC  0xEF51
74
83
   EXT2_SUPER_MAGIC      0xEF53
75
84
   EXT3_SUPER_MAGIC      0xEF53
 
85
   EXT4_SUPER_MAGIC      0xEF53
76
86
   HFS_SUPER_MAGIC       0x4244
77
87
   HPFS_SUPER_MAGIC      0xF995E849
78
88
   HUGETLBFS_MAGIC       0x958458f6
235
245
contains some random stuff such that the pair
236
246
.RI ( f_fsid , ino )
237
247
uniquely determines a file.
238
 
Some OSes use (a variation on) the device number, or the device number
 
248
Some operating systems use (a variation on) the device number, or the device number
239
249
combined with the file-system type.
240
250
Several OSes restrict giving out the
241
251
.I f_fsid
253
263
.BR statvfs (2),
254
264
.BR path_resolution (7)
255
265
.SH COLOPHON
256
 
This page is part of release 3.24 of the Linux
 
266
This page is part of release 3.25 of the Linux
257
267
.I man-pages
258
268
project.
259
269
A description of the project,