Skip to content
Permalink
Browse files

comments from review

  • Loading branch information...
jsrain committed Jan 8, 2014
1 parent 4effdda commit 71a9f9d22c5297c6860beaeda2448eab2042959e
Showing with 8 additions and 7 deletions.
  1. +3 −3 src/clients/inst_disk_for_image.rb
  2. +5 −4 src/modules/ImageInstallation.rb
@@ -69,10 +69,10 @@ def main
def disks_to_use
target_map = Storage.GetTargetMap
Builtins.y2milestone("TM: %1", target_map)
supported_types = [ :CT_DISK, :CT_DMRAID, :CT_DMMULTIPATH, :CT_MDPART ]
# FIXME: move blacklist to Storage
used_by_blacklist = [ :CT_DMRAID, :CT_DMMULTIPATH, :CT_MDPART ]
target_map.select { | key, value |
(supported_types.include? value["type"]) && (! used_by_blacklist.include? value["used_by"])
Storage.IsDiskType(value["type"]) && (! used_by_blacklist.include? value["used_by"])
}.keys
end

@@ -95,7 +95,7 @@ def disk_for_image_help_text

def show_disk_for_image_dialog
Wizard.SetContents(
_("Hard Disk to Deploy To"),
_("Hard Disk for Image Deployment"),
disk_for_image_dialog,
disk_for_image_help_text,
GetInstArgs.enable_back || @test_mode,
@@ -482,19 +482,19 @@ def DeployDiskImage(id, target)
# Checking files for signatures
image = Pkg.SourceProvideDigestedFile(@_repo, 1, file, false)

if image == nil
if image.nil?
Builtins.y2error("File %1 not found on media", file)
return false
end

Builtins.y2milestone("Copying the image")
cmd = Builtins.sformat("dd if=%1 of=%2", image, target)
out = Convert.to_map(SCR.Execute(path(".target.bash_output"), cmd))
cmd = Builtins.sformat("ud bs=1048576 if=%1 of=%2", image, target) #1MB of block size
out = SCR.Execute(path(".target.bash_output"), cmd)
Builtins.y2milestone("Executing %1 returned %2", cmd, out)

RemoveTemporaryImage(image)

Ops.get_integer(out, "exit", -1) == 0
out["exit"] == 0
end

# Mount an image of the filesystem type
@@ -1516,6 +1516,7 @@ def FreeInternalVariables
publish :function => :StoreAllChanges, :type => "void ()"
publish :function => :RestoreAllChanges, :type => "boolean ()"
publish :function => :FreeInternalVariables, :type => "void ()"
publish :function => :PrepareOEMImage, :type => "void ()"
end

ImageInstallation = ImageInstallationClass.new

0 comments on commit 71a9f9d

Please sign in to comment.
You can’t perform that action at this time.