+ if (!isempty(root))
+ return strjoin(root, endswith(root, "/") ? "" : "/",
+ path[0] == '/' ? path+1 : path,
+ rest ? (endswith(path, "/") ? "" : "/") : NULL,
+ rest && rest[0] == '/' ? rest+1 : rest,
+ NULL);
+ else
+ return strjoin(path,
+ rest ? (endswith(path, "/") ? "" : "/") : NULL,
+ rest && rest[0] == '/' ? rest+1 : rest,
+ NULL);
+}
+
+int path_is_mount_point(const char *t, bool allow_symlink) {
+
+ union file_handle_union h = FILE_HANDLE_INIT;
+ int mount_id = -1, mount_id_parent = -1;
+ _cleanup_free_ char *parent = NULL;