summaryrefslogtreecommitdiff
path: root/src/shared/virt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/virt.c')
-rw-r--r--src/shared/virt.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shared/virt.c b/src/shared/virt.c
index 20a8d7c5bf..b4368952ff 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -220,6 +220,23 @@ int detect_vm(const char **id) {
goto finish;
}
+#if defined(__s390__)
+ {
+ _cleanup_free_ char *t = NULL;
+
+ r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t);
+ if (r >= 0) {
+ if (streq(t, "z/VM"))
+ _id = "zvm";
+ else
+ _id = "kvm";
+ r = 1;
+
+ goto finish;
+ }
+ }
+#endif
+
r = 0;
finish: