return s;
}
+/// UNNEEDED by elogind
+#if 0
char *delete_chars(char *s, const char *bad) {
char *f, *t;
return s;
}
+#endif // 0
char *file_in_same_dir(const char *path, const char *filename) {
char *e, *ret;
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid) {
assert(fd >= 0);
return 0;
}
+#endif // 0
cpu_set_t* cpu_set_malloc(unsigned *ncpus) {
cpu_set_t *r;
return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, 0);
}
+/// UNNEEDED by elogind
+#if 0
static char *unquote(const char *s, const char* quotes) {
size_t l;
assert(s);
return strdup(s);
}
+#endif // 0
noreturn void freeze(void) {
return null_or_empty(&st);
}
+/// UNNEEDED by elogind
+#if 0
int null_or_empty_fd(int fd) {
struct stat st;
return null_or_empty(&st);
}
+#endif // 0
DIR *xopendirat(int fd, const char *name, int flags) {
int nfd;
return d;
}
+/// UNNEEDED by elogind
+#if 0
static char *tag_to_udev_node(const char *tagvalue, const char *by) {
_cleanup_free_ char *t = NULL, *u = NULL;
size_t enc_len;
return strdup(p);
}
+#endif // 0
bool dirent_is_file(const struct dirent *de) {
assert(de);
return endswith(de->d_name, suffix);
}
+/// UNNEEDED by elogind
+#if 0
static int do_execute(char **directories, usec_t timeout, char *argv[]) {
_cleanup_hashmap_free_free_ Hashmap *pids = NULL;
_cleanup_set_free_free_ Set *seen = NULL;
wait_for_terminate_and_warn(name, executor_pid, true);
}
+#endif // 0
bool nulstr_contains(const char*nulstr, const char *needle) {
const char *i;
return false;
}
+/// UNNEEDED by elogind
+#if 0
bool plymouth_running(void) {
return access("/run/plymouth/pid", F_OK) >= 0;
}
+#endif // 0
char* strshorten(char *s, size_t l) {
assert(s);
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int symlink_idempotent(const char *from, const char *to) {
_cleanup_free_ char *p = NULL;
int r;
return 0;
}
+#endif // 0
bool display_is_local(const char *display) {
assert(display);
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int in_group(const char *name) {
int r;
gid_t gid;
return in_gid(gid);
}
+#endif // 0
int glob_exists(const char *path) {
_cleanup_globfree_ glob_t g = {};
return errno ? -errno : -EIO;
}
+/// UNNEEDED by elogind
+#if 0
int glob_extend(char ***strv, const char *path) {
_cleanup_globfree_ glob_t g = {};
int k;
return k;
}
+#endif // 0
int dirent_ensure_type(DIR *d, struct dirent *de) {
struct stat st;
return loaded;
}
+/// UNNEEDED by elogind
+#if 0
int prot_from_flags(int flags) {
switch (flags & O_ACCMODE) {
return -EINVAL;
}
}
-
+#endif // 0
char *format_bytes(char *buf, size_t l, off_t t) {
unsigned i;
return 0;
}
+/// UNNEEDED by elogind
+#if 0
bool http_etag_is_valid(const char *etag) {
if (isempty(etag))
return false;
return true;
}
+#endif // 0
bool http_url_is_valid(const char *url) {
const char *p;
return true;
}
+/// UNNEEDED by elogind
+#if 0
/* hey glibc, APIs with callbacks without a user pointer are so useless */
void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
int (*compar) (const void *, const void *, void *), void *arg) {
setlocale(LC_ALL, "");
textdomain(GETTEXT_PACKAGE);
}
+#endif // 0
bool is_locale_utf8(void) {
const char *set;
return search_and_fopen_internal(path, mode, root, copy, _f);
}
+/// UNNEEDED by elogind
+#if 0
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;
return search_and_fopen_internal(path, mode, root, s, _f);
}
+#endif // 0
char *strextend(char **x, ...) {
va_list ap;
return true;
}
+/// UNNEEDED by elogind
+#if 0
int split_pair(const char *s, const char *sep, char **l, char **r) {
char *x, *a, *b;
return parse_boolean(value) != 0;
}
+#endif // 0
int proc_cmdline(char **ret) {
assert(ret);
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int get_proc_cmdline_key(const char *key, char **value) {
_cleanup_free_ char *line = NULL, *ret = NULL;
bool found = false;
return found;
}
+#endif // 0
int container_get_leader(const char *machine, pid_t *pid) {
_cleanup_free_ char *s = NULL, *class = NULL;
return 0;
}
+/// UNNEEDED by elogind
+#if 0
unsigned long personality_from_string(const char *p) {
/* Parse a personality specifier. We introduce our own
return PERSONALITY_INVALID;
}
+#endif // 0
const char* personality_to_string(unsigned long p) {
return (uint64_t) mem * (uint64_t) page_size();
}
+/// UNNEEDED by elogind
+#if 0
void hexdump(FILE *f, const void *p, size_t s) {
const uint8_t *b = p;
unsigned n = 0;
s -= 16;
}
}
+#endif // 0
int update_reboot_param_file(const char *param) {
int r = 0;
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int tempfn_random_child(const char *p, const char *extra, char **ret) {
char *t, *x;
uint64_t u;
return fd;
}
+#endif // 0
int is_symlink(const char *path) {
struct stat info;
return !!S_ISDIR(st.st_mode);
}
+/// UNNEEDED by elogind
+#if 0
int is_device_node(const char *path) {
struct stat info;
return !!(S_ISBLK(info.st_mode) || S_ISCHR(info.st_mode));
}
+#endif // 0
int unquote_first_word(const char **p, char **ret, UnquoteFlags flags) {
_cleanup_free_ char *s = NULL;
return r;
}
+/// UNNEEDED by elogind
+#if 0
int unquote_many_words(const char **p, UnquoteFlags flags, ...) {
va_list ap;
char **l;
return c;
}
+#endif // 0
int free_and_strdup(char **p, const char *s) {
char *t;
}
}
+/// UNNEEDED by elogind
+#if 0
int openpt_in_namespace(pid_t pid, int flags) {
_cleanup_close_ int pidnsfd = -1, mntnsfd = -1, rootfd = -1;
_cleanup_close_pair_ int pair[2] = { -1, -1 };
return -EIO;
}
+#endif // 0
ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags) {
_cleanup_close_ int fd = -1;
return parse_crtime(le, usec);
}
+/// UNNEEDED by elogind
+#if 0
int path_getcrtime(const char *p, usec_t *usec) {
le64_t le;
ssize_t n;
return parse_crtime(le, usec);
}
+#endif // 0
int fd_setcrtime(int fd, usec_t usec) {
le64_t le;
return read_attr_fd(fd, ret);
}
+/// UNNEEDED by elogind
+#if 0
static size_t nul_length(const uint8_t *p, size_t sz) {
size_t n = 0;
return q - (const uint8_t*) p;
}
+#endif // 0
void sigkill_wait(pid_t *pid) {
if (!pid)
(void) wait_for_terminate(*pid, NULL);
}
+/// UNNEEDED by elogind
+#if 0
int syslog_parse_priority(const char **p, int *priority, bool with_facility) {
int a = 0, b = 0, c = 0;
int k;
*p += k;
return 1;
}
+#endif // 0
ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
size_t i;