If a whole disk is already used in a RAID, don't offer to add partitions https://github.com/webmin/webmin/issues/269

This commit is contained in:
Jamie Cameron
2015-11-27 21:44:47 -08:00
parent 97436e9cea
commit ed46708b99

View File

@@ -647,8 +647,8 @@ local @disks;
local $d;
foreach $d (&fdisk::list_disks_partitions()) {
foreach $p (@{$d->{'parts'}}) {
next if ($used{$p->{'device'}} || $p->{'extended'} ||
$skip{$p->{'device'}});
next if ($used{$p->{'device'}} || $used{$d->{'device'}} ||
$p->{'extended'} || $skip{$p->{'device'}});
local @st = &device_status($p->{'device'});
next if (@st);
$tag = $p->{'type'} ? &fdisk::tag_name($p->{'type'}) : undef;