]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Change target connection warning to error
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 25 Nov 2014 11:01:25 +0000 (12:01 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 25 Nov 2014 11:01:25 +0000 (12:01 +0100)
In the previous commit I argued that it is a valid use case to override
target connection option from command line. I realized that this is not
true, because the implementation does not know which option was given
last and the effective option is determined by the implementation and
not by the position on the command line. Therefore, it is almost always
an error to specify target connection option multiple times.

novaboot

index c2e391ea61c8a5be0cc7c59566df8e7c563a192c..0dd1bebad12fc2d9b1101a3a6ca74b071211a9cf 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -263,7 +263,7 @@ if ($ider) {
                      '--amt'        => \$amt);
     my @opts = grep(defined(${$input_opts{$_}}) , keys %input_opts);
 
-    print STDERR "novaboot: Warning: More than one target connection option: ".join(', ', @opts) if scalar @opts > 1;
+    die("novaboot: More than one target connection option: ".join(', ', @opts)) if scalar @opts > 1;
 }
 
 # Default options