text
stringlengths 0
234
|
---|
one of the five strings "rw", "rq", "ro", "sw", "xx"
|
(read-write, read-write with quota, read-only, swap, ignore).
|
.pp
|
the function
|
.br setfsent ()
|
opens the file when required and positions it at the first line.
|
.pp
|
the function
|
.br getfsent ()
|
parses the next line from the file.
|
(after opening it when required.)
|
.pp
|
the function
|
.br endfsent ()
|
closes the file when required.
|
.pp
|
the function
|
.br getfsspec ()
|
searches the file from the start and returns the first entry found
|
for which the
|
.i fs_spec
|
field matches the
|
.i special_file
|
argument.
|
.pp
|
the function
|
.br getfsfile ()
|
searches the file from the start and returns the first entry found
|
for which the
|
.i fs_file
|
field matches the
|
.i mount_point
|
argument.
|
.sh return value
|
upon success, the functions
|
.br getfsent (),
|
.br getfsfile (),
|
and
|
.br getfsspec ()
|
return a pointer to a
|
.ir "struct fstab" ,
|
while
|
.br setfsent ()
|
returns 1.
|
upon failure or end-of-file, these functions return null and 0, respectively.
|
.\" .sh history
|
.\" the
|
.\" .br getfsent ()
|
.\" function appeared in 4.0bsd; the other four functions appeared in 4.3bsd.
|
.sh attributes
|
for an explanation of the terms used in this section, see
|
.br attributes (7).
|
.ad l
|
.nh
|
.ts
|
allbox;
|
lb lb lbx
|
l l l.
|
interface attribute value
|
t{
|
.br endfsent (),
|
.br setfsent ()
|
t} thread safety t{
|
mt-unsafe race:fsent
|
t}
|
t{
|
.br getfsent (),
|
.br getfsspec (),
|
.br getfsfile ()
|
t} thread safety t{
|
mt-unsafe race:fsent locale
|
t}
|
.te
|
.hy
|
.ad
|
.sp 1
|
.sh conforming to
|
these functions are not in posix.1.
|
several operating systems have them, for example,
|
*bsd, sunos, digital unix, aix (which also has a
|
.br getfstype ()).
|
hp-ux has functions of the same names,
|
that however use a
|
.ir "struct checklist"
|
instead of a
|
.ir "struct fstab" ,
|
and calls these functions obsolete, superseded by
|
.br getmntent (3).
|
.sh notes
|
these functions are not thread-safe.
|
.pp
|
since linux allows mounting a block special device in several places,
|
and since several devices can have the same mount point, where the
|
last device with a given mount point is the interesting one,
|
while
|
.br getfsfile ()
|
and
|
.br getfsspec ()
|
only return the first occurrence, these two functions are not suitable
|
for use under linux.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.