mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
maint: silence cppi warnings
* src/nodeinfo.c (linuxNodeInfoCPUPopulate): Fix indentation of last patch.
This commit is contained in:
parent
020ad8d1a2
commit
e692352689
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* nodeinfo.c: Helper routines for OS specific node information
|
* nodeinfo.c: Helper routines for OS specific node information
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc.
|
* Copyright (C) 2006-2008, 2010-2011 Red Hat, Inc.
|
||||||
* Copyright (C) 2006 Daniel P. Berrange
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -164,12 +164,12 @@ cleanup:
|
|||||||
static int parse_socket(unsigned int cpu)
|
static int parse_socket(unsigned int cpu)
|
||||||
{
|
{
|
||||||
int ret = get_cpu_value(cpu, "topology/physical_package_id", false);
|
int ret = get_cpu_value(cpu, "topology/physical_package_id", false);
|
||||||
#if defined(__powerpc__) || \
|
# if defined(__powerpc__) || \
|
||||||
defined(__powerpc64__)
|
defined(__powerpc64__)
|
||||||
/* ppc has -1 */
|
/* ppc has -1 */
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
#endif
|
# endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
nodeinfo->cpus++;
|
nodeinfo->cpus++;
|
||||||
#if defined(__x86_64__) || \
|
# if defined(__x86_64__) || \
|
||||||
defined(__amd64__) || \
|
defined(__amd64__) || \
|
||||||
defined(__i386__)
|
defined(__i386__)
|
||||||
} else if (STRPREFIX(buf, "cpu MHz")) {
|
} else if (STRPREFIX(buf, "cpu MHz")) {
|
||||||
@ -247,7 +247,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
|||||||
&& id > nodeinfo->cores)
|
&& id > nodeinfo->cores)
|
||||||
nodeinfo->cores = id;
|
nodeinfo->cores = id;
|
||||||
}
|
}
|
||||||
#elif defined(__powerpc__) || \
|
# elif defined(__powerpc__) || \
|
||||||
defined(__powerpc64__)
|
defined(__powerpc64__)
|
||||||
} else if (STRPREFIX(buf, "clock")) {
|
} else if (STRPREFIX(buf, "clock")) {
|
||||||
char *p;
|
char *p;
|
||||||
@ -265,9 +265,9 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
|||||||
&& (*p == '\0' || *p == '.' || c_isspace(*p)))
|
&& (*p == '\0' || *p == '.' || c_isspace(*p)))
|
||||||
nodeinfo->mhz = ui;
|
nodeinfo->mhz = ui;
|
||||||
}
|
}
|
||||||
#else
|
# else
|
||||||
# warning Parser for /proc/cpuinfo needs to be adapted for your architecture
|
# warning Parser for /proc/cpuinfo needs to be adapted for your architecture
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nodeinfo->cpus) {
|
if (!nodeinfo->cpus) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user