From: Nikola Forró Date: Thu, 16 Jan 2020 17:43:51 +0000 (+0100) Subject: api.c: Preserve dirty flag when copying controller values X-Git-Tag: v0.42.1~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=903673eecb84bcecda2551e2cdd6710ce596abed;p=thirdparty%2Flibcgroup.git api.c: Preserve dirty flag when copying controller values When setting cgroup parameters with cgset fails, no error is reported. This is caused by the fact that cgroup_copy_controller_values is not preserving dirty flags of the values, so it's making all errors considered non-fatal. Signed-off-by: Nikola Forró Reviewed-by: Tom Hromatka --- diff --git a/src/api.c b/src/api.c index 959a8140..e7a07cfc 100644 --- a/src/api.c +++ b/src/api.c @@ -1751,6 +1751,7 @@ static int cgroup_copy_controller_values(struct cgroup_controller *dst, dst_val = dst->values[i]; strncpy(dst_val->value, src_val->value, CG_VALUE_MAX); strncpy(dst_val->name, src_val->name, FILENAME_MAX); + dst_val->dirty = src_val->dirty; } err: return ret;