Skip to content

Commit

Permalink
simplify resume proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 19, 2014
1 parent 61ef057 commit e025fad
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/lib/bootloader/grub2base.rb
Expand Up @@ -96,13 +96,8 @@ def Propose
BootCommon.globals |= StandardGlobals()
end

swap_sizes = BootCommon.getSwapPartitions
swap_parts = swap_sizes.keys
swap_parts.sort! do |a, b|
swap_sizes[a] <=> swap_sizes[b]
end

largest_swap_part = swap_parts.first || ""
swap_parts = BootCommon.getSwapPartitions
largest_swap_part = swap_parts.max_by{|part, size| size}.first || ""

resume = BootArch.ResumeAvailable ? largest_swap_part : ""
# try to use label or udev id for device name... FATE #302219
Expand Down

0 comments on commit e025fad

Please sign in to comment.