fix coding style

This commit is contained in:
Dietmar Maurer 2011-09-15 09:11:27 +02:00
parent e6c3b671bf
commit 6b64503eb2

View File

@ -1274,7 +1274,7 @@ sub create_disks {
$fmt, undef, $size*1024*1024); $fmt, undef, $size*1024*1024);
$disk->{file} = $volid; $disk->{file} = $volid;
delete ($disk->{format}); # no longer needed delete $disk->{format}; # no longer needed
push @$vollist, $volid; push @$vollist, $volid;
$settings->{$ds} = PVE::QemuServer::print_drive($vmid, $disk); $settings->{$ds} = PVE::QemuServer::print_drive($vmid, $disk);
} else { } else {
@ -2788,24 +2788,18 @@ sub pci_dev_bind_to_stub {
return -d $testdir; return -d $testdir;
} }
sub print_pci_addr() { sub print_pci_addr {
my ($id) = @_; my ($id) = @_;
my $res = ''; my $res = '';
my $devices = {}; my $devices = {
virtio0 => { bus => 0, addr => 10 },
$devices->{virtio0}->{bus} = 0; virtio1 => { bus => 0, addr => 11 },
$devices->{virtio0}->{addr} = 10; virtio2 => { bus => 0, addr => 12 },
$devices->{virtio1}->{bus} = 0; virtio3 => { bus => 0, addr => 13 },
$devices->{virtio1}->{addr} = 11; virtio4 => { bus => 0, addr => 14 },
$devices->{virtio2}->{bus} = 0; virtio5 => { bus => 0, addr => 15 },
$devices->{virtio2}->{addr} = 12; };
$devices->{virtio3}->{bus} = 0;
$devices->{virtio3}->{addr} = 13;
$devices->{virtio4}->{bus} = 0;
$devices->{virtio4}->{addr} = 14;
$devices->{virtio5}->{bus} = 0;
$devices->{virtio5}->{addr} = 15;
if (defined($devices->{$id}->{bus}) && defined($devices->{$id}->{addr})) { if (defined($devices->{$id}->{bus}) && defined($devices->{$id}->{addr})) {
my $addr = sprintf("0x%x", $devices->{$id}->{addr}); my $addr = sprintf("0x%x", $devices->{$id}->{addr});