anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
65878a
From 9e1b1d3414528a7cd6182f06c91db8bffe7ee90e Mon Sep 17 00:00:00 2001
65878a
From: Lukas Nykryn <lnykryn@redhat.com>
65878a
Date: Fri, 12 Sep 2014 15:23:50 +0200
65878a
Subject: [PATCH] systemd-detect-virt: fix detect s390 virtualization
65878a
65878a
rhel-only patch
65878a
65878a
Related: #1139149
65878a
---
65878a
 src/shared/virt.c | 4 ++--
65878a
 1 file changed, 2 insertions(+), 2 deletions(-)
65878a
65878a
diff --git a/src/shared/virt.c b/src/shared/virt.c
65878a
index 5466d97..fca8515 100644
65878a
--- a/src/shared/virt.c
65878a
+++ b/src/shared/virt.c
65878a
@@ -182,9 +182,9 @@ int detect_vm(const char **id) {
65878a
                 r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t);
65878a
                 if (r >= 0) {
65878a
                         if (streq(t, "z/VM"))
65878a
-                                _id = "zvm";
65878a
+                                *id = "zvm";
65878a
                         else
65878a
-                                _id = "kvm";
65878a
+                                *id = "kvm";
65878a
 
65878a
                         return 1;
65878a
                 }
65878a
-- 
65878a
1.8.3.1
65878a