.\" Modified 2001-03-22 by aeb
.\" Modified 2003-08-04 by aeb
.\"
-.TH USTAT 2 2003-08-04 "Linux" "Linux Programmer's Manual"
+.TH USTAT 2 2019-03-06 "Linux" "Linux Programmer's Manual"
.SH NAME
-ustat \- get file system statistics
+ustat \- get filesystem statistics
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
-.br
.BR "#include <unistd.h>" " /* libc[45] */"
-.br
.BR "#include <ustat.h>" " /* glibc2 */"
-.sp
+.PP
.BI "int ustat(dev_t " dev ", struct ustat *" ubuf );
.fi
.SH DESCRIPTION
.BR ustat ()
-returns information about a mounted file system.
+returns information about a mounted filesystem.
.I dev
is a device number identifying a device containing
-a mounted file system.
+a mounted filesystem.
.I ubuf
-is a pointer to a \fIustat\fP structure that contains the following
+is a pointer to a
+.I ustat
+structure that contains the following
members:
+.PP
.in +4n
-.nf
-
+.EX
daddr_t f_tfree; /* Total free blocks */
ino_t f_tinode; /* Number of free inodes */
char f_fname[6]; /* Filsys name */
char f_fpack[6]; /* Filsys pack name */
-.fi
+.EE
.in
.PP
The last two fields,
and
.IR f_fpack ,
are not implemented and will
-always be filled with null bytes (\(aq\\0\(aq).
+always be filled with null bytes (\(aq\e0\(aq).
.SH RETURN VALUE
On success, zero is returned and the
.I ustat
.TP
.B EINVAL
.I dev
-does not refer to a device containing a mounted file system.
+does not refer to a device containing a mounted filesystem.
.TP
.B ENOSYS
-The mounted file system referenced by
+The mounted filesystem referenced by
.I dev
does not support this operation, or any version of Linux before
1.3.16.
+.SH VERSIONS
+Since version 2.28, glibc no longer provides a wrapper for this system call.
.SH CONFORMING TO
SVr4.
.\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
.\" but has no ENOSYS condition.
.SH NOTES
.BR ustat ()
-is deprecated and has only been provided for compatibility.
+is deprecated and has been provided only for compatibility.
All new programs should use
.BR statfs (2)
instead.
.IR f_blksize ,
that is unknown elsewhere.
HP-UX warns:
-For some file systems, the number of free inodes does not change.
-Such file systems will return \-1 in the field
+For some filesystems, the number of free inodes does not change.
+Such filesystems will return \-1 in the field
.IR f_tinode .
.\" Some software tries to use this in order to test whether the
-.\" underlying file system is NFS.
-For some file systems, inodes are dynamically allocated.
-Such file systems will return the current number of free inodes.
+.\" underlying filesystem is NFS.
+For some filesystems, inodes are dynamically allocated.
+Such filesystems will return the current number of free inodes.
.SH SEE ALSO
.BR stat (2),
.BR statfs (2)