mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-21 23:14:52 +00:00
use tty chardev for usb-to-parallel
This commit is contained in:
parent
ecf4916891
commit
4c5dbaf6ab
@ -2353,7 +2353,8 @@ sub config_to_command {
|
|||||||
for (my $i = 0; $i < $MAX_PARALLEL_PORTS; $i++) {
|
for (my $i = 0; $i < $MAX_PARALLEL_PORTS; $i++) {
|
||||||
if (my $path = $conf->{"parallel$i"}) {
|
if (my $path = $conf->{"parallel$i"}) {
|
||||||
die "no such parallel device\n" if ! -c $path;
|
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";
|
push @$devices, '-device', "isa-parallel,chardev=parallel$i";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user