#include <linux/random.h>
]])
-AC_CHECK_TYPES([char16_t, char32_t, key_serial_t, struct ethtool_link_settings],
+AC_CHECK_TYPES([char16_t, char32_t, key_serial_t],
[], [], [[
#include <uchar.h>
-#include <linux/ethtool.h>
]])
AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
return true;
}
+#if 0 /// UNNEEDED by elogind
bool strv_env_is_valid(char **e) {
char **p, **q;
return NULL;
}
-
+S
static bool env_match(const char *t, const char *pattern) {
assert(t);
assert(pattern);
return strv_env_replace(environment, uce);
}
+#endif // 0
REPLACE_ENV_ALLOW_EXTENDED = 4u,
};
+#if 0 /// UNNEEDED by elogind
char *replace_env_n(const char *format, size_t n, char **env, unsigned flags);
char **replace_env_argv(char **argv, char **env);
static inline char *replace_env(const char *format, char **env, unsigned flags) {
return replace_env_n(format, strlen(format), env, flags);
}
+#endif // 0
+#if 0 /// UNNEEDED by elogind
bool strv_env_is_valid(char **e);
#define strv_env_clean(l) strv_env_clean_with_callback(l, NULL, NULL)
char **strv_env_clean_with_callback(char **l, void (*invalid_callback)(const char *p, void *userdata), void *userdata);
int serialize_environment(FILE *f, char **environment);
int deserialize_environment(char ***environment, const char *line);
+#endif // 0
return 0;
}
+#if 0 /// UNNEEDED by elogind
static int gather_environment_generate(int fd, void *arg) {
char ***env = arg, **x, **y;
_cleanup_fclose_ FILE *f = NULL;
gather_environment_collect,
gather_environment_consume,
};
+#endif // 0
void* const callback_args[_STDOUT_CONSUME_MAX],
char *argv[]);
+#if 0 /// UNNEEDED by elogind
extern const gather_stdout_callback_t gather_environment[_STDOUT_CONSUME_MAX];
+#endif // 0
+
return 0;
}
-#endif // 0
int read_nul_string(FILE *f, char **ret) {
_cleanup_free_ char *x = NULL;
*ret = p;
return 0;
}
+#endif // 0
#if 0 /// UNNEEDED by elogind
int link_tmpfile(int fd, const char *path, const char *target);
-#endif // 0
int read_nul_string(FILE *f, char **ret);
int mkdtemp_malloc(const char *template, char **ret);
+#endif // 0
int chase_symlinks(const char *path_with_prefix, const char *root, unsigned flags, char **ret);
+#if 0 /// UNNEEDED by elogind
/* Useful for usage with _cleanup_(), removes a directory and frees the pointer */
static inline void rmdir_and_free(char *p) {
(void) rmdir(p);
free(p);
}
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, unlink_and_free);
+#endif // 0
NULL);
}
+#if 0 /// UNNEEDED by elogind
void log_set_always_reopen_console(bool b) {
always_reopen_console = b;
}
+#endif // 0
void log_received_signal(int level, const struct signalfd_siginfo *si);
void log_set_upgrade_syslog_to_journal(bool b);
-#endif // 0
void log_set_always_reopen_console(bool b);
+#endif // 0
int log_syntax_internal(
const char *unit,
#include <linux/btrfs.h>
#endif
+#if 0 /// UNNEEDED by elogind
#ifdef HAVE_LINUX_VM_SOCKETS_H
#include <linux/vm_sockets.h>
#else
sizeof(unsigned int)];
};
#endif /* !HAVE_LINUX_VM_SOCKETS_H */
+#endif // 0
#include "macro.h"
#define IFA_F_MCAUTOJOIN 0x400
#endif
+#if 0 /// UNNEEDED by elogind
#ifndef HAVE_STRUCT_ETHTOOL_LINK_SETTINGS
#define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */
};
#endif
+#endif // 0
#endif
return log_error_errno(errno, "Failed to unmount %s: %m", what);
return 0;
}
-#endif // 0
const char *mount_propagation_flags_to_string(unsigned long flags) {
return -EINVAL;
return 0;
}
+#endif // 0
unsigned long flags,
const char *options);
int umount_verbose(const char *where);
-#endif // 0
const char *mount_propagation_flags_to_string(unsigned long flags);
int mount_propagation_flags_from_string(const char *name, unsigned long *ret);
+#endif // 0
*ret = n;
return 0;
}
-#endif // 0
int parse_ip_port(const char *s, uint16_t *ret) {
uint16_t l;
return 0;
}
+#endif // 0
#if 0 /// UNNEEDED by elogind
int parse_nice(const char *p, int *ret);
-#endif // 0
int parse_ip_port(const char *s, uint16_t *ret);
+#endif // 0
return a->sockaddr.un.sun_path;
}
-#endif // 0
bool socket_ipv6_is_supported(void) {
if (access("/proc/net/if_inet6", F_OK) != 0)
return true;
}
-#if 0 /// UNNEEDED by elogind
bool socket_address_matches_fd(const SocketAddress *a, int fd) {
SocketAddress b;
socklen_t solen;
};
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ip_tos, int, 0xff);
-#endif // 0
bool ifname_valid(const char *p) {
bool numeric = true;
return true;
}
+#endif // 0
int getpeercred(int fd, struct ucred *ucred) {
socklen_t n = sizeof(struct ucred);
close(cfd);
}
}
-#endif // 0
struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t length) {
struct cmsghdr *cmsg;
return NULL;
}
-#if 0 /// UNNEEDED by elogind
int socket_ioctl_fd(void) {
int fd;
union sockaddr_union {
struct sockaddr sa;
+#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
struct sockaddr_in in;
struct sockaddr_in6 in6;
+#endif // 0
struct sockaddr_un un;
+#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
struct sockaddr_nl nl;
struct sockaddr_storage storage;
struct sockaddr_ll ll;
struct sockaddr_vm vm;
+#endif // 0
};
#if 0 /// UNNEEDED by elogind
bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _pure_;
const char* socket_address_get_path(const SocketAddress *a);
-#endif // 0
bool socket_ipv6_is_supported(void);
-#if 0 /// UNNEEDED by elogind
int sockaddr_port(const struct sockaddr *_sa, unsigned *port);
int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret);
int ip_tos_to_string_alloc(int i, char **s);
int ip_tos_from_string(const char *s);
-#endif // 0
bool ifname_valid(const char *p);
bool address_label_valid(const char *p);
+#endif // 0
int getpeercred(int fd, struct ucred *ucred);
int getpeersec(int fd, char **ret);
#define CMSG_FOREACH(cmsg, mh) \
for ((cmsg) = CMSG_FIRSTHDR(mh); (cmsg); (cmsg) = CMSG_NXTHDR((mh), (cmsg)))
+#if 0 /// UNNEEDED by elogind
struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t length);
+#endif // 0
/* Covers only file system and abstract AF_UNIX socket addresses, but not unnamed socket addresses. */
#define SOCKADDR_UN_LEN(sa) \
is_fs_type(s, RAMFS_MAGIC);
}
+#if 0 /// UNNEEDED by elogind
int fd_is_temporary_fs(int fd) {
struct statfs s;
return fd_is_temporary_fs(fd);
}
+#endif // 0
#endif // 0
bool is_temporary_fs(const struct statfs *s) _pure_;
+#if 0 /// UNNEEDED by elogind
int fd_is_temporary_fs(int fd);
int path_is_temporary_fs(const char *path);
+#endif // 0
/* Because statfs.t_type can be int on some architectures, we have to cast
* the const magic to the type, otherwise the compiler warns about