mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
VirtIO disks aren't IDE
This commit is contained in:
@@ -12,10 +12,9 @@ $d || &error($text{'disk_egone'});
|
||||
@parts = @{$d->{'parts'}};
|
||||
&ui_print_header($d->{'desc'}, $text{'disk_title'}, "", undef,
|
||||
@disks == 1 ? 1 : 0, @disks == 1 ? 1 : 0);
|
||||
$caneditpart =
|
||||
$d->{'table'} ne 'gpt' ||
|
||||
($d->{'table'} eq 'gpt' &&
|
||||
&has_command('parted') && $config{'mode'} ne 'fdisk');
|
||||
$caneditpart = $d->{'table'} ne 'gpt' ||
|
||||
($d->{'table'} eq 'gpt' &&
|
||||
&has_command('parted') && $config{'mode'} ne 'fdisk');
|
||||
|
||||
# Work out links to add partitions
|
||||
foreach $p (@parts) {
|
||||
|
||||
@@ -324,7 +324,7 @@ while(<FDISK>) {
|
||||
# KVM virtual disk
|
||||
$disk->{'desc'} = &text('select_device',
|
||||
'VirtIO', uc($1));
|
||||
$disk->{'type'} = 'ide';
|
||||
$disk->{'type'} = 'virtio';
|
||||
}
|
||||
elsif ($disk->{'device'} =~ /\/(scsi\/host(\d+)\/bus(\d+)\/target(\d+)\/lun(\d+)\/disc)/) {
|
||||
# New complete SCSI disk specification
|
||||
@@ -1764,7 +1764,8 @@ return $disk->{'table'} eq 'gpt';
|
||||
sub supports_hdparm
|
||||
{
|
||||
local ($d) = @_;
|
||||
return $d->{'type'} eq 'ide' || $d->{'type'} eq 'scsi' && $d->{'model'} =~ /ATA/;
|
||||
return $d->{'type'} eq 'ide' ||
|
||||
$d->{'type'} eq 'scsi' && $d->{'model'} =~ /ATA/;
|
||||
}
|
||||
|
||||
# supports_relabel(&disk)
|
||||
|
||||
Reference in New Issue
Block a user