diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-04-07 12:55:00 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-04-07 12:55:00 +0000 |
commit | 7c43f96140c9e0208ae1f650102cab1a120e7295 (patch) | |
tree | f0f3737571d3ceb5573b076eebbe87546958dfd0 /lib/libc/gen/getfsent.3 | |
parent | 86b0c078f70abab5140a11d0a13440d83cdce13d (diff) | |
download | FreeBSD-src-7c43f96140c9e0208ae1f650102cab1a120e7295.zip FreeBSD-src-7c43f96140c9e0208ae1f650102cab1a120e7295.tar.gz |
- Add setfstab() and getfstab().
- Use the environment variable 'PATH_FSTAB' if set rather than the
hardcoded '/etc/fstab' (fstab.h:_PATH_FSTAB)
Diffstat (limited to 'lib/libc/gen/getfsent.3')
-rw-r--r-- | lib/libc/gen/getfsent.3 | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/libc/gen/getfsent.3 b/lib/libc/gen/getfsent.3 index 06def9d..bbf2151 100644 --- a/lib/libc/gen/getfsent.3 +++ b/lib/libc/gen/getfsent.3 @@ -56,6 +56,10 @@ .Fn setfsent void .Ft void .Fn endfsent void +.Ft void +.Fn setfstab "const char *file" +.Ft const char * +.Fn getfstab void .Sh DESCRIPTION The .Fn getfsent , @@ -94,6 +98,18 @@ function closes the file. .Pp The +.Fn setfstab +function sets the file to be used by subsequent operations. +The value set by +.Fn setfstab +does not persist across calls to +.Fn endfsent +.Pp +The +.Fn getfstab +function returns the name of the file that that will be used. +.Pp +The .Fn getfsspec and .Fn getfsfile @@ -128,6 +144,13 @@ The .Fn endfsent function returns nothing. +.Sh ENVIRONMENT +.Bl -tag -width PATH_FSTAB +.It Pa PATH_FSTAB +If the environment variable +.Pa PATH_FSTAB +is set all operations are performed against the specified file. +.El .Sh FILES .Bl -tag -width /etc/fstab -compact .It Pa /etc/fstab @@ -146,7 +169,13 @@ the and .Fn setfsent functions appeared in -.Bx 4.3 . +.Bx 4.3 ; +the +.Fn setfstab +and +.Fn getfstab +functions appeared in +.Fx 5.1. .Sh BUGS These functions use static data storage; if the data is needed for future use, it should be |