1
0
Files
irix-657m-src/eoe/man/man2/sysfs.2
2022-09-29 17:59:04 +03:00

60 lines
2.0 KiB
Groff

'\"macro stdmacro
.if n .pH g2.sysfs @(#)sysfs 40.13 of 1/3/91
.\" Copyright 1991 UNIX System Laboratories, Inc.
.\" Copyright 1989, 1990 AT&T
.nr X
.if \nX=0 .ds x} sysfs 2 "" "" "\&"
.if \nX=1 .ds x} sysfs 2 "" ""
.if \nX=2 .ds x} sysfs 2 "" "" "\&"
.if \nX=3 .ds x} sysfs 2 "" "" "\&"
.TH \*(x}
.SH NAME
\f4sysfs\f1 \- get file system type information
.SH SYNOPSIS
\f4#include <sys/fstyp.h>\f1
.br
\f4#include <sys/fsid.h>\f1
.PP
\f4int sysfs(int opcode, const char \(**fsname);\f1
.PP
\f4int sysfs(int opcode, int fs_index, char \(**buf);\f1
.PP
\f4int sysfs(int opcode);\f1
.SH DESCRIPTION
\f4sysfs\fP returns information about the file system types configured
in the system. The number of arguments accepted by \f4sysfs\fP varies and
depends on the \f2opcode\f1.
The currently recognized \f2opcodes\f1 and their functions are:
.TP 14
\f4GETFSIND\f1
Translate \f2fsname\f1, a null-terminated file-system type identifier,
into a file-system type index.
.TP
\f4GETFSTYP\f1
Translate \f2fs_index\f1, a file-system type index, into a null-terminated
file-system type identifier and write it into the buffer pointed to by \f2buf\f1;
this buffer must be at least of size \f4FSTYPSZ\f1 as defined in
\f4<sys/fstyp.h>\f1.
.TP
\f4GETNFSTYP\f1
Return the total number of file system types configured in
the system.
.PP
\f4sysfs\fP fails if one or more of the following are true:
.TP 14
\f4EINVAL\fP
\f2fsname\f1 points to an invalid file-system identifier; \f2fs_index\f1 is
zero, or invalid; \f2opcode\f1 is invalid.
.TP
\f4EFAULT\fP
\f2buf\f1 or \f2fsname\f1 points to an invalid user address.
.SH BUGS
\f4sysfs\fP does not recognize user-mode file systems such as dos or iso9660.
.SH DIAGNOSTICS
Upon successful completion, \f4sysfs\fP returns the file-system type index if
the \f2opcode\f1 is \f4GETFSIND\f1, a value of 0 if the \f2opcode\f1 is
\f4GETFSTYP\f1, or the number of file system types configured if the
\f2opcode\f1 is \f4GETNFSTYP\f1. Otherwise, a value of \-1 is returned
and \f4errno\f1 is set to indicate the error.
.Ee