nspawn: register_machine() and allocate_scope() bools to flags

This commit is contained in:
Luke T. Shumaker
2024-09-06 18:33:50 -06:00
parent 14762b27d3
commit f1bf6054ce
3 changed files with 60 additions and 14 deletions
+7 -4
View File
@@ -5384,6 +5384,8 @@ static int run_container(
}
if (arg_register) {
RegisterMachineFlags flags = 0;
SET_FLAG(flags, REGISTER_MACHINE_KEEP_UNIT, arg_keep_unit);
r = register_machine(
bus,
arg_machine,
@@ -5396,13 +5398,14 @@ static int run_container(
arg_kill_signal,
arg_property,
arg_property_message,
arg_keep_unit,
arg_container_service_name,
arg_start_mode);
arg_start_mode,
flags);
if (r < 0)
return r;
} else if (!arg_keep_unit) {
AllocateScopeFlags flags = ALLOCATE_SCOPE_ALLOW_PIDFD;
r = allocate_scope(
bus,
arg_machine,
@@ -5412,8 +5415,8 @@ static int run_container(
arg_kill_signal,
arg_property,
arg_property_message,
/* allow_pidfds= */ true,
arg_start_mode);
arg_start_mode,
flags);
if (r < 0)
return r;