[PATCH v2 1/3] util: Move virGetCgroupValueRaw to vircgroup.c and rename it virGetValueRaw

Michal Prívozník mprivozn at redhat.com
Wed Jul 14 14:17:08 UTC 2021


On 7/14/21 2:28 PM, Yang Fei wrote:
> Move virGetCgroupValueRaw from vircgroup.c, so that we can call
> it more appropriately at any where. And change it to a more
> generic name virGetValueRaw.
> Replace virGetCgroupValueRaw by virGetValueRaw in cgroup data obtain.
> 
> Signed-off-by: Yang Fei <yangfei85 at huawei.com>
> ---
>  src/util/vircgroup.c     | 29 ++---------------------------
>  src/util/vircgrouppriv.h |  3 ---
>  src/util/vircgroupv1.c   |  5 +++--
>  src/util/vircgroupv2.c   |  5 +++--
>  src/util/virutil.c       | 23 +++++++++++++++++++++++
>  src/util/virutil.h       |  3 +++
>  6 files changed, 34 insertions(+), 34 deletions(-)

I don't think this is necessary. We have whole family of functions that
read a file and translate its contents into an integer. For instance
virFileReadValueUllong().

BTW: make sure that 'ninja test' passes after each commit.

Michal




More information about the libvir-list mailing list