diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-06-05 22:30:19 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-06-05 22:30:19 -0400 |
commit | ac6af1454474115a0105f07c5704e13e40d0ff0e (patch) | |
tree | ed4dcee12c0758a0542dfda09e54a32273c9c832 /src/libudev/path-util.c | |
parent | b79c75f64b0808e59dd21237361fcefca16e13cb (diff) |
Round 2 of remove unused functions from src/libudev/{hashmap,log,path-util,set,strv,util}
We remove the following functions:
cleanup_pool
uint64_hash_func
hashmap_ensure_allocated
hashmap_clear_free_free
hashmap_replace
hashmap_remove_and_put
hashmap_iterate_skip
hashmap_first
hashmap_first_key
hashmap_last
hashmap_isempty
hashmap_move_one
hashmap_copy
log_metav_object
log_show_color
log_show_location
path_strv_make_absolute_cwd
path_startswith
set_remove
set_move
set_clear
strv_find
strv_contains
strv_merge
strv_split
strv_split_quoted
strv_append
strv_extend
strv_push
strv_split_nulstr
str_compare
dual_timestamp_get
dual_timestamp_from_realtime
timespec_store
timeval_load
timeval_store
parse_boolean
fchmod_umask
parse_env_file
get_process_comm
get_process_id
readlink_and_make_absolute
bus_path_unescape
format_timestamp
acquire_terminal
loop_write
parse_usec
make_stdio
random_ull
lookup_uid
getttyname_malloc
status_printf
replace_env
normalize_env_assignment
wait_for_terminate
freeze
tag_to_udev_node
tty_is_vc_resolve
nulstr_contains
strshorten
hostname_valid_char
display_is_local
get_group_creds
in_gid
dirent_ensure_type
is_locale_utf8
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
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); |