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

@ -201,7 +201,7 @@ __PACKAGE__->register_method ({
my $type = $param->{filesystem} // 'ext4';
$dev = PVE::Diskmanage::verify_blockdev_path($dev);
PVE::Diskmanage::check_unused($dev);
PVE::Diskmanage::assert_disk_unused($dev);
PVE::Storage::assert_sid_unused($name) if $param->{add_storage};
my $worker = sub {