Commit f849ce0a authored by Leigh Stoller's avatar Leigh Stoller

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
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -932,7 +932,8 @@ if (!isset($submit)) {
}
$defaults["loadpart"] = $baseimage->loadpart();
if ($baseimage->loadpart() == 0 && $baseimage->loadlength() == 4) {
$defaults["loadpart"] = "1";
$loadpart = ($baseimage->part1_osid() ? 1 : 2);
$defaults["loadpart"] = $loadpart;
$defaults["wholedisk"] = "Yep";
}
$defaults["mbr_version"] = $baseimage->mbr_version();
......
Markdown is supported
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