mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-25 13:31:37 +00:00
added error messages for file not found.
Signed-off-by: Mariano Alvira <mar@devl.org>
This commit is contained in:
parent
5830ea153e
commit
f4859e129d
@ -18,7 +18,7 @@ GetOptions ('file=s' => \$filename,
|
||||
'terminal=s' => \$term,
|
||||
'verbose' => \$verbose,
|
||||
'baud=s' => \$baud,
|
||||
);
|
||||
) or die 'bad options';
|
||||
|
||||
$| = 1;
|
||||
|
||||
@ -34,11 +34,12 @@ if($filename eq '') {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!(-e $filename)) { die "file $filename not found\n"; }
|
||||
if (($second ne '') && !(-e $second)) { die "secondary file $second not found\n"; }
|
||||
|
||||
my $ob = Device::SerialPort->new ($term) or die "Can't start $term\n";
|
||||
# next test will die at runtime unless $ob
|
||||
|
||||
if ($filename eq '') { die "you must specify a file with -f\n"; }
|
||||
|
||||
$ob->baudrate($baud);
|
||||
$ob->parity('none');
|
||||
$ob->databits(8);
|
||||
|
Loading…
Reference in New Issue
Block a user