summaryrefslogtreecommitdiff
path: root/src/libudev/strv.h
AgeCommit message (Collapse)Author
2014-01-14src/libudev: bring in line with upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-08-02src/libudev/{strv,util}.{h,c}: reorder functionsAnthony G. Basile
We reorder the functions prototypes and definitions to match upstream as in commit aa417a4d83999f6d7f092161d5c411b8cbce9977. The order was lost when that commit was revert and the functions re-introduced in later commits. Preserving the order helps to better track upstream changes when doing a diff between files. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-31add various escaping/path handling utility functionsLennart Poettering
This is a partial combination of two systemd commits: 5926cccae202f1b8869017d4bdaf9e9ce371bba6 4fe88d28a4cfa504c1f2362d4a7030fae4c4af29 ...and provides functions needed for the changes that were added in commit 6284c1ca41dca85e968e8d304cdc154c5a46d6d2 Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31Revert "static-nodes: remove creation of static nodes if HAVE_LIBKMOD"Ian Stakenvicius
This reverts commit aa417a4d83999f6d7f092161d5c411b8cbce9977. Preface: The kmod+tmpfiles static dev-node creation requires two commands to be executed at runtime -- it is not something that will automatically occur without a system's setup being explicitly designed or changed so that these commands are executed. Preface2: In order for the kmod+tmpfiles static dev-node creation to work properly, that -must- be executed at startup before {systemd-,}udevd starts. The reason for this is because udevd will only set permissions on those files at startup, and so if udevd starts beforehand then these nodes will exist with permissions that are (probably) too restrictive. The function in udevd which creates static-nodes is non-fatal and only updates mtime on the devnodes if they already exist. As such, if a system is configured to execute kmod+tmpfiles to create static-nodes, because that must occur first, eudev's udevd will not conflict. Also, if a system does not execute kmod+tmpfiles, then eudev will still create the static devnodes, even if kmod-14 or higher is installed. There *may* be a conflict if kmod+tmpfiles is executed after udevd starts, but as per "preface2" this is not a supported configuration. Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31static-nodes: remove creation of static nodes if HAVE_LIBKMODAnthony G. Basile
This address upstream commit edeb68c53f1cdc452016b4c8512586a70b1262e3 and https://bugs.gentoo.org/show_bug.cgi?id=477890. If eudev is configured with --enable-libkmod then we check for kmod >= 14 and ifdef out the code removed in the upstream commit. Otherwise we retain it for modutils. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06Round 2 of remove unused DECLS from src/libudev/{ioprio,log,macro,set,strv}Anthony G. Basile
Remove the following unused DECLS: IOPRIO_BITS IOPRIO_CLASS_SHIFT IOPRIO_PRIO_MASK IOPRIO_PRIO_CLASS IOPRIO_PRIO_DATA IOPRIO_PRIO_VALUE ioprio_valid IOPRIO_BE_NR IOPRIO_WHO_PROCESS IOPRIO_WHO_PGRP IOPRIO_WHO_USER MESSAGE_ID EXIT_TEST_SKIP XSTRINGIFY STRINGIFY ALIGN_PTR ALIGN4_PTR ALIGN8_PTR MAX MAX3 MIN CLAMP zero CHAR_TO_STR VA_FORMAT_ADVANCE SET_FLAG SET_FOREACH SET_FOREACH_BACKWARDS STRV_FOREACH_BACKWARDS STRV_FOREACH_PAIR _unused_ _destructor_ _deprecated_ _weak_ _hidden_ _weakref_ _introspect_ _alignas_ Remove the following unused static inline functions: static inline int ioprio_set static inline int ioprio_get static inline const char* STRV_IFNOTNULL 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 ↵Anthony G. Basile
src/libudev/{conf-files,exit-status,hashmap,log,path-util,set,strv}.c A lot of upstream commits cross many boundaries between systemd code and udev code. The point of intersection is upstreams src/shared folder. The best way we find to track them is to apply their commits to udev and libudev and then just pick remove functions from the shared folder. Its timely but it gives us the best control over what gets in and what doesnt. In this commit we removed the following functions: conf_files_list_nulstr exit_status_to_string is_clean_exit_lsb uint64_hash_func uint64_compare_func hashmap_free_free_free hashmap_update hashmap_get2 hashmap_remove_and_replace hashmap_remove_value hashmap_steal_first_key hashmap_next log_forget_fds log_set_facility log_meta_object log_struct_internal log_set_target_from_string log_set_max_level_from_string log_get_target log_get_max_level log_show_color_from_string log_show_location_from_string log_on_console is_path path_split_and_make_absolute set_ensure_allocated set_replace set_remove_and_put set_size set_isempty set_iterate_skip set_steal_first set_first set_last set_merge set_move_one set_copy set_clear_free set_get_strv strv_find_prefix strv_merge_concat strv_split_newlines strv_join strv_remove_prefix strv_parse_nulstr strv_overlap strv_sort strv_print 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>
2012-12-01Moved files to libudev that once were in upstream libsystemd-sharedIan Stakenvicius