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
|
.\" 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 to German Sun Oct 20 1996 by Patrick Rother <krd@gulu.net>
.\"
.TH STATFS 2 "20. Oktober 1996" "Linux 0.99.11" "Systemaufrufe"
.SH NAME
statfs, fstatfs \- hole Dateisystemstatistiken
.SH ÜBERSICHT
.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 BESCHREIBUNG
.N Statfs
gibt Informationen über ein aufgesetztes Dateisystem zurück.
.I Path
ist der Pfadname einer Datei in dem aufgesetzten Dateisystem.
.I Buf
ist ein Zeiger auf eine Struktur
.IR statfs ,
die wie folgt definiert ist:
.RS
.nf
struct statfs {
long f_type; /* Typ des Dateisystems (siehe unten) */
long f_bsize; /* optimale Übertragungsblockgröße */
long f_blocks; /* gesamte Datenblöcke im Dateisystem */
long f_bfree; /* freie Blöcke im Dateisystem */
long f_bavail; /* freie Blöcke verfügbar für nicht-Superuser */
long f_files; /* gesamte I-Nodes im Dateisystem */
long f_ffree; /* freie I-Nodes im Dateisystem */
fsid_t f_fsid; /* Dateisystemkennung */
long f_namelen; /* maximale Dateinamenlänge */
long f_spare[6]; /* Reserve */
};
Dateisystemtypen:
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 /* 30 Zeichen minix */
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
Felder, die für ein bestimmtes Dateisystem nicht definiert sind, sind
auf \-1 gesetzt.
.B Fstatfs
gibt die gleichen Informationen über eine offene Datei zurück, die über
den Deskriptor
.IR fd
definiert ist.
.SH "RÜCKGABEWERT"
Bei Erfolg wird Null zurückgegeben. Im Fehlerfall wird \-1 zurückgegeben und
.I errno
entsprechend gesetzt.
.SH FEHLER
Für
.BR statfs :
.TP
.B ENOTDIR
Eine Komponente des Pfadpräfixes von
.I Path
ist kein Verzeichnis.
.TP
.B EINVAL
.I path
enthält ein Zeichen mit dem hochwerten Bit gesetzt (z.B. Umlaute).
.TP
.B ENAMETOOLONG
Die Länge eine Komponente von
.I path
überschreitet 255 Zeichen, oder die Gesamtlänge von
.I path
überschreitet 1023 Zeichen. [Sind diese Werte korrekt für Linux??]
.TP
.B ENOENT
Die Datei, auf die sich
.I path
bezieht, existiert nicht.
.TP
.B EACCES
Sucheberechtigung existiert für eine Komponente des Pfadpräfixes von
.IR path
nicht.
.TP
.B ELOOP
Zu viele symbolische Links traten auf bei der Übersetzung von
.IR path .
.TP
.B EFAULT
.I Buf
oder
.I path
zeigt auf eine ungültige Adresse.
.TP
.B EIO
Ein E/A-Fehler trat auf während des Lesens von oder des Schreibens auf das
Dateisystem.
.PP
Für
.BR fstatfs :
.TP 0.8i
.B EBADF
.I Fd
ist kein gültiger Dateideskriptor.
.TP
.B EFAULT
.I Buf
zeigt auf eine ungültige Adresse.
.TP
.B EIO
Ein E/A-Fehler trat auf während des Lesens von oder des Schreibens auf das
Dateisystem.
.SH "SIEHE AUCH"
.BR stat (2).
|