Skip to content

Commit

Permalink
Set LUKS format before creating the LUKS device (#2332338)
Browse files Browse the repository at this point in the history
In some cases we need the format already configured. This is
normally done by applying the action, but we do that later in
these cases.
  • Loading branch information
vojtechtrefny committed Jan 9, 2025
1 parent 1e31d8b commit e8f791a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blivetgui/blivet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ def _create_partition(self, user_input):
luks_sector_size=user_input.encryption_sector_size,
device=new_part.path)
actions.append(blivet.deviceaction.ActionCreateFormat(new_part, part_fmt))
new_part.format = part_fmt

luks_dev = LUKSDevice("luks-%s" % new_part.name, size=new_part.size, parents=[new_part])
actions.append(blivet.deviceaction.ActionCreateDevice(luks_dev))
Expand Down Expand Up @@ -1084,6 +1085,7 @@ def _create_lvmlv(self, user_input):
luks_sector_size=user_input.encryption_sector_size,
device=new_lv.path)
actions.append(blivet.deviceaction.ActionCreateFormat(new_lv, luks_fmt))
new_lv.format = luks_fmt

luks_dev = LUKSDevice("luks-%s" % new_lv.name, size=new_lv.size, parents=[new_lv])
actions.append(blivet.deviceaction.ActionCreateDevice(luks_dev))
Expand Down

0 comments on commit e8f791a

Please sign in to comment.