File: statfs.2

package info (click to toggle)
manpages-es 0.4a-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 3,592 kB
  • ctags: 3
  • sloc: sh: 59; makefile: 42
file content (163 lines) | stat: -rw-r--r-- 5,379 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"     This product includes software developed by the University of
.\"     California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)statfs.2    6.5 (Berkeley) 7/23/91
.\"
.\" Modified Sat Jul 24 11:27:31 1993 by Rik Faith (faith@cs.unc.edu)
.\" Translated 6 Feb 1998 by Vicente Pastor Gmez <VPASTORG@santandersupernet.com , vicpastor@hotmail.com>
.\"
.TH STATFS 2 "24 Jul 1993" "Linux 0.99.11" "Manual del Programador Linux"
.SH NOMBRE
statfs, fstatfs \- consigue estadsticas del sistema de ficheros
.SH SINOPSIS
.B #include <sys/vfs.h>
.sp
.BI "int statfs(const char *" path ", struct statfs *" buf );
.br
.BI "int fstatfs(int " fd ", struct statfs *" buf );
.SH DESCRIPCIN
.N Statfs
devuelve informacin de un sistema de ficheros montado.
.I Path
el el camino de cualquier fichero en el sistema de ficheros montado.
.I Buf
es un puntero a una estructura
.I statfs
definida como sigue:

.RS
.nf
struct statfs {
   long    f_type;     /* tipo sistema ficheros (ver bajo) */
   long    f_bsize;    /* tamao ptimo de bloque
                          de transferencia */
   long    f_blocks;   /* total de bloques de datos en el sistema
                          de ficheros */
   long    f_bfree;    /* bloques libres en el sf */
   long    f_bavail;   /* bloques libres disponibles para
                          no-superusuarios */
   long    f_files;    /* total de nodos de ficheros en el sf */
   long    f_ffree;    /* nodos de ficheros libres en el sf */
   fsid_t  f_fsid;     /* id del sistema de ficheros */
   long    f_namelen;  /* longitud mxima de nombre de ficheros */
   long    f_spare[6]; /* de sobra, para ms tarde */
};

Tipos de sistema de ficheros:

linux/ext2_fs.h:  EXT2_OLD_SUPER_MAGIC  0xEF51
linux/ext2_fs.h:  EXT2_SUPER_MAGIC      0xEF53
linux/ext_fs.h:   EXT_SUPER_MAGIC       0x137D
linux/iso_fs.h:   ISOFS_SUPER_MAGIC     0x9660
linux/minix_fs.h: MINIX_SUPER_MAGIC     0x137F /* orig. minix */
linux/minix_fs.h: MINIX_SUPER_MAGIC2    0x138F /* minix 30 car. */
linux/minix_fs.h: NEW_MINIX_SUPER_MAGIC 0x2468 /* minix V2 */
linux/msdos_fs.h: MSDOS_SUPER_MAGIC     0x4d44
linux/nfs_fs.h:   NFS_SUPER_MAGIC       0x6969
linux/proc_fs.h:  PROC_SUPER_MAGIC      0x9fa0
linux/xia_fs.h:   _XIAFS_SUPER_MAGIC    0x012FD16D
.fi
.RE
.PP
Los campos no definidos para un sistema de ficheros particular se ponen
a \-1.
.B Fstatfs
devuelve la misma informacin sobre un fichero abierto referenciado por
el descriptor
.IR fd .
.SH "VALOR REGRESADO"
Si hubo xito se devuelve cero. Si hubo error, se devuelve \-1, y
.I errno
es actualizado apropiadamente.
.SH ERRORES
Para
.BR statfs :
.TP 0.8i
.B ENOTDIR
Un componente del camino
.I Path
no es un directorio.
.TP
.B EINVAL
.I path
contiene un caracter con el bit de orden alto a 1.
.TP
.B ENAMETOOLONG
La longitud de un componente de
.I path
excede de 255 caracteres, o la longitud de
.I path
excede de 1023 caracteres. [Nota del documentador: son vlidos estos
valores para Linux?]
.TP
.B ENOENT
El fichero al que se refiere
.I path
no existe.
.TP
.B EACCES
El permiso de bsqueda se deniega para un componente del camino
.IR path .
.TP
.B ELOOP
Se encontraron demasiados enlaces simblicos al traducir
.IR path .
.TP
.B EFAULT
.I Buf
o
.I path
apuntan a una direccin invlida.
.TP
.B EIO
Ocurri un error de E/S mientras se lea o escriba en el sistema
de ficheros.
.PP
Para
.BR fstatfs :
.TP 0.8i
.B EBADF
.I Fd
no es un descriptor de fichero vlido.
.TP
.B EFAULT
.I Buf
apunta a una direccin invlida.
.TP
.B EIO
Ocurri un error de E/S mientras se lea o escriba en el sistema
de ficheros.
.SH "CONFORMA CON"
4.4BSD.
.SH "VASE TAMBIN"
.BR stat (2)