chiark / gitweb /
journalctl: use _COMM= match for scripts
[elogind.git] / src / nspawn / nspawn.c
index 66c2228ca287299d95b0e074dcd8f51d6233520c..fc005d9ce352f7cc763a2948c0bc7328344c7352 100644 (file)
@@ -39,9 +39,9 @@
 #include <sys/signalfd.h>
 #include <grp.h>
 #include <linux/fs.h>
-#include <linux/netlink.h>
 #include <sys/un.h>
 #include <sys/socket.h>
+#include <linux/netlink.h>
 
 #include <systemd/sd-daemon.h>
 #include <systemd/sd-bus.h>
@@ -1162,22 +1162,22 @@ static int register_machine(void) {
 
         r = sd_bus_call_method(
                         bus,
-                        "org.freedesktop.login1",
-                        "/org/freedesktop/login1",
-                        "org.freedesktop.login1.Manager",
+                        "org.freedesktop.machine1",
+                        "/org/freedesktop/machine1",
+                        "org.freedesktop.machine1.Manager",
                         "CreateMachine",
                         &error,
                         NULL,
-                        "sayssuss",
+                        "sayssusa(sv)",
                         arg_machine,
                         SD_BUS_APPEND_ID128(arg_uuid),
                         "nspawn",
                         "container",
                         (uint32_t) 0,
-                        strempty(arg_slice),
-                        strempty(arg_directory));
+                        strempty(arg_directory),
+                        1, "Slice", "s", strempty(arg_slice));
         if (r < 0) {
-                log_error("Failed to register machine: %s", error.message);
+                log_error("Failed to register machine: %s", error.message ? error.message : strerror(-r));
                 return r;
         }