nodeinfo: support kernels that lack socket information
On RHEL 5, I was getting a segfault trying to start libvirtd, because we were failing virNodeParseSocket but not checking for errors, and then calling CPU_SET(-1, &sock_map) as a result. But if you don't have a topology/physical_package_id file, then you can just assume that the cpu belongs to socket 0. * src/nodeinfo.c (virNodeGetCpuValue): Change bool into default_value. (virNodeParseSocket): Allow for default value when file is missing, different from fatal error on reading file. (virNodeParseNode): Update call sites to fail on error.
Showing
想要评论请 注册 或 登录