Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



          SYSFS(2)             INTERACTIVE UNIX System             SYSFS(2)



          NAME
               sysfs - get file system type information

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

               int sysfs (opcode, fsname)
               int opcode;
               char *fsname;

               int sysfs (opcode, fs_index, buf)
               int opcode;
               int fs_index;
               char *buf;

               int sysfs (opcode)
               int opcode;

          DESCRIPTION
               The sysfs system call  returns information about the file
               system types configured in the system. The number of argu-
               ments accepted by sysfs varies and depends on the opcode.
               The currently recognized opcodes and their functions are
               described below:

               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 as defined in
                              <sys/fstyp.h>.

               GETNFSTYP      returns the total number of file system types
                              configured in the system.

               The sysfs system call will fail if one or more of the fol-
               lowing is true:

               [EINVAL]       Fsname points to an invalid file-system iden-
                              tifier; fs_index is zero, or invalid; opcode
                              is invalid.

               [EFAULT]       Buf or fsname point to an invalid user
                              address.

          DIAGNOSTICS
               Upon successful completion, sysfs returns the file-system
               type index if the opcode is GETFSIND, a value of 0 if the


          Rev. C Software Development Set                            Page 1





          SYSFS(2)             INTERACTIVE UNIX System             SYSFS(2)



               opcode is GETFSTYP, or the number of file system types con-
               figured if the opcode is GETNFSTYP.  Otherwise, a value of
               -1 is returned, and errno is set to indicate the error.




















































          Rev. C Software Development Set                            Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026