diff options
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/cgroup-util.c | 6 | ||||
-rw-r--r-- | src/basic/cgroup-util.h | 4 | ||||
-rw-r--r-- | src/basic/conf-files.c | 2 | ||||
-rw-r--r-- | src/basic/conf-files.h | 2 | ||||
-rw-r--r-- | src/basic/fs-util.c | 2 | ||||
-rw-r--r-- | src/basic/fs-util.h | 2 | ||||
-rw-r--r-- | src/basic/hashmap.c | 2 | ||||
-rw-r--r-- | src/basic/hashmap.h | 2 | ||||
-rw-r--r-- | src/basic/parse-util.c | 2 | ||||
-rw-r--r-- | src/basic/parse-util.h | 2 | ||||
-rw-r--r-- | src/basic/path-util.c | 2 | ||||
-rw-r--r-- | src/basic/path-util.h | 4 | ||||
-rw-r--r-- | src/basic/selinux-util.c | 4 | ||||
-rw-r--r-- | src/basic/selinux-util.h | 4 | ||||
-rw-r--r-- | src/basic/signal-util.c | 2 | ||||
-rw-r--r-- | src/basic/signal-util.h | 2 | ||||
-rw-r--r-- | src/basic/strv.c | 2 | ||||
-rw-r--r-- | src/basic/strv.h | 4 |
18 files changed, 17 insertions, 33 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index b5b669c0e..d30edd41b 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -2610,9 +2610,15 @@ bool cg_is_hybrid_wanted(void) { return (wanted = r > 0 ? !b : is_default); } #else +bool cg_is_unified_wanted(void) { + return false; +} bool cg_is_legacy_wanted(void) { return true; } +bool cg_is_hybrid_wanted(void) { + return false; +} #endif // 0 #if 0 /// UNNEEDED by elogind diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index ac115b4b7..ea74df4e6 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -258,13 +258,9 @@ int cg_hybrid_unified(void); int cg_unified_controller(const char *controller); int cg_unified_flush(void); -#if 0 /// UNNEEDED by elogind bool cg_is_unified_wanted(void); -#endif // 0 bool cg_is_legacy_wanted(void); -#if 0 /// UNNEEDED by elogind bool cg_is_hybrid_wanted(void); -#endif // 0 const char* cgroup_controller_to_string(CGroupController c) _const_; CGroupController cgroup_controller_from_string(const char *s) _pure_; diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c index 1cd0d9dfc..b8f0f5d03 100644 --- a/src/basic/conf-files.c +++ b/src/basic/conf-files.c @@ -132,7 +132,6 @@ int conf_files_list_strv(char ***strv, const char *suffix, const char *root, con return conf_files_list_strv_internal(strv, suffix, root, copy); } -#if 0 /// UNNEEDED by elogind int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...) { _cleanup_strv_free_ char **dirs = NULL; va_list ap; @@ -148,7 +147,6 @@ int conf_files_list(char ***strv, const char *suffix, const char *root, const ch return conf_files_list_strv_internal(strv, suffix, root, dirs); } -#endif // 0 int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, const char *d) { _cleanup_strv_free_ char **dirs = NULL; diff --git a/src/basic/conf-files.h b/src/basic/conf-files.h index 3e684364c..e00e0e81f 100644 --- a/src/basic/conf-files.h +++ b/src/basic/conf-files.h @@ -20,8 +20,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#if 0 /// UNNEEDED by elogind int conf_files_list(char ***ret, const char *suffix, const char *root, const char *dir, ...); -#endif // 0 int conf_files_list_strv(char ***ret, const char *suffix, const char *root, const char* const* dirs); int conf_files_list_nulstr(char ***ret, const char *suffix, const char *root, const char *dirs); diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index eefdbb52d..33624354f 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -204,6 +204,7 @@ int readlink_value(const char *p, char **ret) { return 0; } +#endif // 0 int readlink_and_make_absolute(const char *p, char **r) { _cleanup_free_ char *target = NULL; @@ -225,6 +226,7 @@ int readlink_and_make_absolute(const char *p, char **r) { return 0; } +#if 0 /// UNNEEDED by elogind int readlink_and_canonicalize(const char *p, const char *root, char **ret) { char *t, *s; int r; diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index b13961991..4c6bb659a 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -41,7 +41,9 @@ int readlinkat_malloc(int fd, const char *p, char **ret); int readlink_malloc(const char *p, char **r); #if 0 /// UNNEEDED by elogind 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_canonicalize(const char *p, const char *root, char **r); int readlink_and_make_absolute_root(const char *root, const char *path, char **ret); #endif // 0 diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 250fed534..86d648df0 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1745,7 +1745,6 @@ char **internal_hashmap_get_strv(HashmapBase *h) { return sv; } -#if 0 /// UNNEEDED by elogind void *ordered_hashmap_next(OrderedHashmap *h, const void *key) { struct ordered_hashmap_entry *e; unsigned hash, idx; @@ -1763,7 +1762,6 @@ void *ordered_hashmap_next(OrderedHashmap *h, const void *key) { return NULL; return ordered_bucket_at(h, e->iterate_next)->p.value; } -#endif // 0 int set_consume(Set *s, void *value) { int r; diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h index 0fda53e11..6d1ae48b2 100644 --- a/src/basic/hashmap.h +++ b/src/basic/hashmap.h @@ -328,10 +328,8 @@ static inline void *ordered_hashmap_first(OrderedHashmap *h) { return internal_hashmap_first(HASHMAP_BASE(h)); } -#if 0 /// UNNEEDED by elogind /* no hashmap_next */ void *ordered_hashmap_next(OrderedHashmap *h, const void *key); -#endif // 0 char **internal_hashmap_get_strv(HashmapBase *h); static inline char **hashmap_get_strv(Hashmap *h) { diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index e294f25cf..cfdb29aba 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -273,6 +273,7 @@ int parse_range(const char *t, unsigned *lower, unsigned *upper) { *upper = u; return 0; } +#endif // 0 char *format_bytes(char *buf, size_t l, uint64_t t) { unsigned i; @@ -314,7 +315,6 @@ finish: return buf; } -#endif // 0 int safe_atou(const char *s, unsigned *ret_u) { char *x = NULL; diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h index 1c1ee4096..3555aa1ea 100644 --- a/src/basic/parse-util.h +++ b/src/basic/parse-util.h @@ -37,10 +37,10 @@ int parse_ifindex(const char *s, int *ret); int parse_size(const char *t, uint64_t base, uint64_t *size); #if 0 /// UNNEEDED by elogind int parse_range(const char *t, unsigned *lower, unsigned *upper); +#endif // 0 #define FORMAT_BYTES_MAX 8 char *format_bytes(char *buf, size_t l, uint64_t t); -#endif // 0 int safe_atou(const char *s, unsigned *ret_u); int safe_atoi(const char *s, int *ret_i); diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 6c4762029..0e4e76dc4 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -448,7 +448,6 @@ bool path_equal_or_files_same(const char *a, const char *b) { return path_equal(a, b) || files_same(a, b) > 0; } -#if 0 /// UNNEEDED by elogind char* path_join(const char *root, const char *path, const char *rest) { assert(path); @@ -525,6 +524,7 @@ int find_binary(const char *name, char **ret) { return last_error; } +#if 0 /// UNNEEDED by elogind bool paths_check_timestamp(const char* const* paths, usec_t *timestamp, bool update) { bool changed = false; const char* const* i; diff --git a/src/basic/path-util.h b/src/basic/path-util.h index 3e1519efe..487ae1396 100644 --- a/src/basic/path-util.h +++ b/src/basic/path-util.h @@ -53,13 +53,11 @@ char* path_startswith(const char *path, const char *prefix) _pure_; int path_compare(const char *a, const char *b) _pure_; bool path_equal(const char *a, const char *b) _pure_; bool path_equal_or_files_same(const char *a, const char *b); -#if 0 /// UNNEEDED by elogind char* path_join(const char *root, const char *path, const char *rest); static inline bool path_equal_ptr(const char *a, const char *b) { return !!a == !!b && (!a || path_equal(a, b)); } -#endif // 0 /* Note: the search terminates on the first NULL item. */ #define PATH_IN_SET(p, ...) \ @@ -92,9 +90,9 @@ int path_strv_make_absolute_cwd(char **l); char** path_strv_resolve(char **l, const char *root); char** path_strv_resolve_uniq(char **l, const char *root); -#if 0 /// UNNEEDED by elogind int find_binary(const char *name, char **filename); +#if 0 /// UNNEEDED by elogind bool paths_check_timestamp(const char* const* paths, usec_t *paths_ts_usec, bool update); int fsck_exists(const char *fstype); diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index 021041cbd..2a9dd7c8c 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -74,13 +74,11 @@ bool mac_selinux_use(void) { return getuid() == 0; } -#if 0 /// UNNEEDED by elogind void mac_selinux_retest(void) { #ifdef HAVE_SELINUX cached_use = -1; #endif } -#endif // 0 int mac_selinux_init(void) { int r = 0; @@ -120,7 +118,6 @@ int mac_selinux_init(void) { return r; } -#if 0 /// UNNEEDED by elogind void mac_selinux_finish(void) { #ifdef HAVE_SELINUX @@ -131,7 +128,6 @@ void mac_selinux_finish(void) { label_hnd = NULL; #endif } -#endif // 0 int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h index 0528b7759..fa41a65f8 100644 --- a/src/basic/selinux-util.h +++ b/src/basic/selinux-util.h @@ -27,14 +27,10 @@ bool mac_selinux_use(void); bool mac_selinux_have(void); -#if 0 /// UNNEEDED by elogind void mac_selinux_retest(void); -#endif // 0 int mac_selinux_init(void); -#if 0 /// UNNEEDED by elogind void mac_selinux_finish(void); -#endif // 0 int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs); #if 0 /// UNNEEDED by elogind diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c index 0be2ec0c7..8e83bfcf0 100644 --- a/src/basic/signal-util.c +++ b/src/basic/signal-util.c @@ -120,7 +120,6 @@ int ignore_signals(int sig, ...) { return r; } -#if 0 /// UNNEEDED by elogind int default_signals(int sig, ...) { static const struct sigaction sa = { @@ -137,7 +136,6 @@ int default_signals(int sig, ...) { return r; } -#endif // 0 static int sigset_add_many_ap(sigset_t *ss, va_list ap) { int sig, r = 0; diff --git a/src/basic/signal-util.h b/src/basic/signal-util.h index ee37e2726..8dc9e3aea 100644 --- a/src/basic/signal-util.h +++ b/src/basic/signal-util.h @@ -27,8 +27,8 @@ int reset_all_signal_handlers(void); int reset_signal_mask(void); int ignore_signals(int sig, ...); -#if 0 /// UNNEEDED by elogind int default_signals(int sig, ...); +#if 0 /// UNNEEDED by elogind int sigaction_many(const struct sigaction *sa, ...); #endif // 0 diff --git a/src/basic/strv.c b/src/basic/strv.c index fc0b2c4af..c2defbe97 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -790,7 +790,6 @@ char **strv_sort(char **l) { return l; } -#if 0 /// UNNEEDED by elogind bool strv_equal(char **a, char **b) { if (strv_isempty(a)) @@ -813,6 +812,7 @@ void strv_print(char **l) { puts(*s); } +#if 0 /// UNNEEDED by elogind int strv_extendf(char ***l, const char *format, ...) { va_list ap; char *x; diff --git a/src/basic/strv.h b/src/basic/strv.h index dafb4fdc1..1433e896d 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -68,9 +68,9 @@ char **strv_remove(char **l, const char *s); char **strv_uniq(char **l); #if 0 /// UNNEEDED by elogind bool strv_is_uniq(char **l); +#endif // 0 bool strv_equal(char **a, char **b); -#endif // 0 #define strv_contains(l, s) (!!strv_find((l), (s))) @@ -122,9 +122,7 @@ bool strv_overlap(char **a, char **b) _pure_; for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1)) char **strv_sort(char **l); -#if 0 /// UNNEEDED by elogind void strv_print(char **l); -#endif // 0 #define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL })) |