]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Print meaningful error message when serial connection is not established
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 16 Oct 2014 13:51:32 +0000 (15:51 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 16 Oct 2014 13:51:32 +0000 (15:51 +0200)
novaboot

index 8f47b3810b3b3ba10d644d6226582c814d3f63c3..2589374fb4b654376c7197affee78284ec560f08 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -731,6 +731,7 @@ END
 
 
 if ($remote_expect) {
+    $exp || die("No serial line connection");
     $exp->expect(10, $remote_expect) || die "Expect for '$remote_expect' timed out";
 }
 
@@ -999,6 +1000,7 @@ if (defined $target_reset && $reset) {
 if (defined $uboot) {
     my $uboot_prompt = $uboot || '=> ';
     print "novaboot: Waiting for U-Boot prompt...\n";
+    $exp || die("No serial line connection");
     $exp->log_stdout(1);
     #$exp->exp_internal(1);
     $exp->expect(20,