5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-25 23:21:43 +03:00

remove more unused subs

This commit is contained in:
Dietmar Maurer 2012-08-01 07:29:23 +02:00
parent 3ea99fc4a1
commit b1a470ade6

View File

@ -1462,48 +1462,6 @@ sub destroy_vm {
warn $@ if $@;
}
# fixme: remove?
sub load_diskinfo_old {
my ($storecfg, $vmid, $conf) = @_;
my $info = {};
my $res = {};
my $vollist;
foreach_drive($conf, sub {
my ($ds, $di) = @_;
$res->{$ds} = $di;
return if drive_is_cdrom($di);
if ($di->{file} =~ m|^/dev/.+|) {
$info->{$di->{file}}->{size} = PVE::Storage::file_size_info($di->{file});
} else {
push @$vollist, $di->{file};
}
});
eval {
my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid, $vollist);
PVE::Storage::foreach_volid($dl, sub {
my ($volid, $sid, $volname, $d) = @_;
$info->{$volid} = $d;
});
};
warn $@ if $@;
foreach my $ds (keys %$res) {
my $di = $res->{$ds};
$res->{$ds}->{disksize} = $info->{$di->{file}} ?
$info->{$di->{file}}->{size} / (1024*1024) : 0;
}
return $res;
}
sub load_config {
my ($vmid) = @_;