summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-31 13:02:10 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-30 20:43:25 +0100
commita66fee2e970bd3e6ac35db2dd6e377c83093b10e (patch)
treeb3792082a10c993579f92ec1eec097e0c0aaf7fa /src
parentb12d25a8d631af00b200e7aa9dbba6ba4a4a59ff (diff)
downloadsystemd-a66fee2e970bd3e6ac35db2dd6e377c83093b10e.tar.gz
util-lib: rename fd_check_fstype to fd_is_fs_type
Let's use "is" and "fs_type" for consistency with "is_fs_type". "check" is also more ambiguous than "is".
Diffstat (limited to 'src')
-rw-r--r--src/basic/fs-util.c2
-rw-r--r--src/basic/stat-util.c4
-rw-r--r--src/basic/stat-util.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index e74e75a41c..475400177a 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -735,7 +735,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
if (fstat(child, &st) < 0)
return -errno;
if ((flags & CHASE_NO_AUTOFS) &&
- fd_check_fstype(child, AUTOFS_SUPER_MAGIC) > 0)
+ fd_is_fs_type(child, AUTOFS_SUPER_MAGIC) > 0)
return -EREMOTE;
if (S_ISLNK(st.st_mode)) {
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
index ea554f7b73..483c3363af 100644
--- a/src/basic/stat-util.c
+++ b/src/basic/stat-util.c
@@ -193,7 +193,7 @@ bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) {
return F_TYPE_EQUAL(s->f_type, magic_value);
}
-int fd_check_fstype(int fd, statfs_f_type_t magic_value) {
+int fd_is_fs_type(int fd, statfs_f_type_t magic_value) {
struct statfs s;
if (fstatfs(fd, &s) < 0)
@@ -209,7 +209,7 @@ int path_check_fstype(const char *path, statfs_f_type_t magic_value) {
if (fd < 0)
return -errno;
- return fd_check_fstype(fd, magic_value);
+ return fd_is_fs_type(fd, magic_value);
}
bool is_temporary_fs(const struct statfs *s) {
diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
index 615315f306..931f9eb7c4 100644
--- a/src/basic/stat-util.h
+++ b/src/basic/stat-util.h
@@ -57,7 +57,7 @@ int files_same(const char *filea, const char *fileb, int flags);
typedef typeof(((struct statfs*)NULL)->f_type) statfs_f_type_t;
bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) _pure_;
-int fd_check_fstype(int fd, statfs_f_type_t magic_value);
+int fd_is_fs_type(int fd, statfs_f_type_t magic_value);
int path_check_fstype(const char *path, statfs_f_type_t magic_value);
bool is_temporary_fs(const struct statfs *s) _pure_;