From c5729796b4ec5e5f4800bfe6bd9ceb5c2da81fbe Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Tue, 11 Apr 2017 17:26:30 +0200 Subject: [PATCH] Prep v228: Condense elogind source masks (1/5) Although having a two line mask like /// UNNEEDED by elogind #if 0 it is much more easier to read (and patch!) if those two lines were condense into a one-line mask start like #if 0 /// UNNEEDED by elogind --- src/basic/capability-util.c | 6 ++---- src/basic/capability-util.h | 3 +-- src/basic/cgroup-util.c | 24 ++++++++---------------- src/basic/cgroup-util.h | 21 +++++++-------------- src/basic/copy.c | 6 ++---- src/basic/copy.h | 6 ++---- src/basic/errno-list.c | 3 +-- src/basic/errno-list.h | 3 +-- src/basic/extract-word.c | 3 +-- src/basic/extract-word.h | 3 +-- src/basic/fd-util.c | 6 ++---- src/basic/fd-util.h | 6 ++---- src/basic/fileio-label.c | 3 +-- src/basic/fileio-label.h | 3 +-- src/basic/fileio.c | 12 ++++-------- src/basic/fileio.h | 12 ++++-------- src/basic/fs-util.c | 12 ++++-------- src/basic/fs-util.h | 15 +++++---------- src/basic/hashmap.c | 9 +++------ src/basic/hashmap.h | 3 +-- src/basic/hostname-util.c | 9 +++------ src/basic/hostname-util.h | 9 +++------ src/basic/label.c | 3 +-- 23 files changed, 60 insertions(+), 120 deletions(-) diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c index e261e4613..10ff16e42 100644 --- a/src/basic/capability-util.c +++ b/src/basic/capability-util.c @@ -34,8 +34,7 @@ #include "parse-util.h" #include "util.h" -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int have_effective_cap(int value) { _cleanup_cap_free_ cap_t cap; cap_flag_value_t fv; @@ -98,8 +97,7 @@ unsigned long cap_last_cap(void) { return p; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int capability_bounding_set_drop(uint64_t drop, bool right_now) { _cleanup_cap_free_ cap_t after_cap = NULL; cap_flag_value_t fv; diff --git a/src/basic/capability-util.h b/src/basic/capability-util.h index d835e3f20..7f6b34dfb 100644 --- a/src/basic/capability-util.h +++ b/src/basic/capability-util.h @@ -27,8 +27,7 @@ #include "util.h" unsigned long cap_last_cap(void); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int have_effective_cap(int value); int capability_bounding_set_drop(uint64_t drop, bool right_now); int capability_bounding_set_drop_usermode(uint64_t drop); diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index b5de1cc14..6b7b9f7d8 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -747,8 +747,7 @@ int cg_attach_fallback(const char *controller, const char *path, pid_t pid) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_set_group_access( const char *controller, const char *path, @@ -1265,8 +1264,7 @@ int cg_pid_get_path_shifted(pid_t pid, const char *root, char **cgroup) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_path_decode_unit(const char *cgroup, char **unit){ char *c, *s; size_t n; @@ -1585,8 +1583,7 @@ int cg_pid_get_session(pid_t pid, char **session) { return cg_path_get_session(cgroup, session); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_path_get_owner_uid(const char *path, uid_t *uid) { _cleanup_free_ char *slice = NULL; char *start, *end; @@ -1791,8 +1788,7 @@ bool cg_controller_is_valid(const char *p) { return true; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_slice_to_path(const char *unit, char **ret) { _cleanup_free_ char *p = NULL, *s = NULL, *e = NULL; const char *dash; @@ -1874,8 +1870,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri return write_string_file(p, value, 0); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { _cleanup_free_ char *p = NULL; int r; @@ -2108,8 +2103,7 @@ int cg_mask_supported(CGroupMask *ret) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_kernel_controllers(Set *controllers) { _cleanup_fclose_ FILE *f = NULL; char buf[LINE_MAX]; @@ -2202,8 +2196,7 @@ int cg_unified(void) { return unified_cache; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void cg_unified_flush(void) { unified_cache = -1; } @@ -2292,8 +2285,7 @@ bool cg_is_legacy_wanted(void) { } #endif // 0 -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_cpu_shares_parse(const char *s, uint64_t *ret) { uint64_t u; int r; diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index 6fd772748..3e7db8dbd 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -125,8 +125,7 @@ int cg_attach_fallback(const char *controller, const char *path, pid_t pid); int cg_create_and_attach(const char *controller, const char *path, pid_t pid); int cg_set_attribute(const char *controller, const char *path, const char *attribute, const char *value); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret); int cg_set_group_access(const char *controller, const char *path, mode_t mode, uid_t uid, gid_t gid); @@ -141,8 +140,7 @@ int cg_is_empty_recursive(const char *controller, const char *path); int cg_get_root_path(char **path); int cg_path_get_session(const char *path, char **session); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_path_get_owner_uid(const char *path, uid_t *uid); int cg_path_get_unit(const char *path, char **unit); int cg_path_get_user_unit(const char *path, char **unit); @@ -154,8 +152,7 @@ int cg_shift_path(const char *cgroup, const char *cached_root, const char **shif int cg_pid_get_path_shifted(pid_t pid, const char *cached_root, char **cgroup); int cg_pid_get_session(pid_t pid, char **session); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_pid_get_owner_uid(pid_t pid, uid_t *uid); int cg_pid_get_unit(pid_t pid, char **unit); int cg_pid_get_user_unit(pid_t pid, char **unit); @@ -169,8 +166,7 @@ char *cg_escape(const char *p); char *cg_unescape(const char *p) _pure_; bool cg_controller_is_valid(const char *p); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_slice_to_path(const char *unit, char **ret); typedef const char* (*cg_migrate_callback_t)(CGroupMask mask, void *userdata); @@ -183,13 +179,11 @@ int cg_trim_everywhere(CGroupMask supported, const char *path, bool delete_root) int cg_enable_everywhere(CGroupMask supported, CGroupMask mask, const char *p); #endif // 0 int cg_mask_supported(CGroupMask *ret); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_kernel_controllers(Set *controllers); #endif // 0 int cg_unified(void); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void cg_unified_flush(void); bool cg_is_unified_wanted(void); @@ -198,8 +192,7 @@ bool cg_is_legacy_wanted(void); const char* cgroup_controller_to_string(CGroupController c) _const_; CGroupController cgroup_controller_from_string(const char *s) _pure_; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int cg_cpu_shares_parse(const char *s, uint64_t *ret); int cg_blkio_weight_parse(const char *s, uint64_t *ret); #endif // 0 diff --git a/src/basic/copy.c b/src/basic/copy.c index cff446d9f..d807520a9 100644 --- a/src/basic/copy.c +++ b/src/basic/copy.c @@ -45,8 +45,7 @@ int copy_bytes(int fdf, int fdt, uint64_t max_bytes, bool try_reflink) { assert(fdf >= 0); assert(fdt >= 0); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* Try btrfs reflinks first. */ if (try_reflink && max_bytes == (uint64_t) -1 && @@ -129,8 +128,7 @@ int copy_bytes(int fdf, int fdt, uint64_t max_bytes, bool try_reflink) { return 0; /* return 0 if we hit EOF earlier than the size limit */ } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int fd_copy_symlink(int df, const char *from, const struct stat *st, int dt, const char *to) { _cleanup_free_ char *target = NULL; int r; diff --git a/src/basic/copy.h b/src/basic/copy.h index 2cc7ad146..27fc88621 100644 --- a/src/basic/copy.h +++ b/src/basic/copy.h @@ -25,8 +25,7 @@ #include #include -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int copy_file_fd(const char *from, int to, bool try_reflink); int copy_file(const char *from, const char *to, int flags, mode_t mode, unsigned chattr_flags); int copy_file_atomic(const char *from, const char *to, mode_t mode, bool replace, unsigned chattr_flags); @@ -35,8 +34,7 @@ int copy_tree_at(int fdf, const char *from, int fdt, const char *to, bool merge) int copy_directory_fd(int dirfd, const char *to, bool merge); #endif // 0 int copy_bytes(int fdf, int fdt, uint64_t max_bytes, bool try_reflink); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int copy_times(int fdf, int fdt); int copy_xattr(int fdf, int fdt); #endif // 0 diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c index 5b7ac65ba..c41a8b884 100644 --- a/src/basic/errno-list.c +++ b/src/basic/errno-list.c @@ -55,8 +55,7 @@ int errno_from_name(const char *name) { return sc->id; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int errno_max(void) { return ELEMENTSOF(errno_names); } diff --git a/src/basic/errno-list.h b/src/basic/errno-list.h index 752e139fa..e6e0520d6 100644 --- a/src/basic/errno-list.h +++ b/src/basic/errno-list.h @@ -24,7 +24,6 @@ const char *errno_to_name(int id); int errno_from_name(const char *name); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int errno_max(void); #endif // 0 diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c index a03bb9286..5b993e870 100644 --- a/src/basic/extract-word.c +++ b/src/basic/extract-word.c @@ -190,8 +190,7 @@ finish_force_next: return 1; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int extract_first_word_and_warn( const char **p, char **ret, diff --git a/src/basic/extract-word.h b/src/basic/extract-word.h index 994482582..4d9f6679e 100644 --- a/src/basic/extract-word.h +++ b/src/basic/extract-word.h @@ -33,8 +33,7 @@ typedef enum ExtractFlags { } ExtractFlags; int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int extract_first_word_and_warn(const char **p, char **ret, const char *separators, ExtractFlags flags, const char *unit, const char *filename, unsigned line, const char *rvalue); int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) _sentinel_; #endif // 0 diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c index 8b7065fd5..17cafa4bb 100644 --- a/src/basic/fd-util.c +++ b/src/basic/fd-util.c @@ -120,8 +120,7 @@ FILE* safe_fclose(FILE *f) { return NULL; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind DIR* safe_closedir(DIR *d) { if (d) { @@ -251,8 +250,7 @@ int close_all_fds(const int except[], unsigned n_except) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int same_fd(int a, int b) { struct stat sta, stb; pid_t pid; diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h index 0e03e26b0..16304a1af 100644 --- a/src/basic/fd-util.h +++ b/src/basic/fd-util.h @@ -40,8 +40,7 @@ void close_many(const int fds[], unsigned n_fd); int fclose_nointr(FILE *f); FILE* safe_fclose(FILE *f); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind DIR* safe_closedir(DIR *f); #endif // 0 @@ -71,8 +70,7 @@ int fd_cloexec(int fd, bool cloexec); int close_all_fds(const int except[], unsigned n_except); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int same_fd(int a, int b); void cmsg_close_all(struct msghdr *mh); diff --git a/src/basic/fileio-label.c b/src/basic/fileio-label.c index 0bcaba412..5fd949e10 100644 --- a/src/basic/fileio-label.c +++ b/src/basic/fileio-label.c @@ -38,8 +38,7 @@ int write_string_file_atomic_label(const char *fn, const char *line) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int write_env_file_label(const char *fname, char **l) { int r; diff --git a/src/basic/fileio-label.h b/src/basic/fileio-label.h index 9fef650ee..34293ab13 100644 --- a/src/basic/fileio-label.h +++ b/src/basic/fileio-label.h @@ -27,8 +27,7 @@ int write_string_file_atomic_label(const char *fn, const char *line); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int write_env_file_label(const char *fname, char **l); int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path); diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 4adae102b..388bc1825 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -813,8 +813,7 @@ int write_env_file(const char *fname, char **l) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int executable_is_script(const char *path, char **interpreter) { int r; _cleanup_free_ char *line = NULL; @@ -997,8 +996,7 @@ int search_and_fopen(const char *path, const char *mode, const char *root, const return search_and_fopen_internal(path, mode, root, copy, _f); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f) { _cleanup_strv_free_ char **s = NULL; @@ -1083,8 +1081,7 @@ int mkostemp_safe(char *pattern, int flags) { return fd; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int open_tmpfile(const char *path, int flags) { char *p; int fd; @@ -1184,8 +1181,7 @@ int tempfn_random(const char *p, const char *extra, char **ret) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int tempfn_random_child(const char *p, const char *extra, char **ret) { char *t, *x; uint64_t u; diff --git a/src/basic/fileio.h b/src/basic/fileio.h index f45b0d54a..b2f1b0dc6 100644 --- a/src/basic/fileio.h +++ b/src/basic/fileio.h @@ -51,8 +51,7 @@ int load_env_file(FILE *f, const char *fname, const char *separator, char ***l); int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l); int write_env_file(const char *fname, char **l); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int executable_is_script(const char *path, char **interpreter); #endif // 0 int get_proc_field(const char *filename, const char *pattern, const char *terminator, char **field); @@ -60,8 +59,7 @@ int get_proc_field(const char *filename, const char *pattern, const char *termin DIR *xopendirat(int dirfd, const char *name, int flags); int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f); #endif // 0 #define FOREACH_LINE(line, f, on_error) \ @@ -77,15 +75,13 @@ int fflush_and_check(FILE *f); int fopen_temporary(const char *path, FILE **_f, char **_temp_path); int mkostemp_safe(char *pattern, int flags); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int open_tmpfile(const char *path, int flags); #endif // 0 int tempfn_xxxxxx(const char *p, const char *extra, char **ret); int tempfn_random(const char *p, const char *extra, char **ret); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int tempfn_random_child(const char *p, const char *extra, char **ret); int write_timestamp_file_atomic(const char *fn, usec_t n); diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 9449e02a3..ba79a329d 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -43,8 +43,7 @@ int unlink_noerrno(const char *path) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int rmdir_parents(const char *path, const char *stop) { size_t l; int r = 0; @@ -171,8 +170,7 @@ int readlink_malloc(const char *p, char **ret) { return readlinkat_malloc(AT_FDCWD, p, ret); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int readlink_value(const char *p, char **ret) { _cleanup_free_ char *link = NULL; char *value; @@ -277,8 +275,7 @@ int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid) { assert(fd >= 0); @@ -370,8 +367,7 @@ int touch(const char *path) { return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int symlink_idempotent(const char *from, const char *to) { _cleanup_free_ char *p = NULL; int r; diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 55ee990f7..b1719b69b 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -30,24 +30,21 @@ #include "time-util.h" int unlink_noerrno(const char *path); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int rmdir_parents(const char *path, const char *stop); int rename_noreplace(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); #endif // 0 int readlinkat_malloc(int fd, const char *p, char **ret); int readlink_malloc(const char *p, char **r); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int readlink_value(const char *p, char **ret); int readlink_and_make_absolute(const char *p, char **r); int readlink_and_canonicalize(const char *p, char **r); int readlink_and_make_absolute_root(const char *root, const char *path, char **ret); #endif // 0 int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid); #endif // 0 int fchmod_umask(int fd, mode_t mode); @@ -58,8 +55,7 @@ int fd_warn_permissions(const char *path, int fd); int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); int touch(const char *path); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int symlink_idempotent(const char *from, const char *to); int symlink_atomic(const char *from, const char *to); @@ -68,8 +64,7 @@ int mkfifo_atomic(const char *path, mode_t mode); #endif // 0 int get_files_in_directory(const char *path, char ***list); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind #define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1) #define FOREACH_INOTIFY_EVENT(e, buffer, sz) \ diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 59d735326..40fef7774 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1458,8 +1458,7 @@ int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int set_remove_and_put(Set *s, const void *old_key, const void *new_key) { struct swap_entries swap; struct hashmap_base_entry *e; @@ -1806,8 +1805,7 @@ char **internal_hashmap_get_strv(HashmapBase *h) { return sv; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void *ordered_hashmap_next(OrderedHashmap *h, const void *key) { struct ordered_hashmap_entry *e; unsigned hash, idx; @@ -1855,8 +1853,7 @@ int set_put_strdup(Set *s, const char *p) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int set_put_strdupv(Set *s, char **l) { int n = 0, r; char **i; diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h index c194575f7..1272088aa 100644 --- a/src/basic/hashmap.h +++ b/src/basic/hashmap.h @@ -368,8 +368,7 @@ static inline void *hashmap_first(Hashmap *h) { static inline void *ordered_hashmap_first(OrderedHashmap *h) { return internal_hashmap_first(HASHMAP_BASE(h)); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* no hashmap_next */ void *ordered_hashmap_next(OrderedHashmap *h, const void *key); #endif // 0 diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c index 6ad479d55..206959dad 100644 --- a/src/basic/hostname-util.c +++ b/src/basic/hostname-util.c @@ -28,8 +28,7 @@ #include "string-util.h" #include "util.h" -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bool hostname_is_set(void) { struct utsname u; @@ -116,8 +115,7 @@ bool hostname_is_valid(const char *s, bool allow_trailing_dot) { return true; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char* hostname_cleanup(char *s) { char *p, *d; bool dot; @@ -165,8 +163,7 @@ bool is_localhost(const char *hostname) { endswith_no_case(hostname, ".localdomain."); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bool is_gateway_hostname(const char *hostname) { assert(hostname); diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index 6eba0a075..2a264888b 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -25,23 +25,20 @@ #include "macro.h" -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bool hostname_is_set(void); char* gethostname_malloc(void); #endif // 0 bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char* hostname_cleanup(char *s); #endif // 0 #define machine_name_is_valid(s) hostname_is_valid(s, false) bool is_localhost(const char *hostname); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bool is_gateway_hostname(const char *hostname); int sethostname_idempotent(const char *s); diff --git a/src/basic/label.c b/src/basic/label.c index c09adcd32..ed7be67b0 100644 --- a/src/basic/label.c +++ b/src/basic/label.c @@ -58,8 +58,7 @@ int mkdir_label(const char *path, mode_t mode) { return mac_smack_fix(path, false, false); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int symlink_label(const char *old_path, const char *new_path) { int r; -- 2.30.2