chiark / gitweb /
fs-util: drop readlink_and_make_absolute_root()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 9 Feb 2018 07:58:56 +0000 (16:58 +0900)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:51 +0000 (07:58 +0200)
src/basic/fs-util.c
src/basic/fs-util.h

index 791e082380ec7626e9090b4ad9820ef6432300a1..861bb77a3fccfe09af327ca724ce320963819025 100644 (file)
@@ -233,27 +233,7 @@ int readlink_and_make_absolute(const char *p, char **r) {
 }
 
 #if 0 /// UNNEEDED by elogind
-int readlink_and_make_absolute_root(const char *root, const char *path, char **ret) {
-        _cleanup_free_ char *target = NULL, *t = NULL;
-        const char *full;
-        int r;
-
-        full = prefix_roota(root, path);
-        r = readlink_malloc(full, &target);
-        if (r < 0)
-                return r;
-
-        t = file_in_same_dir(path, target);
-        if (!t)
-                return -ENOMEM;
-
-        *ret = t;
-        t = NULL;
-
-        return 0;
-}
 #endif // 0
-
 int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) {
         assert(path);
 
index 148408c76887899ce5b2f917fab75048686822c3..8c46db3dc18562795cdf1faf5249a01be23e8ab6 100644 (file)
@@ -46,7 +46,6 @@ int readlink_value(const char *p, char **ret);
 #endif // 0
 int readlink_and_make_absolute(const char *p, char **r);
 #if 0 /// UNNEEDED by elogind
-int readlink_and_make_absolute_root(const char *root, const char *path, char **ret);
 #endif // 0
 
 int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);