refactor disk/storage checks for Disk API

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2018-09-25 10:38:00 +02:00
committed by Thomas Lamprecht
parent 94836d7b8c
commit 76c1e57be7
6 changed files with 27 additions and 21 deletions

View File

@ -602,4 +602,12 @@ sub locked_disk_action {
return $res;
}
sub check_unused {
my ($dev) = @_;
die "device $dev is already in use\n" if disk_is_used($dev);
return undef;
}
1;