summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/detect-virt/detect-virt.c2
-rw-r--r--src/hostname/hostnamed.c2
-rw-r--r--src/shared/condition-util.c3
-rw-r--r--src/shared/virt.c2
-rw-r--r--src/shared/virt.h6
-rw-r--r--src/test/test-architecture.c2
6 files changed, 8 insertions, 9 deletions
diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c
index 2f8b0ebbbc..8cf8dcfabc 100644
--- a/src/detect-virt/detect-virt.c
+++ b/src/detect-virt/detect-virt.c
@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
switch (arg_mode) {
case ANY_VIRTUALIZATION: {
- Virtualization v;
+ int v;
v = detect_virtualization(&id);
if (v < 0) {
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index e57891bf0d..0f2455b69c 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -123,7 +123,7 @@ static const char* fallback_chassis(void) {
int r;
char *type;
unsigned t;
- Virtualization v;
+ int v;
v = detect_virtualization(NULL);
diff --git a/src/shared/condition-util.c b/src/shared/condition-util.c
index 4aea3caf9d..9961cb47f0 100644
--- a/src/shared/condition-util.c
+++ b/src/shared/condition-util.c
@@ -121,8 +121,7 @@ bool condition_test_kernel_command_line(Condition *c) {
}
bool condition_test_virtualization(Condition *c) {
- int b;
- Virtualization v;
+ int b, v;
const char *id;
assert(c);
diff --git a/src/shared/virt.c b/src/shared/virt.c
index c79d35db4d..ec2ddcfe67 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -278,7 +278,7 @@ finish:
}
/* Returns a short identifier for the various VM/container implementations */
-Virtualization detect_virtualization(const char **id) {
+int detect_virtualization(const char **id) {
int r;
r = detect_container(id);
diff --git a/src/shared/virt.h b/src/shared/virt.h
index aa6ad35ba9..7194ab2bf7 100644
--- a/src/shared/virt.h
+++ b/src/shared/virt.h
@@ -24,12 +24,12 @@
int detect_vm(const char **id);
int detect_container(const char **id);
-typedef enum Virtualization {
+enum {
VIRTUALIZATION_NONE = 0,
VIRTUALIZATION_VM,
VIRTUALIZATION_CONTAINER,
_VIRTUALIZATION_MAX,
_VIRTUALIZATION_INVALID = -1
-} Virtualization;
+};
-Virtualization detect_virtualization(const char **id);
+int detect_virtualization(const char **id);
diff --git a/src/test/test-architecture.c b/src/test/test-architecture.c
index b586c0da5d..7e171c7bbc 100644
--- a/src/test/test-architecture.c
+++ b/src/test/test-architecture.c
@@ -26,7 +26,7 @@
int main(int argc, char *argv[]) {
Architecture a;
- Virtualization v;
+ int v;
const char *id = NULL;
v = detect_virtualization(&id);