From 2f30582bd3d00ce582d190ddb379e46e0a67f813 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 18 Nov 2016 21:35:21 +0100 Subject: tree-wide: stop using canonicalize_file_name(), use chase_symlinks() instead Let's use chase_symlinks() everywhere, and stop using GNU canonicalize_file_name() everywhere. For most cases this should not change behaviour, however increase exposure of our function to get better tested. Most importantly in a few cases (most notably nspawn) it can take the correct root directory into account when chasing symlinks. --- src/core/mount-setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/mount-setup.c') diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index c551fa62b..7dfaf27df 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -174,7 +174,7 @@ static int mount_one(const MountPoint *p, bool relabel) { if (relabel) (void) label_fix(p->where, true, true); - r = path_is_mount_point(p->where, AT_SYMLINK_FOLLOW); + r = path_is_mount_point(p->where, NULL, AT_SYMLINK_FOLLOW); if (r < 0 && r != -ENOENT) { log_full_errno((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, r, "Failed to determine whether %s is a mount point: %m", p->where); return (p->mode & MNT_FATAL) ? r : 0; -- cgit v1.2.3