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

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