summaryrefslogtreecommitdiff
path: root/src/detect-virt.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-09-23 17:00:33 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-23 17:00:33 +0200
commitb52aae1d934b006830e7d575e56e2a98b0765ad3 (patch)
treee1ab1148d400ce6234e106f05420bb4b3bec83c5 /src/detect-virt.c
parentf2b33002cd5747ebf288d20a352655307f97aac5 (diff)
util: move virtualization detection into its own files, and extend return codes
Diffstat (limited to 'src/detect-virt.c')
-rw-r--r--src/detect-virt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/detect-virt.c b/src/detect-virt.c
index 324f182c7e..79cad5d8ab 100644
--- a/src/detect-virt.c
+++ b/src/detect-virt.c
@@ -25,9 +25,10 @@
#include <string.h>
#include "util.h"
+#include "virt.h"
int main(int argc, char *argv[]) {
- int r;
+ Virtualization r;
const char *id;
/* This is mostly intended to be used for scripts which want
@@ -43,5 +44,5 @@ int main(int argc, char *argv[]) {
if (r > 0)
puts(id);
- return r == 0;
+ return r > 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}