summaryrefslogtreecommitdiffstats
path: root/libmount/src/tab_parse.c
diff options
context:
space:
mode:
authorRuediger Meier2016-02-29 12:38:58 +0100
committerKarel Zak2016-03-07 15:33:56 +0100
commit2208b3ccb298be2675cf005b761b1668f8cd576f (patch)
tree2321d7e68e87a87be24220824a47453f67a3881a /libmount/src/tab_parse.c
parenttaskset: fix description of `-c` option in the man page (diff)
downloadkernel-qcow2-util-linux-2208b3ccb298be2675cf005b761b1668f8cd576f.tar.gz
kernel-qcow2-util-linux-2208b3ccb298be2675cf005b761b1668f8cd576f.tar.xz
kernel-qcow2-util-linux-2208b3ccb298be2675cf005b761b1668f8cd576f.zip
lib: remove openat fallback functions (include/at.h)
I have validated that we are still compatible at least back to - openSUSE 11.4 - SLE 11 - RHEL/CentOS 6 - OSX 10.10.x, (Xcode 6.3) - FreeBSD 10.2 Confirmed incompatibility: - OSX 10.9.x, (Xcode 6.2) Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r--libmount/src/tab_parse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
index c67479b3b..9536ebe6b 100644
--- a/libmount/src/tab_parse.c
+++ b/libmount/src/tab_parse.c
@@ -15,6 +15,7 @@
#include <limits.h>
#include <dirent.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include "at.h"
#include "mangle.h"
@@ -753,11 +754,11 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname)
struct stat st;
FILE *f;
- if (fstat_at(dd, ".", d->d_name, &st, 0) ||
+ if (fstatat(dd, d->d_name, &st, 0) ||
!S_ISREG(st.st_mode))
continue;
- f = fopen_at(dd, ".", d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR);
+ f = fopen_at(dd, d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR);
if (f) {
mnt_table_parse_stream(tb, f, d->d_name);
fclose(f);
@@ -793,11 +794,11 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname)
struct stat st;
FILE *f;
- if (fstat_at(dirfd(dir), _PATH_MNTTAB_DIR, d->d_name, &st, 0) ||
+ if (fstatat(dirfd(dir), d->d_name, &st, 0) ||
!S_ISREG(st.st_mode))
continue;
- f = fopen_at(dirfd(dir), _PATH_MNTTAB_DIR, d->d_name,
+ f = fopen_at(dirfd(dir), d->d_name,
O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR);
if (f) {
mnt_table_parse_stream(tb, f, d->d_name);