cfg2cmd: use actual backend names instead of removed tty and paraport aliases

As described in:
https://qemu-project.gitlab.io/qemu/about/removed-features.html#chardev-backend-aliases-tty-and-parport-removed-in-8-0

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-04-03 14:09:42 +02:00 committed by Thomas Lamprecht
parent 9d8d0be31b
commit e35eb8766b

View File

@ -3796,7 +3796,7 @@ sub config_to_command {
}
} else {
die "no such serial device\n" if ! -c $path;
push @$devices, '-chardev', "tty,id=serial$i,path=$path";
push @$devices, '-chardev', "serial,id=serial$i,path=$path";
push @$devices, '-device', "isa-serial,chardev=serial$i";
}
}
@ -3805,7 +3805,7 @@ 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;
my $devtype = $path =~ m!^/dev/usb/lp! ? 'tty' : 'parport';
my $devtype = $path =~ m!^/dev/usb/lp! ? 'serial' : 'parallel';
push @$devices, '-chardev', "$devtype,id=parallel$i,path=$path";
push @$devices, '-device', "isa-parallel,chardev=parallel$i";
}