This may be problem when --remote-expect is used, but the expected string
is not produced by all connection methods. Then, --remote-expect will may
cause indefinite blocking. For example, when
--remote-cmd 'sterm ...' --remote-exepect Connected
is overridedn with --serial ..., then the "Connected" may not be
received.
Since this override may behave correctly in certain cases, we only warn
here.
Thanks to Michal Vokáč for reporting this.
if (!defined $amt) { die "Error: --ider requires --amt"; }
}
+{
+ my %input_opts = ('--iprelay' => \$iprelay,
+ '--serial' => \$serial,
+ '--remote-cmd' => \$remote_cmd,
+ '--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;
+}
+
# Default options
if (defined $serial) {
$serial ||= "/dev/ttyUSB0";