S390: Buffer too small for large CPU numbers.

The output buffer for virFileReadAll was too small for systems with
more than 30 CPUs which leads to a log entry and incorrect behavior.
The new size will be sufficient for the current
architectural limits.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
Viktor Mihajlovski 2012-10-05 15:59:08 +02:00 committed by Eric Blake
parent a86c039d46
commit 4bdc8606e6
1 changed files with 2 additions and 2 deletions

View File

@ -361,7 +361,7 @@ virSysinfoRead(void) {
goto no_memory;
/* Gather info from /proc/cpuinfo */
if (virFileReadAll(CPUINFO, 2048, &outbuf) < 0) {
if (virFileReadAll(CPUINFO, 8192, &outbuf) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to open %s"), CPUINFO);
return NULL;
@ -376,7 +376,7 @@ virSysinfoRead(void) {
VIR_FREE(outbuf);
/* Gather info from /proc/sysinfo */
if (virFileReadAll(SYSINFO, 4096, &outbuf) < 0) {
if (virFileReadAll(SYSINFO, 8192, &outbuf) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to open %s"), SYSINFO);
return NULL;