about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 62919466..316ec2f8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1468,6 +1468,11 @@ extern char** environ;
 int main(int argc, const char **argv, char **env) {
     init_malloc_hook();
     init_auxval(argc, argv, environ?environ:env);
+    // analogue to QEMU_VERSION in qemu-user-mode emulation
+    if(getenv("BOX64_VERSION")) {
+        PrintBox64Version();
+        exit(0);
+    }
     // trying to open and load 1st arg
     if(argc==1) {
         /*PrintBox64Version();