chiark / gitweb /
Prep v228: Condense elogind source masks (1/5)
authorSven Eden <yamakuzure@gmx.net>
Tue, 11 Apr 2017 15:26:30 +0000 (17:26 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:59:13 +0000 (12:59 +0200)
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

23 files changed:
src/basic/capability-util.c
src/basic/capability-util.h
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/basic/copy.c
src/basic/copy.h
src/basic/errno-list.c
src/basic/errno-list.h
src/basic/extract-word.c
src/basic/extract-word.h
src/basic/fd-util.c
src/basic/fd-util.h
src/basic/fileio-label.c
src/basic/fileio-label.h
src/basic/fileio.c
src/basic/fileio.h
src/basic/fs-util.c
src/basic/fs-util.h
src/basic/hashmap.c
src/basic/hashmap.h
src/basic/hostname-util.c
src/basic/hostname-util.h
src/basic/label.c

index e261e4613c1a769b5bac3346457d244d242a84db..10ff16e42ba76f712b648e2f8b300f7b64791a9e 100644 (file)
@@ -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;
index d835e3f209bf2ff6e9a50160a9f96849c98d726c..7f6b34dfbb0fd46af13b627f46843691fdb814f0 100644 (file)
@@ -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);
index b5de1cc143f55f9ec8c8ed719d22a873fb9eef75..6b7b9f7d8f001c820703ba885f676607d460b442 100644 (file)
@@ -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;
index 6fd77274828247697cd45e69165736c07f3accab..3e7db8dbdb75d97ee4ca21d4a1ffd033c2db7cb3 100644 (file)
@@ -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
index cff446d9f0595e58e5675a7725475edae289e8ee..d807520a9a7b4eb69628b28871fb712af83acb32 100644 (file)
@@ -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;
index 2cc7ad1465fa19c38430c87d9e4af08ad3ec68f4..27fc88621feadbd136d70c51f59f499fc83756a5 100644 (file)
@@ -25,8 +25,7 @@
 #include <stdbool.h>
 #include <sys/types.h>
 
-/// 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
index 5b7ac65ba6c1972ed02b66c3dec966c7de3be849..c41a8b8847c3309e319a445391befe33aac64a01 100644 (file)
@@ -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);
 }
index 752e139fa417f8b9ce8a5e2b740d5125408ad9eb..e6e0520d6c4f043d8d3ac828e086c8123db53f33 100644 (file)
@@ -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
index a03bb92861231dba9c6a16935827f4e51ccff89c..5b993e87081d0578782b2e8c08fa39cfb3dc39c5 100644 (file)
@@ -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,
index 9944825822fcb118e9f7e157366e4b0f22c74246..4d9f6679e04aa447de5ba5c25a6cbfcdf581e149 100644 (file)
@@ -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
index 8b7065fd5d53b8ab1fb30fe11fc53bda2d6250b0..17cafa4bb8b46b5f7cf952e2ed96f8b1dfa9954a 100644 (file)
@@ -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;
index 0e03e26b09c32a42c2a091687704a369ee43a1b4..16304a1afa70f45d90d78814e8adcc3ce27ab9bc 100644 (file)
@@ -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);
index 0bcaba41202ba158fbac6062d4b468226bd94bc1..5fd949e1044072cd0d49eca764cf801ec4953969 100644 (file)
@@ -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;
 
index 9fef650ee5b0cc3b394418b2a045ebb051974b39..34293ab13b29491b45fd44ce842ddeafe8b53ae9 100644 (file)
@@ -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);
index 4adae102bbf0060a5ee95f9220ebcd43b1117d19..388bc1825eddfc7800b4899347fe9a30c7776eae 100644 (file)
@@ -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;
index f45b0d54a64edf123178ab93512d27128de4dd0d..b2f1b0dc6aeab85397b61914e7988b6540d5ff8c 100644 (file)
@@ -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);
index 9449e02a3f8130019553042811c6f08b065d3837..ba79a329daa994dfa56a853a0df490b59d7d8f45 100644 (file)
@@ -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;
index 55ee990f7f1622301d6fe47dbf89bc9fadb42573..b1719b69b44e1ff777a3f545fd452c024e93764d 100644 (file)
 #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) \
index 59d735326afc860d3cded89d89512d3ae7339d7d..40fef77742b2ac02ff56a4ea0c64500265f5b591 100644 (file)
@@ -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;
index c194575f71b68645165a3d5f407b911ac88f4662..1272088aa006f64b206d58e0d91e09c0536a6069 100644 (file)
@@ -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
index 6ad479d55fa53fdfbf9c559929abc4f3be8e6b23..206959dad75ead0766b3fdc4abc6253be1cc3e73 100644 (file)
@@ -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);
 
index 6eba0a0759acf2ec6a54d12a53ce9e793af81499..2a264888bb3a5175d6aaba803480883ce8c0480a 100644 (file)
 
 #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);
index c09adcd32723e82a0e959132290ff1fa5628200b..ed7be67b0be57a9145a7856e8f17c41b436be12d 100644 (file)
@@ -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;