Skip to content

Commit

Permalink
remove unused method remapSections
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Sep 2, 2014
1 parent a4b2786 commit 26afbd8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
53 changes: 0 additions & 53 deletions src/include/bootloader/routines/misc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,59 +201,6 @@ def remapResume(append, to_persistent)
end
end

# Function remap section "root" and "resume" to device name (/dev/sda)
# or to label (ufo_partition)
# it also prepared measured files for export
# @param list<map<string,any> > list of sections
# @return [Array<Hash{String => Object>}] list of sections

def remapSections(sec)
sec = deep_copy(sec)
by_mount = nil
if Arch.ppc
by_mount = :id
else
by_mount = Storage.GetDefaultMountBy
end

#by_mount = `id;
return deep_copy(sec) if by_mount == :label

temp_sec = []

# convert root and resume device names in sections to kernel device names
temp_sec = Builtins.maplist(@sections) do |s|
if Ops.get_string(s, "root", "") != ""
rdev = Ops.get_string(s, "root", "")
Ops.set(s, "root", BootStorage.MountByDev2Dev(rdev))

if Ops.get_string(s, "append", "") != ""
Ops.set(
s,
"append",
remapResume(Ops.get_string(s, "append", ""), false)
)
end

Builtins.y2debug(
"remapping root: %1 from section to: %2 ",
rdev,
Ops.get_string(s, "root", "")
)
end
if Ops.get_string(s, "chainloader", "") != ""
Ops.set(
s,
"chainloader",
BootStorage.MountByDev2Dev(Ops.get_string(s, "chainloader", ""))
)
end
deep_copy(s)
end

deep_copy(temp_sec)
end

# returns list difference A \ B (items that are in A and are not in B)
# @param [Array] a list A
# @param [Array] b list B
Expand Down
1 change: 0 additions & 1 deletion src/modules/BootCommon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,6 @@ def Md2Partitions(md_device)
publish :function => :getAnyTypeAttrib, :type => "any (string, any)"
publish :function => :updateTimeoutPopupForFloppy, :type => "void (string)"
publish :function => :remapGlobals, :type => "map <string, string> (map <string, string>)"
publish :function => :remapSections, :type => "list <map <string, any>> (list <map <string, any>>)"
publish :function => :GetBootloaderDevice, :type => "string ()"
publish :function => :GetBootloaderDevices, :type => "list <string> ()"
publish :function => :IsPartitionBootable, :type => "boolean (string)"
Expand Down

0 comments on commit 26afbd8

Please sign in to comment.