diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-02-23 22:05:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-24 13:26:44 +0100 |
commit | 248fab742d2b61557de93ac6e422986a8858bf52 (patch) | |
tree | 3d7fd35295b3bb7d5203733fdab221ae5e223686 /src/shared | |
parent | f8901862b2b030921b3d5aba4157044ceab16451 (diff) |
virt: make Virtualization an anonymous enum
This makes llvm happy when we assign an error code to the variable.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/condition-util.c | 3 | ||||
-rw-r--r-- | src/shared/virt.c | 2 | ||||
-rw-r--r-- | src/shared/virt.h | 6 |
3 files changed, 5 insertions, 6 deletions
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); |