mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
core: fix array size in unit_log_resources()
In 0531bded79dc ("core: include peak memory in unit_log_resources()") new log messages where added, however the size of the according arrays to hold the messages was not adjusted. Fixes: 0531bded79dc ("core: include peak memory in unit_log_resources()")
This commit is contained in:
parent
b6be6a6721
commit
8930285234
@ -2319,12 +2319,12 @@ static int raise_level(int log_level, bool condition_info, bool condition_notice
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int unit_log_resources(Unit *u) {
|
static int unit_log_resources(Unit *u) {
|
||||||
struct iovec iovec[1 + _CGROUP_IP_ACCOUNTING_METRIC_MAX + _CGROUP_IO_ACCOUNTING_METRIC_MAX + 4];
|
struct iovec iovec[1 + 1 + _CGROUP_IP_ACCOUNTING_METRIC_MAX + _CGROUP_IO_ACCOUNTING_METRIC_MAX + 4];
|
||||||
bool any_traffic = false, have_ip_accounting = false, any_io = false, have_io_accounting = false;
|
bool any_traffic = false, have_ip_accounting = false, any_io = false, have_io_accounting = false;
|
||||||
_cleanup_free_ char *igress = NULL, *egress = NULL, *rr = NULL, *wr = NULL;
|
_cleanup_free_ char *igress = NULL, *egress = NULL, *rr = NULL, *wr = NULL;
|
||||||
int log_level = LOG_DEBUG; /* May be raised if resources consumed over a threshold */
|
int log_level = LOG_DEBUG; /* May be raised if resources consumed over a threshold */
|
||||||
size_t n_message_parts = 0, n_iovec = 0;
|
size_t n_message_parts = 0, n_iovec = 0;
|
||||||
char* message_parts[1 + 2 + 2 + 1], *t;
|
char* message_parts[1 + 1 + 2 + 2 + 1], *t;
|
||||||
nsec_t nsec = NSEC_INFINITY;
|
nsec_t nsec = NSEC_INFINITY;
|
||||||
uint64_t memory_peak = UINT64_MAX;
|
uint64_t memory_peak = UINT64_MAX;
|
||||||
int r;
|
int r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user