Blame SOURCES/0008-set-allowed-disk-labels-for-s390x-as-standard-ones-plus-dasd.patch

8c0629
From 462099a9137fb7997140360c07665a21615a0fea Mon Sep 17 00:00:00 2001
8c0629
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
8c0629
Date: Tue, 7 Jul 2020 13:19:02 +0200
8c0629
Subject: [PATCH] set allowed disk labels for s390x as standard ones (msdos +
8c0629
 gpt) plus dasd
8c0629
8c0629
This will solve issues when a SCSI or NVMe disk with GPT partition table
8c0629
is used with a s390x machine (rhbz#1827066, rhbz#1854110).
8c0629
---
8c0629
 blivet/formats/disklabel.py          | 2 +-
8c0629
 tests/formats_test/disklabel_test.py | 2 +-
8c0629
 2 files changed, 2 insertions(+), 2 deletions(-)
8c0629
8c0629
diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py
8c0629
index 3dcac12b..53e2c010 100644
8c0629
--- a/blivet/formats/disklabel.py
8c0629
+++ b/blivet/formats/disklabel.py
8c0629
@@ -230,7 +230,7 @@ def get_platform_label_types(cls):
8c0629
         elif arch.is_efi() and not arch.is_aarch64():
8c0629
             label_types = ["gpt", "msdos"]
8c0629
         elif arch.is_s390():
8c0629
-            label_types = ["msdos", "dasd"]
8c0629
+            label_types += ["dasd"]
8c0629
 
8c0629
         return label_types
8c0629
 
8c0629
diff --git a/tests/formats_test/disklabel_test.py b/tests/formats_test/disklabel_test.py
8c0629
index 94f3775f..3068dc07 100644
8c0629
--- a/tests/formats_test/disklabel_test.py
8c0629
+++ b/tests/formats_test/disklabel_test.py
8c0629
@@ -95,7 +95,7 @@ def test_platform_label_types(self, arch):
8c0629
         arch.is_arm.return_value = False
8c0629
 
8c0629
         arch.is_s390.return_value = True
8c0629
-        self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "dasd"])
8c0629
+        self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "gpt", "dasd"])
8c0629
         arch.is_s390.return_value = False
8c0629
 
8c0629
     def test_label_type_size_check(self):