summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@prydeworx.com>2018-10-24 08:22:22 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-11-08 08:02:57 +0100
commit0f0857b9478c382b392cdf970e4d188df8b0da9c (patch)
treecb94ededf77a7a395ca43864f07fc485946d6469
parent18924a1e18b3c6159bf49a364e8bc339bb5175ae (diff)
Prep v240: Cleanup empty mask blocks and unused functions.
-rw-r--r--src/basic/errno-list.c2
-rw-r--r--src/basic/fileio.c2
-rw-r--r--src/basic/fileio.h2
-rw-r--r--src/basic/unit-def.c2
-rw-r--r--src/basic/unit-def.h2
-rw-r--r--src/basic/unit-name.c4
-rw-r--r--src/basic/unit-name.h6
-rw-r--r--src/libelogind/sd-bus/bus-kernel.h7
-rw-r--r--src/shared/bus-util.h4
-rw-r--r--src/shared/nsflags.h4
10 files changed, 11 insertions, 24 deletions
diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
index 0549fce..1b72bbf 100644
--- a/src/basic/errno-list.c
+++ b/src/basic/errno-list.c
@@ -35,5 +35,3 @@ int errno_from_name(const char *name) {
assert(sc->id > 0);
return sc->id;
}
-#if 0 /// UNNEEDED by elogind
-#endif // 0
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 0269269..41c3819 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -780,7 +780,6 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) {
*rl = m;
return 0;
}
-#endif // 0
static int load_env_file_push_pairs(
const char *filename, unsigned line,
@@ -830,7 +829,6 @@ int load_env_file_pairs(FILE *f, const char *fname, const char *newline, char **
*rl = m;
return 0;
}
-#if 0 /// UNNEEDED by elogind
static int merge_env_file_push(
const char *filename, unsigned line,
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index eac22ff..117e8c4 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -45,8 +45,8 @@ int parse_env_filev(FILE *f, const char *fname, const char *separator, va_list a
int parse_env_file(FILE *f, 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);
+#endif // 0
#if 0 /// UNNEEDED by elogind
int merge_env_file(char ***env, FILE *f, const char *fname);
diff --git a/src/basic/unit-def.c b/src/basic/unit-def.c
index ac6a9b3..2987a17 100644
--- a/src/basic/unit-def.c
+++ b/src/basic/unit-def.c
@@ -34,6 +34,7 @@ int unit_name_from_dbus_path(const char *path, char **name) {
return 0;
}
+#if 0 /// elogind does not support systemd units
const char* unit_dbus_interface_from_type(UnitType t) {
static const char *const table[_UNIT_TYPE_MAX] = {
@@ -67,6 +68,7 @@ const char *unit_dbus_interface_from_name(const char *name) {
return unit_dbus_interface_from_type(t);
}
+#endif // 0
static const char* const unit_type_table[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = "service",
diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h
index d7e2d74..415f06e 100644
--- a/src/basic/unit-def.h
+++ b/src/basic/unit-def.h
@@ -232,8 +232,10 @@ typedef enum NotifyAccess {
char *unit_dbus_path_from_name(const char *name);
int unit_name_from_dbus_path(const char *path, char **name);
+#if 0 /// elogind does not support systemd units
const char* unit_dbus_interface_from_type(UnitType t);
const char *unit_dbus_interface_from_name(const char *name);
+#endif // 0
const char *unit_type_to_string(UnitType i) _const_;
UnitType unit_type_from_string(const char *s) _pure_;
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
index bd0e3f4..13c86e3 100644
--- a/src/basic/unit-name.c
+++ b/src/basic/unit-name.c
@@ -102,6 +102,7 @@ bool unit_instance_is_valid(const char *i) {
return in_charset(i, "@" VALID_CHARS);
}
+#if 0 /// UNNEEDED by elogind
bool unit_suffix_is_valid(const char *s) {
if (isempty(s))
@@ -116,7 +117,6 @@ bool unit_suffix_is_valid(const char *s) {
return true;
}
-#if 0 /// UNNEEDED by elogind
int unit_name_to_prefix(const char *n, char **ret) {
const char *p;
char *s;
@@ -193,7 +193,6 @@ int unit_name_to_prefix_and_instance(const char *n, char **ret) {
*ret = s;
return 0;
}
-#endif // 0
UnitType unit_name_to_type(const char *n) {
const char *e;
@@ -208,7 +207,6 @@ UnitType unit_name_to_type(const char *n) {
return unit_type_from_string(e + 1);
}
-#if 0 /// UNNEEDED by elogind
int unit_name_change_suffix(const char *n, const char *suffix, char **ret) {
char *e, *s;
size_t a, b;
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index a9a2923..d625df0 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -8,8 +8,6 @@
#define UNIT_NAME_MAX 256
-#if 0 /// UNNEEDED by elogind
-#endif // 0
typedef enum UnitNameFlags {
UNIT_NAME_PLAIN = 1, /* Allow foo.service */
UNIT_NAME_INSTANCE = 2, /* Allow foo@bar.service */
@@ -20,9 +18,9 @@ typedef enum UnitNameFlags {
bool unit_name_is_valid(const char *n, UnitNameFlags flags) _pure_;
bool unit_prefix_is_valid(const char *p) _pure_;
bool unit_instance_is_valid(const char *i) _pure_;
+#if 0 /// UNNEEDED by elogind
bool unit_suffix_is_valid(const char *s) _pure_;
-#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);
@@ -31,11 +29,9 @@ static inline int unit_prefix_and_instance_is_valid(const char *p) {
int unit_name_to_prefix(const char *n, char **prefix);
int unit_name_to_instance(const char *n, char **instance);
int unit_name_to_prefix_and_instance(const char *n, char **ret);
-#endif // 0
UnitType unit_name_to_type(const char *n) _pure_;
-#if 0 /// UNNEEDED by elogind
int unit_name_change_suffix(const char *n, const char *suffix, char **ret);
#endif // 0
diff --git a/src/libelogind/sd-bus/bus-kernel.h b/src/libelogind/sd-bus/bus-kernel.h
index 9fcbeb0..fbbc43f 100644
--- a/src/libelogind/sd-bus/bus-kernel.h
+++ b/src/libelogind/sd-bus/bus-kernel.h
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
-/***
-***/
-
#include "sd-bus.h"
#define MEMFD_CACHE_MAX 32
@@ -23,9 +20,5 @@ struct memfd_cache {
size_t allocated;
};
-#if 0 /// UNNEEDED by elogind
-#endif // 0
void close_and_munmap(int fd, void *address, size_t size);
void bus_flush_memfd(sd_bus *bus);
-#if 0 /// UNNEEDED by elogind
-#endif // 0
diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h
index e7231be..153ea12 100644
--- a/src/shared/bus-util.h
+++ b/src/shared/bus-util.h
@@ -37,10 +37,10 @@ enum {
int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata);
-#if 0 /// UNNEEDED by elogind
-#endif // 0
int bus_message_map_all_properties(sd_bus_message *m, const struct bus_properties_map *map, unsigned flags, sd_bus_error *error, void *userdata);
+#if 0 /// UNNEEDED by elogind
int bus_message_map_properties_changed(sd_bus_message *m, const struct bus_properties_map *map, unsigned flags, sd_bus_error *error, void *userdata);
+#endif // 0
int bus_map_all_properties(sd_bus *bus, const char *destination, const char *path, const struct bus_properties_map *map,
unsigned flags, sd_bus_error *error, sd_bus_message **reply, void *userdata);
diff --git a/src/shared/nsflags.h b/src/shared/nsflags.h
index 4fe5b55..ffb81bf 100644
--- a/src/shared/nsflags.h
+++ b/src/shared/nsflags.h
@@ -18,11 +18,11 @@
CLONE_NEWUSER| \
CLONE_NEWUTS))
-#if 0 /// UNNEEDED by elogind
-#endif // 0
#define NAMESPACE_FLAGS_INITIAL ((unsigned long) -1)
+#if 0 /// UNNEEDED by elogind
int namespace_flags_from_string(const char *name, unsigned long *ret);
+#endif // 0
int namespace_flags_to_string(unsigned long flags, char **ret);
struct namespace_flag_map {