提交 02794cc4 编写于 作者: M Michal Privoznik

virCgroupV2DevicesAvailable: Print stringified errno in the debug log

In the virCgroupV2DevicesAvailable() function we try to determine
whether CGroups version 2 are available. We do this by opening
what we believe is the CGroup mount point and issuing a BPF call.
When the call fails, a debug message is printed. However, the BPF
call sets errno too. Include it in the debug message to help us
with debugging.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 3918dbd8
......@@ -55,7 +55,7 @@ virCgroupV2DevicesAvailable(virCgroupPtr group)
}
if (virBPFQueryProg(cgroupfd, 0, BPF_CGROUP_DEVICE, &progCnt, NULL) < 0) {
VIR_DEBUG("failed to query cgroup progs");
VIR_DEBUG("failed to query cgroup progs: %s", g_strerror(errno));
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册