VirtIO disks aren't IDE

This commit is contained in:
Jamie Cameron
2024-09-28 10:08:43 -07:00
parent 6cbbeebb56
commit ce27473110
2 changed files with 6 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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)