diskmanage: rename check_unused to assert_disk_unused

to have a clear method name for this. check_XYZ suggests also that we
return true if the check was OK, but we don't.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2018-10-03 14:51:35 +02:00
parent 9280153e10
commit 0370861cfd
5 changed files with 6 additions and 6 deletions

View File

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