summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fstab.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-01-04 19:28:32 +0000
committerneel <neel@FreeBSD.org>2013-01-04 19:28:32 +0000
commit38ad3ee53626ccab6f22009b0723f2fb7903ecc1 (patch)
tree9981bd6a02de01af545d4aff19c0afbef003cfe5 /lib/libc/gen/fstab.c
parent736fc919674c3c284d5611e7e9b572385c4dbc0e (diff)
parent661fe3468922dc71771a1f31a3562d73f41c4374 (diff)
downloadFreeBSD-src-38ad3ee53626ccab6f22009b0723f2fb7903ecc1.zip
FreeBSD-src-38ad3ee53626ccab6f22009b0723f2fb7903ecc1.tar.gz
IFC @ r244983.
Diffstat (limited to 'lib/libc/gen/fstab.c')
-rw-r--r--lib/libc/gen/fstab.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
index b68db2e..6a77abd 100644
--- a/lib/libc/gen/fstab.c
+++ b/lib/libc/gen/fstab.c
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <errno.h>
-#include <fcntl.h>
#include <fstab.h>
#include <paths.h>
#include <stdio.h>
@@ -255,8 +254,6 @@ getfsfile(const char *name)
int
setfsent(void)
{
- int fd;
-
if (_fs_fp) {
rewind(_fs_fp);
LineNo = 0;
@@ -268,18 +265,11 @@ setfsent(void)
else
setfstab(getenv("PATH_FSTAB"));
}
- fd = _open(path_fstab, O_RDONLY | O_CLOEXEC);
- if (fd == -1) {
- error(errno);
- return (0);
- }
- _fs_fp = fdopen(fd, "r");
- if (_fs_fp != NULL) {
+ if ((_fs_fp = fopen(path_fstab, "re")) != NULL) {
LineNo = 0;
return (1);
}
error(errno);
- _close(fd);
return (0);
}
OpenPOWER on IntegriCloud