]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for all uses
authorOlivia Yin <Hong-Hua.Yin@freescale.com>
Fri, 4 Apr 2014 01:21:06 +0000 (09:21 +0800)
committerJán Tomko <jtomko@redhat.com>
Fri, 4 Apr 2014 06:08:52 +0000 (08:08 +0200)
commit82d858ce422f400da34079ccd88c42b3365dfce1
treeb27b8f15450aa8950cf536dafc41af1af9b36a96
parent34542473e555dcac35abace2bd4e88232ef67f0e
Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for all uses

For example, the file /proc/cpuinfo for 24 cores PowerPC platform is larger than
the previous maximum size 2KB.
It will fail to start libvirtd with the error message as below:
virFileReadAll: Failed to read file '/proc/cpuinfo': Value too large for defined
data type
virSysinfoRead: internal error Failed to open /proc/cpuinfo

This patch defines CPUINFO_FILE_LEN as 10KB which is enough for most architectures.

Signed-off-by: Olivia Yin <Hong-Hua.Yin@freescale.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/util/virsysinfo.c