xsprintf(buf, USEC_FMT "\n", quota * CGROUP_CPU_QUOTA_PERIOD_USEC / USEC_PER_SEC);
(void) set_attribute_and_warn(u, "cpu", "cpu.cfs_quota_us", buf);
} else
- (void) set_attribute_and_warn(u, "cpu", "cpu.cfs_quota_us", "-1");
+ (void) set_attribute_and_warn(u, "cpu", "cpu.cfs_quota_us", "-1\n");
}
static uint64_t cgroup_cpu_shares_to_weight(uint64_t shares) {
}
static void cgroup_apply_unified_memory_limit(Unit *u, const char *file, uint64_t v) {
- char buf[DECIMAL_STR_MAX(uint64_t) + 1] = "max";
+ char buf[DECIMAL_STR_MAX(uint64_t) + 1] = "max\n";
if (v != CGROUP_LIMIT_MAX)
xsprintf(buf, "%" PRIu64 "\n", v);
sprintf(buf, "%" PRIu64 "\n", c->tasks_max);
(void) set_attribute_and_warn(u, "pids", "pids.max", buf);
} else
- (void) set_attribute_and_warn(u, "pids", "pids.max", "max");
+ (void) set_attribute_and_warn(u, "pids", "pids.max", "max\n");
}
}