mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-12-08 06:07:23 +00:00
whitespace/indentation fixes & cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
9a66c311ac
commit
a8d0fec3c2
@ -4026,17 +4026,13 @@ sub vm_deviceunplug {
|
||||
die "can't unplug bootdisk '$deviceid'\n" if grep {$_ eq $deviceid} @$bootdisks;
|
||||
|
||||
if ($deviceid eq 'tablet' || $deviceid eq 'keyboard') {
|
||||
|
||||
qemu_devicedel($vmid, $deviceid);
|
||||
|
||||
} elsif ($deviceid =~ m/^usb\d+$/) {
|
||||
|
||||
die "usb hotplug currently not reliable\n";
|
||||
# when unplugging usb devices this way, there may be remaining usb
|
||||
# controllers/hubs so we disable it for now
|
||||
#qemu_devicedel($vmid, $deviceid);
|
||||
#qemu_devicedelverify($vmid, $deviceid);
|
||||
|
||||
} elsif ($deviceid =~ m/^(virtio)(\d+)$/) {
|
||||
my $device = parse_drive($deviceid, $conf->{$deviceid});
|
||||
|
||||
@ -4044,12 +4040,9 @@ sub vm_deviceunplug {
|
||||
qemu_devicedelverify($vmid, $deviceid);
|
||||
qemu_drivedel($vmid, $deviceid);
|
||||
qemu_iothread_del($vmid, $deviceid, $device);
|
||||
|
||||
} elsif ($deviceid =~ m/^(virtioscsi|scsihw)(\d+)$/) {
|
||||
|
||||
qemu_devicedel($vmid, $deviceid);
|
||||
qemu_devicedelverify($vmid, $deviceid);
|
||||
|
||||
} elsif ($deviceid =~ m/^(scsi)(\d+)$/) {
|
||||
my $device = parse_drive($deviceid, $conf->{$deviceid});
|
||||
|
||||
@ -4059,13 +4052,10 @@ sub vm_deviceunplug {
|
||||
|
||||
qemu_iothread_del($vmid, "virtioscsi$device->{index}", $device)
|
||||
if $conf->{scsihw} && ($conf->{scsihw} eq 'virtio-scsi-single');
|
||||
|
||||
} elsif ($deviceid =~ m/^(net)(\d+)$/) {
|
||||
|
||||
qemu_devicedel($vmid, $deviceid);
|
||||
qemu_devicedelverify($vmid, $deviceid);
|
||||
qemu_netdevdel($vmid, $deviceid);
|
||||
|
||||
} else {
|
||||
die "can't unplug device '$deviceid'\n";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user