Skip to content

Commit

Permalink
Merge e14055e into 2a28990
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Mar 10, 2021
2 parents 2a28990 + e14055e commit da9f6c9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Mar 10 12:47:05 UTC 2021 - Josef Reidinger <jreidinger@suse.com>

- Add validation to device map dialog to prevent exceeding BIOS
limit of device map (bsc#1183218)
- 4.3.25

-------------------------------------------------------------------
Thu Mar 4 09:09:20 UTC 2021 - Josef Reidinger <jreidinger@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 4.3.24
Version: 4.3.25
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
Expand Down
8 changes: 8 additions & 0 deletions src/lib/bootloader/device_map_dialog.rb
Expand Up @@ -61,6 +61,11 @@ def controller_loop
Yast::Popup.Error(_("Device map must contain at least one device"))
next
end
max_dev = Bootloader::DeviceMap::BIOS_LIMIT
if disks.size > max_dev
Yast::Popup.Error(_("Device map can have at maximum %i devices") % max_dev)
next
end
store_order
return :back # we just go back to original dialog
when :cancel
Expand Down Expand Up @@ -212,12 +217,15 @@ def selected_disk_index
end

def refresh_buttons
# by default enable delete and later disable if there are no disks
Yast::UI.ChangeWidget(Id(:delete), :Enabled, true)
pos = selected_disk_index
if !pos # nothing selected
disk_to_select = disks.first
# there is no disks
if !disk_to_select
up_down_enablement(false, false)
Yast::UI.ChangeWidget(Id(:delete), :Enabled, false)
return
end
Yast::UI.ChangeWidget(Id(:disks), :CurrentItem, disk_to_select)
Expand Down

0 comments on commit da9f6c9

Please sign in to comment.