my @cmdline = split(' ', $line);
my $word = shift @cmdline;
+ return 0 unless ($word);
+
my $cmd;
if ( $file ) {
$cmd = $word;
return (-1);
}
- if ($cmd eq "help" || $cmd eq "exit" || $cmd eq "quit") {
- return (&{$commands{$cmd}->{func}}(@cmdline));
- }
-
# Call the function.
return (&{$commands{$cmd}->{func}}(@cmdline));
}
print "Cannot open $device. Did you insert the obdclass module ?\n";
return -1;
}
- print "Openend device $device\n";
+ print "Opened device $device\n";
$opendevfds{$device} = *NEW_OBD;
$::dev_obd = *NEW_OBD;
}