]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: Refactor duplicate logic in cgroup modify and create
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 15 Jul 2020 17:06:47 +0000 (11:06 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 16 Jul 2020 20:53:57 +0000 (14:53 -0600)
commit092e4aeb0416fe34dbf3e103a38073b6b4d31b9b
tree9347e03b920d2aaeddb89c20719ec595a47dac0c
parent58078971f6c5c6039f535467e68c0c8ea4f6c19b
api.c: Refactor duplicate logic in cgroup modify and create

cgroup_modify_cgroup() and cgroup_create_cgroup() have nearly
identical logic to walk the settings beneath the controller
and update them.  This commit refactors the duplicate logic in
these two functions into one location - cgroup_set_values_recursive().

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c
src/libcgroup-internal.h