diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-01 17:58:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 17:58:58 +0100 |
commit | 1a2d4d70845f483bcb3f704fa092f5fd76580d31 (patch) | |
tree | 35991bc9a914c788950c09b1abb072f0b8d350fc /src/basic/mount-util.c | |
parent | NEWS: update the text a bit (#7524) (diff) | |
parent | util-lib: handle empty string in last_path_component (diff) | |
download | systemd-1a2d4d70845f483bcb3f704fa092f5fd76580d31.tar.xz systemd-1a2d4d70845f483bcb3f704fa092f5fd76580d31.zip |
Merge pull request #7237 from keszybz/growfs
Create and grow filesystems
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r-- | src/basic/mount-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c index e394e1adf3..e60750c531 100644 --- a/src/basic/mount-util.c +++ b/src/basic/mount-util.c @@ -278,6 +278,7 @@ int path_is_mount_point(const char *t, const char *root, int flags) { int r; assert(t); + assert((flags & ~AT_SYMLINK_FOLLOW) == 0); if (path_equal(t, "/")) return 1; @@ -302,7 +303,7 @@ int path_is_mount_point(const char *t, const char *root, int flags) { if (fd < 0) return -errno; - return fd_is_mount_point(fd, basename(t), flags); + return fd_is_mount_point(fd, last_path_component(t), flags); } int path_get_mnt_id(const char *path, int *ret) { |