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

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