along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/socket.h>
+// #include <sys/socket.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-#include "util.h"
+// #include "sd-daemon.h"
+// #include "sd-event.h"
+// #include "util.h"
#include "strv.h"
-#include "macro.h"
-#include "def.h"
-#include "path-util.h"
-#include "missing.h"
-#include "set.h"
-#include "signal-util.h"
+// #include "macro.h"
+// #include "def.h"
+// #include "path-util.h"
+// #include "missing.h"
+// #include "set.h"
+// #include "signal-util.h"
#include "unit-name.h"
-#include "sd-bus.h"
-#include "bus-error.h"
-#include "bus-label.h"
+// #include "sd-bus.h"
+// #include "bus-error.h"
+// #include "bus-label.h"
#include "bus-message.h"
#include "bus-util.h"
#include "bus-internal.h"
+/// UNNEEDED by elogind
+#if 0
static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
sd_event *e = userdata;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
int bus_event_loop_with_idle(
sd_event *e,
sd_bus *bus,
#endif
}
+/// UNNEEDED by elogind
+#if 0
int bus_check_peercred(sd_bus *c) {
struct ucred ucred;
socklen_t l;
return 0;
}
+#endif // 0
int bus_print_property(const char *name, sd_bus_message *property, bool all) {
char type;
switch (transport) {
case BUS_TRANSPORT_LOCAL:
+/// elogind does not support a user bus
+#if 0
if (user)
r = sd_bus_default_user(bus);
else
+#endif // 0
r = sd_bus_default_system(bus);
break;
return log_error_errno(r, "Failed to parse bus message: %m");
}
+/// UNNEEDED by elogind
+#if 0
int bus_log_create_error(int r) {
return log_error_errno(r, "Failed to create bus message: %m");
}
-/// UNNEEDED by elogind
-#if 0
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
assert(message);
assert(u);
return 0;
}
-#endif // 0
void bus_wait_for_jobs_free(BusWaitForJobs *d) {
if (!d)
free(d);
}
-/// UNNEEDED by elogind
-#if 0
int bus_wait_for_jobs_new(sd_bus *bus, BusWaitForJobs **ret) {
_cleanup_(bus_wait_for_jobs_freep) BusWaitForJobs *d = NULL;
int r;
return 0;
}
-#endif // 0
static int bus_process_wait(sd_bus *bus) {
int r;
log_debug_errno(q, "Got result %s/%m for job %s", strna(d->result), strna(d->name));
}
- free(d->name);
- d->name = NULL;
+ d->name = mfree(d->name);
- free(d->result);
- d->result = NULL;
+ d->result = mfree(d->result);
}
return r;
return set_put_strdup(d->jobs, path);
}
-/// UNNEEDED by elogind
-#if 0
+int bus_wait_for_jobs_one(BusWaitForJobs *d, const char *path, bool quiet) {
+ int r;
+
+ r = bus_wait_for_jobs_add(d, path);
+ if (r < 0)
+ return log_oom();
+
+ return bus_wait_for_jobs(d, quiet);
+}
+
int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, UnitFileChange **changes, unsigned *n_changes) {
const char *type, *path, *source;
int r;
return 0;
}
-#endif // 0
/**
* bus_path_encode_unique() - encode unique object path
*ret_external = external;
return 1;
}
+#endif // 0
bool is_kdbus_wanted(void) {
_cleanup_free_ char *value = NULL;