use tty chardev for usb-to-parallel

This commit is contained in:
Dietmar Maurer 2013-08-14 14:22:24 +02:00
parent ecf4916891
commit 4c5dbaf6ab

View File

@ -2353,7 +2353,8 @@ sub config_to_command {
for (my $i = 0; $i < $MAX_PARALLEL_PORTS; $i++) {
if (my $path = $conf->{"parallel$i"}) {
die "no such parallel device\n" if ! -c $path;
push @$devices, '-chardev', "parport,id=parallel$i,path=$path";
my $devtype = $path =~ m!^/dev/usb/lp! ? 'tty' : 'parallel';
push @$devices, '-chardev', "$devtype,id=parallel$i,path=$path";
push @$devices, '-device', "isa-parallel,chardev=parallel$i";
}
}