if (mode != UNIT_CHECK) {
c->cpu_accounting = b;
+ u->cgroup_realized_mask &= ~CGROUP_CPUACCT;
unit_write_drop_in_private(u, mode, name, b ? "CPUAccounting=yes" : "CPUAccounting=no");
}
if (mode != UNIT_CHECK) {
c->cpu_shares = ul;
+ u->cgroup_realized_mask &= ~CGROUP_CPU;
unit_write_drop_in_private_format(u, mode, name, "CPUShares=%lu", ul);
}
if (mode != UNIT_CHECK) {
c->blockio_accounting = b;
+ u->cgroup_realized_mask &= ~CGROUP_BLKIO;
unit_write_drop_in_private(u, mode, name, b ? "BlockIOAccounting=yes" : "BlockIOAccounting=no");
}
if (mode != UNIT_CHECK) {
c->blockio_weight = ul;
+ u->cgroup_realized_mask &= ~CGROUP_BLKIO;
unit_write_drop_in_private_format(u, mode, name, "BlockIOWeight=%lu", ul);
}
if (r < 0)
return r;
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
CGroupBlockIODeviceBandwidth *a, *next;
_cleanup_free_ char *buf = NULL;
cgroup_context_free_blockio_device_bandwidth(c, a);
}
+ u->cgroup_realized_mask &= ~CGROUP_BLKIO;
+
f = open_memstream(&buf, &size);
if (!f)
return -ENOMEM;
n++;
}
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;
_cleanup_fclose_ FILE *f = NULL;
cgroup_context_free_blockio_device_weight(c, c->blockio_device_weights);
}
+ u->cgroup_realized_mask &= ~CGROUP_BLKIO;
+
f = open_memstream(&buf, &size);
if (!f)
return -ENOMEM;
if (mode != UNIT_CHECK) {
c->memory_accounting = b;
+ u->cgroup_realized_mask &= ~CGROUP_MEMORY;
unit_write_drop_in_private(u, mode, name, b ? "MemoryAccounting=yes" : "MemoryAccounting=no");
}
if (mode != UNIT_CHECK) {
c->memory_limit = limit;
+ u->cgroup_realized_mask &= ~CGROUP_MEMORY;
unit_write_drop_in_private_format(u, mode, name, "%s=%" PRIu64, name, limit);
}
char *buf;
c->device_policy = p;
+ u->cgroup_realized_mask &= ~CGROUP_DEVICE;
buf = strappenda("DevicePolicy=", policy);
unit_write_drop_in_private(u, mode, name, buf);
a->r = !!strchr(rwm, 'r');
a->w = !!strchr(rwm, 'w');
a->m = !!strchr(rwm, 'm');
-
}
n++;
if (r < 0)
return r;
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;
_cleanup_fclose_ FILE *f = NULL;
cgroup_context_free_device_allow(c, c->device_allow);
}
+ u->cgroup_realized_mask &= ~CGROUP_DEVICE;
+
f = open_memstream(&buf, &size);
if (!f)
return -ENOMEM;