summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-11 13:35:24 -0400
committerDaniel Mack <github@zonque.org>2015-07-11 13:35:24 -0400
commit0dc705bee2dddfa093b47e5459f2c6dac37033c0 (patch)
tree93a9722a58b9c98bfe03ccc99f2c7606e0ba5e0e /src/basic
parent49aa7ab6e1aa558ec96a49218993e25f1b82c703 (diff)
parent10c03e9e82258fee9a9af4c4eacdc4af1e52680c (diff)
Merge pull request #552 from poettering/path-is-mount-point-simplification
basic: simplify path_is_mount_point() a bit
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/path-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index 8f49d65266..5cbfc145a4 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -656,9 +656,11 @@ int path_is_mount_point(const char *t, int flags) {
canonical = canonicalize_file_name(t);
if (!canonical)
return -errno;
+
+ t = canonical;
}
- r = path_get_parent(canonical ?: t, &parent);
+ r = path_get_parent(t, &parent);
if (r < 0)
return r;
@@ -666,7 +668,7 @@ int path_is_mount_point(const char *t, int flags) {
if (fd < 0)
return -errno;
- return fd_is_mount_point(fd, basename(canonical ?: t), flags);
+ return fd_is_mount_point(fd, basename(t), flags);
}
int path_is_read_only_fs(const char *path) {