sysfs(2) sysfs(2)
NAME
sysfs - get file system type information
SYNOPSIS
#include <sys/fstyp.h>
#include <sys/fsid.h>
int sysfs(int opcode, const char *fsname);
int sysfs(int opcode, int fs_index, char *buf);
int sysfs(int opcode);
DESCRIPTION
sysfs returns information about the file system types
configured in the system. The number of arguments accepted by
sysfs varies and depends on the opcode. The currently
recognized opcodes and their functions are:
GETFSIND Translate fsname, a null-terminated file-system
type identifier, into a file-system type index.
GETFSTYP Translate fs_index, a file-system type index,
into a null-terminated file-system type
identifier and write it into the buffer pointed
to by buf; this buffer must be at least of size
FSTYPSZ as defined in sys/fstyp.h.
GETNFSTYP Return the total number of file system types
configured in the system.
Return Values
On success, sysfs returns the file-system type index if the
opcode is GETFSIND, 0 if the opcode is GETFSTYP, or the number
of file system types configured if the opcode is GETNFSTYP.
On failure, sysfs returns -1 and sets errno to identify the
error.
Errors
In the following conditions, sysfs fails and sets errno to:
EINVAL fsname points to an invalid file-system
identifier; fs_index is zero, or invalid; opcode
is invalid.
EFAULT buf or fsname points to an invalid user address.
Copyright 1994 Novell, Inc. Page 1
sysfs(2) sysfs(2)
REFERENCES
fstyp(1M), mkfs(1M), vfstab(4)
Copyright 1994 Novell, Inc. Page 2