chiark / gitweb /
Prep v228: Condense elogind source masks (3/5)
authorSven Eden <yamakuzure@gmx.net>
Tue, 11 Apr 2017 15:28:14 +0000 (17:28 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:59:13 +0000 (12:59 +0200)
23 files changed:
src/basic/smack-util.h
src/basic/socket-util.c
src/basic/socket-util.h
src/basic/stat-util.c
src/basic/stat-util.h
src/basic/strv.c
src/basic/strv.h
src/basic/syslog-util.c
src/basic/syslog-util.h
src/basic/terminal-util.c
src/basic/terminal-util.h
src/basic/time-util.c
src/basic/time-util.h
src/basic/unit-name.c
src/basic/unit-name.h
src/basic/user-util.c
src/basic/user-util.h
src/basic/virt.c
src/basic/virt.h
src/basic/xattr-util.c
src/basic/xattr-util.h
src/core/cgroup.c
src/core/cgroup.h

index c7a4eb36a6aba7f4dc1c7db40e2ee49efbc43b34..08caf90c896b3e1be9238bb29ca42fb1ea11b264 100644 (file)
@@ -30,8 +30,7 @@
 #define SMACK_FLOOR_LABEL "_"
 #define SMACK_STAR_LABEL  "*"
 
 #define SMACK_FLOOR_LABEL "_"
 #define SMACK_STAR_LABEL  "*"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 typedef enum SmackAttr {
         SMACK_ATTR_ACCESS = 0,
         SMACK_ATTR_EXEC = 1,
 typedef enum SmackAttr {
         SMACK_ATTR_ACCESS = 0,
         SMACK_ATTR_EXEC = 1,
@@ -48,8 +47,7 @@ bool mac_smack_use(void);
 
 int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
 
 
 int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 const char* smack_attr_to_string(SmackAttr i) _const_;
 SmackAttr smack_attr_from_string(const char *s) _pure_;
 int mac_smack_read(const char *path, SmackAttr attr, char **label);
 const char* smack_attr_to_string(SmackAttr i) _const_;
 SmackAttr smack_attr_from_string(const char *s) _pure_;
 int mac_smack_read(const char *path, SmackAttr attr, char **label);
index 56a40a1deb37b6da06e0c865d8165b30f28ffa31..563c7db607dbde64f2eba4e5591a654a427ab884 100644 (file)
@@ -44,8 +44,7 @@
 #include "user-util.h"
 #include "util.h"
 
 #include "user-util.h"
 #include "util.h"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int socket_address_parse(SocketAddress *a, const char *s) {
         char *e, *n;
         unsigned u;
 int socket_address_parse(SocketAddress *a, const char *s) {
         char *e, *n;
         unsigned u;
@@ -453,8 +452,7 @@ bool socket_ipv6_is_supported(void) {
         return l[0] == '0';
 }
 
         return l[0] == '0';
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool socket_address_matches_fd(const SocketAddress *a, int fd) {
         SocketAddress b;
         socklen_t solen;
 bool socket_address_matches_fd(const SocketAddress *a, int fd) {
         SocketAddress b;
         socklen_t solen;
@@ -797,8 +795,7 @@ int fd_inc_rcvbuf(int fd, size_t n) {
         return 1;
 }
 
         return 1;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 static const char* const ip_tos_table[] = {
         [IPTOS_LOWDELAY] = "low-delay",
         [IPTOS_THROUGHPUT] = "throughput",
 static const char* const ip_tos_table[] = {
         [IPTOS_LOWDELAY] = "low-delay",
         [IPTOS_THROUGHPUT] = "throughput",
@@ -903,8 +900,7 @@ int send_one_fd(int transport_fd, int fd, int flags) {
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int receive_one_fd(int transport_fd, int flags) {
         union {
                 struct cmsghdr cmsghdr;
 int receive_one_fd(int transport_fd, int flags) {
         union {
                 struct cmsghdr cmsghdr;
index 2924c30bfbc860a6ee5887e11ab32c012bcf64ed..6cd67ffa081508dd6890c1191c4cae945c513659 100644 (file)
@@ -41,8 +41,7 @@ union sockaddr_union {
         struct sockaddr_ll ll;
 };
 
         struct sockaddr_ll ll;
 };
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 typedef struct SocketAddress {
         union sockaddr_union sockaddr;
 
 typedef struct SocketAddress {
         union sockaddr_union sockaddr;
 
@@ -102,8 +101,7 @@ const char* socket_address_get_path(const SocketAddress *a);
 
 bool socket_ipv6_is_supported(void);
 
 
 bool socket_ipv6_is_supported(void);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int sockaddr_port(const struct sockaddr *_sa) _pure_;
 
 Sint sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret);
 int sockaddr_port(const struct sockaddr *_sa) _pure_;
 
 Sint sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret);
@@ -124,8 +122,7 @@ bool sockaddr_equal(const union sockaddr_union *a, const union sockaddr_union *b
 
 int fd_inc_sndbuf(int fd, size_t n);
 int fd_inc_rcvbuf(int fd, size_t n);
 
 int fd_inc_sndbuf(int fd, size_t n);
 int fd_inc_rcvbuf(int fd, size_t n);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int ip_tos_to_string_alloc(int i, char **s);
 int ip_tos_from_string(const char *s);
 #endif // 0
 int ip_tos_to_string_alloc(int i, char **s);
 int ip_tos_from_string(const char *s);
 #endif // 0
@@ -134,8 +131,7 @@ int getpeercred(int fd, struct ucred *ucred);
 int getpeersec(int fd, char **ret);
 
 int send_one_fd(int transport_fd, int fd, int flags);
 int getpeersec(int fd, char **ret);
 
 int send_one_fd(int transport_fd, int fd, int flags);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int receive_one_fd(int transport_fd, int flags);
 #endif // 0
 
 int receive_one_fd(int transport_fd, int flags);
 #endif // 0
 
index baa3b5c822f49df5ededea7ab3d8af099fb18029..5bc11e4a32fb7aa7915cc6006eb83428d2f5c930 100644 (file)
@@ -31,8 +31,7 @@
 #include "stat-util.h"
 #include "string-util.h"
 
 #include "stat-util.h"
 #include "string-util.h"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int is_symlink(const char *path) {
         struct stat info;
 
 int is_symlink(const char *path) {
         struct stat info;
 
@@ -61,8 +60,7 @@ int is_dir(const char* path, bool follow) {
         return !!S_ISDIR(st.st_mode);
 }
 
         return !!S_ISDIR(st.st_mode);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int is_device_node(const char *path) {
         struct stat info;
 
 int is_device_node(const char *path) {
         struct stat info;
 
@@ -115,8 +113,7 @@ int null_or_empty_path(const char *fn) {
         return null_or_empty(&st);
 }
 
         return null_or_empty(&st);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int null_or_empty_fd(int fd) {
         struct stat st;
 
 int null_or_empty_fd(int fd) {
         struct stat st;
 
@@ -149,8 +146,7 @@ int path_is_read_only_fs(const char *path) {
         return false;
 }
 
         return false;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int path_is_os_tree(const char *path) {
         char *p;
         int r;
 int path_is_os_tree(const char *path) {
         char *p;
         int r;
@@ -194,8 +190,7 @@ bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) {
         return F_TYPE_EQUAL(s->f_type, magic_value);
 }
 
         return F_TYPE_EQUAL(s->f_type, magic_value);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int fd_check_fstype(int fd, statfs_f_type_t magic_value) {
         struct statfs s;
 
 int fd_check_fstype(int fd, statfs_f_type_t magic_value) {
         struct statfs s;
 
index 23e00885ffd91f43ab76e42196786096afc4fc62..6923898250e8f0910ce2230dc200c52e2d7b9e6b 100644 (file)
 
 #include "macro.h"
 
 
 #include "macro.h"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int is_symlink(const char *path);
 #endif // 0
 int is_dir(const char *path, bool follow);
 int is_symlink(const char *path);
 #endif // 0
 int is_dir(const char *path, bool follow);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int is_device_node(const char *path);
 
 int dir_is_empty(const char *path);
 int is_device_node(const char *path);
 
 int dir_is_empty(const char *path);
@@ -50,14 +48,12 @@ static inline int dir_is_populated(const char *path) {
 
 bool null_or_empty(struct stat *st) _pure_;
 int null_or_empty_path(const char *fn);
 
 bool null_or_empty(struct stat *st) _pure_;
 int null_or_empty_path(const char *fn);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int null_or_empty_fd(int fd);
 #endif // 0
 
 int path_is_read_only_fs(const char *path);
 int null_or_empty_fd(int fd);
 #endif // 0
 
 int path_is_read_only_fs(const char *path);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int path_is_os_tree(const char *path);
 #endif // 0
 
 int path_is_os_tree(const char *path);
 #endif // 0
 
@@ -69,8 +65,7 @@ int files_same(const char *filea, const char *fileb);
 typedef long statfs_f_type_t;
 
 bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) _pure_;
 typedef long statfs_f_type_t;
 
 bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) _pure_;
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int fd_check_fstype(int fd, statfs_f_type_t magic_value);
 int path_check_fstype(const char *path, statfs_f_type_t magic_value);
 #endif // 0
 int fd_check_fstype(int fd, statfs_f_type_t magic_value);
 int path_check_fstype(const char *path, statfs_f_type_t magic_value);
 #endif // 0
index 7401c29081b5d98c9ce2bb002ea5ded2821bc360..825fdcbdfe10474c9f2036c88b3da8ec6e7fdb72 100644 (file)
@@ -244,8 +244,7 @@ rollback:
         return -ENOMEM;
 }
 
         return -ENOMEM;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
         int r;
         char **s;
 int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
         int r;
         char **s;
@@ -299,8 +298,7 @@ char **strv_split(const char *s, const char *separator) {
         return r;
 }
 
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char **strv_split_newlines(const char *s) {
         char **l;
         unsigned n;
 char **strv_split_newlines(const char *s) {
         char **l;
         unsigned n;
@@ -397,8 +395,7 @@ char *strv_join(char **l, const char *separator) {
         return r;
 }
 
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *strv_join_quoted(char **l) {
         char *buf = NULL;
         char **s;
 char *strv_join_quoted(char **l) {
         char *buf = NULL;
         char **s;
@@ -530,8 +527,7 @@ int strv_consume(char ***l, char *value) {
         return r;
 }
 
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_consume_pair(char ***l, char *a, char *b) {
         int r;
 
 int strv_consume_pair(char ***l, char *a, char *b) {
         int r;
 
@@ -580,8 +576,7 @@ char **strv_uniq(char **l) {
         return l;
 }
 
         return l;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool strv_is_uniq(char **l) {
         char **i;
 
 bool strv_is_uniq(char **l) {
         char **i;
 
@@ -676,8 +671,7 @@ char **strv_split_nulstr(const char *s) {
         return r;
 }
 
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_make_nulstr(char **l, char **p, size_t *q) {
         size_t n_allocated = 0, n = 0;
         _cleanup_free_ char *m = NULL;
 int strv_make_nulstr(char **l, char **p, size_t *q) {
         size_t n_allocated = 0, n = 0;
         _cleanup_free_ char *m = NULL;
@@ -739,8 +733,7 @@ char **strv_sort(char **l) {
         return l;
 }
 
         return l;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool strv_equal(char **a, char **b) {
 
         if (strv_isempty(a))
 bool strv_equal(char **a, char **b) {
 
         if (strv_isempty(a))
index d90527c6f6855ef23820d7ab1a0b31952c22bce4..481829cac2f872b714fa372699850c4d63e82977 100644 (file)
@@ -46,29 +46,25 @@ char **strv_copy(char * const *l);
 unsigned strv_length(char * const *l) _pure_;
 
 int strv_extend_strv(char ***a, char **b, bool filter_duplicates);
 unsigned strv_length(char * const *l) _pure_;
 
 int strv_extend_strv(char ***a, char **b, bool filter_duplicates);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
 #endif // 0
 int strv_extend(char ***l, const char *value);
 int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
 #endif // 0
 int strv_extend(char ***l, const char *value);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_extendf(char ***l, const char *format, ...) _printf_(2,0);
 #endif // 0
 int strv_push(char ***l, char *value);
 int strv_push_pair(char ***l, char *a, char *b);
 int strv_push_prepend(char ***l, char *value);
 int strv_consume(char ***l, char *value);
 int strv_extendf(char ***l, const char *format, ...) _printf_(2,0);
 #endif // 0
 int strv_push(char ***l, char *value);
 int strv_push_pair(char ***l, char *a, char *b);
 int strv_push_prepend(char ***l, char *value);
 int strv_consume(char ***l, char *value);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_consume_pair(char ***l, char *a, char *b);
 #endif // 0
 int strv_consume_prepend(char ***l, char *value);
 
 char **strv_remove(char **l, const char *s);
 char **strv_uniq(char **l);
 int strv_consume_pair(char ***l, char *a, char *b);
 #endif // 0
 int strv_consume_prepend(char ***l, char *value);
 
 char **strv_remove(char **l, const char *s);
 char **strv_uniq(char **l);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool strv_is_uniq(char **l);
 
 bool strv_equal(char **a, char **b);
 bool strv_is_uniq(char **l);
 
 bool strv_equal(char **a, char **b);
@@ -88,22 +84,19 @@ static inline bool strv_isempty(char * const *l) {
 }
 
 char **strv_split(const char *s, const char *separator);
 }
 
 char **strv_split(const char *s, const char *separator);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char **strv_split_newlines(const char *s);
 
 int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags);
 #endif // 0
 char *strv_join(char **l, const char *separator);
 char **strv_split_newlines(const char *s);
 
 int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags);
 #endif // 0
 char *strv_join(char **l, const char *separator);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *strv_join_quoted(char **l);
 #endif // 0
 
 char **strv_parse_nulstr(const char *s, size_t l);
 char **strv_split_nulstr(const char *s);
 char *strv_join_quoted(char **l);
 #endif // 0
 
 char **strv_parse_nulstr(const char *s, size_t l);
 char **strv_split_nulstr(const char *s);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_make_nulstr(char **l, char **p, size_t *n);
 
 bool strv_overlap(char **a, char **b) _pure_;
 int strv_make_nulstr(char **l, char **p, size_t *n);
 
 bool strv_overlap(char **a, char **b) _pure_;
@@ -120,8 +113,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);
         for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
 
 char **strv_sort(char **l);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void strv_print(char **l);
 #endif // 0
 
 void strv_print(char **l);
 #endif // 0
 
@@ -172,8 +164,7 @@ void strv_print(char **l);
                 _l[0];                                       \
         }))
 
                 _l[0];                                       \
         }))
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char **strv_reverse(char **l);
 char **strv_shell_escape(char **l, const char *bad);
 
 char **strv_reverse(char **l);
 char **strv_shell_escape(char **l, const char *bad);
 
index 854401aa21ab1be74c87b4c65725042c7cb25695..441b2259f393d4460b063a37730338cecf7fff03 100644 (file)
@@ -26,8 +26,7 @@
 #include "string-table.h"
 #include "syslog-util.h"
 
 #include "string-table.h"
 #include "syslog-util.h"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int syslog_parse_priority(const char **p, int *priority, bool with_facility) {
         int a = 0, b = 0, c = 0;
         int k;
 int syslog_parse_priority(const char **p, int *priority, bool with_facility) {
         int a = 0, b = 0, c = 0;
         int k;
@@ -96,8 +95,7 @@ static const char *const log_facility_unshifted_table[LOG_NFACILITIES] = {
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_facility_unshifted, int, LOG_FAC(~0));
 
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_facility_unshifted, int, LOG_FAC(~0));
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool log_facility_unshifted_is_valid(int facility) {
         return facility >= 0 && facility <= LOG_FAC(~0);
 }
 bool log_facility_unshifted_is_valid(int facility) {
         return facility >= 0 && facility <= LOG_FAC(~0);
 }
@@ -116,8 +114,7 @@ static const char *const log_level_table[] = {
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_level, int, LOG_DEBUG);
 
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_level, int, LOG_DEBUG);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool log_level_is_valid(int level) {
         return level >= 0 && level <= LOG_DEBUG;
 }
 bool log_level_is_valid(int level) {
         return level >= 0 && level <= LOG_DEBUG;
 }
index 15aa83ef18e85b282a2f17a286e3d02f98c09dee..a34159afbaf899ead5e3ec046affcdfc929d2017 100644 (file)
 
 int log_facility_unshifted_to_string_alloc(int i, char **s);
 int log_facility_unshifted_from_string(const char *s);
 
 int log_facility_unshifted_to_string_alloc(int i, char **s);
 int log_facility_unshifted_from_string(const char *s);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool log_facility_unshifted_is_valid(int faciliy);
 #endif // 0
 
 int log_level_to_string_alloc(int i, char **s);
 int log_level_from_string(const char *s);
 bool log_facility_unshifted_is_valid(int faciliy);
 #endif // 0
 
 int log_level_to_string_alloc(int i, char **s);
 int log_level_from_string(const char *s);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool log_level_is_valid(int level);
 
 int syslog_parse_priority(const char **p, int *priority, bool with_facility);
 bool log_level_is_valid(int level);
 
 int syslog_parse_priority(const char **p, int *priority, bool with_facility);
index d34f61e1c7e601dcf7c17b6a7c1dfca6d02d5353..9e7e3b618931bdce13f08c4558acaf95d4ec20ac 100644 (file)
@@ -74,8 +74,7 @@ int chvt(int vt) {
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
         struct termios old_termios, new_termios;
         char c, line[LINE_MAX];
 int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
         struct termios old_termios, new_termios;
         char c, line[LINE_MAX];
@@ -352,8 +351,7 @@ int open_terminal(const char *name, int mode) {
         return fd;
 }
 
         return fd;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int acquire_terminal(
                 const char *name,
                 bool fail,
 int acquire_terminal(
                 const char *name,
                 bool fail,
@@ -503,8 +501,7 @@ fail:
 }
 #endif // 0
 
 }
 #endif // 0
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int release_terminal(void) {
         static const struct sigaction sa_new = {
                 .sa_handler = SIG_IGN,
 int release_terminal(void) {
         static const struct sigaction sa_new = {
                 .sa_handler = SIG_IGN,
@@ -676,8 +673,7 @@ int vtnr_from_tty(const char *tty) {
         return i;
 }
 
         return i;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *resolve_dev_console(char **active) {
         char *tty;
 
 char *resolve_dev_console(char **active) {
         char *tty;
 
@@ -804,8 +800,7 @@ unsigned lines(void) {
 }
 
 /* intended to be used as a SIGWINCH sighandler */
 }
 
 /* intended to be used as a SIGWINCH sighandler */
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void columns_lines_cache_reset(int signum) {
         cached_columns = 0;
         cached_lines = 0;
 void columns_lines_cache_reset(int signum) {
         cached_columns = 0;
         cached_lines = 0;
@@ -855,8 +850,7 @@ int make_null_stdio(void) {
         return make_stdio(null_fd);
 }
 
         return make_stdio(null_fd);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int getttyname_malloc(int fd, char **ret) {
         size_t l = 100;
         int r;
 int getttyname_malloc(int fd, char **ret) {
         size_t l = 100;
         int r;
@@ -999,8 +993,7 @@ int get_ctty(pid_t pid, dev_t *_devnr, char **r) {
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int ptsname_malloc(int fd, char **ret) {
         size_t l = 100;
 
 int ptsname_malloc(int fd, char **ret) {
         size_t l = 100;
 
index 3464a053fd29627510691b60bba6e32437a5565e..1366181449d7d2b10473c689683f2820a8e016dd 100644 (file)
 /* Set cursor to top left corner and clear screen */
 #define ANSI_HOME_CLEAR "\x1B[H\x1B[2J"
 
 /* Set cursor to top left corner and clear screen */
 #define ANSI_HOME_CLEAR "\x1B[H\x1B[2J"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int reset_terminal_fd(int fd, bool switch_to_text);
 int reset_terminal(const char *name);
 #endif // 0
 
 int open_terminal(const char *name, int mode);
 int reset_terminal_fd(int fd, bool switch_to_text);
 int reset_terminal(const char *name);
 #endif // 0
 
 int open_terminal(const char *name, int mode);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int acquire_terminal(const char *name, bool fail, bool force, bool ignore_tiocstty_eperm, usec_t timeout);
 int release_terminal(void);
 
 int acquire_terminal(const char *name, bool fail, bool force, bool ignore_tiocstty_eperm, usec_t timeout);
 int release_terminal(void);
 
@@ -60,8 +58,7 @@ int terminal_vhangup(const char *name);
 
 int chvt(int vt);
 
 
 int chvt(int vt);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
 int ask_char(char *ret, const char *replies, const char *text, ...) _printf_(3, 4);
 int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
 int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
 int ask_char(char *ret, const char *replies, const char *text, ...) _printf_(3, 4);
 int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
@@ -71,21 +68,18 @@ int vt_disallocate(const char *name);
 char *resolve_dev_console(char **active);
 #endif // 0
 bool tty_is_vc(const char *tty);
 char *resolve_dev_console(char **active);
 #endif // 0
 bool tty_is_vc(const char *tty);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool tty_is_vc_resolve(const char *tty);
 #endif // 0
 bool tty_is_console(const char *tty) _pure_;
 int vtnr_from_tty(const char *tty);
 bool tty_is_vc_resolve(const char *tty);
 #endif // 0
 bool tty_is_console(const char *tty) _pure_;
 int vtnr_from_tty(const char *tty);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 const char *default_term_for_tty(const char *tty);
 #endif // 0
 
 int make_stdio(int fd);
 int make_null_stdio(void);
 const char *default_term_for_tty(const char *tty);
 #endif // 0
 
 int make_stdio(int fd);
 int make_null_stdio(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int make_console_stdio(void);
 #endif // 0
 
 int make_console_stdio(void);
 #endif // 0
 
@@ -93,8 +87,7 @@ int fd_columns(int fd);
 unsigned columns(void);
 int fd_lines(int fd);
 unsigned lines(void);
 unsigned columns(void);
 int fd_lines(int fd);
 unsigned lines(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void columns_lines_cache_reset(int _unused_ signum);
 #endif // 0
 
 void columns_lines_cache_reset(int _unused_ signum);
 #endif // 0
 
@@ -135,8 +128,7 @@ static inline const char *ansi_normal(void) {
 int get_ctty_devnr(pid_t pid, dev_t *d);
 int get_ctty(pid_t, dev_t *_devnr, char **r);
 
 int get_ctty_devnr(pid_t pid, dev_t *d);
 int get_ctty(pid_t, dev_t *_devnr, char **r);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int getttyname_malloc(int fd, char **r);
 int getttyname_harder(int fd, char **r);
 
 int getttyname_malloc(int fd, char **r);
 int getttyname_harder(int fd, char **r);
 
index 7fb3745d6c317f1dc0109f070d13c85d5388ed55..f2250947d127349fe419f895ccfa6ae260fd2820 100644 (file)
@@ -41,8 +41,7 @@ usec_t now(clockid_t clock_id) {
         return timespec_load(&ts);
 }
 
         return timespec_load(&ts);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 nsec_t now_nsec(clockid_t clock_id) {
         struct timespec ts;
 
 nsec_t now_nsec(clockid_t clock_id) {
         struct timespec ts;
 
@@ -83,8 +82,7 @@ dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u) {
         return ts;
 }
 
         return ts;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) {
         int64_t delta;
         assert(ts);
 dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) {
         int64_t delta;
         assert(ts);
@@ -226,8 +224,7 @@ char *format_timestamp(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal(buf, l, t, false);
 }
 
         return format_timestamp_internal(buf, l, t, false);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *format_timestamp_utc(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal(buf, l, t, true);
 }
 char *format_timestamp_utc(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal(buf, l, t, true);
 }
@@ -259,8 +256,7 @@ char *format_timestamp_us(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal_us(buf, l, t, false);
 }
 
         return format_timestamp_internal_us(buf, l, t, false);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *format_timestamp_us_utc(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal_us(buf, l, t, true);
 }
 char *format_timestamp_us_utc(char *buf, size_t l, usec_t t) {
         return format_timestamp_internal_us(buf, l, t, true);
 }
@@ -439,8 +435,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
         return buf;
 }
 
         return buf;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t) {
 
         assert(f);
 void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t) {
 
         assert(f);
@@ -852,8 +847,7 @@ int parse_sec(const char *t, usec_t *usec) {
         return parse_time(t, usec, USEC_PER_SEC);
 }
 
         return parse_time(t, usec, USEC_PER_SEC);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int parse_nsec(const char *t, nsec_t *nsec) {
         static const struct {
                 const char *suffix;
 int parse_nsec(const char *t, nsec_t *nsec) {
         static const struct {
                 const char *suffix;
@@ -1150,8 +1144,7 @@ struct tm *localtime_or_gmtime_r(const time_t *t, struct tm *tm, bool utc) {
         return utc ? gmtime_r(t, tm) : localtime_r(t, tm);
 }
 
         return utc ? gmtime_r(t, tm) : localtime_r(t, tm);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 unsigned long usec_to_jiffies(usec_t u) {
         static thread_local unsigned long hz = 0;
         long r;
 unsigned long usec_to_jiffies(usec_t u) {
         static thread_local unsigned long hz = 0;
         long r;
index 1ef78519f17c7469c0052181b8d8e39fd47eead2..78011a802fa0fa3e554ddaa4204b569a0b527726 100644 (file)
@@ -71,15 +71,13 @@ typedef struct dual_timestamp {
 #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL })
 
 usec_t now(clockid_t clock);
 #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL })
 
 usec_t now(clockid_t clock);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 nsec_t now_nsec(clockid_t clock);
 #endif // 0
 
 dual_timestamp* dual_timestamp_get(dual_timestamp *ts);
 dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u);
 nsec_t now_nsec(clockid_t clock);
 #endif // 0
 
 dual_timestamp* dual_timestamp_get(dual_timestamp *ts);
 dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u);
 dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, usec_t u);
 #endif // 0
 dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u);
 dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, usec_t u);
 #endif // 0
@@ -98,20 +96,17 @@ struct timeval *timeval_store(struct timeval *tv, usec_t u);
 nsec_t timespec_load_nsec(const struct timespec *ts) _pure_;
 
 char *format_timestamp(char *buf, size_t l, usec_t t);
 nsec_t timespec_load_nsec(const struct timespec *ts) _pure_;
 
 char *format_timestamp(char *buf, size_t l, usec_t t);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *format_timestamp_utc(char *buf, size_t l, usec_t t);
 #endif // 0
 char *format_timestamp_us(char *buf, size_t l, usec_t t);
 char *format_timestamp_utc(char *buf, size_t l, usec_t t);
 #endif // 0
 char *format_timestamp_us(char *buf, size_t l, usec_t t);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *format_timestamp_us_utc(char *buf, size_t l, usec_t t);
 #endif // 0
 char *format_timestamp_relative(char *buf, size_t l, usec_t t);
 char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy);
 
 char *format_timestamp_us_utc(char *buf, size_t l, usec_t t);
 #endif // 0
 char *format_timestamp_relative(char *buf, size_t l, usec_t t);
 char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t);
 int dual_timestamp_deserialize(const char *value, dual_timestamp *t);
 
 void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t);
 int dual_timestamp_deserialize(const char *value, dual_timestamp *t);
 
@@ -120,8 +115,7 @@ int parse_timestamp(const char *t, usec_t *usec);
 
 int parse_sec(const char *t, usec_t *usec);
 int parse_time(const char *t, usec_t *usec, usec_t default_unit);
 
 int parse_sec(const char *t, usec_t *usec);
 int parse_time(const char *t, usec_t *usec, usec_t default_unit);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int parse_nsec(const char *t, nsec_t *nsec);
 
 bool ntp_synced(void);
 int parse_nsec(const char *t, nsec_t *nsec);
 
 bool ntp_synced(void);
@@ -136,15 +130,13 @@ clockid_t clock_boottime_or_monotonic(void);
         assert_message_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0, \
                           "xstrftime: " #buf "[] must be big enough")
 
         assert_message_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0, \
                           "xstrftime: " #buf "[] must be big enough")
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int get_timezone(char **timezone);
 
 time_t mktime_or_timegm(struct tm *tm, bool utc);
 #endif // 0
 struct tm *localtime_or_gmtime_r(const time_t *t, struct tm *tm, bool utc);
 
 int get_timezone(char **timezone);
 
 time_t mktime_or_timegm(struct tm *tm, bool utc);
 #endif // 0
 struct tm *localtime_or_gmtime_r(const time_t *t, struct tm *tm, bool utc);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 unsigned long usec_to_jiffies(usec_t usec);
 #endif // 0
 unsigned long usec_to_jiffies(usec_t usec);
 #endif // 0
index 2e3093b33ea13f62ae187b7a1e831d7b5a0c8d69..b76567dc4aeb87e754e3fa679aa96e5778dfa6b4 100644 (file)
@@ -122,8 +122,7 @@ bool unit_suffix_is_valid(const char *s) {
         return true;
 }
 
         return true;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int unit_name_to_prefix(const char *n, char **ret) {
         const char *p;
         char *s;
 int unit_name_to_prefix(const char *n, char **ret) {
         const char *p;
         char *s;
@@ -271,8 +270,7 @@ int unit_name_build(const char *prefix, const char *instance, const char *suffix
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 static char *do_escape_char(char c, char *t) {
         assert(t);
 
 static char *do_escape_char(char c, char *t) {
         assert(t);
 
@@ -836,8 +834,7 @@ static const char* const unit_type_table[_UNIT_TYPE_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
 
 
 DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
         [UNIT_STUB] = "stub",
         [UNIT_LOADED] = "loaded",
 static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
         [UNIT_STUB] = "stub",
         [UNIT_LOADED] = "loaded",
index 2c56d12a2944a313e76af4f49dac9961e1a4f671..0d0831115243cf5b87b1b10d9dad7fb951339d62 100644 (file)
@@ -44,8 +44,7 @@ typedef enum UnitType {
         _UNIT_TYPE_INVALID = -1
 } UnitType;
 
         _UNIT_TYPE_INVALID = -1
 } UnitType;
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 typedef enum UnitLoadState {
         UNIT_STUB = 0,
         UNIT_LOADED,
 typedef enum UnitLoadState {
         UNIT_STUB = 0,
         UNIT_LOADED,
@@ -275,8 +274,7 @@ bool unit_prefix_is_valid(const char *p) _pure_;
 bool unit_instance_is_valid(const char *i) _pure_;
 bool unit_suffix_is_valid(const char *s) _pure_;
 
 bool unit_instance_is_valid(const char *i) _pure_;
 bool unit_suffix_is_valid(const char *s) _pure_;
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 static inline int unit_prefix_and_instance_is_valid(const char *p) {
         /* For prefix+instance and instance the same rules apply */
         return unit_instance_is_valid(p);
 static inline int unit_prefix_and_instance_is_valid(const char *p) {
         /* For prefix+instance and instance the same rules apply */
         return unit_instance_is_valid(p);
@@ -293,8 +291,7 @@ int unit_name_change_suffix(const char *n, const char *suffix, char **ret);
 
 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret);
 
 
 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *unit_name_escape(const char *f);
 int unit_name_unescape(const char *f, char **ret);
 int unit_name_path_escape(const char *f, char **ret);
 char *unit_name_escape(const char *f);
 int unit_name_unescape(const char *f, char **ret);
 int unit_name_path_escape(const char *f, char **ret);
@@ -333,8 +330,7 @@ bool slice_name_is_valid(const char *name);
 const char *unit_type_to_string(UnitType i) _const_;
 UnitType unit_type_from_string(const char *s) _pure_;
 
 const char *unit_type_to_string(UnitType i) _const_;
 UnitType unit_type_from_string(const char *s) _pure_;
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 const char *unit_load_state_to_string(UnitLoadState i) _const_;
 UnitLoadState unit_load_state_from_string(const char *s) _pure_;
 
 const char *unit_load_state_to_string(UnitLoadState i) _const_;
 UnitLoadState unit_load_state_from_string(const char *s) _pure_;
 
index 97ff2af4a121d6da72eb43d2d81b6631cbb7817b..e1ab313bf8cea1b2710a9fa101bb2fffaf879855 100644 (file)
@@ -67,8 +67,7 @@ int parse_uid(const char *s, uid_t *ret) {
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char* getlogname_malloc(void) {
         uid_t uid;
         struct stat st;
 char* getlogname_malloc(void) {
         uid_t uid;
         struct stat st;
@@ -286,8 +285,7 @@ char* gid_to_name(gid_t gid) {
         return ret;
 }
 
         return ret;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int in_gid(gid_t gid) {
         gid_t *gids;
         int ngroups_max, r, i;
 int in_gid(gid_t gid) {
         gid_t *gids;
         int ngroups_max, r, i;
@@ -437,8 +435,7 @@ int reset_uid_gid(void) {
         return 0;
 }
 
         return 0;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int take_etc_passwd_lock(const char *root) {
 
         struct flock flock = {
 int take_etc_passwd_lock(const char *root) {
 
         struct flock flock = {
index 235d0769aa1db2d2b390555be43f8e78ba1d530a..4f098d085ba65cddba0a9a86c559ff9e64b99fdd 100644 (file)
@@ -36,8 +36,7 @@ static inline int parse_gid(const char *s, gid_t *ret_gid) {
         return parse_uid(s, (uid_t*) ret_gid);
 }
 
         return parse_uid(s, (uid_t*) ret_gid);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char* getlogname_malloc(void);
 char* getusername_malloc(void);
 #endif // 0
 char* getlogname_malloc(void);
 char* getusername_malloc(void);
 #endif // 0
@@ -48,8 +47,7 @@ int get_group_creds(const char **groupname, gid_t *gid);
 char* uid_to_name(uid_t uid);
 char* gid_to_name(gid_t gid);
 
 char* uid_to_name(uid_t uid);
 char* gid_to_name(gid_t gid);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int in_gid(gid_t gid);
 int in_group(const char *name);
 
 int in_gid(gid_t gid);
 int in_group(const char *name);
 
@@ -59,8 +57,7 @@ int get_shell(char **_ret);
 
 int reset_uid_gid(void);
 
 
 int reset_uid_gid(void);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int take_etc_passwd_lock(const char *root);
 #endif // 0
 
 int take_etc_passwd_lock(const char *root);
 #endif // 0
 
index ca4a051cfcceab0fcef9a9cc35ea8f2ca901e7a6..7c0666cc244445a22d69e0229fd90c0ee75dce39 100644 (file)
@@ -409,8 +409,7 @@ finish:
         return r;
 }
 
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int detect_virtualization(void) {
         int r;
 
 int detect_virtualization(void) {
         int r;
 
index 17e7310ac818964829dd4f764fd3c7442fabd31b..feb47d50e37eef578addb8e43431c59296761d21 100644 (file)
@@ -66,8 +66,7 @@ static inline bool VIRTUALIZATION_IS_CONTAINER(int x) {
 
 int detect_vm(void);
 int detect_container(void);
 
 int detect_vm(void);
 int detect_container(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int detect_virtualization(void);
 #endif // 0
 
 int detect_virtualization(void);
 #endif // 0
 
index d440b3cd04cc838389bef1799f9e904923315496..e00f1819d70693d9b8afee241557ed4231aeee8f 100644 (file)
@@ -98,8 +98,7 @@ int fgetxattr_malloc(int fd, const char *name, char **value) {
         }
 }
 
         }
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags) {
         char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1];
         _cleanup_close_ int fd = -1;
 ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags) {
         char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1];
         _cleanup_close_ int fd = -1;
index c535b4a0cfd8c0325c170b7a9de0fb5ce509a42e..5ee598f15a08fde7f4141031b10c28e0523c2485 100644 (file)
@@ -29,8 +29,7 @@
 int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink);
 int fgetxattr_malloc(int fd, const char *name, char **value);
 
 int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink);
 int fgetxattr_malloc(int fd, const char *name, char **value);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags);
 
 int fd_setcrtime(int fd, usec_t usec);
 ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags);
 
 int fd_setcrtime(int fd, usec_t usec);
index b2d9d7f0ae556287ce8edab6dd364265b190d7c3..a8d3ae36bef2b1aa9208f2f75f04672421a29786 100644 (file)
@@ -37,8 +37,7 @@
 
 #define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
 
 
 #define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 void cgroup_context_init(CGroupContext *c) {
         assert(c);
 
 void cgroup_context_init(CGroupContext *c) {
         assert(c);
 
@@ -1535,8 +1534,7 @@ void manager_shutdown_cgroup(Manager *m, bool delete) {
         m->cgroup_root = mfree(m->cgroup_root);
 }
 
         m->cgroup_root = mfree(m->cgroup_root);
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 Unit* manager_get_unit_by_cgroup(Manager *m, const char *cgroup) {
         char *p;
         Unit *u;
 Unit* manager_get_unit_by_cgroup(Manager *m, const char *cgroup) {
         char *p;
         Unit *u;
index 008588b68619581d683c1193b371df9322c01e56..7322556893c0bd05b5eb715e9a9cfb95405ad144 100644 (file)
@@ -27,8 +27,7 @@
 // #include "time-util.h"
 #include "logind.h"
 
 // #include "time-util.h"
 #include "logind.h"
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 typedef struct CGroupContext CGroupContext;
 Stypedef struct CGroupDeviceAllow CGroupDeviceAllow;
 typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight;
 typedef struct CGroupContext CGroupContext;
 Stypedef struct CGroupDeviceAllow CGroupDeviceAllow;
 typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight;
@@ -161,8 +160,7 @@ int unit_remove_from_netclass_cgroup(Unit *u);
 int manager_setup_cgroup(Manager *m);
 void manager_shutdown_cgroup(Manager *m, bool delete);
 
 int manager_setup_cgroup(Manager *m);
 void manager_shutdown_cgroup(Manager *m, bool delete);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 unsigned manager_dispatch_cgroup_queue(Manager *m);
 
 Unit *manager_get_unit_by_cgroup(Manager *m, const char *cgroup);
 unsigned manager_dispatch_cgroup_queue(Manager *m);
 
 Unit *manager_get_unit_by_cgroup(Manager *m, const char *cgroup);