]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: Introduce virCgroupFreezerState enum
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 Apr 2026 10:43:53 +0000 (12:43 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 4 May 2026 07:05:34 +0000 (09:05 +0200)
commit289e69d95e6fc843499d15003365596fbfe3500a
tree602141f744b31b54bdd154450b0ffe39351542a1
parent29f3c67837cc10dca3023f0bfd50414244c1bbc3
src: Introduce virCgroupFreezerState enum

So far, only vircgroupv1 implements freezer controller related
callbacks and both work with strings ("THAWED", "FROZEN",
"FREEZING"). This works well with v1 but with CGroupsV2 there are
just two states and they are represented by a number.

Therefore, introduce an enum and implement enum <-> string
conversion for each backend separately.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <pavel@hrdina.info>
src/lxc/lxc_driver.c
src/lxc/lxc_process.c
src/util/vircgroup.c
src/util/vircgroup.h
src/util/vircgroupbackend.h
src/util/vircgroupv1.c