getvfsent(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

getvfsent(3c)

getvfsent(3C)            Standard C Library Functions            getvfsent(3C)

NAME
       getvfsent, getvfsfile, getvfsspec, getvfsany - get vfstab file entry

SYNOPSIS
       #include <stdio.h>
       #include <sys/vfstab.h>

       int getvfsent(FILE *fp, struct vfstab *vp);


       int getvfsfile(FILE *fp, struct vfstab *vp, char *file);


       int getvfsspec(FILE *fp, struct vfstab *vp, char *spec);


       int getvfsany(FILE *fp, struct vfstab *vp, struct vfstab *vref);

DESCRIPTION
       The  getvfsent(), getvfsfile(), getvfsspec(), and getvfsany() functions
       each fill in the structure pointed to by vp with the broken-out  fields
       of a line in the /etc/vfstab file. Each line in the file contains a vf‐
       stab  structure, declared in the <sys/vfstab.h> header, whose following
       members are described on the vfstab(5) manual page:

         char *vfs_special;
         char *vfs_fsckdev;
         char *vfs_mountp;
         char *vfs_fstype;
         char *vfs_fsckpass;
         char *vfs_automnt;
         char *vfs_mntopts;



       The getvfsent() function returns a pointer to the next vfstab structure
       in the file; so successive calls can be used to search the entire file.


       The getvfsfile() function searches the file referenced by  fp  until  a
       mount  point  matching  file is found and fills vp with the fields from
       the line in the file.


       The getvfsspec() function searches the file referenced by  fp  until  a
       special device matching spec is found and fills vp with the fields from
       the  line  in  the  file. The spec argument will try to match on device
       type (block or character special) and major and minor  device  numbers.
       If it cannot match in this manner, then it compares the strings.


       The  getvfsany()  function  searches  the file referenced by fp until a
       match is found between a line in the file and vref. A match  occurs  if
       all  non-null  entries  in  vref  match the corresponding fields in the
       file.


       Note that these functions do not open, close, or rewind the file.

RETURN VALUES
       If the next entry is successfully read by getvfsent()  or  a  match  is
       found  with  getvfsfile(), getvfsspec(), or getvfsany(), 0 is returned.
       If an end-of-file is encountered on reading, these functions return −1.
       If an error is encountered, a value greater than  0  is  returned.  The
       possible error values are:

       VFS_TOOLONG    A  line in the file exceeded the internal buffer size of
                      VFS_LINE_MAX.


       VFS_TOOMANY    A line in the file contains too many fields.


       VFS_TOOFEW     A line in the file contains too few fields.


FILES
       /etc/vfstab

USAGE
       These functions only report on entries in the vfstab file,  which  does
       not include ZFS filesystems with a mountpoint property set to any value
       other  than legacy, filesystems mounted by automountd(8), removable me‐
       dia filesystems mounted by rmmount(1), some  filesystems  automatically
       mounted by the kernel as part of the boot process, nor filesystems man‐
       ually mounted using the mount(8) command without a corresponding vfstab
       entry.  See  the  getmntent(3C)  manual page to retrieve information on
       such filesystems.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ MT-LevelSafe


SEE ALSO
       getmntent(3C), vfstab(5), attributes(7)

NOTES
       The members of the vfstab structure point to information contained in a
       static area, so it must be copied if it is to be saved.

HISTORY
       The  getvfsent(), getvfsfile(), getvfsspec(), and getvfsany() functions
       were introduced in Solaris 2.0.


       Solaris 1.x releases contained similar functionality in the getfsent(),
       getfsfile(), getfsspec(), and getfstype() functions, though  their  man
       page  noted that the routines were included only for compatibility with
       the 4.2 BSD release, and that they had been superseded  by  the  getmn‐
       tent(3C) functions.

Oracle Solaris 11.4               27 Aug 2025                    getvfsent(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3