Skip to contentSkip to conversation

lib/tst_virt: fix is_ibmz(VIRT_IBMZ) on IBM System Z

PATCH New Alexander Egorenkov 2 participants 2 messages Nov 9, 2020 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/tst_virt: fix is_ibmz(VIRT_IBMZ) on IBM System Z

is_ibmz(VIRT_IBMZ) always returns 0 which is incorrect on IBM System Z. Don't check virt_type unnecessarily because it is checked later on in the switch statement.

Fixes commit b2cc450f3 ("lib/tst_virt: support IBM/Z LPAR and z/VM virtualization environments").

---
 lib/tst_virt.c | 3 ---
 1 file changed, 3 deletions(-)
lib/tst_virt.c +0 -3
index 1c6e41548..e72352464 100644
@@ -70,9 +70,6 @@ static int is_ibmz(int virt_type)
 	char line[64];
 	int found_lpar, found_zvm;
 
-	if (virt_type != VIRT_IBMZ_LPAR && virt_type != VIRT_IBMZ_ZVM)
-		return 0;
-
 	if (access("/proc/sysinfo", F_OK) != 0)
 		return 0;
 
Signature · 1 line
2.26.2