neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone

Blame SOURCES/0017-Let-parted-fix-fixable-issues-with-partition-table.patch

f01d01
From d477f8d076789cbe1c0a85545ea8b5133fdc4bdf Mon Sep 17 00:00:00 2001
f01d01
From: Vojtech Trefny <vtrefny@redhat.com>
f01d01
Date: Fri, 18 Sep 2020 13:58:48 +0200
f01d01
Subject: [PATCH] Let parted fix fixable issues with partition table
f01d01
f01d01
This will automatically fix issues like GPT partition table not
f01d01
covering whole device after disk size change.
f01d01
f01d01
Resolves: rhbz#1846869
f01d01
---
f01d01
 blivet/populator/populator.py | 3 +++
f01d01
 1 file changed, 3 insertions(+)
f01d01
f01d01
diff --git a/blivet/populator/populator.py b/blivet/populator/populator.py
f01d01
index 465c272d..fe566816 100644
f01d01
--- a/blivet/populator/populator.py
f01d01
+++ b/blivet/populator/populator.py
f01d01
@@ -64,6 +64,9 @@ def parted_exn_handler(exn_type, exn_options, exn_msg):
f01d01
     if exn_type == parted.EXCEPTION_TYPE_ERROR and \
f01d01
        exn_options == parted.EXCEPTION_OPT_YES_NO:
f01d01
         ret = parted.EXCEPTION_RESOLVE_YES
f01d01
+    elif exn_type == parted.EXCEPTION_TYPE_WARNING and \
f01d01
+            exn_options & parted.EXCEPTION_RESOLVE_FIX:
f01d01
+        ret = parted.EXCEPTION_RESOLVE_FIX
f01d01
     return ret
f01d01
 
f01d01
 
f01d01
-- 
f01d01
2.29.2
f01d01