diff options
Diffstat (limited to 'src/libudev/path-util.c')
-rw-r--r-- | src/libudev/path-util.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/libudev/path-util.c b/src/libudev/path-util.c index d87e60ac8b..b702b94218 100644 --- a/src/libudev/path-util.c +++ b/src/libudev/path-util.c @@ -127,26 +127,6 @@ char *path_make_absolute_cwd(const char *p) { return r; } -char **path_strv_make_absolute_cwd(char **l) { - char **s; - - /* Goes through every item in the string list and makes it - * absolute. This works in place and won't rollback any - * changes on failure. */ - - STRV_FOREACH(s, l) { - char *t; - - if (!(t = path_make_absolute_cwd(*s))) - return NULL; - - free(*s); - *s = t; - } - - return l; -} - char **path_strv_canonicalize(char **l) { char **s; unsigned k = 0; @@ -242,39 +222,6 @@ char *path_kill_slashes(char *path) { return path; } -char* path_startswith(const char *path, const char *prefix) { - assert(path); - assert(prefix); - - if ((path[0] == '/') != (prefix[0] == '/')) - return NULL; - - for (;;) { - size_t a, b; - - path += strspn(path, "/"); - prefix += strspn(prefix, "/"); - - if (*prefix == 0) - return (char*) path; - - if (*path == 0) - return NULL; - - a = strcspn(path, "/"); - b = strcspn(prefix, "/"); - - if (a != b) - return NULL; - - if (memcmp(path, prefix, a) != 0) - return NULL; - - path += a; - prefix += b; - } -} - bool path_equal(const char *a, const char *b) { assert(a); assert(b); |