chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shared: fix build on !x86
[elogind.git]
/
src
/
shared
/
virt.c
diff --git
a/src/shared/virt.c
b/src/shared/virt.c
index 1abd6863ea5aa5fb6d010113b8415eaed2a8e85d..4f8134a7732c964839eea9cb91056f4f988a7ff8 100644
(file)
--- a/
src/shared/virt.c
+++ b/
src/shared/virt.c
@@
-29,6
+29,8
@@
/* Returns a short identifier for the various VM implementations */
int detect_vm(const char **id) {
/* Returns a short identifier for the various VM implementations */
int detect_vm(const char **id) {
+ _cleanup_free_ char *cpuinfo_contents = NULL;
+ int r;
#if defined(__i386__) || defined(__x86_64__)
#if defined(__i386__) || defined(__x86_64__)
@@
-67,8
+69,6
@@
int detect_vm(const char **id) {
const char *j, *k;
bool hypervisor;
_cleanup_free_ char *hvtype = NULL;
const char *j, *k;
bool hypervisor;
_cleanup_free_ char *hvtype = NULL;
- _cleanup_free_ char *cpuinfo_contents = NULL;
- int r;
/* Try high-level hypervisor sysfs file first:
*
/* Try high-level hypervisor sysfs file first:
*