text
stringlengths 0
234
|
---|
.nf |
.b #include <sys/types.h> |
.br "#include <unistd.h>" " /* libc[45] */" |
.br "#include <ustat.h>" " /* glibc2 */" |
.pp |
.bi "int ustat(dev_t " dev ", struct ustat *" ubuf ); |
.fi |
.sh description |
.br ustat () |
returns information about a mounted filesystem. |
.i dev |
is a device number identifying a device containing |
a mounted filesystem. |
.i ubuf |
is a pointer to a |
.i ustat |
structure that contains the following |
members: |
.pp |
.in +4n |
.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 */ |
.ee |
.in |
.pp |
the last two fields, |
.i f_fname |
and |
.ir f_fpack , |
are not implemented and will |
always be filled with null bytes (\(aq\e0\(aq). |
.sh return value |
on success, zero is returned and the |
.i ustat |
structure pointed to by |
.i ubuf |
will be filled in. |
on error, \-1 is returned, and |
.i errno |
is set to indicate the error. |
.sh errors |
.tp |
.b efault |
.i ubuf |
points outside of your accessible address space. |
.tp |
.b einval |
.i dev |
does not refer to a device containing a mounted filesystem. |
.tp |
.b enosys |
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 been provided only for compatibility. |
all new programs should use |
.br statfs (2) |
instead. |
.ss hp-ux notes |
the hp-ux version of the |
.i ustat |
structure has an additional field, |
.ir f_blksize , |
that is unknown elsewhere. |
hp-ux warns: |
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 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) |
.sh colophon |
this page is part of release 5.13 of the linux |
.i man-pages |
project. |
a description of the project, |
information about reporting bugs, |
and the latest version of this page, |
can be found at |
\%https://www.kernel.org/doc/man\-pages/. |
.\" copyright 2009 lefteris dimitroulakis ([email protected]) |
.\" |
.\" %%%license_start(gplv2+_doc_full) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.