Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

sysfs - get information on file system type (extension)

&pagelevel(4)&pagelevel

Syntax

#include <sys/fstyp.h>
#include <sys/fsid.h>

int sysfs(int opcode[, const char *fsname]| [, int fs_index, char *buf]); 

Description

sysfs() returns information on the file system types configured in the system. The number of arguments accepted by sysfs() depends on the value of opcode.

The following values for opcode are accepted in the C runtime system:

 

GETFSIND

Translates fsname, a null-terminated file-system identifier, into a file-system type index.

 

GETFSTYP

Translates fs_index, a file-system type index, into a null-terminated file-system identifier and writes it into the buffer pointed to by buf. This buffer must be at least of size FSTYPSZ (see sys/fstyp.h).

 

GETNFSTYP

Returns the total number of file system types configured in the system.

Return val.

File system type index



if opcode is GETFSIND; upon successful completion.


0

if opcode is GETFSTYP; upon successful completion.


Number of file system types configured



if opcode is GETNFSTYP; upon successful completion.


-1

if unsuccessful. errno is set to indicate the error.

Errors

sysfs() will fail if:

EINVAL

fsname points to an invalid file-system identifier; fs_index is zero or invalid
or opcode is invalid
or an attempt was made to access a BS2000 file.

EFAULT

buf or fsname points outside the allocated address space for the process.

Notes

sysfs() is executed only for POSIX files. 

See also

sys/fstyp.h, sys/fsid.h.