bool cg_ns_supported(void);
#endif // 0
-#if 0 /// UNNEEDED by elogind
int cg_all_unified(void);
int cg_hybrid_unified(void);
int cg_unified_controller(const char *controller);
int cg_unified_flush(void);
+#if 0 /// UNNEEDED by elogind
bool cg_is_unified_wanted(void);
#endif // 0
bool cg_is_legacy_wanted(void);
return 0;
}
-#if 0 /// UNNEEDED by elogind
int conf_files_list_strv(char ***strv, const char *suffix, const char *root, const char* const* dirs) {
_cleanup_strv_free_ char **copy = NULL;
return conf_files_list_strv_internal(strv, suffix, root, copy);
}
+#if 0 /// UNNEEDED by elogind
int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...) {
_cleanup_strv_free_ char **dirs = NULL;
va_list ap;
#if 0 /// UNNEEDED by elogind
int conf_files_list(char ***ret, const char *suffix, const char *root, const char *dir, ...);
-int conf_files_list_strv(char ***ret, const char *suffix, const char *root, const char* const* dirs);
#endif // 0
+int conf_files_list_strv(char ***ret, const char *suffix, const char *root, const char* const* dirs);
int conf_files_list_nulstr(char ***ret, const char *suffix, const char *root, const char *dirs);
#include <stdint.h>
#include <sys/types.h>
-#if 0 /// UNNEEDED by elogind
-#endif // 0
-#if 0 /// UNNEEDED by elogind
typedef enum CopyFlags {
COPY_REFLINK = 0x1, /* try to reflink */
COPY_MERGE = 0x2, /* merge existing trees with our new one to copy */
COPY_REPLACE = 0x4, /* replace an existing file if there's one */
} CopyFlags;
+#if 0 /// UNNEEDED by elogind
int copy_file_fd(const char *from, int to, CopyFlags copy_flags);
int copy_file(const char *from, const char *to, int open_flags, mode_t mode, unsigned chattr_flags, CopyFlags copy_flags);
int copy_file_atomic(const char *from, const char *to, mode_t mode, unsigned chattr_flags, CopyFlags copy_flags);
int copy_tree_at(int fdf, const char *from, int fdt, const char *to, uid_t override_uid, gid_t override_gid, CopyFlags copy_flags);
int copy_directory_fd(int dirfd, const char *to, CopyFlags copy_flags);
int copy_directory(const char *from, const char *to, CopyFlags copy_flags);
+#endif // 0
int copy_bytes(int fdf, int fdt, uint64_t max_bytes, CopyFlags copy_flags);
+#if 0 /// UNNEEDED by elogind
int copy_times(int fdf, int fdt);
int copy_xattr(int fdf, int fdt);
#endif // 0
*rl = m;
return 0;
}
+#endif // 0
static int load_env_file_push_pairs(
const char *filename, unsigned line,
*rl = m;
return 0;
}
+#if 0 /// UNNEEDED by elogind
static int merge_env_file_push(
const char *filename, unsigned line,
return fputs(s, f);
}
+#endif // 0
int open_tmpfile_unlinkable(const char *directory, int flags) {
char *p;
return fd;
}
+#if 0 /// UNNEEDED by elogind
int open_tmpfile_linkable(const char *target, int flags, char **ret_path) {
_cleanup_free_ char *tmp = NULL;
int r, fd;
return fd;
}
+#endif // 0
int open_serialization_fd(const char *ident) {
int fd = -1;
return fd;
}
+#if 0 /// UNNEEDED by elogind
int link_tmpfile(int fd, const char *path, const char *target) {
assert(fd >= 0);
int parse_env_file(const char *fname, const char *separator, ...) _sentinel_;
#if 0 /// UNNEEDED by elogind
int load_env_file(FILE *f, const char *fname, const char *separator, char ***l);
+#endif // 0
int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l);
+#if 0 /// UNNEEDED by elogind
int write_env_file(const char *fname, char **l);
int executable_is_script(const char *path, char **interpreter);
int read_timestamp_file(const char *fn, usec_t *ret);
int fputs_with_space(FILE *f, const char *s, const char *separator, bool *space);
+#endif // 0
int open_tmpfile_unlinkable(const char *directory, int flags);
+#if 0 /// UNNEEDED by elogind
int open_tmpfile_linkable(const char *target, int flags, char **ret_path);
+#endif // 0
int open_serialization_fd(const char *ident);
+#if 0 /// UNNEEDED by elogind
int link_tmpfile(int fd, const char *path, const char *target);
#endif // 0
#include "mkdir.h"
#include "parse-util.h"
#include "path-util.h"
+#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
//#include "time-util.h"
return n;
}
-#if 0 /// UNNEEDED by elogind
static int getenv_tmp_dir(const char **ret_path) {
const char *n;
int r, ret = 0;
return 0;
}
+#if 0 /// UNNEEDED by elogind
int var_tmp_dir(const char **ret) {
/* Returns the location for "larger" temporary files, that is backed by physical storage if available, and thus
return tmp_dir_internal("/var/tmp", ret);
}
+#endif // 0
int tmp_dir(const char **ret) {
return tmp_dir_internal("/tmp", ret);
}
+#if 0 /// UNNEEDED by elogind
int inotify_add_watch_fd(int fd, int what, uint32_t mask) {
char path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1];
int r;
return r;
}
+#endif // 0
int chase_symlinks(const char *path, const char *original_root, unsigned flags, char **ret) {
_cleanup_free_ char *buffer = NULL, *done = NULL, *root = NULL;
return exists;
}
-#endif // 0
int get_files_in_directory(const char *path, char ***list);
-#if 0 /// UNNEEDED by elogind
int tmp_dir(const char **ret);
+#if 0 /// UNNEEDED by elogind
int var_tmp_dir(const char **ret);
#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)
typedef int32_t key_serial_t;
#endif
-#if 0 /// UNNEEDED by elogind
#ifndef KEYCTL_JOIN_SESSION_KEYRING
#define KEYCTL_JOIN_SESSION_KEYRING 1
#endif
#ifndef KEY_SPEC_USER_KEYRING
#define KEY_SPEC_USER_KEYRING -4
#endif
-#endif // 0
#ifndef KEY_SPEC_SESSION_KEYRING
#define KEY_SPEC_SESSION_KEYRING -3
return (pid_t) syscall(__NR_getpid);
#endif
}
-
+#endif // 0
/* ======================================================================= */
#if !HAVE_DECL_RENAMEAT2
# endif
}
#endif
-#endif // 0
/* ======================================================================= */
mkfs = strjoina("mkfs.", fstype);
return binary_is_good(mkfs);
}
+#endif // 0
char *prefix_root(const char *root, const char *path) {
char *n, *p;
return n;
}
+#if 0 /// UNNEEDED by elogind
int parse_path_argument_and_warn(const char *path, bool suppress_root, char **arg) {
char *p;
int r;
(a == '-' && b == '_');
}
+#if 0 /// UNNEEDED by elogind
char *proc_cmdline_key_startswith(const char *s, const char *prefix) {
assert(s);
return (char*) s;
}
+#endif // 0
bool proc_cmdline_key_streq(const char *x, const char *y) {
assert(x);
return true;
}
+#if 0 /// UNNEEDED by elogind
int proc_cmdline_get_key(const char *key, unsigned flags, char **value) {
_cleanup_free_ char *line = NULL, *ret = NULL;
bool found = false;
return 1;
}
-#if 0 /// UNNEEDED by elogind
int shall_restore_state(void) {
bool ret;
int r;
int proc_cmdline(char **ret);
-#if 0 /// UNNEEDED by elogind
int proc_cmdline_parse(const proc_cmdline_parse_t parse, void *userdata, unsigned flags);
+#if 0 /// UNNEEDED by elogind
int proc_cmdline_get_key(const char *parameter, unsigned flags, char **value);
int proc_cmdline_get_bool(const char *key, bool *ret);
char *proc_cmdline_key_startswith(const char *s, const char *prefix);
+#endif // 0
bool proc_cmdline_key_streq(const char *x, const char *y);
+#if 0 /// UNNEEDED by elogind
int shall_restore_state(void);
const char* runlevel_to_target(const char *rl);
#endif // 0
return !p || !p[0];
}
-#if 0 /// UNNEEDED by elogind
static inline const char *empty_to_null(const char *p) {
return isempty(p) ? NULL : p;
}
+#if 0 /// UNNEEDED by elogind
static inline const char *strdash_if_empty(const char *str) {
return isempty(str) ? "-" : str;
}
return l;
}
+#endif // 0
int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags) {
_cleanup_strv_free_ char **l = NULL;
return (int) n;
}
-#endif // 0
char *strv_join(char **l, const char *separator) {
char *r, *e;
char **strv_split(const char *s, const char *separator);
#if 0 /// UNNEEDED by elogind
char **strv_split_newlines(const char *s);
+#endif // 0
int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags);
-#endif // 0
char *strv_join(char **l, const char *separator);
#if 0 /// UNNEEDED by elogind