bus-unit-util: fix return value for CPUAffinity=numa

sd_bus_message_append() returns 0 on success, but the convert helpers are
expected to return 1 when the assignment was handled. Returning 0 here was
harmless for callers that only check for errors, but it is inconsistent with
the other helpers and it would trip the new serialization test.

(cherry picked from commit 5b578462bc66795ea7f3a20ff1d21e0ae2afee28)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-10-16 17:24:52 +01:00
committed by Luca Boccassi
parent ad0dde105c
commit 9e3fbc386f
+1 -1
View File
@@ -1476,7 +1476,7 @@ static int bus_append_cpu_affinity(sd_bus_message *m, const char *field, const c
r = sd_bus_message_append(m, "(sv)", "CPUAffinityFromNUMA", "b", true);
if (r < 0)
return bus_log_create_error(r);
return r;
return 1;
}
return bus_append_parse_cpu_set(m, field, eq);