summaryrefslogtreecommitdiff
path: root/src/libudev/util.h
AgeCommit message (Collapse)Author
2013-06-06Remove unused DECLS from src/libudev/{conf-files,def,exit-status,hashmap,util}.hAnthony G. Basile
The following unused DECLS are removed: DEFAULT_TIMEOUT_USEC DEFAULT_RESTART_USEC DEFAULT_CONFIRM_USEC DEFAULT_EXIT_USEC SIGNALS_CRASH_HANDLER SIGNALS_IGNORE EXIT_INVALIDARGUMENT EXIT_NOTIMPLEMENTED EXIT_NOPERMISSION EXIT_NOTINSTALLED EXIT_NOTCONFIGURED EXIT_NOTRUNNING EXIT_CHDIR EXIT_NICE EXIT_FDS EXIT_EXEC EXIT_MEMORY EXIT_LIMITS EXIT_OOM_ADJUST EXIT_SIGNAL_MASK EXIT_STDIN EXIT_STDOUT EXIT_CHROOT EXIT_IOPRI EXIT_TIMERSLACK EXIT_SECUREBITS EXIT_SETSCHEDULER EXIT_CPUAFFINITY EXIT_GROUP EXIT_USER EXIT_CAPABILITIES EXIT_CGROUP EXIT_SETSID EXIT_CONFIRM EXIT_STDERR EXIT_TCPWRAP EXIT_PAM EXIT_NETWORK EXIT_NAMESPACE EXIT_NO_NEW_PRIVILEGES EXIT_SECCOMP EXIT_STATUS_MINIMAL EXIT_STATUS_SYSTEMD EXIT_STATUS_LSB EXIT_STATUS_FULL HASHMAP_FOREACH_KEY HASHMAP_FOREACH_BACKWARDS FORMAT_TIMESTAMP_MAX FORMAT_TIMESTAMP_PRETTY_MAX FORMAT_TIMESPAN_MAX FORMAT_BYTES_MAX ANSI_HIGHLIGHT_ON ANSI_RED_ON ANSI_HIGHLIGHT_RED_ON dual_timestamp_is_set newa newdup FOREACH_WORD FOREACH_WORD_SEPARATOR NULSTR_FOREACH _cleanup_pclose_ _cleanup_umask_ _cleanup_globfree_ DRAW_TREE_VERT DRAW_TREE_BRANCH DRAW_TREE_RIGHT DRAW_TREE_SPACE DRAW_TRIANGULAR_BULLET _DRAW_SPECIAL_CHAR_MAX FOREACH_LINE procfs_file_alloca The following unused struct defs were removed: struct ExitStatusSet The following unused static inline funcs were remvoed: static inline int safe_atolu static inline int safe_atoli static inline int safe_atolu static inline int safe_atoli static inline int safe_atou32 static inline int safe_atoi32 static inline int safe_atou64 static inline int safe_atoi64 static inline const char* yes_no static inline const char* strempty static inline const char* strnull static inline const char *strna static inline void pclosep static inline void umaskp NOTE: Some unused DECLS were retained if they formed part of a logical series, eg. definition of time units. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06Round 4 of remove unused functions from src/libudev/{hashmap,log,set,util}.cAnthony G. Basile
We removed the following functions: hashmap_merge path_is_read_only_fs set_free_free set_free_freep readlink_malloc hexchar unhexchar octchar unoctchar format_timespan Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06Round 3 of remove unused functions from src/libudev/{conf-files,hashmap,util}Anthony G. Basile
The following functions were removed: strv_env_get_n strv_env_get conf_files_list hashmap_remove hashmap_move log_dump_internal parse_uid read_full_file strstrip file_in_same_dir cunescape cunescape_length cunescape_length_with_prefix xescape dirent_is_file close_all_fds read_one_char ask reset_terminal_fd reset_terminal flush_fd loop_read get_ctty_devnr get_ctty rm_rf_children rm_rf_children_dangerous rm_rf status_vprintf fd_columns columns fd_lines lines on_tty ellipsize ellipsize_mem touch unquote resolve_dev_console tty_is_vc vtnr_from_tty terminal_vhangup_fd terminal_vhangup file_is_priv_sticky signal_from_string fd_wait_for_event memdup memdup_multiply Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-05Round 2 of remove unused functions from ↵Anthony G. Basile
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>
2013-06-05Remove unused functions from src/libudev/util.cAnthony G. Basile
We remove the following unused functions: ascii_strlower block_get_whole_disk bus_path_escape can_sleep can_sleep_disk cescape chars_intersect chvt close_many close_pipe columns_lines_cache_reset copy_file cpu_set_malloc decchar default_signals default_term_for_tty delete_chars dir_is_empty draw_special_char dual_timestamp_deserialize dual_timestamp_serialize execute_directory fchmod_and_fchown fd_cloexec fd_inc_rcvbuf fd_nonblock filename_is_safe first_word fork_agent format_bytes format_timestamp_pretty fstab_node_to_udev_node fstype_is_network getenv_for_pid get_files_in_directory get_home_dir gethostname_malloc getlogname_malloc get_parent_of_pid get_process_cmdline get_process_exe get_process_gid get_process_uid get_starttime_of_pid getttyname_harder get_user_creds getusername_malloc glob_exists hostname_cleanup hostname_is_set hostname_is_valid ignore_signals in_charset in_group in_search_path is_device_path is_kernel_thread is_valid_documentation_url kexec_loaded kill_and_sigcont load_env_file make_console_stdio make_null_stdio parse_bytes parse_nsec parse_pid parse_timestamp pipe_eof plymouth_running prot_from_flags readlink_and_canonicalize release_terminal rename_process replace_env_argv reset_all_signal_handlers rmdir_parents rm_rf_dangerous running_in_chroot setrlimit_closest sigaction_many signal_from_string_try_harder sigset_add_many socket_from_display startswith_no_case status_welcome strdup_or_null string_is_safe strreplace symlink_atomic tty_is_console undecchar vt_disallocate wait_for_terminate_and_warn warn_melody write_env_file write_one_line_file_atomic xopendirat Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04src/libudev/strv.{c,h}: bring in line with upstreamAnthony G. Basile
In doing so, we better alined util.{c,h} by movig the definitions of freep, fclosep, closep, closedirp, umaskp from util.c to util.h as static inline. We also add strv_env_get to env-util.{c,h} which we forgot to do earlier. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04src/libudev/util.c: bring in line with upstreamAnthony G. Basile
To bring this in line with upstream, we had to add in env-util.c. The approach we will take is to slim down upstream's "shared" code so that it only contains functions and macros for what we need. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-01Moved files to libudev that once were in upstream libsystemd-sharedIan Stakenvicius