Skip to content

Commit

Permalink
turn into ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
wfeldt committed Mar 19, 2014
1 parent 2937387 commit ed36277
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/modules/Kdump.rb
Expand Up @@ -504,18 +504,13 @@ def getAllocatedMemory(crash_value)
# @return [String] value of crashkernel

def BuildCrashkernelValue
# if user doesn't modified or select don't modify
# return readed value
# If user didn't modify or select return old value.
return @crashkernel_param_value if @crashkernel_list_ranges

crash_value = ""
crash_value = Ops.add(@allocated_memory, "M")

reserved_memory = Builtins.tostring(
Ops.multiply(2, Builtins.tointeger(@allocated_memory))
)
crash_value = @allocated_memory + "M"
reserved_memory = (@allocated_memory.to_i * 2).to_s
crash_value = reserved_memory + "M-:" + crash_value

crash_value = Ops.add(Ops.add(reserved_memory, "M-:"), crash_value)
Builtins.y2milestone("built crashkernel value is %1", crash_value)

crash_value
Expand Down

0 comments on commit ed36277

Please sign in to comment.