@@ -647,14 +647,16 @@ if (defined $donate_spec) {
if grep { m/^!/ } @ARGV;
}
+sub precheck () {
+ logm("pre-checking resources (dry run)...");
+ local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)';
+ execute(1);
+}
+
if ($duration) {
die "--donate and --steal are incompatible with the planning system\n"
- if @steal_specs || defined $donate_spec;
- {
- logm("pre-checking resources (dry run)...");
- local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)';
- execute(1);
- };
+ if @steal_specs || defined $donate_spec;
+ precheck();
plan();
} else {
execute();
Signed-off-by: Ian Jackson <iwj@xenproject.org> --- mg-allocate | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)