X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-manager.c;h=75004cb7c4523804a576229c0cccb4428e276fd5;hb=151b9b9662a90455262ce575a8a8ae74bf4ff336;hp=38004a07fbb66e8abe59b0ac1e9cafef4fed4513;hpb=4f7385fa496242f06aaf358b66b28d71348607b3;p=elogind.git diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 38004a07f..75004cb7c 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -547,7 +547,7 @@ static int method_start_transient_unit(sd_bus *bus, sd_bus_message *message, voi return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid unit type."); if (!unit_vtable[t]->can_transient) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unit type %s does not support transient units."); + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unit type %s does not support transient units.", unit_type_to_string(t)); mode = job_mode_from_string(smode); if (mode < 0) @@ -873,7 +873,7 @@ static int method_create_snapshot(sd_bus *bus, sd_bus_message *message, void *us Manager *m = userdata; const char *name; int cleanup; - Snapshot *s; + Snapshot *s = NULL; int r; assert(bus); @@ -1338,7 +1338,7 @@ static int send_unit_files_changed(sd_bus *bus, const char *destination, void *u assert(bus); - r = sd_bus_message_new_signal(bus, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "UnitFilesChanged", &message); + r = sd_bus_message_new_signal(bus, &message, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "UnitFilesChanged"); if (r < 0) return r; @@ -1405,7 +1405,9 @@ static int method_enable_unit_files_generic( sd_bus_error *error) { _cleanup_strv_free_ char **l = NULL; +#ifdef HAVE_SELINUX char **i; +#endif UnitFileChange *changes = NULL; unsigned n_changes = 0; UnitFileScope scope; @@ -1678,7 +1680,7 @@ static int send_finished(sd_bus *bus, const char *destination, void *userdata) { assert(bus); assert(times); - r = sd_bus_message_new_signal(bus, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartupFinished", &message); + r = sd_bus_message_new_signal(bus, &message, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartupFinished"); if (r < 0) return r; @@ -1714,7 +1716,7 @@ static int send_reloading(sd_bus *bus, const char *destination, void *userdata) assert(bus); - r = sd_bus_message_new_signal(bus, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "Reloading", &message); + r = sd_bus_message_new_signal(bus, &message, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "Reloading"); if (r < 0) return r;