Commit f849ce0a authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Bug Fix: Set the loadpart properly when cloning a whole disk image, so

that the backend script can performs its checks properly.
parent 11afc3fc
<?php <?php
# #
# Copyright (c) 2000-2013 University of Utah and the Flux Group. # Copyright (c) 2000-2014 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -932,7 +932,8 @@ if (!isset($submit)) { ...@@ -932,7 +932,8 @@ if (!isset($submit)) {
} }
$defaults["loadpart"] = $baseimage->loadpart(); $defaults["loadpart"] = $baseimage->loadpart();
if ($baseimage->loadpart() == 0 && $baseimage->loadlength() == 4) { if ($baseimage->loadpart() == 0 && $baseimage->loadlength() == 4) {
$defaults["loadpart"] = "1"; $loadpart = ($baseimage->part1_osid() ? 1 : 2);
$defaults["loadpart"] = $loadpart;
$defaults["wholedisk"] = "Yep"; $defaults["wholedisk"] = "Yep";
} }
$defaults["mbr_version"] = $baseimage->mbr_version(); $defaults["mbr_version"] = $baseimage->mbr_version();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment