]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: add cgroup error string for ECGNOVERSIONCONVERT
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 26 May 2022 14:12:30 +0000 (08:12 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 26 May 2022 14:12:36 +0000 (08:12 -0600)
commitc5fe7f83c1feae890523c8d09238ff535caebd58
tree28860a400122f2b1c710eca3496ab5783a6c46f7
parentcaeb34404fd9a7318f99a7016722f8df4cc37a76
api.c: add cgroup error string for ECGNOVERSIONCONVERT

Add the missing error string for the error code ECGNOVERSIONCONVERT to
cgroup_strerror_codes[], that is looked upon to print string version of
the error encountered.

Reproducer:
-----------
$ cat cgrp-strerr.c

int main(void)
{
        int err = ECGNOVERSIONCONVERT;

        fprintf(stderr, "%s\n", cgroup_strerror(err));

        return 0;
}

without the patch:
-----------------
$ ./cgrp-stderr
(null)

with the patch:
---------------
$ ./cgrp-stderr
Failed to convert from cgroup v1 to/from cgroup v2

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c