mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
cgroup: correct mangling of return values
Let's nor return the unmangled return value before we actually mangle it. Fixes: #11062
This commit is contained in:
parent
92a993041a
commit
d742f4b54b
@ -2856,10 +2856,10 @@ static int unit_get_cpu_usage_raw(Unit *u, nsec_t *ret) {
|
||||
uint64_t us;
|
||||
|
||||
r = cg_get_keyed_attribute("cpu", u->cgroup_path, "cpu.stat", STRV_MAKE("usage_usec"), &val);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (IN_SET(r, -ENOENT, -ENXIO))
|
||||
return -ENODATA;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = safe_atou64(val, &us);
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user