]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-register.c
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
[thirdparty/systemd.git] / src / nspawn / nspawn-register.c
index 374f958c2032dc4369a45fffd583eccb4913567d..d6c0200c0c7da87fb5ddadc566aec24f626c3202 100644 (file)
@@ -42,8 +42,8 @@ int register_machine(
                 bool keep_unit,
                 const char *service) {
 
-        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
+        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         int r;
 
         r = sd_bus_default_system(&bus);
@@ -68,7 +68,7 @@ int register_machine(
                                 strempty(directory),
                                 local_ifindex > 0 ? 1 : 0, local_ifindex);
         } else {
-                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+                _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
                 char **i;
                 unsigned j;
 
@@ -105,6 +105,10 @@ int register_machine(
                                 return bus_log_create_error(r);
                 }
 
+                r = sd_bus_message_append(m, "(sv)", "TasksMax", "t", 8192);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
                 r = sd_bus_message_append(m, "(sv)", "DevicePolicy", "s", "strict");
                 if (r < 0)
                         return bus_log_create_error(r);
@@ -195,9 +199,9 @@ int register_machine(
 }
 
 int terminate_machine(pid_t pid) {
-        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
-        _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
+        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
+        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         const char *path;
         int r;