Description:
create tool which shows cgroups which are on system:
Usage: lscgroup [<controllers>:<path>] [...]
list all cgroups
Changes since V1(the previous versions was not enumerated):
* fix the format of comments which have more than 1 line
* printf of help -> fprintf(stdout,...
* change the sequence of processing of cgroups on input (now
first) and internal controller list(first in the previous version), now the
cgroups are output in order in which they are put to input
* fix return values/error messages - now if the controller is not mount
the tool return error - it returns 0 otherwise
Changes since V2
* fix problem with slash characters
( $ lscgroup cpu:/1/2
cpu:/1/2/
cpu:/1/2/1
$ lscgroup cpu:1/2
cpu:/2/
cpu:/2/1 )
Changes since V3
* rename the variables (dp1 -> cgroup_dir_path, dp2 -> input_dir_path)
* improve the coding style