summaryrefslogtreecommitdiff
path: root/src/shared/path-util.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-05-29 17:13:12 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2015-05-29 17:42:44 +0200
commite26d6ce517a49c246141ed20528614823c2f5799 (patch)
tree1c69999b21f15b189c3e7d21fb5dd766bf75835b /src/shared/path-util.c
parent5d409034017e9f9f8c4392157d95511fc2e05d87 (diff)
path-util: Change path_is_mount_point() symlink arg from bool to flags
This makes path_is_mount_point() consistent with fd_is_mount_point() wrt. flags.
Diffstat (limited to 'src/shared/path-util.c')
-rw-r--r--src/shared/path-util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 8be479cd7f..be50a1865d 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -637,7 +637,8 @@ fallback_fstat:
return check_st_dev && (a.st_dev != b.st_dev);
}
-int path_is_mount_point(const char *t, bool allow_symlink) {
+/* flags can be AT_SYMLINK_FOLLOW or 0 */
+int path_is_mount_point(const char *t, int flags) {
_cleanup_close_ int fd = -1;
_cleanup_free_ char *parent = NULL;
int r;
@@ -655,7 +656,7 @@ int path_is_mount_point(const char *t, bool allow_symlink) {
if (fd < 0)
return -errno;
- return fd_is_mount_point(fd, basename(t), (allow_symlink ? AT_SYMLINK_FOLLOW : 0));
+ return fd_is_mount_point(fd, basename(t), flags);
}
int path_is_read_only_fs(const char *path) {